Commit Graph

3792 Commits

Author SHA1 Message Date
Stefan Csomor
6cab9052b8 updating docs for min system 2020-07-04 21:28:13 +02:00
Gilbert Pelletier
76c7f723fc Add wxFontDialog::RestrictSelection() to disallow raster fonts
Under MSW it is possible to restrict the native font dialog to showing
only scalable fonts only, disallowing the raster fonts, so add a method
to wxFontDialog exposing this functionality in wxWidgets API.

Closes https://github.com/wxWidgets/wxWidgets/pull/1926

Closes #16988.
2020-07-04 13:14:38 +02:00
Vadim Zeitlin
ca84560350 Add wxGridCellActivatableEditor and show it in the grid sample
Add a helper class making it easier to define activation-only editors
and use it to implement MyGridStarEditor in the sample, showing a
typical example of using such editor.
2020-06-30 02:30:36 +02:00
Vadim Zeitlin
3cc3236f10 Add support for "activatable" editors to wxGrid
This is useful for editors which don't really need to show any control
as they can change their value directly and will be used to reimplement
wxGridCellBoolEditor in the upcoming commits.
2020-06-30 02:25:14 +02:00
Vadim Zeitlin
d14a33bf37 Merge branch 'grid-streamline'
Various simplifications and bug fixes in wxGrid code, mostly related to
handling in-place cell editing.

See https://github.com/wxWidgets/wxWidgets/pull/1910
2020-06-30 00:25:46 +02:00
Robin Dunn
c43af017c9 Document wxDC::[GS]etGraphicsContext 2020-06-29 10:14:43 -07:00
Vadim Zeitlin
c73634c520 Add DoShowCellEditControl() showing the editor unconditionally
It doesn't make sense to perform the checks in ShowCellEditControl()
when it's called from EnableCellEditControl() and this makes the code
unnecessarily fragile as m_cellEditCtrlEnabled needs to be set at just
the right moment for it to work correctly.

Call the new DoShowCellEditControl() instead and perform the checks only
in the public function, for compatibility.

Also note in a comment and the documentation that ShowCellEditControl()
is not very useful anyhow and that EnableCellEditControl() should most
often be used instead.

No real changes (the commit is best viewed ignoring whitespace changes).
2020-06-28 00:30:57 +02:00
Vadim Zeitlin
63643eb122 Fix typo in wxGrid::EnableCellEditControl() documentation
Just s/show/shown/
2020-06-28 00:02:43 +02:00
Vadim Zeitlin
45bc2e648b Remove check for read only cells from IsCellEditControlEnabled()
This check was introduced back in 283b7808d8 (added support for readonly
cells and 3d border drawing, 2000-02-16), but was wrong even then and
remained wrong ever since: we must not set m_cellEditCtrlEnabled to true
when the current cell is read-only, so there is no need to check for the
latter condition if m_cellEditCtrlEnabled is indeed true.

Ensure that we really never erroneously set m_cellEditCtrlEnabled for
the read-only cells by replacing an wxASSERT_MSG checking for this in
EnableCellEditControl() with wxCHECK_RET().

Also explicitly document this function precondition, also added back in
b54ba67107 ([...] added CanEnableCellControl() and use it before calling
EnableEC, 2000-02-17) but never documented so far.
2020-06-28 00:02:29 +02:00
Vadim Zeitlin
d7f19ee610 Fix spelling in comments and documentation using codespell
Apply the utility from https://github.com/codespell-project/codespell/
to fix spelling issues in the headers under both include and interface
directories and add a file with a couple of exceptions.

The exact command line used was:

    $ codespell -w -I misc/scripts/codespell.ignore -i 3 in*
2020-06-27 22:56:22 +02:00
Vadim Zeitlin
2a368fec9f Document that using wxClientDC for drawing is not portable
We can't make wxClientDC work on the platforms not supporting drawing
outside of wxEVT_PAINT handler, but at least document that this doesn't
work.

Also add an example of using this class for the purpose for which it
still works (measuring) and remove references to it and wxWindowDC from
wxPaintDC documentation as we don't want to encourage people using it.

