Commit Graph

3043 Commits

Author SHA1 Message Date
Vadim Zeitlin
560d00f3cc Replace references to "adv" with "core" in classes documentation
All classes previously in "wxadv" are now in "wxcore".
2018-08-27 22:52:15 +02:00
Vadim Zeitlin
fd569842b1 Merge branch 'html-set-cell'
Make wxHTML API more flexible by allowing to operate on individual
wxHtmlContainerCell instead of only the entire HTML document text.

See https://github.com/wxWidgets/wxWidgets/pull/899
2018-08-27 02:17:10 +02:00
Vadim Zeitlin
895edcdddf Merge branch 'id-docs'
Improve documentation of window and menu item IDs.

Closes https://github.com/wxWidgets/wxWidgets/pull/890
2018-08-27 02:15:53 +02:00
Vadim Zeitlin
f9f82714db Document wxTR_LINES_AT_ROOT peculiar behaviour under MSW
Without this style, expander button is not shown for the tree item
neither by the native control, so recommend always using it.

Closes #18201.
2018-08-25 22:33:57 +02:00
Vadim Zeitlin
d09a7180e7 Make wxHtmlContainerCell ctor explicit
No real changes, just make it more difficult to misuse it accidentally.
2018-08-25 21:19:33 +02:00
Vadim Zeitlin
a59f5932df Add wxHtmlContainerCell::Detach()
This allows manipulating the HTML DOM from the outside, e.g. to detach
a header element in order to be able to repeat it on all pages.
2018-08-25 21:16:55 +02:00
Vadim Zeitlin
2895e5c4a1 Document that wxHtmlContainerCell::InsertCell() takes ownership
This might have been already clear, but it doesn't hurt to specify it
explicitly.
2018-08-25 21:14:40 +02:00
Vadim Zeitlin
9db0234abc Allow passing already parsed HTML to wxHtmlDCRenderer
This is more efficient when the same HTML is reused multiple times, e.g.
for measuring it first and then rendering it.

The new function also makes it simpler to parse HTML and manipulate it
in some way before measuring and rendering it.
2018-08-25 02:37:55 +02:00
Vadim Zeitlin
de5ba70203 Fix handling events from their items in submenu itself
This previously worked in wxGTK, but not in wxMSW and even under wxGTK
it could be surprising that the submenu got the event, but its parent
menu did not.

Make things consistent between the platforms and send the event to the
menu directly containing it first, but then also to its parent menu(s).

Document the new behaviour and verify that it works as intended with a
new unit test.

Closes #18202.
2018-08-25 02:36:45 +02:00
PB
b01f4ef8e7 Add more references to wxIconBundle to documentation
Add wxIconBundle to the list in the Overview of Available Classes /
Image and bitmap classes as well as to the documentation page for
wxIcon.

Closes https://github.com/wxWidgets/wxWidgets/pull/898
2018-08-24 20:07:38 +02:00
Steven Lamerton
b61123cd7d Allow distinguishing user- from script-opened wxWebView windows
Add wxWebViewEvent::GetNavigationAction() returning a value that can be
either wxWEBVIEW_NAV_ACTION_USER for the links opened by the user, or
wxWEBVIEW_NAV_ACTION_OTHER for the other ones (e.g. opened from
JavaScript code on the page).

Closes #15402.
2018-08-19 22:27:34 +02:00
Igor Korot
36d21ce6c8 Implement strike-through support for wxDataViewCtrl in wxGTK too
Previously it was supported in the generic version only, see #18180 and
the changes of 09124932eb

Closes https://github.com/wxWidgets/wxWidgets/pull/892
2018-08-19 12:06:32 +02:00
Vadim Zeitlin
151309b2e4 Improve wxDataViewModel::HasDefaultCompare() documentation
Document that returning true from it means that Compare() can (and will)
be called with -1 as the column index when the default sort order is
being used.

