Commit Graph

3753 Commits

Author SHA1 Message Date
Vadim Zeitlin
e803408058 Document wxWindow::PopupMenu() effect on focus
This may be not obvious, so mention it explicitly.
2020-04-18 20:35:22 +02:00
Vadim Zeitlin
efa302c577 Improve wxMenu::Break() documentation and show it in the sample
Document that this method only actually does something in wxMSW.

Demonstrate the use of it in the menu sample.

See #18692.
2020-04-18 00:43:09 +02:00
Vadim Zeitlin
e5d03323f9 Rename wxGridBlockCoords::ContainsCell/Block() to just Contains()
These methods do the same thing, so it seems better to use the same name
for them.

This is not really a backwards-incompatible change, as these methods
were just added in the parent commit, so nobody is using them yet.
2020-04-15 18:37:06 +02:00
Vadim Zeitlin
a5a7641616 Merge branch 'grid-selection-refactoring'
Completely overhauled selection handling in wxGrid.

Make various ways of extending selection (using Shift-arrow keys,
Ctrl-Shift-arrows, Shift-click etc) work as expected from the user point
of view instead of producing various bizarre results. Also improve
row/column header click selection as well as Ctrl/Shift-Space handling.

Internally, store selection as just a vector of blocks, independently of
the selection mode, and provide a simple API for iterating over it which
remains usable even with selections containing millions of cells (as
long as they're still composed of only a few blocks, which is the case
in practice).

Add more tests and add display of the current selection to the sample.

See https://github.com/wxWidgets/wxWidgets/pull/1772
2020-04-15 18:10:08 +02:00
Vadim Zeitlin
945718ef5f Fix documented return type of wxGridBlockCoords::ContainsBlock()
This should have been part of 791a9e68ae (Rename and simplify
wxGridBlockCoords::ContainsBlock(), 2020-04-05).
2020-04-14 18:07:47 +02:00
Vadim Zeitlin
ed077e17cf Restore wxAnimation::GetFrame() constness
This got lost, almost surely accidentally, in 706c8e8ad6 (Merge branch
'disable-native-animation', 2020-04-07), so just restore it now.

See https://github.com/wxWidgets/wxWidgets/pull/1768

Closes #18725.
2020-04-12 16:36:34 +02:00
Vadim Zeitlin
30eaa28de5 Rename wxGrid::GetSelectionRange() to GetSelectedBlocks()
This seems to be more consistent with the existing functions and doesn't
create ambiguity with a grid range.

Also rename wxGridSelectionRange to just wxGridBlocks as, in principle,
this class could be used for iterating over any blocks, not just the
selected ones.

No changes in functionality, this is just a renaming.
2020-04-12 02:38:37 +02:00
Scott Talbert
e8be37da3d Add missing documentation for wxTreeCtrl GetSpacing / SetSpacing
Closes https://github.com/wxWidgets/wxWidgets/pull/1787
2020-04-10 17:20:24 +02:00
Vadim Zeitlin
706c8e8ad6 Merge branch 'disable-native-animation'
Allow the generic animation classes to be used on all platforms.

See https://github.com/wxWidgets/wxWidgets/pull/1768
2020-04-07 00:40:45 +02:00
Vadim Zeitlin
f2ed3a5376 Add static wxAnimationCtrl::CreateCompatibleAnimation()
This may be more convenient to use than CreateAnimation() if there is no
wxAnimationCtrl object at hand.
2020-04-06 23:33:07 +02:00
Vadim Zeitlin
af7890e330 Reduce insignificant documentation changes with master
Restore the original amount of whitespace and remove WXDLLIMPEXP_CORE
which shouldn't have appeared in the documentation header in the first
place.
2020-04-06 01:30:46 +02:00
Vadim Zeitlin
103a01989e Document wxGenericAnimationCtrl as deriving from wxAnimationCtrl
Even though this is not really the case at the code level, this makes
more sense, as wxGenericAnimationCtrl adds methods to the interface
implemented by wxAnimationCtrl.

