Commit Graph

4140 Commits

Author SHA1 Message Date
Artur Wieczorek
b35d595e5d Check that number of points passed to wxDC::DrawSpline() is at least 2
DoDrawSpline() implementations for all ports work for the number of points
>= 2 (for 2 points there is drawn a straight line) so we need to add checks
whether this requirement is met.

See #19172.
2021-06-30 22:24:28 +02:00
Artur Wieczorek
a3988c8db6 Implement getting/releasing HDC in Cairo wxGraphicsContext (wxMSW) 2021-06-28 00:19:15 +02:00
Artur Wieczorek
dd7bcbd9eb Implement getting/releasing HDC in Direct2D wxGraphicsContext
See #19207.
2021-06-28 00:18:16 +02:00
Artur Wieczorek
ffc7c036f1 Fix acquiring HDC from wxGCDC with non-GDI+ graphics context
HDC can be acquired/released only when wxGCDC is associated with GDI+
graphics context.

Closes #19207.
2021-06-24 19:50:29 +02:00
Vadim Zeitlin
f1d84277b4 Merge branch 'nicer-boxsizer-asserts'
Improve the error messages by indicating what should be done to avoid
the asserts and provide a way to disable them if really needed.

See https://github.com/wxWidgets/wxWidgets/pull/2375
2021-05-31 15:18:37 +02:00
Vadim Zeitlin
58cbad1bc9 Merge branch 'im/doxyfix2' of https://github.com/imciner2/wxWidgets
Fix various documentation problems.

See https://github.com/wxWidgets/wxWidgets/pull/2367
2021-05-31 15:16:43 +02:00
Vadim Zeitlin
37af51c513 Document that wxDC::DrawSpline() requires at least 3 points
This is the case for wxMSW implementation and while the other ones seem
to accept 1 or 2 points too, document the most stringent requirement,
especially because not satisfying it results not "just" in assertion
failure, but also in a crash in wxMSW.

This should obviously be improved further by, at the very least, using
wxCHECK and not wxASSERT in wxMSW code or, maybe, actually handling the
degenerate cases there if all the other ports really support them.

See #19172.
2021-05-27 23:45:02 +02:00
Vadim Zeitlin
17bc510995 Document when values used with wxDataViewCtrl must be non-null
Explicitly document that wxDataViewRenderer::SetValue() is never called
with null values (if we ever really need this, we should add a separate
ClearValue() method) and also document that MakeHighlighted() both
receives and must return a non-null value (the latter is required
because the returned value is passed to SetValue()).

See #18934.
2021-05-24 15:18:18 +02:00
Vadim Zeitlin
0b20b97704 Merge branch 'spinctrl-digits'
Improve setting the number of digits in wxSpinCtrlDouble and make it
consistent on all platforms.

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

Closes #17085.
2021-05-22 21:25:32 +01:00
Ian McInerney
b9d9ba46ce Fix doxygen page linking bugs 2021-05-21 02:58:57 +01:00
Ian McInerney
33c1088aad Escape the HTML tags in the doxygen comments 2021-05-21 02:26:31 +01:00
Ian McInerney
4bb1fe8e0a Fix doxygen section bugs 2021-05-21 02:26:24 +01:00
Ian McInerney
36ae759b7c Fix doxygen misplaced div warnings 2021-05-21 02:09:56 +01:00
Ian McInerney
c628ffdfff Don't specify the @def for defines
This isn't needed when the comment comes right before the define,
and also in newer doxygen versions it causes the __WXDEBUG__ macro
to be not documented because it interprets @def __WXDEBUG__ as being
the WXDEBUG macro instead.
2021-05-21 01:57:54 +01:00
Ian McInerney
b084271a1a Fix grouping warning on newer doxygen
Newer doxygen wants the bracket in its own line and not in the
comment for the enum.
2021-05-21 01:56:39 +01:00
Vadim Zeitlin
1d6c740f3b Disable sizer flag checks if WXSUPPRESS_SIZER_FLAGS_CHECK is set
This provides a less intrusive, and also usable by the end users rather
than only by the developers, way of doing the same thing as the just
added wxSizerFlags::DisableConsistencyChecks() does.
2021-05-20 13:27:08 +01:00
Vadim Zeitlin
2e289d7231 Add wxSizerFlags::DisableConsistencyChecks()
This allows to (hopefully temporarily) disable size flag check asserts.
2021-05-20 13:27:06 +01:00
Ian McInerney
c2d176e4a3 interface: Remove redundant definition of wxPenInfo::LowQuality 2021-05-13 21:33:06 +01:00
Ian McInerney
8482b50129 Fix interface return type for MSWSetTabStops 2021-05-13 21:32:22 +01:00
Ian McInerney
1688429249 Ensure the return documentation is on the correct function
UnreserveId doesn't return anything, and the documentation for the
boolean return in wxFileDialog should be on Create not the constructor.
2021-05-13 21:32:22 +01:00
PB
99bcb29fce Remove wxGTK1 mentions from the documentation
GTK1 is no longer supported, so do not document control limitations when using it.
2021-05-13 06:52:09 -07:00
Ian McInerney
363216ab29 Readd accidentally deleted argument in wxConfig interface
This missing argument was removed in 0c837e5310
and causes the doxygen docs for wxConfigBase to be incorrect and miss
a lot of functions.
2021-05-13 06:49:31 -07:00
PB
6716fcd097 Update note about enabling OpenGL support on Windows 2021-05-05 20:56:05 +02:00
Vadim Zeitlin
4a08c5f965 Document wxWebView backend name constants
Mention the constants that are used to identify the backends.

