CMake: Create a config file for use with find_package and use it for
building our own sample, as the config file has the advantage of working
with wx 3.2.0 too, unlike the existing FindwxWidgets.cmake.
See #22536.
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".
Radio buttons are different from the other controls internally in
IFileDialogCustomize-based implementation, so check that disabling them
also works correctly.
Update the extra controls whenever anything changes in the dialog to
make the example in the dialogs sample actually work with the generic
dialog (previously nothing was updated at all).
Also delete the extra controls earlier to make the behaviour more
consistent with the native dialogs.
Use the new customization API for the generic dialogs in the sample too.
Creating a text with a label is a common operation and can be
implemented to look slightly better than AddStaticText() followed by
AddTextCtrl() without a label when using IFileDialog.
Inherit wxFileDialogCustomControl from wxEvtHandler to allow Bind()ing
to events on it and use this to handle wxEVT_BUTTON and wxEVT_CHECKBOX
in the sample.
And inherit from IFileDialogControlEvents in wxMSW code to actually
generate these events when they happen.
wxFileDialog::SetCustomizeHook() can be implemented in terms of
IFileDialogCustomize in wxMSW, which means that it can be used with the
new style dialogs shown by IFileDialog, unlike SetExtraControlCreator(),
which could only be supported when using older style common dialogs.
Add support for a few different controls and wxMSW implementation, more
controls, generic implementation and the documentation will be updated
later.
Also update the sample to show the new API in action and allow toggling
between using it and the old API for testing.
This allows to use the new style dialog for the file dialogs for which
Centre() or SetSize() had been called, as we can now position the window
even when not using a hook function.
As there is no IFileDialogEvents function corresponding to CDN_INITDONE
notification, use the first call to OnTypeChange() instead.
m_mutable_button_bar was used on multiple pages. When one of those pages
is deleted, the pointer becomes invalid. Use the ButtonBar associated
with the event instead.
Closes#22459.
Closes#22464.
Give a reasonable default size to wxPreviewCanvas and fit wxPreviewFrame
to its contents.
Remove the useless call to Fit() from SizerWithButtons: the size set
inside it was just ignored anyhow.
This also allows to stop hardcoding the size in the sample, so don't do
this any more.
See #22439.
The changes of adb8bbab4d (Sort font names in the dialog showing them in
the font sample, 2022-05-12) didn't compile with wxUSE_STL==1 because
wxSortedArrayString doesn't inherit from wxArrayString in this case.
Fix this by using wxArrayString and its Sort() method instead.
This makes the list of the fonts much more readable, compared to listing
them in essentially random order.
Incidentally stop using manual memory allocation to avoid giving a bad
example.
Increase usable scrolling range in wxMSW by a factor of 10,000 by
switching to handling the device origin in wxWidgets itself instead of
letting GDI handle it.
See #22382.
Reuse the same code for handling mouse events for both rows and columns
instead of duplicating almost (but not quite) the same code for both of
them.
As part of resolving the inconsistencies between the two versions, add
wxEVT_GRID_ROW_AUTO_SIZE corresponding to the existing event with the
same name for the columns.
Closes#22380.
This allows to see that the grid is currently not redrawn correctly
under MSW when it has more than ~6,000,000 rows due to overflowing the
device space span of 2^27.
Make wxDC and wxGraphicsContext DPI aware, i.e. add {From,To}DIP() to
them too and make the values returned from Get{DPI,PPI}() consistent
with wxWindow.
Also improve CMake build: add support for finding Cairo when not using
GTK, fix a warning when creating the inplace-config, and mark some
variables as advanced.
See #22346.
Don't use FromDIP for 0.
Include DIP in drawing sample variable and function names to make it clear these sizes are in DIP.
Show both logical and DIP coordinates in statusbar.
Fix the bug introduced in ec0734f96f (Install DLLs in bindir, not
libdir, when using MSW toolchains, 2021-01-09): the directory where the
DLLs were installed wasn't created any more, resulting in errors if it
didn't exist.
Update to latest bakefile version adding the missing mkdir command to
fix this and also use a released bakefile version for the wx makefiles.
Regenerate configure to match the new version.
See #14601.
wxBitmap::CreateWithDIPSize expects an DPI independent size.
And when saving as SVG, it also expects a DPI independent size.
Also show DPI independent coordinates in the status bar.
This reverts most of the changes from ee2b02614e (Add GetDPIScaleFactor to wxDC
and wxGraphicsContext, 2022-04-16).
This is not supposed to be used to scale pixels, FromDIP will be added instead.
Temporary use scale=1 in the drawing sample until FromDIP is added.
Previously it interpreted its argument as being in DIPs, which was
perhaps more convenient, but inconsistent with most of the other
functions and broke the general rule that FromDIP() should be used with
all hard-coded sizes.
Update the sample to use FromDIP() when calling it now, improve the
documentation and fix a bug in AdjustToolBitmapSize() which resulted in
not increasing the bitmap size when moving toolbar sample using "large"
toolbar size from a standard DPI display to a high DPI one: the old code
considered that the new size was the same as the old one and returned
before comparing it with m_requestedBitmapSize, which resulted in the
bitmaps not changing size at all instead of doubling their size as they
were expected to.
Restore the old behaviour of wxLocale, which is supposed to use the
default locale and not the preferred language, which may not be the same
(see #22281).
Also apply the following fixes and improvements to wxUILocale:
- Add new GetSystemLocale() method.
- Change the MSW implementation to use the default locale instead of the
preferred UI language for Windows versions below Windows 10.
- Change the Unix implementation to respect LANGUAGE environment
variable and use it for determining the preferred UI languages.
- Use wxUILocale in wxTranslations to determine the preferred UI
languages.
- Use wxUILocale during initialization of internat sample.
Closes#22281.
Closes#22318.
This is much more realistic and looks less weirdly.
Also add the text directly as a page, without wrapping it in a panel,
just to show that this is possible and works too.
No real changes.
This reverts parts of 533958be10 (recreating Xcode project files with
new script, 2022-04-16) that seem to have been committed accidentally
and are now preventing CI builds from passing.
Fix declaration of 'o' hides previous local declaration warnings.
Change two wxCONSTRUCTOR_5 definitions using wxBitmapBundle instead of
wxBitmap (this does not give build errors).
wxGenericCalendarCtrl is missing all XTI implementations, so just use
RTTI. And fix building the xti sample.
Note the shared build still fails due to WXDLLIMPEXP related issues.
Closes#22300.
Closes#22301.