Don't repeat the same code in all the ports, move it to the common base class
and add a new virtual DoYieldFor() for the really port-specific code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76061 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Deprecate the use of the old untyped constants but don't schedule them from
removal in a future wx version by removing "#if WXWIN_COMPATIBILITY_3_0" tests
around their definition and use. Provoking deprecation warnings in the code
using these constants is worth it as they are unclear and it's easy to make
mistakes when using them, but breaking this code compilation outright can't be
justified -- even in the future.
Also use more informational wxDEPRECATED_MSG() instead of a simple
wxDEPRECATED() as it might not be obvious at all how should the code be
updated exactly.
Finally, avoid the use of deprecated constants inside the library itself.
As a side effect, this closes#15814.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.
If nothing else, this will make an eventual transition to Git simpler.
Closes#14487.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method allows to request exiting from the given event loop even if it's
not the currently active one, unlike Exit() which would assert in this case.
With it, it becomes possible to ask the loop to terminate as soon as possible
even if a nested loop is currently running.
See #10258.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Call it from public Run() after setting the loop as active and resetting
m_shouldExit flag.
No real changes, just cut down on the code duplication among the ports and
make it easier to implement the upcoming changes. see #10258.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This helper class allows to create wxFonts using shorter and more readable
code, e.g.
wxFont font(12, wxFONTFLAG_DEFAULT,
wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, true,
"DejaVu Sans");
can now be written simply as
wxFont font(wxFontInfo(12).FaceName("DejaVu Sans").Underlined());
Remove the ctor from font flags added in r70445 as it's not needed any longer
now that we have this one and adding it resulted in compilation errors in the
existing code which compiled with 2.8 because of ambiguities between that ctor
and wxFont(int size, int family, int style, int weight. bool underlined, ...)
one, e.g.
wxFont(12, wxFONTFAMILY_SWISS, wxNORMAL, wxNORMAL)
didn't compile any more but it does compile again now.
See #9907.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73885 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This reverts r72978, 72984, 72989 and 72992. Do not use wxNOEXCEPT for
wxTextCtrl dtor as this breaks compilation of any user-defined classes
inheriting from it unless they use wxNOEXCEPT as well and the benefits
(fixing a harmless warning for the niche ICC compiler) are just not worth
the compatibility breakage.
See #14826.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix compilation with some compilers after r72978 which added wxNOEXCEPT to
wxTextCtrlBase dtor and wxTextCtrl dtor in wxMSW but not in all the other
ports.
See #14826.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This simple function can be used to create a wxBitmap from the raw image data
in PNG format. It is just a thin wrapper around wxImage load functions under
almost all platforms but has two advantages:
1. It can be implemented natively for some platforms (currently only OS X).
2. It can be used in a single expression as it doesn't require creating a
temporary wxMemoryInputStream and this will be required by wxBITMAP_PNG()
macro that will be added soon.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Currently this ctor just does the same thing as the existing ctors in a
different way but it will be extended to support wxFONTFLAG_STRIKETHROUGH in
the next commits.
See #9907.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Even though most compilers just ignore this, it's just wrong and if you
do get warnings about header files, they can become quite overwhelming.
Forward port of r70163.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This constructor previously used int and, especially annoyingly, wxByte* for
the data. Use standard void* for untyped binary data instead.
Also document this ctor as it seems to be implemented in all ports.
Closes#13451.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Existing declarations used -1 in several places to indicate the absence of the
image which wasn't especially clear and was also inconsistent with other
places that used wxNOT_FOUND which didn't make much sense in this context.
Add a new symbolic constant NO_IMAGE in wxWithImages and use it in the classes
deriving from it. This still doesn't help with wx{Tree,List}Ctrl but improves
clarity for the other classes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68810 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Replaced C++ comments (occurring outside of __cplusplus blocks) in files that contain the warning "THIS IS A C FILE" with C comments.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Applied patch by snowleopard2 fixing a bunch of typos such as misspellings and double words in the documentation. Combined the patch with some local queued typos waiting to be committed as well as adding new typo fixes inspired by the patch.
Function names with American spelling were not changed nor was third-party code touched. The only code changes involve some changes in strings that are translated ("Can not" -> "Cannot").
Closes#13063 (again).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fixed commented names (path, filename, and extension) of files in include/ and src/. Prepended the names in src/ with "src/" everywhere, while starting those in include/wx/ with "wx/".
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This parameter was never needed nor properly documented. Simply remove it from
SetTickFreq() and keep the overload still taking it for backwards
compatibility only.
Closes#12907.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Although returning wxFONTFAMILY_UNKNOWN when the font family is not recognized
makes more sense, it breaks a lot of existing code including all the
font-related code generated by DialogBlocks, so prefer to return
wxFONTFAMILY_DEFAULT instead -- which can't be confused for a valid font
family neither but can be passed to wxFont ctor or SetFamily() without
problems.
To ensure that this behaviour is correctly implemented by all ports, rename
the existing wxFont::GetFamily() to DoGetFamily() and call the new method from
wxFontBase::GetFamily() which adjusts the return value if needed.
Closes#12330.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use "wxWindows licence" and not "wxWidgets licence" (the latter doesn't
exist) and consistently spell "licence" using British spelling.
See #12165.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is huge but there are no non-white-space changes in it.
Some files containing third-party sources (src/msw/wince/time.cpp,
src/x11/pango*.cpp) were left unchanged.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
- implements YieldFor() with event filtering for wxMSW and wxGTK,
adds TODO markers in other ports;
- replaces wxYield() in GTK's clipboard code with a wxTheApp->YieldFor() call, thus fixing possible reentrancies
(and modifies clipboard sample to test synchronous IsSupported calls)
- replaces wxYieldIfNeeded() calls in wxProgressDialog with wxTheApp->YieldFor() calls, so that it processes only
UI/user-input events, thus fixing the race condition visible in the "thread" sample
- documents the new functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
classes for wxMDI{Parent,Child}Frame and wxMDIClientWindow.
Also use generic MDI implementation for wxMotif as it seems to be more
functional and definitely is more maintained (we probably should use the
generic version for wxGTK too).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775