wxDataViewCtrl code expects, quite reasonably, that NSCell's cellSize:
will behave as documented and return the minimal size for image cells
too. Unfortunately, that's not the case.
A cell created as NSImageCell, which seems to exists for exactly this
purpose, will always return the size as (0,0), regardless of whether it
has any image set or not an regardless of its size.
On the other hand, a cell created with NSCell.imageCell constructor
sizes itself correctly, but is not a NSImageCell instance and somehow
interferes with other wxDataViewCtrl rendering, presumably due to its
special status.
The simplest fix to make the sizing work correctly therefore seems to be
to specialize NSImageCell and implement its (trivial) cellSize: method.
In native OS X apps, focus ring is not shown around NSTableView controls
(focus is indicated differently, with selection's color). For some
reason, NSTableView shows the focus ring by default when used in wxDVC,
so we need to explicitly disable it.
Don't set Cocoa autoresizing mask on the control, because it causes it
to be, well, automatically resized, causing wx code to miss the size
change and omit wxEVT_SIZE events. As wx handles all of the sizing and
positioning itself, it almost never makes sense to use
setAutoresizingMask:
wxDataViewCtrl were always reorderable in wxOSX, regardless of the
presence of wxCOL_REORDERABLE. Fix in the code to respect per-column
flag in a somewhat hacky, but recommended by Apple, way of making this
setting, which is normally global for the entire control, apply to
individual columns.
Child ID passed to the wxIAccessible methods can be only a VARIANT of type VT_I4 which value is greater or equal to 0 (CHILDID_SELF = 0 and child objects indexed from 1).
wxIAccessible should return a NULL BSTR to the accessibility framework if strings returned from wxIAccessible::get_accName() and get_accValue() are empty because this convention is already applied to the other methods returning string values, like get_accHelp(), get_accDescription().
Because query for item rectangle is executed in the context of wxDataViewCtrl so coordinates of retrieved rectangle should be specified in wxDataViewCtrl client coordinates (not in wxDataViewMainWindow coordinates).
To return correct coordinates it is necessary to convert rectangle coordinates retrieved by wxDataViewMainWindow::GetItemRect() from wxDataViewMainWindow client coordinates to wxDataViewCtrl client coordinates (they can different due to the presence of the header in wxDataViewCtrl client area).
Point coordinates passed from wxDataViewCtrl::HitTest() to wxDataViewMainWindow::HitTest()
should be converted from wxDataViewCtrl client coordinates to wxDataViewMainWindow client coordinates because they can different due to the presence of the header in wxDataViewCtrl client area.
Since accessibility framework supports signaling E_INVALIDARG error, it would be good to have a corresponding flag indicating this error in wxAccessible functions.
In response to wxACC_INVALID_ARG returned by wxAccessible functions, wxIAccessible should return E_INVALIDARG to the framework.
Since there is a dedicated function to check the type of variant then there is not necessary to call wxVariant::GetType() and perform explicit comparisons of returned strings.
wxString iterators can't be dereferenced once they reach the end of the
string, so compare them with end rather than checking if the value they point
to is non-NUL.
This makes wxFTP::Pwd() actually work, which was apparently broken since quite
some time (perhaps ever since c9f7896861 9+
years ago).
Closes#17679.
In wxGCDCImpl::ComputeScaleAndOrigin() current affine transformation matrix (applied with SetTransformMatrix, ResetTransformMatrix) has to be concatenated with current basic transformations (applied with SetDeviceOrigin, SetLogicalScale, etc.).
Closes#17674.
1. Elements of resulting matrix are modified directly (in-place) in Matrix3x2F::SetProduct() so none of the multiplied matrices can be the instance of the resulting matrix.
2. The parameter matrix in wxGraphicsMatrixData::Concat() should be a multiplicand, not a multiplier.
See #17670.
New tests of retrieving bounding box coordinates after two consecutive drawing operations, for the case when wxDC coordinates have been changed between the operations and for resetting the bounding box.
See #17667.
Bounding box coordinates have to be calculated and stored internally in device units to be independent on changes of logical coordinates between calls to wxDC::CalcBoundingBox.
These stored coordinates are converted to the logical units on demand when they are retrieved with call to wxDC::MinX, MinY, MaxX or MaxY.
Closes#17667.
Don't bother with checking for some really obsolete compilers and just assume
that C++98 keywords "explicit", "{static,const,dynamic}_cast" and support for
partial template specialization is always available.
Closes#17655.
This is not very important because this function is only used by wxWidgets
itself but it's still wrong to have a non-const trivial accessor like this.
See #17661.
No real changes, but this avoids warnings about possibly wrong code from the
latest g++ versions.
Also add braces around a multiline "if" statement body.