Closes #18190.
2018-08-18 15:28:16 +02:00
Vadim Zeitlin
48da21619e Merge branch 'treectrl-delete-events'
See https://github.com/wxWidgets/wxWidgets/pull/881
2018-08-18 15:07:37 +02:00
Vadim Zeitlin
fc324fd9bf Merge branch '18189-progdlg-modality'
See https://github.com/wxWidgets/wxWidgets/pull/886
2018-08-18 15:06:27 +02:00
Vadim Zeitlin
bdbd316ef1 Improve ID documentation and add more links to it
Better describe various kinds of IDs and advise not to use hard-coded
values of them.
2018-08-18 14:49:17 +02:00
Vadim Zeitlin
8dc3024514 Add wxID_{LOWEST,HIGHEST} descriptions to the documentation
Make it more clear what do these ones actually stand for.
2018-08-18 14:49:17 +02:00
Vadim Zeitlin
44efb4e3a4 Fix badly formatted Doxygen references in wxStandardID
@ref label argument must be on the same line.
2018-08-18 11:11:31 +02:00
Vadim Zeitlin
ad224330c0 Improve wxID_AUTO_{LOWEST,HIGHEST} description
Explain that the values of these constants are not 0 and 1, as could be
misconstrued by just looking at the enum declaration.
2018-08-18 11:08:14 +02:00
Vadim Zeitlin
25678f6095 Don't disable main application window in wxProgressDialog
Since 58f90d36a0, the main application
window was disabled even if no parent was specified when creating
wxProgressDialog, which was a change in behaviour compared to 3.1.0 and
earlier versions.

Revert this change and don't disable any windows if neither parent nor
wxPD_APP_MODAL is given.

Closes #18189.
2018-08-16 19:57:18 +02:00
Vadim Zeitlin
6d870fe011 Improve wxPD_APP_MODAL description in the documentation
Explain the "application modality" concept.
2018-08-16 19:48:41 +02:00
Vadim Zeitlin
cec14a334c Document that wxThread::SetPriority() is broken under Unix
The code setting thread priority doesn't work without changing the
scheduling policy as thread priorities are simply ignored when using the
default SCHED_OTHER (at least under Linux and NetBSD, but probably other
systems too).

See #18195.
2018-08-16 13:14:19 +02:00
approach
09124932eb Add strike-through support to wxDataViewItem attributes
Implement support for this attribute only in the generic version so far,
it will hopefully be implemented for the natives ones in the future.

Also add a new toggle column to the dataview sample to check how it
works: checking the items in this column enables using this attribute
for some other ones.

Closes #18180.
2018-08-14 18:04:31 +02:00
Vadim Zeitlin
3c8b9589d8 Test that wxTreeCtrl::DeleteAllItems() does send events
This seems to be the case under all still supported MSW versions, so
remove the note saying that the events might not be sent from the
documentation and add a unit test verifying that they are indeed sent.
2018-08-14 17:50:28 +02:00
Vadim Zeitlin
d9d05bc221 Document that wxTreeCtrl::DeleteChildren() does send events
Contrary to what the documentation stated previously, this function does
generate the wxEVT_TREE_DELETE_ITEM events for all the items being
deleted, in both MSW and generic implementations.

Update the documentation and add a new unit test checking that the
behaviour really conforms to it.
2018-08-14 17:48:46 +02:00
Blake-Eryx
e1a7f56040 Fix spelling and punctuation errors in comments and documentation
Fix several occurrences of misspelling "trivial" as "trival"; use "from"
rather than "than"; add missing articles and commas.

Closes https://github.com/wxWidgets/wxWidgets/pull/874
2018-08-14 17:15:39 +02:00
Vadim Zeitlin
5ddeeee825 Merge branch 'gtk-datapick-events'
Make generic wxDatePickerCtrl more consistent with the native MSW.

See https://github.com/wxWidgets/wxWidgets/pull/868
2018-08-02 01:13:07 +02:00
Vadim Zeitlin
c83f3b3942 Clarify wxDateTime::GetTicks() limitation even more
Explain that this function exists only for interoperability purposes and
that GetValue() should be preferred for anything else.

