A cached attribute may continue to be used even though the attribute returned
by a custom wxGridCellAttrProvider has changed so add a method to force wxGrid
to update the attribute by forgetting the cached copy.
Closes#12406.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Custom labels set for wxGenericMessageDialog buttons were simply ignored as it
used CreateSeparatedButtonSizer() to create the actual buttons which in turn
always used the standard labels.
Fix this by explicitly creating the buttons with custom labels if necessary.
This also fixes custom label support in wxGenericRichMessageDialog deriving
from this class.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Extract the code adding a separating wxStaticLine to the sizer in its own
function to be able to reuse it in upcoming commits.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
r64500 introduced tracking of previous selection in wxMSW's wxListBox so
that an event isn't sent when the user clicks already selected item
again. Unfortunately, it forgot to account for programatic changes of
selection (e.g. when all items are removed, so is the selection) and
didn't update selection book-keeping information in that case. The
result was that the event wasn't sent when it should be in some cases.
Fixed by using UpdateOldSelections() even in single-selection case in
wxMSW.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Correct a lot of problems with the initial implementation, notably make the
API consistent across all platforms, e.g. all keyboard-related methods now
take just a wxKeyCode.
Add some useful higher-level helpers such as Text() and MouseDragDrop().
Improve documentation.
wxUIActionSimulator now works under MSW, GTK and OS X and is enabled by
default.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just extract a private Dpy class used by wxGTK to a header
and rename it to wxX11Display.
This will allow reusing it from X11 wxUIActionSimulator implementation in the
upcoming commits.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This header uses wxPoint so it must include wx/gdicmn.h (instead of relying on
it having been already included).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65379 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use larger bold font for the main message in wxGenericMessageDialog if the
extended message is also given to make it stand out similarly to how it
happens in the native GTK and MSW dialogs.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Move IsCheckBoxChecked() to the .cpp file where wxCheckBox is fully defined
and not just forward declared (at least when not using PCH).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If available, the task dialog is now used for the wxProgressDialog under
Windows. This provides a much more native looking dialog which doesn't look
out of place under modern Windows versions, unlike the generic implementation.
The internals of the code had to be significantly changed as the task dialog
can only be shown modally so, to emulate wxProgressDialog modeless nature, a
separate thread is used for the progress dialog management.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65352 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is a generalization of wxMessageDialog based on the native task dialog
under recent (Vista and later) Windows versions and implemented generically
for the other ports for now.
It provides the possibility to use additional controls in the message boxes
(checkbox useful for the "Don't ask me again" kind of dialogs and collapsible
detailed explanations field) and better look and feel under Windows.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65349 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use the task dialog instead of the legacy message box for wxMessageDialog
implementation under wxMSW on recent (Vista and later) Windows versions.
As part of this change, remove wxMessageDialogWithCustomLabels and integrate
its functionality in wxMessageDialogBase itself as it's now used by all
platforms.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use the "syslink" native control to implement wxHyperlinkCtrl under (recent
enough, i.e. XP or later) versions of Windows.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
A command link button wraps a native MSW control under recent Windows versions
and is implemented generically as a simple bitmap button elsewhere.
In the future, GTK implementation should allow using a different font for the
button label and its note.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This method is/will be needed by wxNonOwnedWindow in wxOSX but couldn't be
used as long as it was protected, so make it public. And as it seems that it
might be useful outside of wx itself, document it as well.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65260 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
With MSWSetTransparentBackground() hack only the panel which was the immediate
child of wxNotebook (i.e. its page) inherited the notebook background but not
its children. This resulted in jarring background discontinuities when nested
panels were used.
Fix this by inheriting notebook background in all child panels by testing for
the return value of the parents MSWHasInheritableBackground() method in
wxPanel::HasTransparentBackground() recursively.
Closes#12317.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65238 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Current item is the same as the selected item in single selection mode but in
multiple selection mode there was no way to neither get this item nor change
it before so add the new functions to allow doing this now.
The new methods are implemented for the generic, GTK and OS X/Cocoa versions
but only stubs are provided for OS X/Carbon.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65228 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As all the other wxWidgets controls take the parameter in their ctor/Create()
it's unexpected that wxDataViewCtrl does not. Add the name parameter and pass
it to wxWindowBase::CreateBase() as usual.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65215 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
No real changes, just refactor the code to use a function mapping GtkTreeIter
to our wxDataViewItem and use it instead of duplicating its code everywhere.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65211 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We need to include wx/defs.h that (indirectly) defines wxUSE_CHECKLISTBOX
before testing for it in wx/checklst.h, otherwise the test may fail if the
latter header is the first wx header included by the user code.
Closes#12306.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
List-only models don't have expanders and so the control shouldn't
reserve any space for them; the notion of expander column doesn't make
sense here.
Previously, this was done correctly only for wxDataViewVirtualListModel;
"ordinary" list models, such as the one used by wxDataViewListCtrl, were
treated as generic tree models and 0th column had ugly empty space
reserved for (never used) expander.
This patch fixes it by adding IsListModel() helper function in
addition to existing IsVirtualListModel(). Some of the
IsVirtualListModel() tests were changed into IsListModel() checks as
appropriate.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This allows to always find the correct wxTextEntry to use in the
implementation of text-related widgets without using any casts. Notably, the
wrong up-cast of wxWindow to wxTextCtrl in wxNSTextFieldControl::controlAction()
which resulted in a crash when the window was actually a wxComboBox can now be
fixed.
Closes#12284.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These are convenience functions for work working with indexes, for
consistency with other wxDataViewListCtrl methods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
These are commonly needed when using wxDataViewListCtrl, yet they were
only available in wxDataViewIndexListModel.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
__WXMSW__ should be tested using #ifdef but in fact there doesn't seem to be
any need to test for it at all here as __CYGWIN__ implies __WXMSW__ anyhow.
Closes#12266.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65102 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775