This function must return a composite data object and not just any
wxDataObject because its callers cast the returned object to this class,
so make it a bit more type-safe.
This function doesn't need to be virtual as it's not meant to be
overridden in, but just called from the derived classes. In fact, it
doesn't even have to be a member function at all, but leave it in the
class for now to avoid having to create a new header just for it, but
make it static.
Also add a comment explaining what is it for and what it does.
Also rename EnableDropTarget() to EnableDropTargets(), as calling
EnableDropTarget(wxDF_XXX) would be ambiguous due to the existence of a
non-explicit wxVector ctor taking size_t (which is a mistake on its own,
but is probably not worth changing any more).
Allow specifying multiple formats to be accepted when dragging data to
wxDataViewCtrl in the generic and Cocoa implementations.
Add wxDataViewCtrlBase::EnableDropTarget() overload taking an array of
wxDataFormats to support this at the API level.
Add new DoEnableDropTarget() used by both EnableDropTarget() overloads
and implement it in the generic and Cocoa ports. GTK implementation
still uses only a single format, as before.
Also refactor the Cocoa implementation: all operations using dragged
data are now handled by wxDropTarget and unnecessary DataViewPboardType
as removed.
Update the dataview sample to show the new functionality.
It seems that the default value of NtfsDisable8dot3NameCreation registry
value is 2, and not 0, since a very long time (at least Windows 7), so
the wxPATH_NORM_LONG test was never actually executed.
Change the check guarding it to check if the value of the key is
different from 1 instead of checking that it is 0, as the test can still
succeed on the systems where this is the case.
Of course, it can also fail, if short names are disabled for the current
volume, but let's see if this is a problem in practice before doing
something more complicated to deal with this case.
This file already exists in the test directory, as it's used by another
test, so just use it instead of relying on the existing of mkinstalldirs
in the parent directory, which is not guaranteed as CMake build runs the
tests from a different directory, which is not the immediate child of
the top source directory.
No real changes, just use a more clear and longer (which will be
important for the next commit) name for a test file.
Remove the non-existing samples/console/testdata.gc from make_dist.mk
(there are other non-existing files still referenced there).
It is better and more clear to use a separate functions rather than a
"bool force" parameter.
Also add OnThaw() instead to let wxOSXDataViewModelNotifier itself
decide what it needs to do when the control is thawed.
No real changes.
wxOSXDataViewModelNotifier::AdjustAutosizedColumns() does nothing if the
control is frozen, so there is no need to test for it before calling it
and this just made this call inconsistent with all the other ones.
This option is disabled in the GUI, but users can still specify it on the
command-line. Never add the linker flags to prevent errors (unsupported option
'-static-libgcc') or warnings (argument unused during compilation:
'-static-libstdc++').
Closes https://github.com/wxWidgets/wxWidgets/pull/2612Closes#19330.
Using this ctor is more convenient than using the default ctor and then
calling SetMin() and SetMax().
Document the new ctor and add tests showing that minimum and maximum
values are actually respected.
Closes https://github.com/wxWidgets/wxWidgets/pull/2610
wxPGProperty value edited in the first or last property of wxPropertyGrid
should be validated while attempting to navigate to the previous/next
property.
Closes#19315.
Don't use the ternary operator as t_str() doesn't return a pointer in
this build configuration.
Also remove outdated (and maybe even wrong) comment about MinGW headers,
as it's better to use a temporary variable just to avoid writing the
cast explicitly anyhow.
Closes#19338.
Include wx/textctrl.h, required here because wxTextCtrl is used as the
base class of wxPrintPageTextCtrl, explicitly instead of relying on it
being implicitly included by something else, as it happens in the
default build but not when validators are disabled.
Closes#19337.
Define __STDC_WANT_LIB_EXT1__ as early as possible to ensure that it's
defined before string.h is included by some other header without it.
Closes#19334.
This doesn't really change anything as the scaling factor is always the
same in both directions currently, but is more consistent with the other
places where Scale[XY]() are used.
This slightly amends the changes of 3787f55a6b (Add
wxDPIChangedEvent::Scale() and use it in this event handlers,
2021-07-11).
OpenVMS C++ compiler can't compile NanoSVG headers after including
wx/unichar.h, so include them as soon as possible, i.e. right after
wx/wxprec.h but before anything else.
This commit is best viewed with --color-moved git option.
There should be no more changes on this branch, and the ones so far are
not very important, but still update to its final version just for
consistency.
This fixes the wxGenericCalendarCtrl on wxGTK3 where the SpinCtrl is
much wider than on other platforms and should also ensure that the
control is always big enough in all locales under Mac.
Closes https://github.com/wxWidgets/wxWidgets/pull/2604Closes#11444.
Document that this function can leave the provided wxVariant null and
not return anything, but that if it does return some value, it must be
of the appropriate type.
Add an item with unspecified year and update the custom model GetValue()
to not return anything in this case to check, and confirm, that all
implementations handle this properly by simply not showing anything in
the cell in this case.