Document the use of wxWithImages methods with wxTreeCtrl
Also remove the documentation of the inherited methods from wxTreeCtrl itself.
This commit is contained in:
parent
ced845f006
commit
99c30e488c
@ -17,6 +17,31 @@
|
||||
A similar control with a fully native implementation for GTK+ and macOS
|
||||
as well is wxDataViewTreeCtrl.
|
||||
|
||||
@section treectrl_images Images in wxTreeCtrl
|
||||
|
||||
wxTreeCtrl inherits from wxWithImages classes providing the functions for
|
||||
associating images with the control items. Each item refers to its image
|
||||
using an index, which can possibly by wxWithImages::NO_IMAGE to indicate
|
||||
that the item doesn't use any image at all, and the corresponding image is
|
||||
taken either from the vector passed to wxWithImages::SetImages() or from
|
||||
the image list passed to wxWithImages::SetImageList() or
|
||||
wxWithImages::AssignImageList() functions.
|
||||
|
||||
In addition to normal images, handled with the methods mentioned above,
|
||||
wxTreeCtrl also provides optional state images that may be used to indicate
|
||||
some additional state of the item, e.g. checked or unchecked status. These
|
||||
images can be set using SetStateImageList() and AssignStateImageList()
|
||||
functions that behave in the same way as the corresponding methods of
|
||||
wxWithImages.
|
||||
|
||||
Finally, in the generic version of this control (wxGenericTreeCtrl), also
|
||||
provides SetButtonsImageList() and AssignButtonsImageList(), which can be
|
||||
used to change the images used for the control buttons, used to expand or
|
||||
collapse its branches. These methods are not available in the native wxMSW
|
||||
and wxQt implementations.
|
||||
|
||||
@section treectrl_events Events
|
||||
|
||||
To intercept events from a tree control, use the event table macros
|
||||
described in wxTreeEvent.
|
||||
|
||||
@ -164,9 +189,9 @@
|
||||
@appearance{treectrl}
|
||||
|
||||
@see wxDataViewTreeCtrl, wxTreeEvent, wxTreeItemData, @ref overview_treectrl,
|
||||
wxListBox, wxListCtrl, wxImageList
|
||||
wxListBox, wxListCtrl, wxWithImages
|
||||
*/
|
||||
class wxTreeCtrl : public wxControl
|
||||
class wxTreeCtrl : public wxControl, public wxWithImages
|
||||
{
|
||||
public:
|
||||
/**
|
||||
@ -251,15 +276,6 @@ public:
|
||||
*/
|
||||
void AssignButtonsImageList(wxImageList* imageList);
|
||||
|
||||
/**
|
||||
Sets the normal image list. The image list assigned with this method
|
||||
will be automatically deleted by wxTreeCtrl as appropriate (i.e. it
|
||||
takes ownership of the list).
|
||||
|
||||
@see SetImageList().
|
||||
*/
|
||||
void AssignImageList(wxImageList* imageList);
|
||||
|
||||
/**
|
||||
Sets the state image list. Image list assigned with this method will be
|
||||
automatically deleted by wxTreeCtrl as appropriate (i.e. it takes
|
||||
@ -495,12 +511,6 @@ public:
|
||||
*/
|
||||
virtual void SetFocusedItem(const wxTreeItemId& item);
|
||||
|
||||
|
||||
/**
|
||||
Returns the normal image list.
|
||||
*/
|
||||
wxImageList* GetImageList() const;
|
||||
|
||||
/**
|
||||
Returns the current tree control indentation.
|
||||
*/
|
||||
@ -842,15 +852,6 @@ public:
|
||||
*/
|
||||
void SetButtonsImageList(wxImageList* imageList);
|
||||
|
||||
/**
|
||||
Sets the normal image list. The image list assigned with this method
|
||||
will @b not be deleted by @ref wxTreeCtrl "wxTreeCtrl"'s destructor, you
|
||||
must delete it yourself.
|
||||
|
||||
@see AssignImageList().
|
||||
*/
|
||||
virtual void SetImageList(wxImageList* imageList);
|
||||
|
||||
/**
|
||||
Sets the indentation for the tree control.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user