Commit graph

4505 commits

Author SHA1 Message Date
Vadim Zeitlin
7999102295 Document wxGrid::RefreshBlock()
This function is useful and there is no reason to exclude it from public
API and it should have been done back in 00224e3f30 (Add
wxGrid::RefreshBlock() helper, 2019-07-11) when it was added.
2022-08-03 19:36:22 +02:00
Vadim Zeitlin
c0f1ecf263 Fix another unbalanced Doxygen grouping command after last commit
Add the missing section start to wxString documentation.

See #22248.
2022-08-03 19:36:22 +02:00
Vadim Zeitlin
8ac10d28f8 Fix all the other comments with Doxygen grouping commands too
This is the same thing as bd92523bc5 (Fix use of Doxygen @addtogroup
command, 2022-08-03) except it fixes comments format for all the other
occurrences of "@{" and "@}" too, not just for those used with
@addtogroup which was the problem in #22572.

This fixes many different formatting problems due to attaching various
Doxygen commands to wrong elements because of broken grouping, e.g. all
overloaded functions were documented incorrectly and there were several
problems in wxString documentation.

See #22248.
2022-08-03 18:58:47 +02:00
Vadim Zeitlin
4c46e01b14 Remove stray Doxygen end group marker
This fixes a warning given, after the changes of the last commit, by
Doxygen 1.9.1 but, amazingly, not given by the latest 1.9.4.

See #22572.
2022-08-03 18:35:45 +02:00
Vadim Zeitlin
bd92523bc5 Fix use of Doxygen @addtogroup command
Put Doxygen grouping constructs ("@{" and "@}") in Doxygen comments
rather than plain C++ ones to make them actually take effect. Some old
Doxygen versions (~1.8.5) did recognize them even in plain comments, but
the currently uses 1.9.1 one does not and @addtogroup didn't have any
effect as the result.

This fixes the problem with the "Functions by Category" pages being
empty in the resulting HTML documentation.

See #22572.
2022-08-03 18:28:06 +02:00
Vadim Zeitlin
6917b6b0f1 Document wxTHREAD_WAIT_DEFAULT value change
It has been a long-time coming, see b95a7c3144 (Allow wxThread::Wait()
and Delete() to block, even under wxMSW., 2011-03-14), but do still
document that it has finally changed.
2022-08-03 17:39:48 +02:00
Artur Wieczorek
5e2da5a106 Get rid of v2.8 code 2022-08-02 08:26:29 +02:00
Vadim Zeitlin
57bf9c5af5 Escape all "__" in Doxygen to preserve them in the output
New version of Doxygen interprets __foo__ as Markdown markup and
consumes the underscores, which mangles the identifier.

Prevent this from happening by escaping the leading underscore for all
occurrences of "__" outside of the code blocks, this seems to be the
least intrusive fix.

See #22671.
2022-07-30 14:56:23 +02:00
Vadim Zeitlin
8e2c683bf7 Merge branch 'grid-message'
Improve wxGrid messages documentation and safety.

See #22652.
2022-07-24 15:52:15 +01:00
Vadim Zeitlin
c15c0040db Correct documentation of wxGridTableMessage ctor parameters
Notably explain that the first parameter should contain the number of
rows/columns when appending, not the position.
2022-07-19 16:18:47 +01:00
Vadim Zeitlin
39a226c600 Document customizing shortcuts section title in wxMSW
It's quite non obvious that the "FileDescription" field of the version
information defined in the resource file is used for this, so explain
it.

Co-Authored-By: Mark Roszko <mark.roszko@gmail.com>
2022-07-18 23:57:49 +01:00
Vadim Zeitlin
854599c0bd Add wxFileDialog::AddShortcut() documentation
Also add a comment to the sample explaining the default behaviour.
2022-07-17 22:24:56 +01:00
Vadim Zeitlin
134862a464 Document that wxWindow::SetClientSize() doesn't support -1
Unlike SetSize(), passing -1 to this function doesn't preserve the
existing size in the corresponding direction.
2022-07-15 00:57:53 +02:00
MikeWang000000
d8eddbd115 Fix using non-alphanumeric language ids in MSW resources
The character "@", which can be part of the full language name, e.g. in
the case of "sr@latin", can't be reliably used as part of resource name,
so replace it with "_" in wxResourceTranslationsLoader.

Closes #22589.

Closes #22601.
2022-07-12 15:35:52 +02:00
Tim Stahlhut
4010140491 Don't use non-ASCII characters in interface headers
Replace "’s" with "'s" in interface headers as the former broke wxPython
build with SIP under MSW.

Closes #22605.
2022-07-06 00:26:54 +02:00
Ronny Krüger
8ef6f9fa27 Add a 'revision' component to wxVersionInfo
Some versions consist of four parts with the last part being called the
revision or build number. wxVersionInfo is now able to save such a
fourth number.
2022-06-29 22:50:12 +02:00
Vadim Zeitlin
b95f2b699d Clarify that wxDC::CopyAttributes() doesn't copy scaling factor
Also show an example of setting the scaling factor in wxMemoryDC
documentation.
2022-06-28 22:50:24 +02:00
Vadim Zeitlin
b9a84dcae5 Improve wxMemoryDC documentation
Try to explain the difference between SelectObject() and
SelectObjectAsSource() more clearly.
2022-06-28 22:45:30 +02:00
Vadim Zeitlin
7e1cbe8f79 Merge branch 'bmpbndle-from-xpm'
Allow creating wxBitmapBundle from XPM and use it in wxRichToolTip.

