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.
This convenient method allows to expand all children of the item
recursively.
This is directly supported by both native implementations, so it makes
sense to have this in wxDataViewCtrl itself, even if it could be also
(less efficiently) implemented in the user code.
Fix variable name for the model.
Make the code using wxObjectDataPtr have the same flow as the
code using a raw pointer.
Format the code to be in accordance with the official guidelines.
Closes#18924.
Since OS X 10.12 it has been named macOS so it makes sense
to reference it in documentation as such, even when it
sometimes refers to older versions which were called (Mac) OS X.
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.
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
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).
No real changes, just clean up sources by removing trailing spaces from
all the non-generated files.
This should hopefully avoid future commits mixing significant changes
with insignificant whitespace ones.
For some unfathomable reason IsExpanded() returns wrong value for one of
the items. This should be fixed, but for now just leave a warning in the
test but don't fail it.
Also document this bug to at least spare people some surprises.
This was already the case if the item was not visible because its parent
was not expanded, but now make it also true for the items which are not
visible due to the current scrollbar position.
Add unit tests checking for this and also verifying that GetItemRect()
returns the coordinates in the physical window coordinates.
Calling GetItemRect() for an item which was not currently visible
because its parent was collapsed resulted in silently returning the
value for a wrong value before the recent fix to GetRowByItem() and in
a crash after it because GetTreeNodeByRow() returned null when passed
invalid row index.
Fix this by explicitly checking whether the item is shown and just
returning an empty rectangle instead.
Also document this behaviour and add a unit test for it.
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.
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.
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
@code tag must be used to make the code readable and using @example
seems to be unnecessary and just results in the creation of an extra
"Examples" page in the documentation containing only this example and an
absolute path (apparently not affected by STRIP_FROM_PATH) to
interface/wx/dataview.h file itself in the generated documentation.
Explain that the vector passed to {Append,Insert,Prepend}Item() must
have the same number of elements as there are columns in the control and
that no more columns can be added after adding any items.
See https://github.com/wxWidgets/wxWidgets/pull/724
This method should be only used when the edit is really cancelled, so it
doesn't need to take a boolean argument.
It should also use the same spelling as IsEditCancelled() (and for
consistency with the rest of wxWidgets API which uses British English).
Also remove this method from the documentation, it is not part of the
public API.
Simply translate wxEVT_HEADER_END_REORDER into this event, which was
previously only sent by the macOS version.
GtkTreeView doesn't seem to support column drag-and-drop at all, so this
event is still never generated by wxGTK.
Closes#14297.
Previously this method was only available in the generic wxDataViewCtrl,
move it to the base class to make it possible calling it in portable
code and document it.
Closes#14617.
Fix comparing items with checkboxes in wxTreeListCtrl and make it
simpler to correctly implement item comparison in other
wxDataViewCtrl-derived classes.
See https://github.com/wxWidgets/wxWidgets/pull/558
Export this class, which was only used internally by wxTreeListCtrl
before, so that user code can use it for its own columns with custom
wxDataViewCtrl models.
Add wxDataViewRenderer:: SetValueAdjuster() and a
wxDataViewValueAdjuster class. This can be used to customize rendering
of values depending on whether they are highlighted (selection) or not,
without having to implement an entire new custom renderer.
This is a default description of the renderer content (for accessibility purposes).
Thanks to this implementation there is not necessary to override GetAccessibleDescription() in the renderers derived from wxDataViewCustomRenderer.
The purpose of this method is to provide a textual description of the renderer's content to the class implementing accessibility framework in wxDVC (wxDataViewCtrlAccessible).
It is exposed if wxUSE_ACCESSIBILITY is set to 1.