This also allows to avoid having notes indicating that some methods
don't work for the native version of the control -- by simply not having
them there.
2020-04-06 01:21:31 +02:00
Vadim Zeitlin
b08db49bf6 Make wxAnimationImpl private and get rid of wxAnimationImplType
Simplify and streamline animation classes relationship: wxAnimation is
the only public class representing an animation and it can be created by
both the native wxAnimationCtrl and wxGenericAnimationCtrl using the new
public CreateAnimation() method.

Replace wxAnimationImplType enum with more flexible type info based
check.
2020-04-06 01:00:15 +02:00
Vadim Zeitlin
791a9e68ae Rename and simplify wxGridBlockCoords::ContainsBlock()
Change the return type of this function to a simple and clear bool
instead of 3-valued int requiring a special explanation. This is simpler
and not any less efficient as checking for whether one block contains
another or the other one contains this one are separate operations
anyhow.

Rename the function to a more grammatically correct name.

Also move it inline as it's now trivial enough for this to be worth it.
2020-04-05 01:37:56 +02:00
Vadim Zeitlin
a5952ee087 Rename wxGridBlockCoords::ContainsCell() and move it inline
Make the function name more grammatically correct.

No real changes.
2020-04-04 19:45:19 +02:00
Vadim Zeitlin
0a5a904d8d Simplify wxGridSelectionRange to provide only iterators
This class was a strange hybrid of a container/view/range and iterator,
as it both provided begin()/end() container-like methods and
iterator-like methods for dereferencing/advancing.

Simplify this by removing the latter part and making this class really
just a range, with its own iterator class in order to avoid leaking the
exact type of the iterator used in the API.

Note that while it's now completely trivial, it is still useful as it
isolates the application code from the vector used to store the selected
blocks currently and will allow to change internal representation in the
future without breaking the existing code.
2020-04-04 19:37:23 +02:00
Ilya Sinitsyn
f8015b13b1 Implement wxGrid selection blocks iterating interface 2020-04-04 18:50:37 +02:00
Ilya Sinitsyn
0920a1646b Make wxGrid row selecting more user friendly 2020-04-04 18:50:37 +02:00
Ilya Sinitsyn
89dd47edee Make wxGrid column selecting more user friendly 2020-04-04 18:50:37 +02:00
Ilya Sinitsyn
02509cbc39 Refactor wxGridSelection to store selection as blocks only
Store all types of selection with an array of blocks instead of arrays of
cells, blocks, rows and columns.

It (hopefully) simplifies the code and allows us to implement editing of
the last selection block much easier.
2020-04-04 18:50:36 +02:00
Ilya Sinitsyn
acd72efbf1 Implement wxGridBlockCoords class
wxGridBlockCoords represents a location of a block of cells in the grid.
2020-04-04 18:50:36 +02:00
Robin Dunn
ce8085808c Documentation updates 2020-04-03 14:10:35 -07:00
Robin Dunn
4545d93924 Move wxAnimationDecoderList-related methods to wxAnimation 2020-04-03 12:49:15 -07:00
Robin Dunn
80c9513a80 Minor documentation tweaks 2020-04-02 14:21:21 -07:00
Robin Dunn
52d4bad3df
Apply suggestions from code review
Co-Authored-By: VZ <vadim@wxwidgets.org>
2020-04-02 12:35:58 -07:00
Robin Dunn
6039be5291 More documentation updates 2020-04-01 15:27:34 -07:00
Robin Dunn
1cf191f5d6 Update docs 2020-04-01 13:31:03 -07:00
Robin Dunn
85bd16fb06 Trim trailing whitespace 2020-03-31 14:02:39 -07:00
Vadim Zeitlin
06af121e9c Add wxObjectDataPtr::release()
This makes it possible to use wxObjectDataPtr inside functions returning
raw pointers owned by the caller, such as custom GetAttr() in the grid
sample.
2020-03-31 02:57:01 +02:00
Vadim Zeitlin
15b5a1865c Add a simple wxGrid::AssignTable() wrapper for SetTable()
In many case SetTable() is called with its takeOwnership parameter set
to true, as shown by the grid sample in which all 3 of the calls to
SetTable() set it to true, but calling it in this case is awkward, as
bare "true" in the caller is unreadable and almost invariably requires
an explanatory comment.

