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
Override CanScroll() in wxScrolled to return the real state of the scrollbar
instead of just relying on the wx[HV]SCROLL styles.
Closes#15440.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74714 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 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
Don't include wxBORDER_NONE in neither wxToolBar ctor and Create() nor
wxFrame::CreateToolBar() flags parameter, override GetDefaultBorder() in
wxToolBar itself instead to use the border style appropriate for the current
platform by default. This has the same effect -- the default border style is
used unless another one is explicitly specified -- but is more clear and
consistent.
Also add wxTB_DEFAULT_STYLE for consistency with the other classes.
Closes#15037.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't change the background colour when the control is being enabled or
disabled, it doesn't seem necessary and it's unclear why was this added by
r10179 in the first place. It does result in problems however as it could
somehow make the selection of wxTextCtrl invisible when it lost focus and so
fixes a serious usability problem which happened to all wxTextCtrls for which
a wxEVT_UPDATE_UI handler using wxUpdateUIEvent::Enable() was defined.
Closes#14898.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73756 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
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
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
Replace it with wxWindowWithItems<> template class which takes care of
disambiguating between the two inherited Get/SetClientXXX() versions and use
it as a base class in all clases that previously used the macro.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68460 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
The storage class must come first in a declaration so put it in front of
WXDLLIMPEXP_DATA_CORE() and not inside it to avoid warnings from some
compilers (notably Intel one).
Closes#12932.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't duplicate wxCheckBoxNameStr declarations in all ports.
Of course, the question still remains why does wxToggleButton use
wxCheckBoxNameStr and not a specific name in the first place.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This eliminates a linking dependency that would drag in the printing
code for any program that used wxColourDialog or wxFontDialog (which
is currently all of them, due to more link dependencies...)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxMenu::GetTitle() returned a string in GTK+ format (i.e. using underscores
instead of ampersands) instead of the expected wx one.
This is, of course, the right thing to do and it also fixes
wxMenuBar::FindMenuItem() as a side effect.
Closes#12672.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66175 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
Implement compatibility aliases for non-prefixed macro names.
Require a final semicolon where possible.
Correct a recurring error in the docs: IMPLEMENT/DECLARE_CLASS are alias to the DYNAMIC macros, not to the ABSTRACT macros.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These two styles were always equivalent so we can just as well replace them
with a single one and stop wasting an extra bit.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We don't use crptknm$port.cpp naming convention even for MSW any more and
there is really no reason to continue to do it for just this one file in
wxGTK.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Most of them were dummy and didn't do anything and this API was never meant to
be used anyhow.
Keep just the declarations in wxFontBase but mark them as deprecated.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62349 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