20151 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
35e982a67f Merge branch 'grid-dragmove'
Improve UI of dragging the wxGrid columns/rows to move them.

See #22457.
2022-06-05 13:39:35 +01: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
72f851f6f4 Remove the size parameter of wxBitmapBundle::GetConsensusSizeFor()
It doesn't seem to be useful and wasn't really specified in 2 out of 3
existing calls to this function and was probably wrongly specified in
the remaining one, so just remove it for now, it can always be added
later if we decide what exactly should it do.
2022-06-05 03:23:41 +02:00
Vadim Zeitlin
907e4ea862 Add wxBitmapBundle::GetConsensusSizeFor(double) and test it
Add an overload of the existing function which can be easily tested in
the unit tests and add a trivial new test for it.
2022-06-05 03:06:10 +02:00
Vadim Zeitlin
34fa234f48 Merge branch 'bmpbndl-scaling'
Improve wxBitmapBundle scaling logic by limiting it to integer scaling
factors and ensure it's consistent for files and MSW resources.

See #22481.
2022-06-04 18:36:50 +01:00
Lauri Nurmi
83c6edcc32 Always call wxSecureZeroMemory() to wipe memory in wxSecretValue
Replaces a call to MSW native ::SecureZeroMemory(), and calls to plain
memset().
2022-06-04 15:14:09 +03: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
07d7dd19f8 Add support for custom radio button controls in wxFileDialog
Update the dialogs sample to show using them too.
2022-06-03 01:35:31 +01:00
Vadim Zeitlin
44b6ce4826 Implement sending events for generic custom wxFileDialog controls
Forward the events from the actual wxControls used in the generic
implementation of wxFileDialogCustomize to wxFileDialogCustomControl so
that they could be handled by the application code binding to them.
2022-06-03 01:35:31 +01:00
Vadim Zeitlin
ae16657426 Add generic implementation of wxFileDialogCustomize API
Add implementation of the new file dialog customization API in terms of
the old one for the non-MSW ports (or even wxMSW if IFileDialog can't be
used for whatever reasons).

Just map wxFileDialogFoo to the corresponding wxFoo.
2022-06-03 01:35:31 +01:00
Vadim Zeitlin
fdcaeb050f Move GetExtraControlSize() hack from wxFileDialogBase to MSW code
The hack with creating a dummy dialog just to get the size of the extra
controls is only used in wxMSW, so move it to MSW-specific file from the
common code.

To allow doing this there, add CreateExtraControlWithParent() helper,
which is still not really used anywhere else than in wxMSW, but at least
doesn't do anything particularly ugly and doesn't really penalize the
common code for wxMSW sins.

No real changes.
2022-06-03 01:35:31 +01:00
Vadim Zeitlin
751a73a2ca Add optional label to wxFileDialogCustomize::AddTextCtrl()
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.
2022-06-03 01:35:30 +01:00
Vadim Zeitlin
095c4dfc94 Add event generation to MSW IFileDialog-based implementation
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.
2022-06-03 01:35:30 +01:00
Vadim Zeitlin
359ab98cb2 Start adding new API for wxFileDialog customization
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.
2022-06-03 01:35:30 +01:00
Vadim Zeitlin
0caddb4472 Document important COM implementation macro limitation
These macros can't be used with multiple inheritance, as they don't do
anything to cast the pointer to the correct type in this case.
2022-06-03 01:35:30 +01:00
Vadim Zeitlin
63f44b5bfa Call MSWOnInitDone() when using IFileDialog too
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.
2022-06-03 01:35:30 +01:00
Vadim Zeitlin
a137145a44 Update the currently selected file when using IFileDialog too
Implement IFileDialogEvents::OnSelectionChange() to react to the changes
in the dialog selection.
2022-06-03 01:35:30 +01:00
Vadim Zeitlin
5bd765355b Make ConvertIShellItemToPath() public and rename
Extract a private function from src/msw/dirdlg.cpp, change its return
type to avoid losing information about the error and rename it to a more
clear name now that it's used outside of this file.

No real changes.
2022-06-03 01:35:30 +01:00
Vadim Zeitlin
0a1714b709 Start using IFileDialogEvents to get notifications about changes
For now only update the currently selected file type using this
interface, but it will be used for more notifications later.
2022-06-03 01:35:30 +01:00
Vadim Zeitlin
a341efec34 Add helper FileDialogGetFileTypeIndex()
This is just a refactoring to allow reusing this function later.

No real changes.
2022-06-03 01:35:30 +01:00
Vadim Zeitlin
db7cf34e30 Remove unused HWND parameter of MSWOnTypeChange()
Also simplify the hook function code a little by using OPENFILENAME
local variable directly instead of using OFNOTIFY only to always use its
OPENFILENAME member and nothing else.