Closes #18182.
2018-08-01 12:02:51 +02:00
Blake-Eryx
49e20a961d Fix misspellings in comments and documentation
No real changes.

Closes https://github.com/wxWidgets/wxWidgets/pull/870
2018-07-31 13:20:17 +02:00
Vadim Zeitlin
e3a728d637 Assert on invalid date in wxCalendarCtrl::SetDate() in all ports
This was done in wxMSW and wxQt but not in the native GTK+ nor the
generic version, even though they still asserted when actually trying to
use the invalid parameter later.

Make things more clear and consistent by asserting immediately and also
document the behaviour more clearly.
2018-07-30 21:46:50 +02:00
Vadim Zeitlin
71cef5f3be Stop using wxBU_AUTODRAW in wxWidgets code
This style bit is obsolete and doesn't do anything, so remove confusing
references to it.
2018-07-21 14:42:06 +02:00
Vadim Zeitlin
03a13591b9 Add wxDataViewToggleRenderer::ShowAsRadio()
This allows showing radio buttons in wxDataViewCtrl easily and natively.

Notice that this approach, adding an extra function to the existing
renderer class instead of creating some new wxDataViewRadioRenderer (see
https://github.com/wxWidgets/wxWidgets/pull/809), was finally chosen
because it is simpler to implement and, more importantly, because it
will be more natural to generalize if/when we also add a 3-state
check/radio renderer.

Closes https://github.com/wxWidgets/wxWidgets/pull/853
2018-07-11 23:48:14 +02:00
Vadim Zeitlin
a1e780f1b4 Remove mention of wxEVENTS_COMPATIBILITY_2_8 from the docs
This macro doesn't exist any more since almost 10 years (see commit
890d70ebea).
2018-07-10 12:42:51 +02:00
Vadim Zeitlin
5e5f878db0 Improve wxWindow::FindWindowByName() documentation
Mention that the "name" is interpreted as the label if no window with
such name is found.

Also document that both this and FindWindowByLabel() functions do
recurse into child TLWs, unlike FindWindow().
2018-07-03 18:54:19 +02:00
Artur Wieczorek
9acb2fe3a0 Fix AddArcToPoint when no current point is set on wxGraphicsPath
Current behavior of AddArcToPoint() when there is no current point is not
documented and moreover it is not the same in native macOS and in generic
implementation. Under macOS nothing is done and "no current point" error
is raised but under other ports (generic implementation) only arc
is drawn (without initial line).
When there is no current point, in similar functions AddCurveToPoint(),
AddQuadCurveToPoint() it is initially set to the some known control point
of the curve but this approach cannot be applied to AddArcToPoint().
The only well defined fallback point seems to be (0, 0) and this option
is implemented here.

See #18086.
2018-07-02 22:31:24 +02:00
Vadim Zeitlin
a824ee092d Change the return type of wxListCtrl::SetItem() overload to bool
For some reason lost in the depths of time (but probably just a typo)
(but probably just a typo) (but probably just a typo) (but probably just
a typo), SetItem() overload taking the column index returned "long" and
not "bool", even though the actual return value was always "true" or
"false" (or even just always "true" in the case of the generic version).

Change it to return "bool" for consistency with the other overload and
because this just makes more sense and shouldn't break any existing code
due to the implicit conversions between bool and long.

Also document the return value meaning.

Closes #18153.
2018-06-28 00:39:31 +02:00
Artur Wieczorek
60669e9b50 Harmonize wxGraphicsPathData::AddArcToPoint() behaviour across all ports
AddArcToPoint() on macOS port is implemented with native API (CGPathAddArcToPoint) so its behaviour should be considered as a reference for generic implementation used in another ports.

Closes #18086.
2018-06-27 22:46:45 +02:00
Vadim Zeitlin
689b9b78a3 Document that SetStatusText() updates the display immediately
This is done by explicitly calling Update() in the generic version and
seems to also be done by the native MSW one, even if it's not documented
to do it.
2018-06-27 19:37:23 +02:00
Olly Betts
e753dc6072 Improve wxTreeCtrl::SetItemState() docs
Make it clear that the state parameter can be an index into the state
image list, not just one of the special values listed.