See #17820.
2020-06-27 16:37:48 +02:00
Vadim Zeitlin
1905f60b2d Merge branch 'grid-enhance'
Many enhancement to wxGrid UI: fix redraw and (some) flicker bugs; fix
bugs with mouse handling; improve editors positioning etc.

See https://github.com/wxWidgets/wxWidgets/pull/1902
2020-06-26 22:20:41 +02:00
Hertatijanto Hartono
8ff434c2a5 Fix typo in settings.h and wxListCtrl Class Reference
Consistently use "colour" spelling.

Closes https://github.com/wxWidgets/wxWidgets/pull/1903
2020-06-23 01:35:54 +02:00
Ian McInerney
4ac648901d Don't allow using GetPath/GetFilename() with wxFD_MULTIPLE
GetPaths/GetFilenames() must be used instead when more than one file
could be selected: document this and assert if the wrong functions are
called.

Closes https://github.com/wxWidgets/wxWidgets/pull/1883
2020-06-22 14:04:10 +02:00
Vadim Zeitlin
867cc2a3eb Handle clicks on grid edges normally when not using drag-resizing
Clicking on (or near) the grid column or row edges was handled specially
to allow dragging them in order to resize the column or row, but this
doesn't need to be done if drag-resizing the columns or rows is not
allowed in the first place and resulted in surprising user-visible
behaviour: e.g. when using row selection, clicking mostly anywhere in
the row selected it, except if the click happened to be between the two
columns, in which case it didn't.

Fix this and always select the row in such scenario now.

Unfortunately, doing this required adding yet more CanDragXXX()
functions in addition to the already impressive panoply of them in
wxGrid, but we need CanDragGridColEdges() as none of the existing
functions checked for m_useNativeHeader (there was instead an ad hoc
check for it directly in the mouse handling code) and the row version
had to be added for symmetry.
2020-06-21 19:29:37 +02:00
Vadim Zeitlin
350ae65cb6 Fix parameter name in wxDC::DrawBitmap() documentation
Closes #18795.
2020-06-21 00:07:01 +02:00
Hertatijanto Hartono
895424ecc0 Add wxWebView::SetZoomFactor(float) and GetZoomFactor()
The new method allows to set the zoom level more precisely than the
existing SetZoom(wxWebViewZoom).

Also improve the webview sample by using radio menu items instead of
check items and manually resetting them.

Closes https://github.com/wxWidgets/wxWidgets/pull/1894

Closes #18769.
2020-06-18 03:13:00 +02:00
Vadim Zeitlin
dc9040cc89 Merge branch 'grid-autosize'
Optimize wxGrid::AutoSizeColumns() for big grids.

This includes an optimization of wxDC::GetTextExtent() at the price of
slightly reduced precision in wxMSW.

See https://github.com/wxWidgets/wxWidgets/pull/1893
2020-06-16 20:37:57 +02:00
Vadim Zeitlin
036ab992d5 Merge branch 'list-deselect-event'
Consistently send DESELECTED events from virtual wxListCtrl.

See https://github.com/wxWidgets/wxWidgets/pull/1857
2020-06-13 22:50:55 +02:00
Vadim Zeitlin
71d42a8290 Add wxGridCellRenderer::GetMaxBestSize()
This is another optimization, useful for the renderers that are used
with the values of a fixed form or part of a limited set, as it is much
faster to compute the best size for all values of the set rather than
computing them for all the cells in the column.
2020-06-13 15:51:20 +02:00
Vadim Zeitlin
249db04dd3 Add wxGridTableBase::CanMeasureColUsingSameAttr()
This allows to optimize AutoSizeColumns() in the common case when all
cells in the same column can be measured using the same attribute.
2020-06-11 10:03:13 +02:00
Vadim Zeitlin
8ff6fa6f54 Use GetAnimation() in wxAnimationCtrlXmlHandler again
This function basically only exists in order to be used in this handler,
so extend it to allow doing it by adding wxAnimationCtrlBase argument to
it, allowing it to create wxAnimation object compatible with the given
control.

