For all use cases the locale name and the codeset are now determined in the `wxUILocaleImplUnix` ctor.
If `locale_t` support is not available, the use of explicit locales with `wxUILocale` will be problematic.
While there is no real harm in keeping them, it still seems better to
tell people that they're not needed.
Don't put them inside WXWIN_COMPATIBILITY_3_0 for now, however:
considering how late in 3.2 development this deprecation comes, it seems
better to wait until after it and then use WXWIN_COMPATIBILITY_3_2
instead.
Neither of these methods was actually ever used after the changes of the
last two commits (and they hadn't been used when not using wxGTK even
before), so don't force the user-defined model classes to override them.
Also stop using them, as the stub versions don't return correct values
any longer.
Still keep the virtual functions in the base class for compatibility
however as it doesn't cost us much and avoids breaking the existing code
using "override".
We must use wxDataViewCtrl::GetColumnCount() instead, as using the model
column count was just wrong if the control didn't use all of the model
columns.
We don't seem to really need it as we can just convert everything to
strings and this will allow to remove the requirement to override it in
the derived model classes.
This commit is best viewed ignoring whitespace-only changes.
This provider is supposed to have all the icons that the Tango provider
has because this is the justification for turning off support for the
latter when using wxGTK, see logic for setting wxUSE_ARTPROVIDER_TANGO
in configure.in, but it didn't provide two of the recently added ones.
Do add them and also add a reminder to Tango provider code to ensure
this doesn't happen again.
Closes#22550.
For example vc_lib, vc_x64_lib, vc_dll, vc_x64_dll, gcc_lib and gcc_dll all in
the same installation location. Disable the architecture (32 vs 64 bit)
compatibility check in the version file.
CONFIG mode uses the <packageName>_DIR variable.
CMake has an error when generating the solution because the
lib/vc_x64_dll/mswud directory does not exist; it is not built and installed.
So only add the used configuration.
The config file uses the wxWidgetsTargets file to find all the libraries that
can be linked to.
It supports checking for components (e.g. base, core, aui, gl) and fails if a
requested component is not found.
Set the version compatibility to SameMinorVersion (when CMake supports this),
because different minor wxWidgets versions (3.0 and 3.1/3.2) are expected to
break API.
Because the default libraries are named like wx::wxname, create an alias that
is just called wx::name. CMake older than 3.18 does not support creating an
alias to non-global imported targets, so manually create a library with the
same properties.
The wxWidgets CMake build only builds the Release and Debug configurations, but
when creating a (MSVC) CMake project it also contains MinSizeRel and
RelWithDebInfo configurations. By default these seems to use the Debug
libraries, causing build errors. Map them to the Release libraries instead.
Also create a wxWidgets_LIBRARIES variable that can be used to link with, so
users can keep using the same variables from FindwxWidgets.
The headers are installed in 'include/wx-3.1/', so also use this in the INSTALL_INTERFACE.
Determine wxINSTALL_INCLUDE_DIR only once and reuse it in install.cmake.
Use wx_install macro so install is only used when wxBUILD_INSTALL is set.
The install.cmake script has a check for wxBUILD_INSTALL, so don't use it there.
Determine the name of the default user locale in the `wxUILocaleImplUnix` ctor and store it in a memeber variable for later reference in method `wxUILocaleImplUnix::GetName`
Remove locale name inconsistency (using "en_US" instead of "en-US")
In case of the system default locale the codeset can't be determined in the constructor, because the requested locale is actually not yet set up, so that typically the C locale is queried for the codeset resulting in a usually wrong value. Therefore the codeset has to be determined in `wxUILocaleImplUnix::Use()` (again).
Apply similar changes as to wxSplitterWindow to make the existing
wxINVERT-based code work at least in this case, i.e.
1. Don't use wxScreenDC with wxGTK3 (although this is more involved in
this case, as we can't just use wxClientDC for this window itself).
2. Use white brush so that wxCOMPOSITION_DIFF works as wxINVERT.
Drawing the sash using wxClientDC doesn't work when using Wayland, so
non-live resizing mode is unusable due to the sash being completely
invisible and so we need to force live-resizing, just as we already do
under Mac.
While drawing using wxClientDC still doesn't work when using Wayland,
the sash can be at least made visible when using X11 with GTK 3 if we
use white foreground with wxINVERT logical function.
This is implemented in Cairo and CoreGraphics renderers only, but this
is still useful as these renderers are used on the platforms where wxDC
wxINVERT logical function is not supported and this composition mode can
partially replace it.
wxScreenDC doesn't work at all in wxGTK3, so use wxClientDC there,
which, unfortunately, does not work for drawing the splitter sash in
wxMSW, so we have to use different classes depending on the platform.
This doesn't change anything yet, as using wxINVERT logical function
doesn't work in wxGTK neither yet, but this gives us a fighting chance
to make this work later.
No real changes, simply rename the variable, because it won't always be
a wxScreenDC after the next commit, and remove the unnecessary
SetLogicalFunction() call restoring wxCOPY -- this doesn't matter for an
object going out of scope anyhow.
Calling TransferDataFromCustomControls() in custom panel destructor
suffered from two fatal flaws:
1. It happened whether the dialog was accepted or cancelled, while
we're only supposed to call this function when it's accepted.
2. It was done too late, when the customization hook itself could
have been already destroyed, as it only has to live until ShowModal()
returns but doesn't have (and typically doesn't) survive wxFileDialog
itself.
Fix this by adding TransferDataFromExtraControl() and calling it
explicitly when, and only if, the dialog is accepted.
This fixes accessing invalid stack memory (thanks ASAN!) under GTK and
Mac and allows to remove the ugly workaround from wxMSW code, which can
now also just call TransferDataFromExtraControl().
As NSOpenPanel is a subclass of NSSavePanel, we can define "sPanel" in
any case, whether we're working with "Save" or "Open" dialog, and doing
this allows reusing this variable instead of writing another ugly cast.
Also use static_cast<> rather than C-style casts.
No real changes.
Define "wasAccepted" variable and use it instead of testing "returnCode"
several times and setting another "result" variable, which is actually
not needed at all.
No real changes.
Arithmetic conversions on operands of different enumeration types
are deprecated in C++20 so we need to explicitly cast the operand
to the compatible type.
Closes #22505.
GetSystemLocale() creates internally a default locale instance that is then queried for its identifier. Under Unix this fails, because GetLocaleId() returns any empty wxLocaleIdent. With this change the method will determine the identifier correctly for the default locale.
Add the directory only to the build interface, not to the install
interface. INTERFACE_LINK_DIRECTORIES can't use paths that are prefixed
in the source (or build) directory.
Closes#22524.
Allow selecting between the "default" and "simple" providers for now, we
might want to extend this to allow user-defined providers in the future.
Closes#22515.
After the changes of the previous commit, calling SetupBitmaps()
preemptively is not necessary any more, as it's called in any case just
before showing the menu, so remove the calls to it to simplify the code
and even make it slightly faster (at the cost of slowing it down before
opening the menu, but this needs to be done in any case to avoid
reintroducing the problem fixed by the parent commit).
Set up popup menu bitmaps after executing wxEVT_MENU_OPEN handler, so
that any changes to the menu item bitmaps done in it are taken into
account, as this only happens when SetupBitmaps() is called.
Closes#22530.
Ensure that all derived classes have these functions and let them to
avoid defining them if they can just use the default implementation,
which was the case for most ports.
Also move m_bitmap to the base class from the derived ones.
No real changes.