Commit Graph

4521 Commits

Author SHA1 Message Date
Miguel Gimenez
c08e48d627 Use wxCOL_WIDTH_DEFAULT instead of -1 in wxDataViewCtrl functions
Replace -1 with wxCOL_WIDTH_DEFAULT in the header and the documentation
for clarity.

See #23307, #23325.

(cherry picked from commit cf3dcb230a009c6748dc9eb986df805edfac84b4)
2023-03-09 00:21:57 +01:00
Blake-Madden
cb4ebdc66d Document wxSplitterWindow::SetSashPosition() argument better
Explain the special meaning of 0 and negative values in this function.

See #23299.

(cherry picked from commit 809d2918ccd01ac029ff3d0bc3a143c140832862)
2023-02-28 18:31:52 +01:00
Vadim Zeitlin
026b2c5dc9 Remove wxSYS_COLOUR_MAX from documentation
There is no real need to document this, it's not a valid enum value and
having it in this file without a trailing comma was a syntax error.

Closes #23298.

(cherry picked from commit 5b6b644e8bcb5b9503ff1a5fb49b2db768cb625c)
2023-02-25 22:04:53 +01:00
Vadim Zeitlin
1d1b13253b Add wxUILocale::GetSystemLocaleId()
This function replaces the existing GetSystemLocale() as it can
represent the locales that don't have any corresponding wxLanguage
values and for which GetSystemLocale() has no choice but to return
wxLANGUAGE_UNKNOWN.

(cherry picked from commit 14714856b3956d52ede8bcf27345fdc6efd438e9)
2023-02-08 20:51:45 +01:00
Vadim Zeitlin
dc1710bbf3 Recommend using wxUILocale::GetSystemLanguage() in wxLocale docs
The wxUILocale function really returns the default language unlike the
one in wxLocale which must kepe using the default locale for
compatibility, making its name confusing.

(cherry picked from commit ce04dbc0247aa548680f753568f9c9c39a4236b9)
2023-02-08 20:51:45 +01:00
Vadim Zeitlin
ee2a2ccaee Fix return value of wxToolBar::GetToolBitmapSize() under GTK/Mac
Fix another pixel units confusion in wxToolBar code and ensure that
"sizeNeeded" is expressed in logical units when a fixed bitmap size is
set, to make it consistent with the case when it is not set, and also
because bitmap size is supposed to be expressed in logical pixels, in
both SetToolBitmapSize() and, for consistency, GetToolBitmapSize() too.

Also explicitly mention the latter in the documentation.

See #23228, #23222.

(cherry picked from commit 453a52b942fa27c8f412716c8290dbcb6172d0e4)
2023-02-08 17:50:35 +01:00
Scott Talbert
f55ed82261 Document wxBookCtrlBase::GetControlSizer
The documentation for wxChoiceBook discusses using this method, but it
was not previously documented.

See #23211.

Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
(cherry picked from commit 3cc00091e2d251f9b6cae20dc997f068604e0b4f)
2023-02-03 16:37:12 +01:00
Blake-Madden
1d32868d36 Fix typo in wxDEFINE_EVENT macro name in the documentation
Should be wxDEFINE_EVENT, not wxDEFINE_EVENT_TYPE.

See #23126.

(cherry picked from commit 451772530c670b91f06c77e84198898700645091)
2023-01-12 17:37:25 +01:00
Vadim Zeitlin
68f6dc2cb6 Update copyright years to 2023 in 3.2 branch too
Just run misc/scripts/inc_year and commit the results.

See #18690.
2023-01-03 04:21:29 +01:00
Vadim Zeitlin
0c4f02606b Fix wxSysColourChangedEvent brief description in Doxygen
This is another instance of the problem mostly fixed back in a193a6786d
(Escape space after "e.g." or "i.e." in the manual., 2014-12-24),

See #22925.

