So IDEs like Visual Studio show the correct character set.
Add an option to override the character set and use it in the win32 API tests.
See #26458.
Closes#26462.
Can be used by console applications, it links with wx::base with wxUSE_GUI=0.
Update wx_copy_target in wxWidgetsConfig.cmake to handle INTERFACE libraries correctly.
See #26285
Try to install using 'ln -s --relative' first, before falling back to 'ln -s' and 'cmake -E create_symlink'.
If all fail, use 'cmake -E copy'.
Also add an option to disable using symlinks and always copy.
Correctly use and (not) escape DESTDIR and CMAKE_INSTALL_PREFIX in install and uninstall variables.
Fixes#26247
When installing static libraries, the built-in libraries also need import mappings for MinSizeRel and RelWithDebInfo configurations.
Otherwise they will default to using Debug libraries.
Change it from 'const wxString&' to just 'wxString' so there is no need to keep a copy around of untranslated strings.
This allows to remove thread_local UntranslatedStringHolder used by GetUntranslatedString, which causes many problems with MinGW.
Fixes#26195.
MacOS (at least with homebrew gtk3) does not have gdk/gdkx.h.
Check if the X11 (or any) back-end is used when enabling XTest/UIActionSimulator and OpenGL.
Keep the item colour instead of unconditionally replacing it with the
highlight colour in dark mode too, for consistency with white mode.
Closes#25633.
It extends the full column, including the padding.
To match light mode, there should be 1px between columns that do not have the attribute colour.
The first (most left) column, and columns with checkboxes or images should still use the padding.
The item was also highlighted when hovering over the header because ListView_HitTest
returns true when hovering over the header.
Replace ListView_HitTest by checking if the mouse pointer is in the item rectangle.
When the mouse is over an item, change the colour of it.
This only works when using Explorer theme, DarkMode_Explorer does not get custom draw calls to remove the colour.
Fixes#26001
This was broken in bde6b7a8b8.
When the list is scrolled the x-coordinate will be negative.
So don't start counting from 0, but start from the original x coordinate of the full rectangle.
The grid lines are erased when custom drawing the sub-items, so the grid lines need to be redrawn after drawing the item.
OnPaint() is not called after every custom draw (e.g. just hovering over a row will cause a custom draw but no paint),
so it has to be drawn in the custom paint handler.
Add a common function for drawing grid lines and reuse it on OnPaint().
Draw the background color outside the list-items area on all Windows version,
both below and behind the items, and when the list is empty.
Set the text foreground and background colors when custom drawing. So the disabled
list will use the correct colors in list or icon view.
Fixes#25990
When a column is custom drawn, it wrongly used the wxItemAttr of the
column being updated to redraw all columns.
Fix this by requesting the column attributes of each column that is
drawn.
See #25633.
Closes#25962.
wxWidgets uses the WIDE variant of the win32 API. But when the ANSI version of
Windows.h is included before wxWidgets headers and wxNO_WIN32_W is defined,
the ANSI variant of the functions will be used.
This can cause build errors in headers that are (indirectly) included by the user.
Because the class/string types do not match the function type.
So use the WIDE variant explicitly to prevent these errors.
Create the files in a temporary directory and only copy them to the
final directory if the files are different.
This prevents the source files from being rebuilt every time CMake is
run and the protocol files are replaced.
Exclude the protocols directory from being installed.
Closes#25945.
This is used by FindwxWidgets and already created in the installed CMake files.
Also create it when building wxWidgets, so it can be used when wxWidgets is included via add_subdirectory.
Also create aliases to all targets using the wxWidgets prefix.
These are used for the default library/archive/runtime/include directories,
but can be overridden with wxBUILD_INSTALL_<artifact>_DIR.
Replace the hard-coded lib and bin directories with wx_get_install_dir().
Packages of third-party dependencies were searched twice. Once when adding them via wx_add_thirdparty_library to determine if they are available or of the built-in library should be used. And then again when including the third-party cmake file. Move all the logic into the third-party library cmake file.
This also removes the need to move the WebP variables into the parent scope.
First render to a temporary wxSVGFileDC, then use the size of the bounding box as input for the actual SVG size.
Use a slightly larger size to account for lines drawn with a bigger wxPen width.
Define WebP_LIBRARIES and WebP_INCLUDE_DIRS in the parent scope,
otherwise the caller never gets the values found by either
find_package() or pkg_check_modules().
Closes#25786.
This allows to render a SVG without writing it to a file, and can for example be useful to get the final size of the SVG.
Rename m_OK to m_writeError to better reflect its purpose.
Don't create the bitmap handler when it will not be used.
Input for wxDC functions and constructor are in DPI-independent pixels, so no scaling should be performed.
This ensures the SVG will get the same size on every platform.
When an online SVG is opened in a browser, the browser might not want to process
the style attributes because there is no valid Content Security Policy (CSP).
Use the attributes directly inside the svg elements.
This passes the W3C validator, except for the 'white-space' attribute. So keep this one inside a style attribute.
Detect when a checkbox is hit and return wxLIST_HITTEST_ONITEMSTATEICON.
Determine the correct location of the icon, it might be preceded by a
checkbox.
Return only the icon rectangle in GetSubItemRect with wxLIST_RECT_ICON,
not the padding or margins above/below the icon.
Closes#25764.
Using the actual expander icon size instead of hard-coded ones (see 229a9631)
causes the gutter around the icons to be too big.
In general the icon seems wide enough to not need a gutter. Only on Windows
without using the system theme (i.e. when the +/- expander is used) the icon
becomes to small. Calculate a gutter size that will increase the icon width to
a standard 16px width.