This reverts 5d630caabd (Make it enough to predefine only
wxUSE_DPI_AWARE_MANIFEST, 2023-08-23) and all the commits which tried to
fix the breakage caused by it.
While the original change had merit, it seems to be too difficult to fix
all our build systems to avoid embedding manifest when defining this in
the code, like samples/sample.rc does, so revert this change for now.
Maybe it can be reintroduced in the future after switching to some other
build system.
This clashes with the wx manifest which is getting included now after
the changes of 5d630caabd (Make it enough to predefine only
wxUSE_DPI_AWARE_MANIFEST, 2023-08-23).
- caret: Use the system color for window background instead of
hard-coded white.
- image: Use hard-coded black for the text drawing since all other
drawings on the image canvas use hard-coded colours too. The default
text colour was barely readable in dark mode.
- joytest: Use wxCYAN_PEN instead of wxBLACK_PEN to ensure the line is
visible both in light and dark colour system mode.
- ownerdrw: Use such background colour that there is good contrast
between text and background both in light and dark colour system mode.
- popup: Use such background colour for the pop up so that there is a
good contrast between text and background both in light and dark
colour system mode.
Closes#23773.
In the dialog, create the controls put in the static box sizer
with the sizer's static box as the parent instead of the dialog.
Improve appearance of custom drawn items in dark mode.
Closes#23765.
"base" library must always come last in the samples bakefiles as the
list of wx libraries to link with is generated when processing it, so
putting the "net" library after it had no effect.
See #23723.
This sample is the only one to use a GLU function too.
It would probably be better to drop GLU dependency entirely, but until
this is done (see #23721), do link with it.
This commit is best viewed ignoring whitespace-only changes.
Previously this was never done, as we couldn't determine if we were
using Cocoa or not at generation time, but we can determine it in the
makefile itself.
This samples used "wx_append" in its bakefile, but should be using
"wx_append_base", as it's a console application.
This fixes its build with makefile.unx, as wxUSE_GUI wasn't properly
defined as 0 before.
This is not needed when building as part of the build tree, as it's
already part of EXTRALIBS_OPENGL then, but is required when building the
samples against installed libraries.
This commit is best viewed ignoring whitespace-only changes.
This function should be used to get the parent for the custom controls
instead of relying on them being reparented under it by the code added
in the last commit.
Change the type of m_contents to be wxWindow and not wxPanel as it
doesn't really matter, but wxPanel is not fully declared in this header
while wxWindow is.
The code in b76ebc6 switched from wxList to std::vector but the changes
did not account that we must store the pointers to derived classes in
the entity list, not just the struct they derive from.
Closes#23582.
Don't hardcode white background in wxHtmlWindow, but use
wxSYS_COLOUR_WINDOW, as was already done in wxHtmlWinParser in case when
wxHtmlWindow was not used at all.
Also use wxSYS_COLOUR_WINDOWTEXT for the default foreground and
light/dark-mode dependent link colour instead of hardcoded blue. As a
side effect, this uses a more appropriate colour for the links in the
light mode as well.
Add a link to the lists test page in the HTML test sample to allow
testing the links appearance easily (links present in the other pages of
this sample use fixed colours specified in HTML itself).
This key produces events with different key codes in wxMSW (WXK_CLEAR)
and the other ports (WXK_NUMPAD_BEGIN), so add a new constant to allow
to refer to it under the same name everywhere.
Also generate a key event for it in wxOSX where it previously wasn't
generated at all.
Closes#23478.
Closes#23491.
These functions didn't correctly account for the indices beyond the
first group.
Fix this and add tests for these functions to the sample.
See #23458.
Closes#23457.
Update the sample to use std::vector<> and std::unordered_map<> for
storing the model data, this should be much more useful for the people
trying to write their own model.
Also use std::unique_ptr<> to avoid manual memory management.
This type is part of the public API, so it can't be just replaced by a
std::vector<>, but it can at least be replaced by wxBaseArray<> which
inherits from std::vector<>.
Also accept just a vector, unimaginatively called wxGridCellCoordsVector
in the code, on input, as this is backwards-compatible with passing in a
wxGridCellCoordsArray.
Finally, simplify the code a bit by using range-for loop.
No real changes.
The list client data must be destroyed not only when closing the
resource browser dialog (see 754f75c1cd (Fix memory leaks in artprov
sample, 2022-01-28) but also whenever the art client is changed.
Closes#23417.
Closes#23418.
This always wasn't the best and started to result in CI failures now as
recent versions of gcc (e.g. 11.3 in Ubuntu 2.2.04) started giving
-Wdeprecated-enum-float-conversion when using REAL_SIZE in the
expressions.
Add wxPrintDialogData::EnableCurrentPage() and implement support for it
under MSW, where it enables selecting the "Current page" radio button in
the pages selection area of the native dialog.
Update the sample to show the new function.
This replaces the previously implemented wxWebViewWindowInfo.
It explicitly breaks the previous API to enable WebKitGTK
integration and to make the usage in application code less error prone.
A new event wxEVT_WEBVIEW_NEWWINDOW_FEATURES is added to allow
access to the window features and the child web view.
Remove _() around string which it doesn't make sense to translate in the
sockets sample.
This doesn't actually change anything as this sample doesn't use
translations in any case, but still show a good example.
Closes#23362.