See #22573.
2022-06-27 01:33:28 +02:00
Vadim Zeitlin
e9e22477cc Remove "experimental" warning from wxDisplayChangedEvent docs
There are no known big problems with this event any longer.
2022-06-26 22:18:17 +02:00
Vadim Zeitlin
2fa0bd5b1b Improve documentation of the default wxEVT_DPI_CHANGED handler
Mention that the size may grow unexpectedly.

Co-Authored-By: Maarten Bent <MaartenBent@users.noreply.github.com>
2022-06-26 22:17:15 +02:00
Vadim Zeitlin
74967df874 Take wxBitmapBundle, not just wxIcon, in wxRichToolTip::SetIcon()
Extend this function to allow passing it multi-resolution bitmaps too.
2022-06-26 21:52:30 +02:00
Vadim Zeitlin
f48a13514f Allow constructing wxBitmapBundle from XPM data for compatibility
Add another compatibility implicit constructor to allow the existing
code, directly passing XPM data to various functions that used to take
wxBitmap or wxIcon and now taking wxBitmapBundle, to work.

Closes #22566.
2022-06-26 20:52:13 +02:00
Vadim Zeitlin
f0ea00cd35 Let application determine TLW size after DPI change
Don't change the window size automatically if the application handled
wxEVT_DPI_CHANGED event to allow it to choose a better size than what is
suggested by MSW itself.

Closes #19152.
2022-06-24 02:49:34 +01:00
Vadim Zeitlin
c639226543 Merge branch 'dvc-model-simplify'
Simplify defining classes inheriting from wxDataViewModel.

See #22553.

Closes #17755.
2022-06-20 00:42:54 +02:00
Vadim Zeitlin
8872a77d66 Merge branch 'splitter-invisible-sash'
Make wxINVERT logical function work in at least some circumstances with
wxGTK3/X11 and use this to make wxSplitterWindow and wxSashWindow
separator visible during resizing.

See #22546.

Closes #16890.
2022-06-20 00:38:55 +02:00
Vadim Zeitlin
171f9ab8f4 Make wxBitmap::HasAlpha() and UseAlpha() available in all ports
HasAlpha() was already available in most of them, now ensure that it's
present in all of them, especially as it has a reasonable default
implementation.

UseAlpha() was only present in wxMSW and wxOSX and still remains only
implemented there, but provide at least a stub for it elsewhere as well
to avoid problems such as that of #17393.

See #22545.

Closes #17397.
2022-06-20 00:38:09 +02:00
Vadim Zeitlin
dbd211dbc2 Don't require overriding wxDataViewModel::GetColumn{Count,Type}()
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".
2022-06-18 19:19:16 +02:00
Vadim Zeitlin
5783b22d3d Add wxCOMPOSITION_DIFF composition mode
This is implemented in Cairo and CoreGraphics renderers only, but this
is still useful as these renderers are used on the platforms where wxDC
wxINVERT logical function is not supported and this composition mode can
partially replace it.
2022-06-17 01:32:07 +01:00
Vadim Zeitlin
dd5162ee1d Merge branch 'menu-bitmaps'
Fix changing menu bitmaps from wxEVT_MENU_OPEN and provide
wxMenuItem::GetBitmapBundle() in addition to GetBitmap().

See #22532.
2022-06-16 13:03:01 +01:00
Vadim Zeitlin
5f8b900078 Add wxMenuItem::GetBitmapBundle()
This is needed to e.g. allow cloning a wxMenuItem fully without losing
any of its data.
2022-06-16 01:09:43 +01:00
Vadim Zeitlin
d0b32e71f5 Document wxMSW-specific wxMenuItem methods separately
Also remove obsolete note about having to call SetBitmap() before
appending the item to the menu as this is not true any longer since
quite some time.
2022-06-16 01:09:43 +01:00
Vadim Zeitlin
475c2ca201 Add an example of customizing "Save" file dialog too
Show doing it in the sample and also add a missing line to the example
in the documentation.
2022-06-12 00:51:31 +01:00
Vadim Zeitlin
7faa70a4a9 Merge branch 'listctrl-col-count'
Ensure wxListCtrl::GetColumnCount() behaves consistently on all
platforms with wxLC_LIST style.

See #22497.

Closes #22482.
2022-06-10 17:16:47 +01:00
Vadim Zeitlin
9547cbc6a4 Extend wxListCtrl::GetColumnCount() tests to all modes
Check that it consistently returns 0 in the wxLC_ICON and
wxLC_SMALL_ICON modes under all platforms.

Document the behaviour of this function in all modes.
2022-06-08 13:52:53 +01:00
Scott Talbert
dc4d1b66e4 Fix documentation for wxPropertyGridPageState::GetColumnFullWidth 2022-06-08 08:59:53 +02: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