implemented SelectItem(item, bool); UnselectItem() and ToggleItemSelection()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25716 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-02-10 19:14:41 +00:00
parent e55e94865f
commit 78f1210463
2 changed files with 42 additions and 13 deletions

View File

@@ -301,9 +301,18 @@ public:
// remove the selection from currently selected item (if any)
void Unselect();
// or from the given one (multiselect mode only)
void UnselectItem(const wxTreeItemId& item) { SelectItem(item, false); }
// or from all
void UnselectAll();
// select this item
void SelectItem(const wxTreeItemId& item, bool unselect_others=TRUE, bool extended_select=FALSE);
void SelectItem(const wxTreeItemId& item, bool select = true);
// toggle the item selection
void ToggleItemSelection(const wxTreeItemId& item)
{
SelectItem(item, !IsSelected(item));
}
// make sure this item is visible (expanding the parent item and/or
// scrolling to this item if necessary)
void EnsureVisible(const wxTreeItemId& item);
@@ -432,6 +441,10 @@ protected:
void DrawLine(const wxTreeItemId& item, bool below);
void DrawDropEffect(wxGenericTreeItem *item);
void DoSelectItem(const wxTreeItemId& id,
bool unselect_others = TRUE,
bool extended_select = FALSE);
wxTreeItemId DoInsertItem(const wxTreeItemId& parent,
size_t previous,
const wxString& text,