This function should be used instead of CreateWithDIPSize() in portable
code, the latter is currently often used to do what this function is
doing, but this only works correctly in wxOSX and wxGTK3 but not wxMSW.
Still use the traditional dot file if it already exists, but prefer
using the new location otherwise, i.e. for the new program installation.
Add wxCONFIG_USE_HOME to allow forcing the use of the old location if
really necessary.
Also use the new style as default "old style" of MigrateLocalFile() so
that calling it even when using XDG layout in wxStandardPaths still
works as expected.
Unary minus of wxPoint and multiplication with double are implemented
but undocumented. Many of operators that use integers types other
than int remain undocumented though.
The arithmetic operators for wxPoint and wxRealPoint are quite
repetitive and were made by copy-paste from the wxSize operators.
Because of that, some of the names are a bit misleading which this
commit changes. The changes are:
1. replace s/sz with p/pt for point variables (likely 's' comes from
copied code used for wxSize variables)
2. replace 'i' with 'f' for floating point types (likely 'i' comes
from copied code used for integer types)
3. replace 'factor' with 'divisor' for division operations (factors
are the multiplication operands, not division)
Do this for consistency with wxSize which already had this operator/()
overload and operator*() in these classes which was already overloaded
for double.
Closes#24185.
Closes#24187.
This can be useful for the existing applications switching to using
XDG-compliant config files location as they can just call this function
on startup to keep using the existing file.
Sometimes it's useful to have some code used only if wxConfig is defined
as wxRegConfig or only if it is defined as wxFileConfig and testing for
these symbols is more clear than testing for the platform (and more
correct, considering that setting wxUSE_CONFIG_NATIVE to 0 may result in
wxFileConfig being used even under Windows).
Use the correct types instead of wxSize which was erroneously used
there ever since a5664fd6ef (Increase interoperability between wxPoint
and wxRealPoint introducing constructors which convert between the two
classes., 2010-06-09).
Closes#23804.
Using this style allows to tell wxFileConfig to use XDG-compliant
location for the user configuration file, even when not using XDG file
layout for wxStandardPaths, which can be convenient when modifying the
existing application using wxStandardPaths for other files locations
too.
And using it in combination with wxCONFIG_USE_SUBDIR allows to put the
config file in a XDG-compliant subdirectory, which wasn't easily
possible at all before.
This allows using GetUserDir(Dir_Config) to retrieve XDG-compliant
location of the configuration files, independently of the file layout
used by the global wxStandardPaths object.
Recommend using this directory instead of GetUserDataDir() for multiple
configuration files under Unix.
This parameter wasn't used for anything as it specified the encoding of
the data contents in memory and not the encoding of the XML file as
might be believed, so it only created unnecessary confusion.
See #24167.
Override required functions in wxHeaderCtrlSimple to avoid asserts if
its columns are reordered.
Also bring the code behaviour in agreement with the documentation by
calling UpdateColumn() after calling UpdateColumnVisibility().
Finally, only call UpdateColumnsOrder() if the corresponding event was
not processed as the application should use one xor the other mechanism
for reacting to columns reordering, but not both.
Closes#24108.
Closes#24172.
In this case we can still use wxClientDC, so let people do it if they
really want to for consistency with wxSplitterWindow and because it
doesn't really cost us anything.
This is similar to wxAuiManager::AlwaysUsesLiveResize() and does the
same thing, i.e. returns true if live update is always used, whether
wxSP_LIVE_UPDATE is enabled or not.
Use the new function in the sample to disable the menu item in the
environments where it doesn't do anything, as it was confusing to have
it under e.g. Wayland.
This function can be used to check if drawing on wxClientDC actually
works. This has to be a run-time, rather than compile-time, check
because in wxGTK3 this depends on the backend being used: wxClientDC
only doesn't work with Wayland, but does work with X11 (and, less
importantly, Win32) backend(s).
Currently the wxWindow parameter of this function is not used but it
could be useful in the future and it will be simpler to allow not
specifying it (by defaulting it to nullptr) than to add it later, so it
seems better to have it.
This makes behaviour more consistent across all platforms, as this flag
is always used in wxGTK and wxOSX, and might avoid some problems in
wxMSW, see #23982.
Use the same argument name as in the actual code in the class
constructor as well as the convenience function, instead of
wrongly copypasted "book".
See also 33de6dc (Fix confusing wxPersistentTLW ctor argument name,
2023-12-22).
Closes#24158.
Missing semicolon on latest method addition causes doxygen parsing
issues which in turn causes problems for dependent projects like wxRuby
and wxPython.
Closes#24155.