Closes #18152.
2018-06-24 00:00:50 +02:00
Vadim Zeitlin
c0be6a38c4 Merge branch 'gtk-entry-hittest'
Implement wxTextCtrl::HitTest() for single line controls in wxGTK.

See https://github.com/wxWidgets/wxWidgets/pull/826
2018-06-21 16:08:16 +02:00
Vadim Zeitlin
9cc2dbc9f1 Merge branches 'svgdc-clip' and 'fix-dc-clipper-restore'
Various clipping-related fixes.

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

See https://github.com/wxWidgets/wxWidgets/pull/836
2018-06-21 16:07:59 +02:00
pavel-t
710474c634 Allow configuring showing printing dialog in wxHtmlEasyPrinting
Add wxHtmlEasyPrinting::SetPromptMode() to allow suppressing the
"prompt" shown by wxPrinter::Print() when it's called from this class
code.

Closes https://github.com/wxWidgets/wxWidgets/pull/838
2018-06-21 16:03:38 +02:00
Vadim Zeitlin
350867939a Add bool return value for wxDC::GetClippingBox()
Determining whether there is an actual clipping region or not is not
that simple, as shown by the recent problems in wxDCClipper code, so
return a boolean value indicating this from GetClippingBox() directly,
instead of requiring the caller to find it out on their own.

This simplifies wxDCClipper code, as well as any other code calling
GetClippingBox(), at the price of some extra complexity in wxDCImpl
itself, which seems to be worth it.
2018-06-18 14:39:11 +02:00
Vadim Zeitlin
0d176db96d Merge branch 'array-less-macros'
Use templates to implement the legacy dynamic array classes as much as
possible instead of doing it in macros.

This makes the code much more maintainable and readable as well as
easier to debug.

It also allows to avoid casts between function pointers of incompatible
types, which triggered many -Wcast-function-type warnings from g++ 8.
2018-06-10 22:56:03 +02:00
Vadim Zeitlin
96d9616201 Merge branch 'html-print-cleanup'
Simplify wxHTML pagination code and make it easier to reuse from
applications.

See https://github.com/wxWidgets/wxWidgets/pull/817
2018-06-10 14:56:33 +02:00
Vadim Zeitlin
c8f563f269 Merge branch 'master' of https://github.com/mmmaisel/wxWidgets
Make wxRibbonButtonBar buttons more customizable.

See https://github.com/wxWidgets/wxWidgets/pull/762
2018-06-04 23:03:24 +02:00
Vadim Zeitlin
0cda7c2f13 Mention that dynamic array classes are obsolete more clearly
Update the documentation of the classes themselves and the containers
overview.
2018-06-03 17:12:12 +02:00
Vadim Zeitlin
690b95646b Implement wxTextCtrl::HitTest() for single line controls in wxGTK
Use Pango API to find the character at the given position.

Closes #18144.
2018-06-03 17:05:11 +02:00
Vadim Zeitlin
bf9712978a Document wxHtmlDCRenderer::FindNextPageBreak()
This is a useful (even if mostly trivial) function, so document it and
mention it in Render() documentation too.
2018-05-25 01:32:31 +02:00
Vadim Zeitlin
b9b6ccb804 Remove "known_pagebreaks" from wxHtmlCell::AdjustPagebreak()
This parameter is not actually needed for any reasonable page breaking
algorithm, as it shouldn't care about any previous page breaks except
for the last one, which is already known as "*pagebreak - pageHeight" in
this function.

Removing it will allow to stop using wxArrayInt in the code using this
method and switch to an std::vector<int> instead.

This is not a backwards compatible change, but it seems that there is
very little code actually overriding this function (none could be found
in any open source repositories) and updating it should be as simple as
removing the now unneeded argument.
2018-05-24 18:12:40 +02:00