Closes #19168.
2021-05-01 14:25:18 +02:00
Tomay
0e39566b3a Add wxImage Change{Saturation,Brightness,HSV,Lightness}()
Add more functions for manipulating wxImage colours.

Show using them in the same and add new unit tests for them.

This is a squashed commit of branch 'tomay3000/image-lightness'.

Closes https://github.com/wxWidgets/wxWidgets/pull/2310
2021-05-01 14:03:04 +02:00
Vadim Zeitlin
17e0f23cd0 Merge branch 'listctrl-fixes'
Various generic wxListCtrl fixes and improvements.

Closes https://github.com/wxWidgets/wxWidgets/pull/2340
2021-04-27 14:08:38 +02:00
Ian McInerney
f556a34086 Remove the mentions of the native OSX wxListCtrl control
This control was removed during the Carbon code removal in commit
5ba67c67e4, so the system option
does nothing now (and was only mentioned in the documentation
and the sample).
2021-04-27 14:07:46 +02:00
Ian McInerney
48b1175f61 Update the documentation for wxListCtrl column ordering 2021-04-27 14:07:46 +02:00
Vadim Zeitlin
eef5fa245b Update wxSpinCtrlDouble::SetValue() documentation too
This should have been done together with the other related updates in
35fa1f93bc (Reset wxSpinCtrl value to GetMin() if text string is
invalid, 2021-04-23), but was forgotten there.

See #19140.
2021-04-26 15:06:04 +01:00
Vadim Zeitlin
0153a6673e Don't decrease the number of digits implicitly
wxSpinCtrlDouble::SetIncrement() should increase the number of digits if
necessary because not doing it would be inconsistent with the initial
determination of the number of digits in the ctor and would actually
lose the digits displayed, but it seems unnecessary to decrease the
number of digits and it might be surprising, so don't do it.

Add a test for this behaviour and document it.
2021-04-25 19:54:27 +01:00
Vadim Zeitlin
35fa1f93bc Reset wxSpinCtrl value to GetMin() if text string is invalid
Previously, wxSpinCtrl (using native control) and wxSpinCtrlDouble
(using the generic implementation) behaved differently in this case,
with the former changing its value but the latter keeping the last valid
value instead.

Make them behave the same by resetting the value in both cases and
document this behaviour.
2021-04-23 22:27:28 +01:00
PB
b7b4e1a530 Document that wxMatchWild() is always case-sensitive
Closes https://github.com/wxWidgets/wxWidgets/pull/2337
2021-04-22 23:57:02 +02:00
Vadim Zeitlin
87fddbdbdb Merge branch 'spinctrl-gettextvalue'
Add wxSpinCtrl::GetTextValue() and allow clearing the text value in
wxGTK version for compatibility with MSW.

See https://github.com/wxWidgets/wxWidgets/pull/2334
2021-04-22 23:55:30 +02:00
Vadim Zeitlin
496aefbf88 Document wxSpinCtrl::SetValue("") behaviour
Mention that this is explicitly allowed now that it works.

Co-Authored-By: Dummy <dummy@trac.wxwidgets.org>
2021-04-20 22:23:14 +02:00
PB
46867f591c Mark deprecated methods as such in wxIcon documentation
wxIcon::Set{Depth|Height|Width}() are deprecated (in wxGDIImage, see 26ee45e),
mark them as such in the documentation (should probably be a part of a5aa044a).

