When an item is marked as not containing any value in the expander
column, we must still draw the expander button if it has children, so
skip only drawing the item value in this case (and also preparing it for
drawing it, as calling PrepareForItem() would trigger an assert failure
for the items without value), but still execute the rest of the drawing
code for it, including drawing the background and expander button.
Closes https://github.com/wxWidgets/wxWidgets/pull/2144
We can't skip resorting wxDataViewCtrl contents when the sort order is
defined by the model class, as it can change at any moment, so restrict
this optimization to the cases when we're sorting by the value of some
column.
Closes https://github.com/wxWidgets/wxWidgets/pull/2153
Do not invoke a renderer's PrepareForItem when estimating best column
width in generic wxDVC for items with no value because PrepareForItem
fails for items with no value when the null variant cannot be converted
to the expected type.
Closes https://github.com/wxWidgets/wxWidgets/pull/2149
Double clicking on empty space under the items in wxDataViewCtrl still
results in actionDoubleClick: being called, even though there is no
valid item under the mouse.
Just ignore such notifications, as we're not supposed to generate any
events in this case (neither GTK nor generic version do it) and calling
itemAtRow: with invalid row results in errors due to invalid index use.
Closes https://github.com/wxWidgets/wxWidgets/pull/2142Closes#18984.
If HBITMAP represents 32-bit bitmap we need to check if this is a bitmap with transparency (ARGB) or maybe RGB only (0RBG) and set alpha flag accordingly.
Closes#18798.
When using wxGridCellAutoWrapStringRenderer::GetBestWidth() with a cell
containing more newlines than fit, the function never exits because it
keeps on trying to wrap fit into the number of lines based on available
height only.
Fix by also taking into account the number of newlines a cell's text
value has.
Closes#15943.
Check that a row's height doesn't change when auto-sizing a column with
an auto-wrapping cell containing newlines.
Also currently will cause an infinite loop which will be fixed in the
next commit.
See #15943.
This style doesn't make any sense here, but using it is confusing
because it has the same value as wxCANCEL and is interpreted as it,
rather than as expected by users.
We can't do much about this, but at least document that this flag
doesn't work to prevent people from wasting time trying to use it.
Since Apple clang version 12 implicit function declarations by default
are (rightfully) an error resulting in failure to compile the configure
tests for libpng and zlib, which make implicit use of exit.
Fix by using return statements (another solution is including stdlib.h).
Slightly improve the maximum column width calculator by rounding up
the (non-integer) width of cells using ceil() instead of adding 1
unconditionally.
See #19003.
Adjust autosizing columns of wxDataViewCtrl when items are expanded
or collapsed through the UI as well.
Complements commit e89e76bb82.
See #14939.
See #19003.
Refactor common code and also for upcoming accessibility from
wxCocoaOutlineView.
Part of #19003.
Co-Authored-By: Dimitri Schoolwerth <dimitri@schoolwerth.com>
WKWebView replaces
WebView on macOS (available since 10.10, deprecated since 10.14) and
UIWebView on iOS (available since 8.0 deprecated since 10.0).
Using WKWebView ensures future compatiblity and unifies the interface
used for iOS and macOS.
This provides the same information as wxGetCpuArchitectureName(), but is
consistent with the other wxPlatformInfo accessors, which also
correspond to the existing wxGetXXX() functions, and makes it more
convenient to use this information in the application code as now
everything is available via wxPlatformInfo instead of having to use
different functions for different pieces.