No real changes.
2022-06-03 01:35:30 +01:00
Vadim Zeitlin
895b4a0710 Make wxFileDialog::MSWOnXXX() private
These functions were always marked as being implementation-only, but we
can actually do better and make them private, by making the dialog hook
function a (static) member of wxFileDialogMSWData and making this class
(which is now a class and not a struct any more, as it's not just a
collection of fields any longer) a friend of wxFileDialog.

No real changes.
2022-06-03 01:35:30 +01:00
Vadim Zeitlin
cf81527cfc Move private wxFileDialog members to wxFileDialogMSWData
No real changes, just make it possibly to add more fields to the private
struct in the future without affecting the ABI.

This commit is best viewed with git --color-moved
--color-moved-ws=ignore-all-space options.
2022-06-03 01:35:29 +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
DietmarSchwertberger
4b04384b98 improve comments 2022-06-01 21:11:56 +02:00
JohnKnow
db7a69aa82 Fix a gcc warning in wx/rawbmp.h
Using "&=" results in -Warith-conversion with recent gcc, so use an
explicit case to avoid it.

This fixes allheaders unit test failure.

Closes #22477.
2022-06-01 15:48:03 +02:00
Vadim Zeitlin
731d29bace Move wxBitmapBundle::Clear() out of line
Ensure that wxBitmapBundleImpl full declaration is available when it is
compiled, at least OpenVMS compiler has trouble with compiling the call
to reset(), which involves using wxBitmapBundleImpl dtor, if it comes
before this class declaration.
2022-05-31 14:46:44 +02: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
982a720069 Use ctor initializer list to initialize data members 2022-05-30 19:15:36 +02:00
Artur Wieczorek
c09f1c258b Use conditional operators to simplify statements 2022-05-30 19:14:46 +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
b079554100 Fix wxPropertyGrid classes build without implicit wxString encoding
Ensure that all headers in wx/propgrid can be compiled with
wxNO_IMPLICIT_WXSTRING_ENCODING defined.

Closes #22102.
2022-05-30 19:07:08 +02:00
Randalphwa
385acccebb Fix some harmless MSVC compiler warnings
This fixes warnings C4244 ('=': conversion from 'int' to 'xxx', possible
loss of data) and C4267 (conversion from 'size_t' to 'int', possible
loss of data) from the MSVC compiler (Version 19.29.30136 for x64) when
compiling in 64-bits.

Note that these warnings are disabled in wx/defs.h by default and so
only happen when saving/restoring the warning settings using the
appropriate pragmas before/after including wx headers.

Closes #22462.
2022-05-30 17:47:15 +02:00
Artur Wieczorek
2855ec1e88 Make data member mutable to avoid const_casts 2022-05-27 19:13:44 +02:00
Artur Wieczorek
e7fac13461 Declare functions as const 2022-05-27 19:13:42 +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
cdba0ba961 Add IFileDialog-based wxFileDialog implementation
If possible, i.e. if none of the features not supported by IFileDialog
are needed, prefer to use IFileDialog for wxFileDialog rather than the
old common dialog functions.

There are no real differences in appearance because the old functions
actually already forward to the new IFileDialog-based implementation
internally anyhow, if possible, but this provides us with more
flexibility and some things that were ignored by the common dialog
functions now work, such as setting the initial dialog directory.
2022-05-25 21:06:42 +01:00
Vadim Zeitlin
4bcbff00f3 Split wxIFileDialog::Show() in multiple functions
No real changes, just refactor the code to have separate ctor, setter
functions and Show() instead of doing everything in a single function.

This commit is best viewed ignoring whitespace-only changes.
2022-05-25 21:06:42 +01:00
Vadim Zeitlin
d77a373118 Extract wxIFileDialog::Show() from wxDirDialog code
Add a trivial class for showing an IFileDialog (and not just
IFileOpenDialog) and getting result(s) from it.

This class will be also used by wxFileDialog soon, but this commit only
updates wxDirDialog to use it.

This commit is best viewed with git --color-moved
--color-moved-ws=ignore-all-spac options.
2022-05-25 21:06:42 +01:00
Vadim Zeitlin
20430728bc Add wxFileDialog::ShowCommFileDialog()
No changes, just extract this function from ShowModal() before adding an
alternative implementation in the upcoming commits.
2022-05-25 21:06:41 +01:00
DietmarSchwertberger
65470df332 introduce CheckIfAtDragSourceLine for a better check if line would be moved; check also f. marker colour change 2022-05-24 21:59:58 +02: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
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
21fe682187 Don't store wxBitmap objects on the heap in wxPropertyGrid
To simplify managing the life cycle of the objects.
2022-05-21 22:08:02 +02:00