This reduces code duplication and, incidentally, makes GetAnimation()
more useful for any user-defined XRC handlers.
2020-06-09 18:07:10 +02:00
Vadim Zeitlin
de2fba540b Document wxSizer::RecalcSizes() and RepositionChildren() better
Mention that RecalcSizes() shouldn't be called any more, after the
changes of 622deec262 (Replace wxSizer::RecalcSizes() with
RepositionChildren(), 2015-10-11), and that RepositionChildren()
replacing it shouldn't be directly called neither.
2020-06-08 13:26:59 +02:00
Vadim Zeitlin
0d68a6d42e Fix formatting of @since in the list items in wxGauge docs
The line break after "Since" doesn't look good in this context, so avoid
using @since and spell it out explicitly.
2020-06-07 18:55:11 +02:00
Vadim Zeitlin
90783fec05 Merge branch 'generic-dvc-improve-dnd'
Improve drag-and-drop in generic wxDataViewCtrl.

See https://github.com/wxWidgets/wxWidgets/pull/1836
2020-06-07 17:22:05 +02:00
Vadim Zeitlin
cbe21c0cc9 Recommend SetMinSize() instead of wxSizerItem::SetInitSize()
It's not really clear why do we have this function at all, but
SetMinSize() name is more clear and consistent with wxWindow, so prefer
using it instead.
2020-06-02 18:33:57 +02:00
Ian McInerney
68561ecea8 Minor doc fixes for wxSizerItem methods
Fix typo in GetRatio() documentation and add documentation for
SetInitSize().

Closes https://github.com/wxWidgets/wxWidgets/pull/1882
2020-06-02 18:33:02 +02:00
Vadim Zeitlin
5b810b129d Fix wxUIActionSimulator::Text() parameter documentation
This function explicitly accepts ASCII strings only, so it's limited to
"const char*", but was incorrectly documented as taking wxString.

Closes https://github.com/wxWidgets/wxWidgets/pull/1879
2020-06-01 17:25:41 +02:00
Vadim Zeitlin
66c8437952 Add notes about standard threading classes to the documentation
There is no reason to use wxMutex and wxCondition in C++11 programs as
they have about the same API as the corresponding standard classes but
are, well, non-standard.

wxThread API is different from std::thread, so it's a less obvious
replacement, but still at least mention the standard class in its
documentation.
2020-06-01 15:10:24 +02:00
Vadim Zeitlin
192e8befb8 Fix example showing wxMutex usage in documentation
Fix wrong use of pointer and wrong variable name.

Closes #18778.
2020-06-01 15:04:45 +02:00
Vadim Zeitlin
789c7cec7b Merge branch 'grid-col-row-sel'
Fix returning duplicates from Get{Row,Col}Selection(); add more tests.

See https://github.com/wxWidgets/wxWidgets/pull/1874
2020-05-31 00:43:23 +02:00
Lauri Nurmi
96b83a1523 Make virtual lists send DESELECTED events consistently on both implementations
In the case when a listctrl is clicked outside of any item, the item is
visually deselected, and it is logical that a DESELECTED is sent.

For non-virtual lists this would happen, but for virtual lists it would
either happen or not happen depending on implementation (MSW/generic)
and mode (single/multi). From now on the DESELECTED event is always sent.
2020-05-28 10:51:58 +03:00
Vadim Zeitlin
5a5ed51528 Merge branch 'aui-repaint-optimize'
Optimize AUI repainting under MSW and always use live resize mode with
GTK3.

See https://github.com/wxWidgets/wxWidgets/pull/1869
2020-05-27 13:40:04 +02:00
Vadim Zeitlin
3307000baa Add wxGrid::GetSelectedRowBlocks() and GetSelectedColBlocks()
These functions are much simpler to use in the application code using
wxGrid in row- or column-only selection mode than GetSelectedBlocks()
itself because they take care of deduplicating, ordering and squashing
together the adjacent ranges, so that the application can use their
results directly, unlike with GetSelectedBlocks().
2020-05-27 03:19:34 +02:00
Tomay
9990d91dfc Fix generated documentation for wxZipEntry::GetInternalName()
Remove the group around it to avoid problems due to the existence of
another overload.

This completes the changes of ca59d38cfd (Add missing static to
wxZipEntry::GetInternalName() documentation, 2020-05-25).

