4484 Commits

Author SHA1 Message Date
Simon Rozman
0ba58ce8aa Merge tag 'v3.1.7'
Some checks failed
Unix builds / Ubuntu 20.04 wxGTK ANSI (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 STL (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 2 UTF-8 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxMotif (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxQt (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxX11 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 2 (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxGTK 3 with clang (push) Has been cancelled
Unix builds / Ubuntu 18.04 wxDFB (push) Has been cancelled
CMake builds / macOS 10.15 wxOSX (push) Has been cancelled
CMake builds / Windows MSVC (push) Has been cancelled
CMake builds / macOS 10.15 wxIOS (push) Has been cancelled
CMake builds / Ubuntu 18.04 wxGTK 3 (push) Has been cancelled
Mac builds / wxMac ARM C++11 STL (push) Has been cancelled
Mac builds / wxMac Universal C++14 (push) Has been cancelled
Mac builds / wxiOS (push) Has been cancelled
Mac builds / wxMac macOS 10.15 (push) Has been cancelled
Mac builds / wxMac Intel C++17 (push) Has been cancelled
Mac Xcode builds / iOS static Debug (push) Has been cancelled
Mac Xcode builds / iOS Simulator static (push) Has been cancelled
Mac Xcode builds / macOS dynamic Release (push) Has been cancelled
MSW builds / wxMSW vs2022 DLL Debug x64 (push) Has been cancelled
MSW builds / wxMSW vs2019 DLL Release x64 (push) Has been cancelled
MSW builds / wxMSW vs2019 Debug Win32 (push) Has been cancelled
MSW cross-builds / wxMSW 64 bits (push) Has been cancelled
MSW cross-builds / wxMSW 32 bits (push) Has been cancelled
Code Checks / Check Spelling (push) Has been cancelled
Code Checks / Check Whitespace (push) Has been cancelled
Code Checks / Check Mixed EOL (push) Has been cancelled
Update Documentation / Update Online Documentation (push) Has been cancelled
2025-11-04 10:41:41 +01:00
Vadim Zeitlin
4b83ed83ec Merge branch 'tbar-bitmap-size'
Improve handling toolbar tools bitmap size.

See #22488.
2022-06-05 14:43:29 +02:00
Vadim Zeitlin
56e4bb8bb4 Merge branch 'custom-file-dialog-controls'
Implement support for custom file dialog controls in new style MSW
dialogs.

See #22476.

Closes #14770.
2022-06-05 13:13:28 +01:00
Vadim Zeitlin
e13b4f8833 Don't force fractional scale when toolbar bitmap size is given
The old code in wxToolBarBase::AdjustToolBitmapSize() forced the use of
the exact value of the requested bitmap size multiplied by the current
scale factor, which resulted in ugly bitmaps whenever fractional scaling
factor was used. It also used not immediately clear IncTo() call.

Simplify and improve it by handling the cases when we have a requested
bitmap size and we don't have it differently: if we do have it, just use
it directly, but only with an integer scale factor. And if we don't,
then simply use the bitmap size suitable for the current scale factor.

This seems to result in the most expected behaviour and, notably,
doesn't break the toolbar sample where the bitmap size can still be
toggled between small and big bitmaps on both normal and high DPI
monitors.

Also update the documentation: still recommend not to use
SetToolBitmapSize() at all, but don't claim that it forces fractional
scaling, as this is not the case any longer.
2022-06-05 03:23:03 +02:00
Vadim Zeitlin
c18486e81f Add support for custom comboboxes in wxFileDialogCustomize
Allow using simple (i.e. not editable) comboboxes, known as wxChoice in
wx API, in the dialog too.

Demonstrate their use in the dialogs sample.
2022-06-04 00:50:54 +01:00
Vadim Zeitlin
153a024492 Document the new wxFileDialog customization API
Explain its relationship to the old API and document the new classes.
2022-06-03 03:18:05 +01:00
Vadim Zeitlin
06232cd275 Make filters discussion a section in wxFileDialog documentation
Using a section looks better and prepares for adding another one in the
upcoming commit.

Also remove a note about Motif file dialog limitation, nobody cares
about it any more anyhow.
2022-06-03 01:41:30 +01:00
Vadim Zeitlin
98635d1ef8 Document some issues involved in adding high DPI support
Notably mention that wxToolBar::SetToolBitmapSize() shouldn't be used.
2022-06-03 01:33:31 +01:00
Vadim Zeitlin
d86c1a8c46 Add wxBitmapBundleImpl::GetIndexToUpscale()
Ensure that wxBitmapBundleImplSet and wxBitmapBundleImplRC use the same
logic for actually selecting the bitmap to upscale, and not just for
deciding the size that it must have, too.

No real changes, but this should make impossible for these functions to
diverge once again -- and also make it simpler to reuse the same logic
in any other wxBitmapBundleImpl-derived classes in the future.
2022-06-02 23:09:05 +01:00
Vadim Zeitlin
36abfe973a Change DoGetPreferredSize() to use a callback function
Instead of taking an array of scales, call GetNextAvailableScale() to
get them.

This allows centralising the logic for returning the available scales in
a single place, where it will be reused in the upcoming commits.
2022-06-02 01:37:24 +01:00
Vadim Zeitlin
78da0eed68 Refactor wxBitmapBundleImplSet::GetPreferredBitmapSizeAtScale()
Extract the logic determining the scale to use in a reusable
DoGetPreferredSize() function to allow reusing it in other places.

There are no real changes here, this commit just moved the existing
code to the new function, but because it also changed it from using
wxSize to double, even git --color-moved doesn't show it as an actual
move.
2022-06-02 01:37:24 +01:00
Artur Wieczorek
b72a742b21 Decouple wxPropertyGridPageState from wxDC
Reimplement functions to calculate column widths to do that without
referring to wxClientDC.
2022-05-30 19:17:37 +02:00
Artur Wieczorek
763f4141bc Don't expose internal wxPropertyGridPageState functions
Functions designed for internal use shouldn't be exposed as public ones
to avoid calling them directly from the user code by mistake.
2022-05-30 19:13:33 +02:00
Artur Wieczorek
2aa6259aa4 Pass const pointer as a parameter 2022-05-27 19:13:42 +02:00
Artur Wieczorek
502ede23ab Don't expose internal wxPropertyGridPageState functions
Functions designed for internal use shouldn't be exposed as public ones
to avoid calling them directly from the user code by mistake.
2022-05-27 19:13:42 +02:00
Vadim Zeitlin
01c8978690 Merge branch 'docs-events' of https://github.com/PBfordev/wxWidgets
Several improvements to the event-related docs.

See #22448.
2022-05-23 22:31:34 +01:00
Vadim Zeitlin
411c150bba Merge branch 'print-preview-layout'
Print preview layout and appearance fixes.

See #22441.
2022-05-23 22:25:16 +01:00
Vadim Zeitlin
9042b529fa Merge branch 'dvc-bitmap-renderer-bundle'
Allow using wxBitmapBundle with wxDataViewBitmapRenderer.

See #22411.
2022-05-23 22:22:53 +01:00
PB
6f135cae70 Fix mistakenly added "events" category
The category was added to wxAuiToolBarStyle instead wxAuiToolBarEvent/
2022-05-23 20:05:02 +02:00
PB
97aae519fa Add "events" category to wxEvent-derived classes docs where missing
If a wxEvent-derived class documentation lacks "events" category,
the class will not appear in the Events class list.

The "events" category is still missing in several event classes
(e.g., palette events or wxRibbonToolBarEvent), but those lack
actual documentation aside from just methods declarations anyway.
2022-05-23 19:06:55 +02:00
Vadim Zeitlin
663fa1c77b Still use wxPreviewFrame size if it was explicitly specified
Even though it's better to not specify the preview frame size at all,
the size should still be used if it was explicitly specified, but this
didn't happen any more after the addition of the call to Fit().

Fix this now by only doing the equivalent of Fit() if no size was
explicitly given.

Also add advice about not setting the size explicitly to the
documentation.
2022-05-23 15:07:06 +01:00
Artur Wieczorek
547afc66c4 Pass large object by a const reference 2022-05-21 22:03:08 +02:00
Robin Dunn
e6f2325f63 Add some missing wxBitmap --> wxBitmapBundle changes 2022-05-16 15:33:41 -07:00
Vadim Zeitlin
2ba9007d0e Add wxCHECK_CXX_STD() and use it to test for C++17 and C++20
Unlike direct tests of __cplusplus, using this macro also works with
(recent enough, i.e. MSVS 2015.3 or later) MSVC versions, even if
/Zc:__cplusplus is not used.

This simplifies some checks and makes some other ones (notably the check
for C++20 used before wxALLOW_COMBINING_ENUMS macro definition) work
with MSVC versions with C++20 support as intended.
2022-05-11 16:57:18 +01:00
Vadim Zeitlin
140b88af4a Improve wxDataViewRenderer variant type documentation
Explain what it is in the ctor documentation and link to the new
IsCompatibleVariantType() in GetVariantType() docs.
2022-05-11 17:23:56 +02:00
Vadim Zeitlin
a7eee933c6 Merge branch 'tsan-warnings'
Fix a harmless warning from thread sanitizer and make wxAtomicInc() more
useful.

See #22417.
2022-05-11 02:37:26 +02:00
Vadim Zeitlin
bb52a5c5b5 Merge branch 'imaglist-mask'
Make handling of masks in wxImageList simpler and more useful.

See #22400.
2022-05-11 02:35:59 +02:00
Vadim Zeitlin
c036bdf3e5 Recommend using std::atomic instead of our functions
The standard class is much more flexible and type-safe.
2022-05-11 00:18:02 +02:00
Vadim Zeitlin
cf66ce5f94 Return the new value from wxAtomicInc() too
This is easy to do and can be useful when using an atomic initialization
counter.

The only platform where not returning the new value might be more
efficient than returning it is Solaris which is not really relevant any
more and on all the other platforms the functions we were already using
provided this value already (or almost, in case of using gcc builtins,
when we just have to use a different one).
2022-05-11 00:16:47 +02:00
Vadim Zeitlin
1b82a9fe04 Use wxBitmapBundle as default type in wxDataViewBitmapRenderer
The default type doesn't really matter after the previous commits, as
the renderer accepts both wxBitmap and wxBitmapBundle (and also wxIcon)
in any case anyhow, but it seems better to use the preferred type as the
default one.

Also make the documentation more useful, although an example is still
lacking.
2022-05-09 14:36:41 +02:00
Vadim Zeitlin
23e815bcf6 Allow relaxing the check for variant type in wxDataViewRenderer
Instead of checking for the exact variant type match, call the new
IsCompatibleVariantType() virtual function, which still does the same
check by default, but can be overridden to allow other types as well if
they're accepted by the renderer.

This will be soon used to allow accepting both wxBitmap (which must
still be accepted for compatibility) and wxBitmapBundle (which is the
simplest way to support high DPI) in wxDataViewBitmapRenderer at once.
2022-05-08 18:39:15 +01:00
Vadim Zeitlin
dc90e92110 Add wxBitmapBundle::Clear()
This is just a convenient helper for resetting the bundle contents which
seems more readable than assigning an empty bundle to it.
2022-05-08 15:54:51 +01:00
Vadim Zeitlin
937fa42d10 Document that wxGetTimeZone() doesn't account for DST
This is intentional and won't be changed, although we could, perhaps,
add a wxGetDST() function or similar to make it easier to take DST into
account as well.

Closes #22399.
2022-05-08 16:18:29 +02:00
Vadim Zeitlin
0e544960b0 Fix example of creating wxUILocale in its documentation
There are several ways to do it, and it's not clear which one of them
should be illustrated here, but it should definitely be one that works.

Closes #22389.
2022-05-07 16:34:45 +02:00
Vadim Zeitlin
6feeed9fe9 Handle transparency to the best of our ability in wxImageList
Don't take the value of "mask" parameter of wxImageList constructor too
prescriptively, it predates support for alpha in wxWidgets by many years
and was never meant to actually suppress using it.

Instead, do the best thing we can in all cases, i.e. use alpha if it's
specified and supported and use mask otherwise. But only create the mask
from light grey colour if we have nothing else if "mask" is true in
wxImageList constructor, as this is a potentially destructive action
that must not be performed if the user has explicitly decided to set
this parameter to false.

Incidentally fix handling of alpha with comctl32.dll v5 (which is used
in the absence of any manifest) by converting it to a mask in this case:
this is not ideal, but better than just using black background as it
happened before, and restores pre-3.1.5 behaviour.

Also simplify the generic version which just has to create the default
mask if necessary and doesn't have to do anything at all in all the
other cases.

Note that these changes required relaxing some of the existing unit
tests as wxMSW implementation now can add alpha channel to the bitmaps
that didn't have it -- but this is a more useful behaviour, and so it
makes more sense to adapt the tests to it rather than doing a less
useful thing just to conform to the tests.

This commit is best viewed with git --color-moved
--color-moved-ws=ignore-all-spac options.

Closes #22349.
2022-05-06 02:12:54 +01:00
PB
68dee47694 Explain how to best use wxFrame as input form
Add information about the recommended way of using wxFrame
as a form, i.e., to not create the input controls as its
direct children but use wxPanel for this instead.

Closes #22395.
2022-05-05 17:32:43 +02:00
DietmarSchwertberger
ec737396d8 Unify wxGrid code for processing row and column mouse events
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.
2022-05-05 17:23:45 +02:00
Vadim Zeitlin
eb5ad7255c Merge branch 'shared-client-data'
Allow sharing client data in wxGrid-related classes.

See #22369.
2022-05-01 02:55:36 +02:00
Vadim Zeitlin
9a36e26d4a Merge remote-tracking branch 'MaartenBent/wxdc-dpi'
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.
2022-05-01 02:53:12 +02:00
Frode Roxrud Gill
f646e8b11c Allow cloning client data stored in wxGrid attributes etc
Add wxSharedClientDataContainer class storing ref-counted client data
and use it instead of plain wxClientDataContainer in wxGridCellAttr,
wxGridCellEditor and wxGridCellRenderer classes.

This allows to keep the same client data associated with many grid cells
without having to make many copies of it.
2022-04-28 00:28:58 +02:00
Vadim Zeitlin
05014523bc Merge branch 'document_missing_webview_event' of https://github.com/swt2c/wxWidgets
More documentation fixes: inconsistent or missing declarations.

See #22366.
2022-04-27 19:45:16 +02:00
Scott Talbert
1a531def4b Fix wxTextCtrl::OSXEnableNewLineReplacement documentation 2022-04-26 22:31:54 -04:00
Scott Talbert
db8eb640eb Document missing wxWebView events 2022-04-26 20:12:24 -04:00
Maarten Bent
6072d3aeee Add documentation for wxDC and wxGraphicsContext FromDIP and ToDIP
Remove documentation of removed function GetDPIScaleFactor.
2022-04-26 21:35:05 +02:00
Lauri Nurmi
e3bf759615 Add wxTRANSLATE_IN_CONTEXT() macro for marking strings for translation
Similarly to wxTRANSLATE(), this macro does not do much itself.
2022-04-24 11:30:31 +03:00
Uwe Runtemund
28f62b2e59 Add support for creating wxBitmapBundle from wxIconBundle
This is useful for converting existing code using wxIconBundle for
similar purposes to switch to using wxBitmapBundle instead.

Closes #22347.
2022-04-23 17:31:46 +02:00
Vadim Zeitlin
ac60d78d8d Merge branch 'toolbar-bitmap-size'
Make wxToolBar::SetToolBitmapSize() take size in logical pixels.

See #22338.
2022-04-21 21:24:46 +02:00
PB
8c9c6f5088 Fix examples in wxBitmapBundle documentation
Add the missing label parameter to AddTool() calls.

Closes #22345.
2022-04-21 21:21:51 +02:00
Scott Talbert
be106d3fed Document missing wxEVT_FULLSCREEN 2022-04-20 22:54:06 -04:00
Vadim Zeitlin
eb6506e677 Make wxToolBar::SetToolBitmapSize() take size in logical pixels
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.
2022-04-19 23:36:02 +01:00