(cherry picked from commit fd8453ed08a03416c789df6f7e0bed9509e31309)
2022-12-18 02:27:37 +01:00
Vadim Zeitlin
b2c37a7e7f Improve documentation of events sent by wxTreeCtrl::EditLabel()
Make it clear that wxEVT_TREE_END_LABEL_EDIT is sent whether the user
accepts or cancels editing the label.

See #22867.

(cherry picked from commit 6e940d1a108bbf4a07586d32f0d8061beb63f927)
2022-12-05 23:36:44 +01:00
Vadim Zeitlin
720cff6e9c Document that wxSearchCtrl derives only from wxTextEntry
It doesn't derive from wxTextCtrl in all ports, even if it does in some
of them.

See #22951.

(cherry picked from commit 76145b377ccdc59d4e0f9d5a402efcb863dfebe3)
2022-11-12 17:53:23 +01:00
PB
b597d39cdd Fix the name of EVT_WEBVIEW_FULLSCREEN_CHANGED macro in the docs
It had an extra underscore in it (EVT_WEBVIEW_FULL_SCREEN_CHANGED).

See #22947, #22948.

(cherry picked from commit fc9c9c0e1bbdbc0038bda070fc640b413f00b454)
2022-11-12 17:47:15 +01:00
PB
d109e79653 Update strftime() link in wxDateTime::Format() docs
The old link to https://cplusplus.com became invalid.

See #22912, #22913.

(cherry picked from commit 232e161ed63362ce5053f1e147491c780fee2e64)
2022-11-12 17:47:15 +01:00
Vadim Zeitlin
7835005985 Fix wxTaskBarButton availability in the documentation
It's only available under MSW and doesn't have a generic implementation.

(cherry picked from commit 0850666ebdec59010a2ac7317f62bad6cf7fb4f6)
2022-10-21 02:53:08 +02:00
Vadim Zeitlin
47a7041e33 Correct wxBitmapBundle best match choice description in its docs
See #22891.

(cherry picked from commit 6e3d4b87666931b5c7eec0034d609f78e82cf5d9)
2022-10-21 02:53:03 +02:00
Vadim Zeitlin
b6d9948852 Implement wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK in wxOSX
Use a custom NSTableHeaderView subclass just to be able to override
rightMouseDown: in it and generate this event, as there is no direct
support for this at NSOutlineView level.

See #22833.

(cherry picked from commit 5ac9b4897192a3545cc1cd1b814a130ddc191cab)
2022-10-05 00:44:38 +02:00
Tobias Taschner
caf206039a Document third wxBitmapBundle::FromSVG() variant
Add a note that data has to be null terminated with the variants
without len parameter and to use the third variant for data
that is not null terminated.

See #22838.

(cherry picked from commit 17934d3d624a93b39b9c4935e2086d6ab0d54c1a)
2022-10-02 01:45:41 +02:00
Vadim Zeitlin
d723a1b3bb Improve formatting of wxStandardPaths::UseAppInfo() documentation
Don't use @code as we don't want the expression to appear on its own
line(s).

Also use Markdown `` instead of Doxygen @c as the former is more general
and can be used around arbitrary runs of text.

(cherry picked from commit 3bf8a60c6c1be7de663ab114100898fa9e0abe36)
2022-09-30 15:38:38 +02:00
Vadim Zeitlin
401bab8e9c Improve wxEVT_GRID_SELECT_CELL documentation
Mention that the event can be vetoed and the consequences of that.

(cherry picked from commit 0067ff7753baf3d8954168ea1aad4a7f61910ed8)
2022-09-27 23:27:19 +02:00
PB
7352e5a363 Improve wxBitmapBundle documentation, notably mention SVG support
Add an SVG and a wxBitmapBundleImpl to the list of methods that can be
used when creating a wxBitmapBundle.

Remove a generic sentence promising adding other methods of creating
bundles in the future.

See #22774.