Closes https://github.com/wxWidgets/wxWidgets/pull/1876
2020-05-27 01:46:59 +02:00
Tomay
ca59d38cfd Add missing static to wxZipEntry::GetInternalName() documentation
Closes https://github.com/wxWidgets/wxWidgets/pull/1872
2020-05-25 22:46:15 +02:00
Vadim Zeitlin
e2562b08a4 Explain that wxApp::OnInitCmdLine() must not call Parse()
Make it clear that this method should only set up the command line
options to recognize, but not actually parse them.

See #18771.
2020-05-25 22:40:11 +02:00
Vadim Zeitlin
faea4da8ff Force enable live resizing in wxAUI for GTK 3 too
Do for GTK 3 the same thing as was already done for macOS in 68030cae69
(Added wxAUI_MGR_LIVE_RESIZE flag for live sash sizing, the default on
wxOSX, 2009-01-07) and for the same reasons: sash feedback is simply
invisible with this port and so can't be used.
2020-05-25 18:02:14 +02:00
Vadim Zeitlin
f6727a17a2 Add wxAuiManager::AlwaysUsesLiveResize()
This allows to check if it's worth specifying wxAUI_MGR_LIVE_RESIZE or
not and allows to get rid of the corresponding menu item in the sample
if it doesn't do anything anyhow.
2020-05-25 18:01:09 +02:00
Vadim Zeitlin
74bc08535b Replace wxAuiManager_HasLiveResize() hack with normal accessor
For some unknown reason a free function taking "*this" was used instead
of just an accessor. Add the latter to make this code less unusual.
2020-05-25 17:52:08 +02:00
Vadim Zeitlin
758a81bc89 Allow using wxWindowUpdateLocker conditionally
This can be useful if the window needs to be frozen only if some
run-time condition holds true.
2020-05-25 17:52:08 +02:00
Vadim Zeitlin
152f3154be Make wxWindowUpdateLocker ctor explicit
No real changes, just avoid using ctor allowing implicit conversions
when none are desired.
2020-05-25 17:52:08 +02:00
Vadim Zeitlin
7338f30167 Document wxDataViewEvent::GetProposedDropIndex()
This method was added back in d3e8d3f271 (Support or disable "insert"
for drag/drop wxDataViewCtrl on OSX, 2018-07-16) but didn't appear in
the documentation at all, so describe it, at least minimally.

See #18167.
2020-05-25 01:52:32 +02:00
Vadim Zeitlin
d83478e94d Document wxBookCtrl not sending events when deleting last page
Currently, DeletePage() and RemovePage() functions don't send any events
when deleting the last page of the control and while this is
inconsistent with the behaviour when deleting the other pages, it seems
too dangerous to change this now, as the existing application code might
not expect getting page change events with the invalid page index.

So just document the current behaviour.

Ideal would be to add a unit test checking that this is really the case
under all platforms, for now it was just checked manually under MSW and
GTK.

Closes https://github.com/wxWidgets/wxWidgets/pull/1848
2020-05-21 02:06:47 +02:00
Tomay
04322fa711 Fix references to wxZipEntry::GetNextEntry() in documentation
It should actually be wxZipInputStream::GetNextEntry().

Closes https://github.com/wxWidgets/wxWidgets/pull/1858
2020-05-21 01:59:00 +02:00
Vadim Zeitlin
17d759d579 Merge branch 'mediactrl-doc'
Improve wxMediaCtrl documentation.

See https://github.com/wxWidgets/wxWidgets/pull/1856
2020-05-21 01:57:33 +02:00
Vadim Zeitlin
96ad142ae1 Remove the mention of MCI-based backend from wxMediaCtrl docs
MCI is not used any more and the backend is not relevant any longer.
2020-05-21 01:55:59 +02:00
Artur Wieczorek
19da5f61bb Update wxSpinCtrlDouble documentation
Closes #17085.
See #18764.
2020-05-18 19:13:31 +02:00
PB
6a04fd2f42 Fix few more things in wxMediaCtrl docs
Should be merged with the previous commit.

Fixes a typo introduced in the previous commit.
Updates the section about force linking a module.
2020-05-16 14:56:00 +02:00
PB
e6eaf6425c Improve wxMediaCtrl documentation
Fix the totally broken example code.
Replace "movie" with "media" where appropriate.
Fix few spelling and grammar errors.
2020-05-16 14:29:45 +02:00