Calling wxControlBase::SetLabel() only from GTKSetLabelForLabel() made its
behaviour inconsistent with GTKSetLabelWithMarkupForLabel() and also was
redundant in all but two places from which it was called, so remove this call
from this function itself and instead add it to its callers where it's really
needed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Only the ampersands need to be escaped when setting the text of a native hyper
link control in MSW and this is done by wxControl::EscapeMnemonics(), not by
wxStaticText::RemoveMarkup() which also removes any tags which is not wanted
at all here.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These methods allow to set the font size using CSS-like absolute size
specifications.
Notice that the factors used here are incompatible with (but better than) the
ones used in wxBuildFontSizes() in src/html/winpars.cpp. In the future it
would be nice to reuse the new wxFont functions in wxHTML code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just remove markup parsing code from wxStaticText
implementation and reuse wxMarkupParser methods there instead.
This makes include/wx/private/stattext.h file unnecessary as it is used only
in a single place now so remove it and move its remaining contents to
src/gtk/mnemonics.cpp.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This code is not used anywhere yet, this commit only adds the parser for the
markup and the related classes as well as the corresponding unit test.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is still simpler than std::stack<> which can be used with any container
and not just wxVector<> but better than the WX_DECLARE_STACK() macro which was
all that we had before.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67047 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This test consistently fails on the MSW build slave machines (see e.g.
http://buildbot.tt-solutions.com/wx/builders/XPSP2 VC9 wxMSW trunk release/builds/2084/steps/test/logs/stdio)
for unknown reason so disable it for them. Notice that it does pass when ran
locally so it looks like another instance of a problem with wxUIActionSimulator
on these machines rather than the problem with the class itself.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67046 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxBU_EXACTFIT should affect the width of the button best size but not its
height which should be at least the same as the height of a standard button
even when wxBU_EXACTFIT is specified, otherwise buttons created with it (like
the one in generic wxCollapsiblePane implementation) look completely ugly.
This commit restores the old behaviour which was recently changed by wxButton
sizing code simplifications.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67045 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use the real bitmap size instead of the default tool size when creating the
disabled image list as the actual bitmap size could be less than the default
one and in this case adding images to the image list later would fail (as
could be seen by using custom bitmaps in the toolbar sample).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The richtext library must come before the adv one as it depends on the classes
in the latter and with the old libraries order linking failed in static build.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We don't need to catch Enter presses to generate spin control events as we do
it anyhow when we lose focus. So simply remove the Enter handling code
entirely (it could be used to generate wxEVT_COMMAND_TEXT_ENTER events but we
don't generate them nor wxEVT_COMMAND_TEXT_UPDATED at all currently in the
generic version).
Closes#12980.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There is no reason to use this flag for the spin control and doing it makes it
gratuitously different from the native one under wxMSW.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Preprocessor operations don't work with empty values so check for the case of
empty suffix specially.
This avoid warnings about "not enough actual parameters for macro
'wxSTRINGIZE_HELPER'" from MSVC.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The example was corrupted by transition to Doxygen (the menu item labels got
eaten), fix it to actually work.
Also use this opportunity to improve and modernize it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67006 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This function is required by wxGraphicsContext Cairo-based implementation but
is missing in old Cairo versions so check for it in configure and disable
wxGraphicsContext is it's not available.
Closes#12966.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66995 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
There is no need to declare wxFooNameStr constants in wx/osx/foo.h files as
they are already declared in wx/foo.h.
Also remove a couple of header/forward declarations unnecessary for the same
reason.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66993 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
Use regular space between these two buttons even on Windows, where they
were previously close together. This used to be done in older Windows
versions, but modern Windows HIG documents show wizards with equal
spacing between all buttons and that's what Windows OS itself does. In
other words, not treating this pair of buttons specially is more native.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The semicolons after the method signature in its implementation are useless
and, in fact, provoke warnings from the compiler used by Xcode 4. Simply
remove them.
See #12927.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This macro can be used to make the same code compile with both v2 and v3 as it
expands to wxT() in 2.8 and nothing in later versions.
See #12925.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This flag allows to suppress the error message in case there are no currently
running instances of this object and can be useful if the caller doesn't know
in advance whether it's available or not.
Closes#12734.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Intel compiler gives warnings if the static keyword is not at the beginning of
the declaration and this happened when using it inside wxDEPRECATED() and
related macros because the declaration started with __declspec(deprecated) or
__attribute__((deprecated)) instead.
To avoid this problem, simply move "static" outside the macro.
Closes#12932.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Casting a signed value to unsigned type is a recipe for disaster if it
actually turns out to be negative because the comparison remains always false
and the loop becomes practically infinite. So cast the unsigned value to
signed int instead, this should be perfectly safe as the number of columns or
rows in a sizer can't exceed INT_MAX anyhow.
Notice that after the changes of the previous revision the signed value
should actually be always positive so this change is not strictly needed but
it is still safer to write the comparison like this.
See #12934.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775