(cherry picked from commit 17371d911d9ec68b0c2d98c7f56977523803b392)
2022-09-05 20:36:11 +02:00
Vadim Zeitlin
ccca07af33 Fix crash when using wxNotebook with glib 2.73 or later
Make GTK notebook log suppression opt-in to avoid a fatal error when the
application calls g_log_set_writer_func() itself, as doing it more than
once immediately kills the application with glib 2.73 and there is no
way to check if it had been already done or not (you have to admire the
purity of the API design here).

This is unfortunate as 99% of the wxWidgets applications that do _not_
call g_log_set_writer_func() would now show the spurious diagnostics by
default again, but preferable to making the remaining 1% crash, and
there doesn't seem to be any other solution.

Call the new GTKAllowDiagnosticsControl() function in the notebook
sample to at least still avoid getting the spurious diagnostic messages
described in #22176 there.

See #22717.

(cherry picked from commit 8af645ed229ebb2542769775565ce85c158e4fb1 and
adapted to 3.2 stable ABI).
2022-08-30 12:35:46 +02:00
Lauri Nurmi
b6803cdfd2 Fix double negatives used with 'neither' in docs and comments
In many cases it should be 'either', and 'nor' should be 'or'
accordingly.

No changes to actual code.

See #22723.

(cherry picked from commit 66916c74a3d44e8bc1b30cf42309e36e5d9e9135)
2022-08-19 16:30:25 +02:00
Vadim Zeitlin
c5b8634db3 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.

(cherry picked from commit 7999102295c81ccda5a0a07f55fec47e8e0fa8d9)
2022-08-18 19:15:47 +02:00
Vadim Zeitlin
ccba6d73f9 Fix use of Doxygen grouping
Fix wrong use of Doxygen grouping-related markup which somehow worked in
older Doxygen versions, but doesn't work any longer.

This fixes the problem with the "Functions by Category" pages being
empty in the resulting HTML documentation and wrong documentation being
shown for a bunch of wxString members.

This is a combined cherry-pick of the following master commits:

bd92523bc5 Fix use of Doxygen @addtogroup command
4c46e01b14 Remove stray Doxygen end group marker
8ac10d28f8 Fix all the other comments with Doxygen grouping commands too
c0f1ecf263 Fix another unbalanced Doxygen grouping command after last commit

See #22248, #22572.
2022-08-18 19:15:47 +02:00
Vadim Zeitlin
29cce9b8a3 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.

(cherry picked from commit 57bf9c5af5258f1f0f20d75c708dcec9d876b6e2)
2022-08-18 19:15:20 +02:00
Vadim Zeitlin
e1ac455a6e Correct documentation of wxGridTableMessage ctor parameters
Notably explain that the first parameter should contain the number of
rows/columns when appending, not the position.

(cherry picked from commit c15c0040dbb80d20251674f7e582d75d0b1962c2)
2022-08-18 19:14:45 +02:00
Vadim Zeitlin
475f66e246 Improve wxRegEx::GetMatch() return value documentation
Don't imply that the function returns false for the empty capture groups
because this is not the case (and never was).

See #22708.

(cherry picked from commit 537f11fd4d258d11454a75fa5891e4f011ff0da5)
2022-08-14 17:15:51 +02:00
Vadim Zeitlin
d013367c24 Backport wxFileDialog::AddShortcut() changes to 3.2
This is a backport of #22635 with the following changes:

- Don't make the new function virtual to avoid changing ABI.
- Use wxABI_VERSION checks around the declarations of the new
  functions (and also constants, for good measure).
- Add new symbol to the linker version script (creating a new
  section for it).
- Document the function as being new in 3.2.1, not 3.3.0.

See #22543.
2022-08-01 22:14:09 +02:00
Vadim Zeitlin
e3da07a582 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.

(cherry picked from commit 134862a4648f594d3de766b00c55ff730e12d03b)
2022-07-17 15:43:24 +02:00
Tim Stahlhut
5b5ec3804a 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.

See #22605.

(cherry picked from commit 4010140491a4db4067a7754e6cf2ea7dd71e2161)
2022-07-06 00:27:55 +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