Commit Graph

4010 Commits

Author SHA1 Message Date
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
Blake Eryx
fb5c13ed00
Update docs about DisplayEditorDialog replacing OnButtonClick (?) (#1853)
Update doc for DisplayEditorDialog change
2020-05-11 20:04:31 +02:00
Vadim Zeitlin
fc08ce94a5 Improve documentation of wxDataViewCtrl item dragging
Try to explain at least a little how is this supposed to work. This is
still insufficient, but better than nothing, which was what we had
before.
2020-05-02 20:12:22 +02:00
Kvaz1r
63e1697dda Add wxGridBlocks::iterator::operator->()
An iterator should have this operator defined too, and not just
operator*() as it used to.
2020-05-02 18:50:03 +02:00
Vadim Zeitlin
e6ab2391c4 Merge branch 'dvc-virtual-has-value'
Allow overriding wxDataViewModel::HasValue() to specify which cells
should, and should not, show anything.

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

Closes #18724.
2020-05-02 18:22:27 +02:00
Artur Sochirca
d1553c63ed Improve support for TABs in wxListBox under MSW
Always set the LB_USETABSTOPS style flag to achieve behaviour more
compatible with other platforms and expand TABs to align them at tab
stops positioned at every 8 characters.

Also add MSW-specific MSWSetTabStops() method allowing to customize tab
stops.

Update the documentation and the sample to demonstrate using TABs.

Closes https://github.com/wxWidgets/wxWidgets/pull/1789
2020-05-02 18:07:50 +02:00
Dummy
b3730a59c6 Document default value for wxDialog::Show() parameter correctly
It's "true", not "1".

See #18743.
2020-04-29 15:46:47 +02:00
Dummy
bbc88cedf1 Fix wrong documentation of EVT_CLOSE for the dialogs
Clicking OK/Cancel buttons closes the dialog (by default), but doesn't
generate wxEVT_CLOSE event, so don't write that it does.

Closes #18743.
2020-04-28 18:52:49 +02:00
Vadim Zeitlin
62372d4337 Merge branch 'webview_edge3' of https://github.com/TcT2k/wxWidgets
Update wxWebViewEdge for SDK 0.9.488.

It now requires Edge 84.0.488.0 or newer (currently Canary).

See https://github.com/wxWidgets/wxWidgets/pull/1814
2020-04-21 18:30:53 +02:00
Paul Cornett
896512c732 Change fractional point size from float to double
There doesn't seem to be any compelling reason to use float. Using double
is simpler, and avoids otherwise unnecessary float<->double conversions.
2020-04-21 09:00:04 -07:00
Tobias Taschner
7d1c40ecf5
Updated wxWebViewEdge for SDK to 0.9.488
Requires Edge 84.0.488.0 or newer

Another SDK release before 1.0 includes some
breaking changes regarding naming
2020-04-20 23:00:10 +02:00
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
1fa1aa5937 Mention that wxDataViewModel::HasValue() became virtual in 3.1.4
This method existed since earlier versions, but couldn't be overridden
until now.
2020-04-17 23:30:07 +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
Jorge Moraleda
c2e4bc422c Make HasValue virtual in wxDataViewModel and have implementations use it. This addresses issue https://trac.wxwidgets.org/ticket/18724 2020-04-14 17:48:47 -07: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
Vadim Zeitlin
ebc0f056c0 Make wxTemp[F]File classes non default ctor explicit
There should really be no reason to ever implicitly convert a string to
a file.
2020-02-21 14:56:06 +01:00
Dummy
3e0780e811 Add wxTempFFile, similar to wxTempFile but using buffered I/O
Also add wxTempFFileOutputStream.

Closes #18673.
2020-02-21 14:52:40 +01:00
Dummy
8c574e5c2b Fix documentation of wxFile::Write() default conversion value
It's wxConvAuto, not wxConvUTF8.

Closes #18672.
2020-02-21 14:30:43 +01:00
Artur Wieczorek
5bc020e844 Implement getters for members of wxPGWindowList
There is no reason to expose wxPGWindowList member variables. They should
be set in ctors and retrieved with getters.
2020-02-12 17:09:25 +01:00
Vadim Zeitlin
789858a4d9 Merge branch 'secret-service-check'
Check if secret service can be used under Unix.

See https://github.com/wxWidgets/wxWidgets/pull/1733
2020-02-11 22:36:03 +01:00
Vadim Zeitlin
b18169a0e4 Merge branch 'paint-debug'
Detect invalid use of wxPaintDC/wxPaintEvent better.

See https://github.com/wxWidgets/wxWidgets/pull/1732
2020-02-11 22:35:33 +01:00
Vadim Zeitlin
697d494caa Merge branch 'grid-attr-smart-ptr'
Use smart pointers in wxGrid code.

See https://github.com/wxWidgets/wxWidgets/pull/1731
2020-02-11 22:35:03 +01:00
Vadim Zeitlin
8fcf46f65c Forbid creation of wxPaintEvent objects from user code
This doesn't work anyhow, so it's better to prevent the code doing this
from compiling instead of getting run-time asserts or worse.

Also simplify construction of these events inside wxWidgets by passing
the window itself to the ctor instead of passing just its ID and calling
SetEventObject() separately later.

For consistency, do the same thing for wxNcPaintEvent too.
2020-02-10 23:03:01 +01:00
Vadim Zeitlin
f7f90a6111 Mention that wxSecretStore ctor can block
At least under Unix it can show a dialog asking to create a new key
ring.
2020-02-10 18:27:38 +01:00
Vadim Zeitlin
5a454d373b Optionally return error message from wxSecretStore::IsOk()
This allows to give at least some explanation about why the secrets
can't be stored to the user, e.g. they could search for a message such
as

The name org.freedesktop.secrets was not provided by any .service files

to find out that gnome-keyring package needs to be installed on their
system.

Note that this change means that under Unix an attempt to connect to the
secret service is now made when wxSecretStore is constructed and not
just when it's used for the first time, as before.
2020-02-10 18:23:59 +01:00
Vadim Zeitlin
b680ba9596 Explicitly document that wxPaintEvent ctor must not be used
Objects of this type are only supposed to be created by wxWidgets
itself and not by user code.
2020-02-10 13:42:03 +01:00
Artur Wieczorek
9dbd3b4946 Use ctor with default argument instead of providing specialized ctor
We can use 2-parameter ctor with default NULL value for second parameter
instead of providing a special 1-paramater ctor.
2020-02-09 20:31:58 +01:00
Artur Wieczorek
f2f9cbe619 Get rid of unused wxPGWindowList ctor
There is no use case for wxPGWindowList initialiazed with NULL data.
2020-02-09 20:19:52 +01:00
Vadim Zeitlin
2e64ba6d6e Also add wxGridCellEditorPtr and wxGridCellRendererPtr
This is similar to the previous commit and replaces manual calls to
DecRef() on the renderers/editors with the use of smart pointers for
them too.
2020-02-08 15:14:24 +01:00
Vadim Zeitlin
5f34b1749e Use wxGridCellAttrPtr instead of manual DecRef() calls
Provide GetAttrPtr() and GetCellAttrPtr() convenience functions that can
be used instead of the original Ptr-less versions to avoid the need to
manually call DecRef() on the returned wxGridCellAttr pointers.

No real changes, just simplify the code and make it safer.
2020-02-08 14:55:36 +01:00
Ilya Sinitsyn
a40acbb28e Add CanOverflow function to wxGridCellAttr
Add function to determine whether the cell will draw the overflowed text
to neighbour cells. Note that only left aligned cells currently can overflow.
2020-02-07 19:34:50 +01:00
Kvaz1r
5663157674 Fix link between flags and buttons in wxAuiManager
Don't store the buttons used by a pane separately, but take them
directly from the flags, as this ensures that updating the pane flags,
e.g. by calling CloseButton(false), really removes the corresponding
button.

This also makes wxAuiPaneButton helper completely unnecessary, so just
remove it to simplify the code.

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

Closes #18223.
2020-02-05 16:02:51 +01:00
Vadim Zeitlin
396dd6cf0b Document that wxINVERT is not supported under wxGTK3 and wxMac
Also explain how to update the existing code using it.

See #16890.
2020-01-23 01:11:58 +01:00
Vadim Zeitlin
767c07c040 Merge branch 'webview-edge'
Add support for (optionally) using Edge-based wxWebView.

See https://github.com/wxWidgets/wxWidgets/pull/1700
2020-01-22 03:38:00 +01:00
Vadim Zeitlin
0b2dd516c1 Slightly improve Edge webview backend setup instructions
Make it even more clear where should the files go and which files should
be copied, to avoid any ambiguity.
2020-01-22 03:36:38 +01:00
Vadim Zeitlin
db4c025e42 Document wxRadioButton relationship with focus in wxMSW
Explain that calling SetValue(true) may change the focus, as this is
not really obvious (and doesn't happen in the other ports).
2020-01-20 13:21:44 +01:00
Tobias Taschner
fb0e82e9d1
Implement GetPageSource() and GetPageText() 2020-01-17 21:09:51 +01:00
Tobias Taschner
bb508dc347
Implement text selection in wxWebViewEdge
Text selection/copy/paste etc implemented via javascript
2020-01-16 20:50:26 +01:00
Tobias Taschner
d829e5e832
Document unsupported parameters 2020-01-16 10:37:31 +01:00
Tobias Taschner
9f11abd8fc
Rename wxWebView::EnableDevTools() to EnableAccessToDevTools() 2020-01-16 09:38:35 +01:00
Tobias Taschner
b4764bbf4f
Fix typo in interface/wx/webview.h
Co-Authored-By: PB <PBforDev@gmail.com>
2020-01-15 22:14:23 +01:00
Vadim Zeitlin
1ace3b336e Update strings of already created wxGridCellChoiceEditor too
Calling wxGridCellChoiceEditor::SetParameters() didn't have any effect
if the editor had been already used because this method only updated the
internally stored m_choices, used for creating the combobox, but not the
strings actually used by the combobox, if it had been already created.

Also mention that this works in the documentation.

Closes #10465.
2020-01-15 20:03:56 +01:00
Tobias Taschner
903279a9af
Add a note about WebView2 SDK license requirements 2020-01-15 17:05:34 +01:00
Tobias Taschner
bce0e65a80
Rename wxWebView::IsDevToolsEnabled() to IsAccessToDevToolsEnabled() 2020-01-15 16:22:43 +01:00
Tobias Taschner
c3f0b7a6cb
Apply suggestions from code review
Co-Authored-By: VZ <vz-github@zeitlins.org>
2020-01-15 15:55:49 +01:00
Lauri Nurmi
e8b8b0288f Make wxNewId() and others return/take wxWindowID rather than int
wxWindowID is a typedef of int, so nothing should really change, except
for the improved readability.

Closes https://github.com/wxWidgets/wxWidgets/pull/1682
2020-01-15 14:28:33 +01:00
Tobias Taschner
049d253a85
Fix typo and wording in webview documentation 2020-01-14 09:55:30 +01:00
Tobias Taschner
19b85d6370
Update interface/wx/webview.h
Co-Authored-By: PB <PBforDev@gmail.com>
2020-01-12 21:10:41 +01:00
Vadim Zeitlin
41dcd9ecdb Add API for ellipsization support to wxGrid
This API is not implemented yet, i.e. ellipsization mode is not
respected for now. This commit just adds the API, documents it and adds
an example of using it in the sample.
2020-01-11 19:14:23 +01:00
Vadim Zeitlin
f13085441c Add wxGridFitMode and functions working with it
Replace "bool overflow" flag with a class allowing to specify the same
overflow/clipping behaviour currently, but also allowing to extend it,
notable to add ellipsization support, in the future.

Preserve the existing API by reimplementing it in terms of the new one.

Also update the same to demonstrate a cell which always overflows,
independently of the default cell behaviour.
2020-01-11 18:02:12 +01:00
Tobias Taschner
68c46681a0
Document wxWebViewEdge build process 2020-01-11 15:43:22 +01:00
Vadim Zeitlin
325408f062 Make wxGridCellAttr ctor taking a single argument explicit
There doesn't seem to be any reason for allowing to implicitly convert
wxGridCellAttr pointer to wxGridCellAttr object.
2020-01-11 14:05:09 +01:00
Tobias Taschner
d72e5874eb
Add wxWebView methods to enable dev tools
Currently only implemented for the Edge (Chromium) backend.
2020-01-10 22:27:36 +01:00
Markus Pingel
6a99e7e273
Add wxWebView Edge (Chromium) implementation
This backend requires WebView2 SDK and enables usage of Edge (Chromium)
on Windows 7 and newer
2020-01-10 22:22:28 +01:00
Ian McInerney
64ac20536a Remove event macros expansions from the documentation
The expansions do not really add anything to the documentation
page, and can be confusing at first.

Closes https://github.com/wxWidgets/wxWidgets/pull/1701
2020-01-10 16:30:20 +01:00
Vadim Zeitlin
db5cf010d7 Improve wxLIST_STATE_DONTCARE documentation
Don't say that it's MSW-specific because it's just a symbolic name for
0, and is used under all platforms if no other flags are set.
2020-01-09 16:28:00 +01:00
Tobias Taschner
095a93e0c0
Add wxWebView::IsBackendAvailable()
This allows to check if a specified backend has been registered before creation of a new instance
2020-01-09 13:44:06 +01:00
Vadim Zeitlin
826cc882dc Merge branch 'gtk-srchctrl'
Add native wxSearchCtrl implementation for wxGTK.

Closes https://github.com/wxWidgets/wxWidgets/pull/1688
2020-01-07 03:16:02 +01:00
Vadim Zeitlin
2635360f3c Mention GTK native version in wxSearchCtrl documentation
Document some of the (minor) limitations of the native implementation as
well as its existence itself.
2020-01-07 03:15:39 +01:00
PB
1b93041d6e Improve wxRegKey documentation
Expand the class description.

Fix and improve the code example.

Closes https://github.com/wxWidgets/wxWidgets/pull/1693
2020-01-07 02:39:33 +01:00
Ian McInerney
577faedb65 Fix docs for wxDEPRECATED_MSG macro
Add the missing macro definition.

Closes https://github.com/wxWidgets/wxWidgets/pull/1689
2019-12-29 15:37:13 +01:00
Lauri Nurmi
84f7e925e5 Fix wxThread::SetPriority() documentation
The documentation's notes about MSW limitations about setting priority
before creating the thread do not appear to be true (anymore). Thread
priority is already set by Create() if SetPriority() was called earlier.
Setting it immediately just failed, because the thread did not exist
yet, but this was fixed by the previous commit.
2019-12-28 00:06:28 +01:00
Robin Dunn
09c4033f43 OSXEnableAutomaticTabbing does not return a value 2019-12-11 12:07:43 -08:00
Ian McInerney
b17aa08c26 Allow automatic OS-provided tabbing to be disabled in wxOSX
macOS 10.12+ implements automatic tabbing in the OS. This adds
entries to the menus and also adds a tab bar. Some applications
might want to disable this, so provide an interface for doing this.

Closes https://github.com/wxWidgets/wxWidgets/pull/1674
2019-12-09 22:46:04 +01:00
Ian McInerney
540fed9216 Implement background color attribute for wxDataViewCtrl in wxOSX
Add support for this attribute for text-like cells to the native macOS
version too, to bring it up to parity with the generic and GTK ones.

Closes https://github.com/wxWidgets/wxWidgets/pull/1673
2019-12-09 22:45:06 +01:00
Paul Kulchenko
1c754fe71c Make wxAuiNotebook wxAuiTabCtrl-related methods public
Allow retrieving the active tab control or tab at the given position.

Closes #16262.
2019-12-07 15:13:06 +01:00
Dummy
edc5474a73 Add @since annotation to a couple of wxPGProperty methods
Document that these methods have been added in 3.1.0.

Closes #18613.
2019-12-05 17:33:27 +01:00
Ilya Sinitsyn
53ffbf6cf5 Allow ignoring margins in wxRendererNative::GetCheckBoxSize()
Add ability to get the size of the checkbox without any margins by
passing wxCONTROL_CELL flag: this can be useful when the checkbox is
part of some "cell", e.g. wxGrid one, and doesn't need any extra margins
around it.

Currently wxCONTROL_CELL is only really used by wxGTK2 implementation.
2019-11-28 02:14:50 +01:00
Artur Wieczorek
7b86958b25 Fix wxColour::GetAsString called for non-solid colour
Don't return RGB values if colour is not solid
and hence cannot be represented with these values.
Non-solid colour should be reported as an unknown
RGB value, e.g. '??????'.

Closes #18596.
2019-11-24 19:49:59 +01:00
Vadim Zeitlin
428d47f534 Merge branch 'wxwebviewieimpl' of https://github.com/MaartenBent/wxWidgets
Actually allow using wxWebVieWIE-specific methods for setting the
emulation level.

Make it possible to include wx/msw/webvieW_ie.h by removing inclusion of
the private headers from it, which was in turn achieved by moving all
the implementation details into a private class.

See https://github.com/wxWidgets/wxWidgets/pull/1647
2019-11-14 17:26:00 +01:00
Maarten Bent
9455fe2d21 Move wxWebViewIE specific functions to correct interface class 2019-11-14 00:04:48 +01:00
Ian McInerney
e093199058 Fix parameter name in wxDir::HasSubDirs() documentation
Closes https://github.com/wxWidgets/wxWidgets/pull/1648
2019-11-13 19:18:06 +01:00
Vadim Zeitlin
d8cd02b480 Create primary monitor when using wxDisplay default ctor
Previously, the first monitor was created instead and while it was often
also the primary one, this wasn't always the case.

In particular, this makes wxGetDisplayPPI() always return something
reasonable instead of returning (0, 0) when the first monitor is not the
primary one, as expected by plenty of code, including our own printing
sample, which divides by the values returned from wxGetDisplayPPI()
without checking if they're zero.
2019-11-08 00:26:20 +01:00
Vadim Zeitlin
b842f2afa2 Merge branch 'im/menu' of https://github.com/imciner2/wxWidgets
Make wxEVT_MENU_HIGHLIGHT generation when there is no highlighted item
consistent across all the major ports: use wxID_NONE instead of wxID_ANY
in wxGTK and send these events, which were previously not sent at all in
this case, in wxOSX.

See https://github.com/wxWidgets/wxWidgets/pull/1637
2019-11-05 20:09:14 +01:00
Ian McInerney
790c1818cb Update menuitem docs with unhighlight event 2019-11-05 09:15:55 +00:00
Maarten Bent
918e102533 Support DPI change in sizers
Return the size of DoGetDefaultBorderInPx as float, so no precision is lost
when multiplying it for DoubleBorder and TripleBorder.

Closes #18551.
2019-11-01 21:07:15 +01:00
Artur Wieczorek
9e4d28ba7f Fix names of wxDirProperty ctor parameters
First two paramaters of ctors of wxPGProperty and its derivates are named
'label' and 'name' so wxDirProperty ctor should conform to this convention.

Close #18547.
2019-10-29 23:34:37 +01:00
Robin Dunn
4684607a0d wxGrid now derives from wxScrolledCanvas 2019-10-25 21:22:58 -07:00
PB
46792d4933 Fix typos in wxStaticBox docs
Add missing commas in code examples.

Closes #18542
2019-10-25 19:39:47 +02:00
PB
aa3e812d42 Add wxVariantDataSafeArray reference to wxOleConvertVariantFlags docs 2019-10-22 20:52:18 +02:00
PB
4f7a3fbbbd Restructure OLE-related doxygen documentation
All OLE-related classes and enums were described
in interface header msw/ole/automatn.h which led
to incorrectly listed include files in the generated
documentation for those classes and enum that
were actually declared in different include header files.

The documentation in the interface files has now been
split into files with names matching the actual include files.

Closes #18536
2019-10-22 20:46:13 +02:00
Vadim Zeitlin
dddbc1bafc Document that size of shaped windows can't be changed
Shaped windows have the size defined by the shape and it's not really
clear what calling SetSize() on them should do -- so just document that
it's not supposed to work.

Closes #9794.
2019-10-22 19:37:32 +02:00
tm
fa3c0b1808 Document wxOSX_FILEDIALOG_ALWAYS_SHOW_TYPES system option
Make this option slightly more discoverable.

See #12429.
2019-10-21 21:14:54 +02:00
Vadim Zeitlin
ad6799f249 Merge branch 'grid-uitests-gtk'
Fixes to wxUIActionSimulator allowing the tests using it to work for
wxGrid in wxGTK.

And some improvements and bug fixes to wxGrid itself.

Closes https://github.com/wxWidgets/wxWidgets/pull/1609
2019-10-21 21:12:01 +02:00
Artur Wieczorek
6c1c621888 Add reference to the widgets sample in the documentation
Add reference to the description of the widgets sample wherever this
sample is mentioned in the documentation.
2019-10-20 21:37:44 +02:00
PB
9d4e116e8a Improve wxVariantDataSafeArray documentation
Improve the class description.

Mention that one needs to call wxAutomationObject::SetConvertVariantFlags()
with wxOleConvertVariant_ReturnSafeArrays to actually receive a
wxVariant with SAFEARRAY (if possible).

Make better use of now-documented wxSafeArray in the code examples.

Closes https://github.com/wxWidgets/wxWidgets/pull/1611
2019-10-20 18:37:57 +02:00
PB
51d2284da3 Add documentation for wxSafeArray
This wxMSW-only class was introduced in 3.0 but was not documented.

Closes https://github.com/wxWidgets/wxWidgets/pull/1610
2019-10-20 15:44:24 +02:00
Vadim Zeitlin
128608dc25 Fix mistake in wxDateTime::Tm struct documentation
yday field values starts from 0 and mday starts from 1, contrary to what
was actually written.

Closes #18534.
2019-10-20 15:37:13 +02:00
Artur Wieczorek
5925893eed Fix various doxygen issues in the documentation 2019-10-20 11:53:49 +02:00
Vadim Zeitlin
4fac71fc29 Merge branch 'per-monitor-dpi-aware-controls-3' of https://github.com/MaartenBent/wxWidgets
Add, or improve, per-monitor DPI awareness to/for more controls.

See https://github.com/wxWidgets/wxWidgets/pull/1589
2019-10-19 20:10:05 +02:00
Vadim Zeitlin
0656823e2a Document that wxGrid::ShowCellEditControl() does not start editing
This was sufficiently misleading that event our own wxGrid unit tests
used this function in an attempt to start editing a grid cell -- even
though it actually doesn't do it at all.

Unfortunately documenting the surprising semantics of this functions
looks like the best thing we can do because it appears to have always
behaved like this and changing it now to actually show the cell editor
control, i.e. starting to edit the cell, is almost certain to break some
existing code.
2019-10-12 17:34:35 +02:00
Maarten Bent
c538e8f9d6 Add wxGraphicsRenderer::CreateFontAtDPI to support font with fractional pixel-size 2019-10-09 22:24:28 +02:00
Vadim Zeitlin
612634fffd Merge branch 'spinctrl-fixes'
Various improvements to wxSpinCtrl and wxGridCellNumberEditor, using it.

Closes https://github.com/wxWidgets/wxWidgets/pull/1588
2019-10-09 01:52:10 +02:00
Ilya Sinitsyn
9ef1b1529d Add wxControl::GetSizeFromText() helper function
Add the helper function that combines GetSizeFromTextSize() and
GetTextExtent() as they are often used together.
2019-10-09 01:43:50 +02:00
Vadim Zeitlin
9102da27ec Document that wxGLCanvas now uses physical pixels
Instruct people to use GetContentScaleFactor() to convert between
logical coordinates used by wxWindow and physical ones used by
wxGLCanvas.

See https://github.com/wxWidgets/wxWidgets/pull/1485
2019-10-08 02:23:15 +02:00
Vadim Zeitlin
654bfaea31 Add wxListCtrl::IsEmpty()
Add a simple accessor for consistency with the other controls.
2019-10-08 01:20:44 +02:00
Vadim Zeitlin
c92f9e0a17 Document that wxDateTime::UNow() returns time in local time zone
This is its actual behaviour and it's the right thing to do, as it's
consistent with Now() -- even though the documentation wrongly stated
otherwise (since 324ab5e2db).

Also add a unit test checking that UNow() == Now(), except for the
milliseconds.

See #14148.

Closes #18524.

Closes https://github.com/wxWidgets/wxWidgets/pull/1594
2019-10-07 12:27:28 +02:00
Vadim Zeitlin
51adb388a4 Merge branch 'dc-clear-white-default'
Fix regression in wxDC::Clear() and make wxGCDC::Clear() consistent with
it by using white if the background brush hadn't been explicitly set.

See https://github.com/wxWidgets/wxWidgets/pull/1582
2019-10-05 18:47:44 +02:00
Vadim Zeitlin
864cc1aa71 Document that wxDC::Clear() uses white background by default
This officially documents the historical behaviour of this method in
wxMSW and wxGTK2.
2019-10-02 02:45:28 +02:00
Artur Wieczorek
a771da5623 Don’t use void for functions without arguments 2019-10-02 00:54:14 +02:00
Artur Wieczorek
4489ddc13c Update wxPropertyGrid documentation
Mention that ChangePropertyValue() shouldn't be called from wxEVT_PG_CHANGED handler.

See #18502.
2019-10-02 00:06:58 +02:00
Vadim Zeitlin
66526adf7a Document issues with event handlers called when mouse is captured
Notably mention that showing modal dialogs won't work in this case.

Also link to this explanation from wxListCtrl documentation as
wxEVT_LIST_ITEM_SELECTED is one of the perhaps less expected cases in
which this problem arises.

See #9973.
2019-09-29 14:57:59 +02:00
Vadim Zeitlin
7a1bc568e5 Document that move events are only generated for non-TLW in wxMSW
wxGTK only sends these events for TLWs.

Closes #18485.
2019-09-29 00:08:21 +02:00
Vadim Zeitlin
e46385e964 Test that adding window to 2 sizers results in an assert
Check that adding a window to either the same, or different, sizer the
second time asserts -- but that it can still be moved to another sizer
if it is detached from the first one first.

Also document that SetContainingSizer() should never be called from
outside the library.

See #17166.
2019-09-28 23:42:37 +02:00
New Pagodi
203074567c Regenerate wxSTC files after recent changes 2019-09-28 00:50:47 -05:00
Paul Cornett
1753ed4037 Fix typo in wxXmlDocument documentation 2019-09-24 11:49:58 -07:00
Vadim Zeitlin
bb1c3c4ebb Merge branch 'osx-dvc'
Some wxOSX wxDataViewCtrl fixes OSX.

See https://github.com/wxWidgets/wxWidgets/pull/1556
2019-09-18 14:34:10 +02:00
Vadim Zeitlin
daa64f2ee4 Merge branch 'dvc-inconsist-fixes'
Fix several inconsistencies in wxDVC between wxGTK and the other
implementations.

See https://github.com/wxWidgets/wxWidgets/pull/1547
2019-09-18 14:33:34 +02:00
Vadim Zeitlin
da1944a5cc Merge branch 'grid-autosize-native-header'
Fix auto-sizing column labels when using native header in wxGrid.

See https://github.com/wxWidgets/wxWidgets/pull/1559
2019-09-18 14:32:02 +02:00
Vadim Zeitlin
8ed487923d Fix QT version in a comment for wxPORT_QT
No real changes.
2019-09-18 02:19:13 +02:00
Ilya Sinitsyn
0766283b2e Add wxHeaderCtrl::GetColumnTitleWidth() overload taking index
This makes it possible to get the appropriate column width from outside
the class, as GetColumn() itself is currently protected and so the
existing overload couldn't easily used.
2019-09-18 01:21:36 +02:00
Vadim Zeitlin
b9338b6130 Call wxDataViewCustomRenderer::ActivateCell() in Mac version too
Do this for consistency with the other ports.

Closes #17746.
2019-09-17 00:09:00 +02:00
Ilya Sinitsyn
e26d90028b Allow disabling hiding columns when using wxHeaderCtrl in wxGrid
Add wxGrid::DisableHidingColumns() method which can be used to prevent
wxHeaderCtrl from allowing the user to hide columns interactively, which
is something it allows to do by default, unlike the "built-in" wxGrid
header.

Also add EnableHidingColumns() and CanHideColumns() for consistency with
the other similar methods.

Closes https://github.com/wxWidgets/wxWidgets/pull/1554
2019-09-16 23:32:59 +02:00
Artur Wieczorek
2d15218c9d Fix drawing wxBitmap with both alpha channel and mask
For 32 bpp wxBitmap with both alpha channel and mask we have to apply mask on our own while drawing the bitmap because MaskBlt() API doesn't work properly with 32 bpp RGBA bitmaps. To do so we need to create a temporary bitmap with copy of original RGB data and with alpha channel being a superposition of the original alpha values and the mask.

See #18498.
2019-09-16 18:37:52 +02:00
Vadim Zeitlin
dfc6cdc063 Emphasize that wxDC::Clear() used brush set by SetBackground()
Ensure that people don't get the impression that using SetBrush() is
supposed to affect Clears().

See #18463.
2019-09-14 23:08:20 +02:00
Vadim Zeitlin
93815ad2d2 Merge branch 'listctrl-itemrect'
Improve wxListCtrl::GetSubItemRect() and add a unit test for it.

See https://github.com/wxWidgets/wxWidgets/pull/1511
2019-09-14 16:37:57 +02:00
Vadim Zeitlin
59e9da28f5 Improve wxDataViewModel::Cleared() documentation
Explain that this method can be useful not only when the model is
cleared.
2019-09-12 23:43:42 +02:00
Robin Dunn
41b444e011
Merge pull request #1455 from wxWidgets/gradient-pen
Add support for gradients in wxGraphicsPen
2019-09-11 20:17:34 -07:00
Kvaz1r
3fffc0782c Make wxThread::OnExit() protected rather than private
This allows calling the base class version from the derived classes and
also, at least as importantly, make sure that the function is actually
documented as private functions are not extracted by Doxygen by default.

Closes #16749.

Closes https://github.com/wxWidgets/wxWidgets/pull/1543
2019-09-12 00:55:32 +02:00
Kvaz1r
16b08c6ef9 Allow updating wxBusyInfo text while it's shown
Add UpdateText() and UpdateLabel() updating the text (i.e. possibly
containing markup) or the label (just plain text) shown in the window.

Closes #14743.

Closes https://github.com/Kvaz1r/wxWidgets.git BusyInfoUpdateText14743
2019-09-08 23:13:00 +02:00
Vadim Zeitlin
7811d1a833 Merge branch 'per-monitor-dpi-aware-controls-1' of https://github.com/MaartenBent/wxWidgets
Update the font of some buddy controls when the DPI changes. Fix the
position of the statusbar after a DPI change. Add some changes that were
suggested in https://github.com/wxWidgets/wxWidgets/pull/1499 but left
out from it.

Some sizes are cached to improve the speed of the library. These sizes
become incorrect when the DPI changes. And are incorrect when a window
is created on a display with a different DPI. Fix this by checking if
the current DPI is the same as the DPI that was used when calculating
the size, otherwise recalculate the size.

Closes https://github.com/wxWidgets/wxWidgets/pull/1530
2019-09-07 14:57:54 +02:00
Maarten Bent
462f2a4686 Add optional wxWindow parameter to wxButtonBase::GetDefaultSize()
When per-monitor DPI is used, the default button size depends on the DPI of the
display. Use the window to determine this DPI.
2019-09-06 20:59:59 +02:00
Robin Dunn
f705cb3087 Another typo fix 2019-09-05 17:47:33 -07:00
Robin Dunn
a8a19e25ee Various typo and coding style fixes 2019-09-05 13:33:15 -07:00
Robin Dunn
61a39165b8 documentation tweaks 2019-09-04 14:19:24 -07:00
Robin Dunn
f7896d4dff Use new parameter names in the existing CreateRadialGradientBrush methods too 2019-09-04 14:19:24 -07:00
Robin Dunn
80f24d9e74 User more easily understandable names for the radial gradient coordinate parameters in wxGraphicsPenInfo 2019-09-04 14:19:24 -07:00
Robin Dunn
7c33d3f969 Gradients can have matrix transforms too. Updates for Cairo. 2019-09-04 14:19:23 -07:00
Robin Dunn
fd0b19f277 Add the rest of the accessors in wxPenInfo and wxGraphicsPenInfo,
so wxPython can see them.
2019-09-04 14:19:23 -07:00
Robin Dunn
4708d2539e Add gradient-related attributes to wxGraphicsPenInfo 2019-09-04 14:19:23 -07:00
Robin Dunn
1269b712bb Add wxEVT_DPI_CHANGED 2019-09-04 14:14:59 -07:00
Maarten Bent
2704d32089 Update wxDPIChangedEvent documentation 2019-08-27 23:06:04 +02:00
Vadim Zeitlin
0bf223be44 Return empty rect for wxLIST_RECT_ICON for subitems without icons
It doesn't make sense to return anything else than an empty rectangle
when querying the icon rectangle of the sub-items that can't show any
icon.

Also document this behaviour, just in case it's not obvious.
2019-08-27 16:42:39 +02:00
Vadim Zeitlin
83134174fa Merge branch 'menu_highlight_event' of https://github.com/imciner2/wxWidgets
Set menu object for the menu highlight events too.

See https://github.com/wxWidgets/wxWidgets/pull/1506
2019-08-27 13:13:23 +02:00
Vadim Zeitlin
5873ee7e4a Merge branch 'tlw-layout'
Make wxTLW::Layout() do the right thing and resize the only child to fit
the entire TLW client area.

See https://github.com/wxWidgets/wxWidgets/pull/1496
2019-08-27 13:08:47 +02:00
Vadim Zeitlin
b225d78187 Merge branch 'per-monitor-dpi-aware-framework' of https://github.com/MaartenBent/wxWidgets
Add preliminary support for per-monitor DPI awareness to wxMSW.

Individual controls still need to be fixed, so this support is still
experimental/unfinished for now.

See https://github.com/wxWidgets/wxWidgets/pull/1499
2019-08-27 12:59:56 +02:00
Maarten Bent
e3d3a0b7e8 Generate wxDPIChangedEvent when DPI changes 2019-08-25 22:01:11 +02:00
Ian McInerney
d846b24450 Update menu event documentation and sample
Update the documentation to reflect change to the GetMenu event
working for all 3 menu events. Also update the sample to give the
menu for the highlight event.
2019-08-25 16:25:55 +02:00
Tomay
050ca4ce3a Add wxRegEx::QuoteMeta() helper
Quote all characters special for wxRegEx in the given string: this can
be useful when searching for a literal string using wxRegEx.

Closes https://github.com/wxWidgets/wxWidgets/pull/1489
2019-08-25 12:32:51 +02:00
oneeyeman1
14bcf09924 Move URL<->filename conversion functions to wxFileName
This ensures that they are always available and can be used in
wxLaunchDefaultBrowser() in all build variants, whereas before this
function didn't handle file:// URLs correctly when the library was built
with wxUSE_FILESYSTEM==0.

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

Closes #10414.
2019-08-25 00:48:39 +02:00
Vadim Zeitlin
a47d16dc9f Document that wxTreeCtrl::ScrollTo() doesn't work when frozen
Also mention that EnsureVisible() does work in this case.

See #18435.
2019-08-23 17:23:22 +02:00
oneeyeman1
78c3ef2ebb Implement support for wxFD_NO_FOLLOW in wxMac
Disable aliases resolving in standard file dialogs if this flag is
specified.

Closes https://github.com/wxWidgets/wxWidgets/pull/1479
2019-08-22 23:27:54 +02:00
Vadim Zeitlin
773f8f86e3 Merge branch 'svg-misc' of https://github.com/MaartenBent/wxWidgets
Miscellaneous improvements to wxSVGFileDC, notably add gradient fill
support and shape rendering mode.

See https://github.com/wxWidgets/wxWidgets/pull/1493
2019-08-22 17:21:00 +02:00
Vadim Zeitlin
2a487ffe83 Update wxWindow and wxTopLevelWindow::Layout() documentation
Explain how these methods actually work, remove a very (from wx 1.x
days?) outdated reference to wxPanel always calling Layout() and mention
the special case of wxTopLevelWindow in the overview too.
2019-08-22 14:04:54 +02:00
Vadim Zeitlin
70f8bf4c86 Just return true from wxString::Shrink()
The comparison of lengths() seems to be completely unnecessary.

Also document that Shrink() always returns true.
2019-08-22 00:04:04 +02:00
Maarten Bent
9c193e1774 Add wxWindow::GetDPI()
This is simpler to use than wxDisplay(window).GetPPI() which was used
instead of it so far in all ports and can be implemented more
efficiently for wxMSW.

Remove wxGetWinTLW, GetDPI already tries to get the top window.
2019-08-21 19:30:07 +02:00
Maarten Bent
a41a8ded79 Allow to set wxSVGFileDC shape rendering mode 2019-08-20 20:21:05 +02:00
Vadim Zeitlin
346d7c378d Merge branch 'arrstr-doc' of https://github.com/PBfordev/wxWidgets
Improve wxArrayString documentation.

See https://github.com/wxWidgets/wxWidgets/pull/1473
2019-08-20 17:04:54 +02:00
Vadim Zeitlin
ffd424debb Merge branch 'mswdc-draw-point-checkbox' of https://github.com/MaartenBent/wxWidgets
Draw the same shape in wxDC::DrawCheckMark() under all platforms and
provide wxRenderer::DrawCheckMark() for drawing the platform-specific
shape.

Also fix wxGCDC::DrawPoint() to use the default one point wide pen.

See https://github.com/wxWidgets/wxWidgets/pull/1471
2019-08-20 13:25:28 +02:00
PB
e6753b5a7a Clarify wxArrayString::Insert() description 2019-08-10 15:09:59 +02:00
Maarten Bent
2874dab7f0 Add DrawCheckMark and GetCheckMarkSize to wxRendererNative
Show its use in the render sample. Also use the recently added GetExpanderSize
for the size of DrawTreeItemButton.
2019-08-10 13:42:04 +02:00
Vadim Zeitlin
5a394deba4 Merge branch 'accel_keys' of https://github.com/imciner2/wxWidgets
Fixes for accelerator handling in wxGTK.

See https://github.com/wxWidgets/wxWidgets/pull/1463
2019-08-09 23:54:37 +02:00
PB
60a09f55e0 Slightly improve wx(Sorted)ArrayString documentation
Correct the signature of wxArrayString::Insert():
the first parameter is "const wxString&", not "wxString".

Mention wxSortedArrayString in wxArrayString documentation.

The rest are just minor edits improving language, consistency, and formatting.
2019-08-08 11:32:04 +02:00
oneeyeman1
43c519e04f Add wxListCtrl::IsVisible()
Allow checking if the given item is (at least partially) visible on
screen.

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

Closes #9949.
2019-08-05 13:46:15 +02:00
Ian McInerney
d82351ffa3 Add invalid keys to documentation 2019-08-04 21:49:33 +02:00
Ian McInerney
4d582eda57 Updated documentation to reflect invalid GTK keycodes 2019-08-04 21:25:49 +02:00
Artur Wieczorek
b06a9d227f Replace wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes with wxPG_DIALOG_TITLE
Current wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes can be used to customize editor dialog titles only for wxFileProperty and wxDirProperty, respectively. New wxPG_DIALOG_TITLE property is applicable to all properties derived from wxEditorDialogProperty so not only editor dialog titles for wxFileProperty and wxDirProperty can be set but also for wxFontProperty, wxLongStringProperty, etc.
wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes are marked obsolete.
2019-08-04 20:20:19 +02:00
Igor Korot
c525784f77 Allow disabling saving wxFileConfig data when it is destroyed
This can be useful to avoid saving the changes performed by the user if
this turns out to be undesirable, for whatever reason.

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

Closes #13788.
2019-08-04 19:15:39 +02:00
ousnius
2a2fa8c5af Allow expanding environment variables in XRC file paths
Add a new flag wxXRC_USE_ENVVARS for wxXmlResourceFlags that triggers a
call to wxExpandEnvVars() for bitmap, icon and animation paths.

This flag is not set by default to avoid silently changing the behaviour
of existing applications.

Closes https://github.com/wxWidgets/wxWidgets/pull/1445
2019-07-31 23:57:40 +02:00
Robin Dunn
cd2e3dd2cf Various interface corrections 2019-07-31 12:18:55 -07:00
Lauri Nurmi
4739b9dedd Add C++20-style starts_with()/ends_with() functions to wxString
C++20 introduces these two functions, along with some overloads, to
std::string. Add similar functions to wxString, which simply call the
already existing StartsWith() and EndsWith().

Closes https://github.com/wxWidgets/wxWidgets/pull/1452
2019-07-31 00:52:29 +02:00
oneeyeman1
ab7ba98dbc Implement support for wxCB_SORT in wxOSX wxComboBox
Insert the item at the correct location when this style is specified.

Closes https://github.com/wxWidgets/wxWidgets/pull/1438
2019-07-26 18:19:47 +02:00
Vadim Zeitlin
fb2c17c193 Merge remote-tracking branch 'sunset/process-enter'
Fix wxTE_PROCESS_ENTER logic for wxMSW and wxGTK too.

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

Closes #18273.
2019-07-26 18:02:08 +02:00
Vadim Zeitlin
9d92ba185c Fix truncating CJK mnemonics in control labels
13068d3603 introduced code for stripping
CJK mnemonics (i.e. trailing " (&X)") from the menu items, but due to
the use of wxStripMenuCodes() in wxControl::GetLabelText(), it also
applied to the control labels, resulting in wrongly measuring their size
(because the text used for measurement didn't include the "(&X)" part)
and truncating them in display.

Fix this by adding an explicit wxStrip_CJKMnemonics and using it only in
the code dealing with the menu item labels. This requires more changes
than just modifying GetLabelText() to use some wxStrip_NoCJKMnemonics
flag, but is more compatible as it's not impossible that some existing
code using wxStripMenuCodes() could be broken by this change too, while
now the existing behaviour is preserved.

Also improve wxStrip_XXX documentation.

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

See #16736.

Closes #18452.
2019-07-26 17:59:47 +02:00
Vadim Zeitlin
d97c2ed9e3 Merge branch 'grid-frozen'
Add support for freezing wxGrid columns and/or rows.

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

See https://github.com/wxWidgets/wxWidgets/pull/952
2019-07-26 17:57:23 +02:00
Andreas Falkenhahn
79724b1710 Allow opening ToC and index in wxCHMHelpController
Use special values of DisplaySection() and KeywordSearch() parameters to
open the table of contents (if section is -1) or search page (if the
keyword to search for is empty) when using CHM help controller.

This is less discoverable than having separate Display{TOC,Search}()
methods, but avoids introducing special API that couldn't be implemented
in the other wxHelpController implementations.

Closes #18445.
2019-07-24 11:29:06 +02:00
PeterO
8f386265dc Use correct expander size in wxDataViewCtrl under MSW
Add wxRendererNative::GetExpanderSize(), implement it using the
appropriate theme element and use it instead of hardcoding the expander
size to 3 character widths.

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

Closes #18449.
2019-07-20 17:00:32 +02:00
Vadim Zeitlin
3d970a9c08 Merge branch 'underline-improvements' of https://github.com/MaartenBent/wxWidgets
Add support for different underline types and colour to wxTextCtrl.

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

Closes #17124.
2019-07-19 23:45:38 +02:00
Vadim Zeitlin
81db73cf9c Merge branch 'travis-gui-tests'
Enable running GUI tests for wxGTK under Travis CI.

See https://github.com/wxWidgets/wxWidgets/pull/1426
2019-07-19 23:42:04 +02:00
Maarten Bent
cd7e21ad2b Apply wxTextCtrl underline review suggestions 2019-07-19 21:06:10 +02:00
Vadim Zeitlin
5bd9c5b65b Test wxTextCtrl::HitTest() with negative coordinates under wxGTK
In wxGTK using negative coordinates with HitTest() happens to work and
it's useful to test that it does, as this test will run when the control
is scrolled even under Travis CI, unlike the test with positive
coordinates which doesn't work under Xvfb there and was disabled in the
previous commit.

Also document that passing negative coordinates to this function only
works in wxGTK.
2019-07-19 01:44:29 +02:00
Olly Betts
b3ef78124c Remove the flash sample
Adobe have announced the official EOL for flash is 2020 so we're
now at the point where support for flash just isn't interesting
any more.

It doesn't make sense to support it for the upcoming 3.2.x release
series, and the sample .swf files are lacking source code.

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

Closes #15886.
2019-07-18 17:48:23 +02:00
Vadim Zeitlin
76e21c2ffa Merge branch 'gtk-persist-tlw'
Fix bugs affecting wxPersistentTLW under GTK.

See https://github.com/wxWidgets/wxWidgets/pull/1419
2019-07-18 17:44:35 +02:00
Igor Korot
1879e8e646 Make wxColourData parameter of wxColourDialog ctor const
This parameter is not modified by wxColourDialog (this might have been
the case, or at least the plan, some long time ago) and so has no reason
not to be "const".

Just add the qualifier to ctor and Create() in all ports.

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

Closes #12511.
2019-07-16 20:19:33 +02:00
oneeyeman1
8748a476c3 Add flag for displaying hidden files in the file dialog
Add wxFD_SHOW_HIDDEN and implement support for it for all the major
ports.

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

Closes #9342.
2019-07-16 19:59:48 +02:00
Vadim Zeitlin
4c553c1db2 Document delayed effect of wxDataViewColumn::SetWidth() in wxGTK
It may be surprising that calling GetWidth() after SetWidth(100) still
returns 0, so at least document this behaviour (fixing it doesn't seem
to be easily possible).
2019-07-16 18:23:35 +02:00
lucian-rotariu
04f7f1fd32 Add support for freezing columns and/or rows of wxGrid
Add wxGrid::FreezeTo() method which allows to freeze the given number of
columns and/or rows at the beginning of the grid, i.e. keep them pinned
in place while the rest of the grid is scrolled.

The main wxGridWindow (m_gridWin) now corresponds to the non-frozen part
of the grid, with up to 3 new similar windows for the frozen
rows/columns and the frozen corner cells (which only exist if both rows
and columns are frozen) being additionally used.

Doing this involved adding "wxGridWindow*" parameter to many functions
that previously only worked with m_gridWin itself and addressing
additional complications, such as mouse events that can now cross
different windows.

See https://github.com/wxWidgets/wxWidgets/pull/952 for the original
version of the changes.
2019-07-16 18:01:36 +02:00