Both GTK+ and OS X native controls use single click to toggle
checkboxes, instead of double-click activation used by the generic
version. So does wxCheckListBox on Windows, so make wxDVC
behave the same way.
See #11185.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Instead, have WXOnActivate() and WXOnLeftClick() with same signatures as
their public API counterparts and just call Activate/LeftClick() from
them for wxDataViewCustomRenderer.
This accomplishes the same thing, but makes it easier to override
behaviour in wx's internal implementations of renderers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Instead of just setting the value in the generic implementation, do full
preparation (incl. attributes etc.) as everywhere else.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
VC6 seems to have a strange bug with escaped quotes used in strings passed to
macros and failed to compile the original code with nonsensical error messages.
Use single quotes to try to work around this issue. They are also somewhat
more readable as they don't need to be escaped inside C strings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This class isn't really supposed to be used polymorphically but add a virtual
dtor just to suppress g++ warning about it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
In case of a certain amount of whitespace at the bottom of a vertical toolbar it would not be drawn correctly: the more whitespace the more painting would be clipped starting from the left (covering the whole height of the toolbar) until the toolbar would look completely empty.
This was reproducible using the toolbar sample, setting the toolbar on the left or right edge of the window and then increasing the height of the window sufficiently.
Regression since r62971.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
VC6 has very poor support for template functions and in particular doesn't
understand explicitly choosing the type of the function to call so replace
template DoApplyToFont() function with FontModifier template class in
wxMarkupParserAttrOutput implementation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Mention that wxButton and wxStaticText now support markup in all major ports
(using the generic version of the latter under MSW).
Also mention markup changes in the change log.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67070 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxMarkupToAttrString helper that converts wx markup to OS X attribute
strings and use it in wxStaticText and wxButton.
This required adding new SetLabelMarkup() method to wxWidgetCocoaImpl, it
seems to make sense to have it there as it could be implemented by more
controls in the future.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxMarkupText allows to easily support markup in the controls that we draw
ourselves so use it in wxGenericStaticText to have a possibility to use
markup on all platforms, even those where there is no native markup support in
wxStaticText itself.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67067 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use recently added wxMarkupText to implement support for markup in wxMSW
wxButton.
Update the button page of the widgets sample to show markup support.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxMarkupText is a private class that implements generic handling of markup
strings, i.e. can measure them and render them onto a wxDC.
This class will be used for markup support in wxMSW wxButton.
Also add wxMarkupParserAttrOutput which will be useful for other wxMarkupText
implementations.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add a new wxDC method allowing to retrieve the font characteristics not
available from GetTextExtent(), notably the internal leading (and also the
average font width).
Currently this is implemented for wxMSW only, the internal leading is always 0
in the other ports.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Make it possible to disable all the new markup-related code by setting
wxUSE_MARKUP to 0 in setup.h or using configure --disable-markup option.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67062 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Adjust the height of the underline to be compatible with native MSW behaviour.
Notice that in wxGTK we should use pango_font_metrics_get_underline_position()
to get the font-dependent value that should be used here.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The change of r66893 was wrong, we do need to adjust the button height here
because the increase to standard height is not enough if we use bigger fonts
that require making taller buttons.
The real problem was the use of EDIT_HEIGHT_FROM_CHAR_HEIGHT() which added too
much to the height, so replace it with something based on the actual font
height. This is still arbitrary but slightly better.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Ensure that the member is always initialized as calling GetAuthNeeded() for a
default-constructed button would access a non-initialized variable before.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add a helper function called from ctors and initialize m_imageData in it
instead of doing it in each ctor -- this will be more important when we add
more wxButton members.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Put this method in the existing private section at the end of the class
instead of having an extra access specifier just for it for some reason.
Also add a comment explaining what it does and when is it used.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67056 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is an incompatible change which removes the wxStaticText-specific
wxST_MARKUP style and adds wxControl::SetLabelMarkup() replacing it.
It doesn't actually change anything yet but it simplifies wxStaticText code a
lot by getting rid of many markup-related functions in it which had to behave
differently depending on whether wxST_MARKUP was used or not and also paves
way for adding markup support for the other controls in the future.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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