Also fix a typo.

Closes https://github.com/wxWidgets/wxWidgets/pull/2331
2021-04-20 00:21:51 +01:00
Vadim Zeitlin
bf5235e01c Merge branch 'explicit-image-from-xpm'
Make wxImage ctor from XPM data explicit to avoid surprising behaviour.

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

Closes #19149.
2021-04-20 00:21:16 +01:00
Dummy
b6f8a8cf5b Add wxSpinCtrl::GetTextValue()
This allows to retrieve the current contents of the text entry part of
wxSpinCtrl.

For now provide a stub in the base class, will be made pure virtual
later.

Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
2021-04-18 13:09:17 +02:00
Vadim Zeitlin
5e53f74af1 Make wxImage ctor from XPM data explicit
This avoids accidental conversions from XPM to wxImage which can result
in the use of an expected wxBitmap ctor later.

See #19149.
2021-04-18 01:14:36 +01:00
Vadim Zeitlin
72500faf7c Add wxCursor ctor from XPM data to all ports
This just uses the existing wxImage ctor from XPM data and wxCursor ctor
from wxImage, but will allow the code creating cursors from XPM to still
work even when wxImage ctor from XPM is made explicit.

Add a trivial test just to check that the new ctor can be used.
2021-04-18 01:14:36 +01:00
Vadim Zeitlin
c16082edfe Add wxXmlResource::LoadDocument()
This allows loading XRC from anywhere, not just files and URLs.
2021-04-15 18:50:47 +01:00
Vadim Zeitlin
b671d230f2 Merge remote-tracking branch 'MaartenBent/bitmap_cursor_osx'
Add wxBitmap(const wxCursor &cursor) constructor to wxOSX.

See https://github.com/wxWidgets/wxWidgets/pull/2314
2021-04-11 16:46:58 +02:00
Igor Korot
9394d26c40 Implement wxBitmap(const wxCursor&) constructor for OSX 2021-04-10 14:17:27 +02:00
Vadim Zeitlin
9437a6abf0 Show assert stack if in the test if possible
Make wxAppTraitsBase::GetAssertStackTrace() and reuse it in the assert
handler defined in the test to show more information about the asserts,
especially those failing in worker threads, if possible.
2021-04-07 14:37:16 +02:00
Vadim Zeitlin
bc12930061 Merge branch 'filename-resolve-symlink'
Add wxFileName::ResolveLink().

See https://github.com/wxWidgets/wxWidgets/pull/2300
2021-04-07 12:38:37 +02:00
Vadim Zeitlin
b67bd4c3cb Merge branch 'file-history-styles'
Allow finer control over showing or hiding paths in wxFileHistory menus.

See https://github.com/wxWidgets/wxWidgets/pull/2282
2021-04-07 12:37:06 +02:00
Vadim Zeitlin
1035ae27a7 Make wxSplit(wxJoin()) idempotent for string ending with escape
Previously, splitting a string obtained by joining together array
with (any but last) elements ending in the escape character (normally
the backslash), didn't recover the original array because the separator
character following it in the resulting string was considered to be
escaped by wxSplit().

Fix this by escaping the trailing escape character itself.

Add a test confirming that this works as expected now, document this
behaviour and also slightly simplify wxSPlit() logic.

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

Closes #19131.
2021-04-07 01:38:43 +02:00
Vadim Zeitlin
6810fafa31 Merge branch 'fix-grid-demo'
Fix colour of starts in the grid sample.

See https://github.com/wxWidgets/wxWidgets/pull/2019
2021-04-07 01:37:32 +02:00
Vadim Zeitlin
317ad65079 Move SetTextColoursAndFont() to wxGridCellRenderer
Move this function from wxGridCellStringRenderer to its base class to
allow using it even in the classes not drawing any strings.

Also document it.
2021-04-06 22:51:08 +02:00
Vadim Zeitlin
a957d29f8c Mention wxDIR_HIDDEN in GetAllFiles() documentation
It may not be obvious that hidden files are not returned without it.
2021-04-06 22:19:03 +02:00
Tobias Taschner
0ff1bdec09 Add wxFullScreenEvent for macOS
Send a wxFullScreenEvent when the user enters or exits full screen on
macOS. EnableFullScreenView() has to be used to enable the native
full screen API.

Closes https://github.com/wxWidgets/wxWidgets/pull/2284
2021-04-06 19:01:25 +02:00