Improve the API by adding AssignTable(), which is the same to SetTable()
as the existing AssignImageList() to SetImageLabel(), which always takes
ownership of the table pointer.
2020-03-31 02:43:08 +02:00
Robin Dunn
e72793abec IsOk is pure virtual 2020-03-30 15:44:32 -07:00
Robin Dunn
f13c3dc1ec Documentation updates for Animation classes 2020-03-30 15:26:52 -07:00
Robin Dunn
08ac4dbad6 Name the base animation class wxGenericAnimation with a wxAnimation shim class 2020-03-27 15:53:03 -07:00
Robin Dunn
488084c2f5 Name the base animation class wxGenericAnimation with a wxAnimation shim class 2020-03-27 14:33:11 -07:00
Robin Dunn
7468e7c8a8 Add text to wxAnimation docs about how to use the generic version on wxGTK 2020-03-24 19:58:04 -07:00
Robin Dunn
357f792971 Split decoder interface to match the actual header files 2020-03-24 17:32:12 -07:00
Robin Dunn
f3cd24ee35 Fix interface filename, remove duplicate enum 2020-03-24 17:02:48 -07:00
Robin Dunn
4942ee99f6 Update the interface files for the animation classes 2020-03-24 16:25:30 -07:00
Robin Dunn
501e55f949 Add missing wxMemoryDC::GetSelectedBitmap 2020-03-23 20:17:22 -07:00
Vadim Zeitlin
eaaad6471d Merge branch 'aui-delete-tool'
Provide work around for surprising behaviour of
wxAuiToolBar::DeleteTool().

Closes https://github.com/wxWidgets/wxWidgets/pull/1758
2020-03-15 17:10:41 +01:00
Vadim Zeitlin
ea359e02ab Rename tool ID parameter in wxAuiToolBar documentation
Use "toolId" to match the actual name in the header instead of
"tool_id".

No real changes.
2020-03-15 17:09:54 +01:00
Vadim Zeitlin
700eaff131 Add wxAuiToolBar::DestroyTool() and DestroyToolByIndex()
These new functions destroy the associated window too, unlike the
existing DeleteTool() and DeleteByIndex().

Closes #16552.
2020-03-15 17:09:51 +01:00
Robin Dunn
5c039e080c Add missing IsAcceptedKey to the wxGridCellEditor interface 2020-03-13 11:50:41 -07:00
Vadim Zeitlin
586d0e6ee6 Make wxGrid::GetBatchCount() const
There is really no reason for this simple accessor not to be const.
2020-03-11 21:59:15 +01:00
Vadim Zeitlin
8802657490 Add wxGrid::IsUsingNativeHeader()
It is convenient to have this function if only in order to be able to
call GetGridColHeader() safely, i.e. without triggering an assert if
native header is not being used.
2020-03-11 18:41:16 +01:00
Vadim Zeitlin
95b1f7b7ea Document wxAuiToolBar::DeleteTool() and DeleteByIndex()
The behaviour of these functions for the tools containing controls is
counter-intuitive but changing it now would silently break existing code
working around the current semantics, so just document it instead.

See #16552.
2020-03-10 23:34:06 +01:00
Vadim Zeitlin
c09fd8b59d Update copyright years to 2020
Just run misc/scripts/inc_year and commit the results.

Closes #18690.
2020-03-06 00:51:39 +01:00
PB
e22ab23216 Fix wxWindow::GetThemeEnabled() documentation
The method description was for some reason the
same as for ClearBackground().

Closes https://github.com/wxWidgets/wxWidgets/pull/1745
2020-02-29 15:43:21 +01:00
Tobias Taschner
613687ecb5 Updated wxWebViewEdge for SDK 0.9.430
This first beta release of the WebView2 SDK has many identifiers
renamed and webview interfaces split to Host and WebView.

Closes https://github.com/wxWidgets/wxWidgets/pull/1743
2020-02-29 15:40:45 +01:00
Vadim Zeitlin
1c6ab1aa65 Document wxTemp[F]File default ctors
For some reason default ctor wasn't documented, so add it.
2020-02-21 14:57:28 +01:00