Rename the existing but not implemented and never used OnItemAdd() method to
OnItemsInserted() and add OnItemsDeleted(), which is more efficient than
OnItemDelete() when many items are being removed from the control at once.
This is not used yet, but will be used in wxDataViewCtrl soon and maybe in the
other controls later.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is necessary for retrieving all the selected items at once: while doing
this is not recommended for a control with a potentially very large number of
items, it must be possible to allow using wxSelectionStore for wxDataViewCtrl
implementation as wxDataViewCtrl must implement its GetSelections() method.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This was unexpected and resulted in a crash in the case of wxDatePickerCtrl.
And while this particular crash could be fixed just by checking for the
pointers validity in the overridden wxDatePickerCtrl::SetSize(), it seems
better to avoid such unexpected calls to SetSize(), especially as they only
happen under wxGTK, which calls SetLayoutDirection(wxLayout_Default) from its
wxWindow::Create(), and so wouldn't be found by any amount of testing under
other platforms.
Closes#16589.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Extract and pull the common functions from wxButton and wxToggleButton to
wxAnyButton in wxUniv too.
Also make wxToggleButton inherit from wxToggleButtonBase correctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
SetSize() doesn't have any dependent parameters so call it via an explicit
"this->" to make it work with standard conforming compilers (and not MSVC).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The children layout will almost always depend on the layout direction, so redo
it when the latter changes.
In particular, this fixes changing the layout of wxSpinCtrlDouble under MSW.
See #11583.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77756 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Position the spin control components (the button and the text) correctly for
the current layout.
Also update the layout of the text explicitly.
See #11583.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77755 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The EDIT control used by the native combobox is different from normal EDIT
controls and has to be handled specially.
We also need to explicitly forward WS_EX_LAYOUTRTL to the dropdown window as
it doesn't inherit it from the combobox itself automatically.
See #11583.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This class requires wxTaskBarButton to be really implemented, so there is no
need to even define the MSW-specific version of it if wxUSE_TASKBARBUTTON is 0
anyhow.
This fixes a compilation problem with wxUSE_TASKBARBUTTON==0 but, more
importantly, just makes more sense.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is more informative than showing just the title and we can do it for the
message boxes and it's worth handling them specially just because they are so
common.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Extract creation of the message describing an unexpected dialog in a separate
virtual method in order to allow customizing it, notably in order to add more
useful description of custom application dialogs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It's not very helpful to just say that an unexpected dialog was shown, using
its title provides at least some hint as to what dialog it was.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It was unexpected that wxMessageDialog::GetTitle() returned empty string even
when non-empty caption, which is just another word for title, was specified.
Implement GetTitle() as synonym for GetCaption() and also provide SetTitle()
for consistency.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Define it and wxUSE_GRAPHICS_DIRECT2D, when it's supposed to be enabled, as
wxUSE_GRAPHICS_CONTEXT instead. This ensures they are set to 0 if the use of
wxGraphicsContext is entirely disabled, as is the case when using MinGW under
MSW by default for example.
Closes#16558.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
First of all, do define it under non-MSW platforms.
Second, don't crash in it when running under XP where wxTaskBarButton is not
available.
Also add IsAvailable() method to check for its availability explicitly and add
a demonstration of this class to the dialogs sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to encapsulate checking for errors, which should be handled when
using this class as task bar buttons API is not available under Windows XP.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Due to a bug in MSVC handling of __VA_ARGS__ (see
https://connect.microsoft.com/VisualStudio/feedback/details/380090/variadic-macro-replacement)
wxCALL_FOR_EACH() didn't work correctly as long as more than two arguments
were used with it.
Work around the bug by protecting __VA_ARGS__ from being incorrectly passed as
a single token to the macro being called on every step: this was already done
for wxCALL_FOR_EACH itself with wxCALL_FOR_EACH_, but we need to do it for all
the helper macros too.
Also add a test checking that this does, actually, work.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Define it in wx/msw/setup_inc.h and not in wx/msw/setup0.h itself to ensure
that it survives the regeneration of this file using build/update-setup-h.
Also only set wxUSE_GRAPHICS_DIRECT2D to 1 for VC10+ and not VC9 as the latter
lacks Direct2D header in its default SDK version.
Finally also update comments to explain the various settings more clearly and
remove outdated information (wxGraphicsContext is not experimental any more).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The use of variadic macros results in a warning/error if -pedantic[-errors]
is used when compiling C++98 code as they are only formally part of C99 (or
C++11). With g++ 4 and later, this can be avoided by using -Wno-variadic-macros
option, but it doesn't exist in g++ 3, so a nasty workaround in the header
itself is required: mark it as system header in order to fix compilation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775