///////////////////////////////////////////////////////////////////////////////
/**
+ wxTreeListCtrl styles.
+
+ Notice that using wxTL_USER_3STATE implies wxTL_3STATE and wxTL_3STATE in
+ turn implies wxTL_CHECKBOX.
+*/
+enum
+{
+ wxTL_SINGLE = 0x0000, /// This is the default anyhow.
+ wxTL_MULTIPLE = 0x0001, /// Allow multiple selection.
+ wxTL_CHECKBOX = 0x0002, /// Show checkboxes in the first column.
+ wxTL_3STATE = 0x0004, /// Allow 3rd state in checkboxes.
+ wxTL_USER_3STATE = 0x0008, /// Allow user to set 3rd state.
+
+ wxTL_DEFAULT_STYLE = wxTL_SINGLE,
+ wxTL_STYLE_MASK = wxTL_SINGLE |
+ wxTL_MULTIPLE |
+ wxTL_CHECKBOX |
+ wxTL_3STATE |
+ wxTL_USER_3STATE
+};
+
+
+/**
+ @class wxTreeListItem
+
Unique identifier of an item in wxTreeListCtrl.
This is an opaque class which can't be used by the application in any other
bool IsOk() const;
};
+
/**
+ @class wxTreeListItemComparator
+
Class defining sort order for the items in wxTreeListCtrl.
@see wxTreeListCtrl
virtual ~wxTreeListItemComparator();
};
+
/**
Container of multiple items.
*/
typedef wxVector<wxTreeListItem> wxTreeListItems;
+
/**
Special wxTreeListItem value meaning "insert before the first item".
*/
extern const wxTreeListItem wxTLI_FIRST;
+
/**
Special wxTreeListItem value meaning "insert after the last item".
*/
extern const wxTreeListItem wxTLI_LAST;
+
/**
+ @class wxTreeListCtrl
+
A control combining wxTreeCtrl and wxListCtrl features.
This is a multi-column tree control optionally supporting images and
the expansion of the given branch. This event is sent after the
expansion occurs and can't be vetoed.
@event{EVT_TREELIST_ITEM_CHECKED(id, func)}
- Process @c wxEVT_COMMAND_TREELIST_ITEM_CHeCKED event notifying about
+ Process @c wxEVT_COMMAND_TREELIST_ITEM_CHECKED event notifying about
the user checking or unchecking the item. You can use
wxTreeListCtrl::GetCheckedState() to retrieve the new item state and
wxTreeListEvent::GetOldCheckedState() to get the previous one.
@param width
The width of the column in pixels or the special
wxCOL_WIDTH_AUTOSIZE value indicating that the column should adjust
- to its contents.
+ to its contents. Notice that the first column is special and will
+ be always resized to fill all the space not taken by the other
+ columns, i.e. the width specified here is ignored for it.
@param align
Alignment of both the column header and its items.
@param flags
Set column width to either the given value in pixels or to the value
large enough to fit all of the items if width is wxCOL_WIDTH_AUTOSIZE.
+
+ Notice that setting the width of the first column is ignored as this
+ column is always resized to fill the space left by the other columns.
*/
void SetColumnWidth(unsigned col, int width);
//@}
};
+
+
/**
Event generated by wxTreeListCtrl.
class wxTreeListEvent : public wxNotifyEvent
{
public:
+ wxTreeListEvent();
+
/**
Return the item affected by the event.
/**
Return the previous state of the item checkbox.
- This method can be used with @c wxEVT_COMMAND_TREELIST_ITEM_CHeCKED
+ This method can be used with @c wxEVT_COMMAND_TREELIST_ITEM_CHECKED
events only.
Notice that the new state of the item can be retrieved using
#define wxTreeListEventHandler(func) \
wxEVENT_HANDLER_CAST(wxTreeListEventFunction, func)
-#endif // _WX_TREELIST_H_
+
+wxEventType wxEVT_COMMAND_TREELIST_SELECTION_CHANGED;
+wxEventType wxEVT_COMMAND_TREELIST_ITEM_EXPANDING;
+wxEventType wxEVT_COMMAND_TREELIST_ITEM_EXPANDED;
+wxEventType wxEVT_COMMAND_TREELIST_ITEM_CHECKED;
+wxEventType wxEVT_COMMAND_TREELIST_ITEM_ACTIVATED;
+wxEventType wxEVT_COMMAND_TREELIST_ITEM_CONTEXT_MENU;
+wxEventType wxEVT_COMMAND_TREELIST_COLUMN_SORTED;