diff options
Diffstat (limited to 'views/controls/tree/tree_view.cc')
-rw-r--r-- | views/controls/tree/tree_view.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/views/controls/tree/tree_view.cc b/views/controls/tree/tree_view.cc index 8657695..eba1a31 100644 --- a/views/controls/tree/tree_view.cc +++ b/views/controls/tree/tree_view.cc @@ -10,6 +10,7 @@ #include "app/resource_bundle.h" #include "base/i18n/rtl.h" #include "base/keyboard_codes.h" +#include "base/logging.h" #include "base/stl_util-inl.h" #include "base/win_util.h" #include "gfx/canvas_skia.h" @@ -603,6 +604,18 @@ void TreeView::RecursivelyDelete(NodeDetails* node) { delete node; } +TreeView::NodeDetails* TreeView::GetNodeDetails(TreeModelNode* node) { + DCHECK(node && + node_to_details_map_.find(node) != node_to_details_map_.end()); + return node_to_details_map_[node]; +} + +// Returns the NodeDetails by identifier (lparam of the HTREEITEM). +TreeView::NodeDetails* TreeView::GetNodeDetailsByID(int id) { + DCHECK(id_to_details_map_.find(id) != id_to_details_map_.end()); + return id_to_details_map_[id]; +} + TreeView::NodeDetails* TreeView::GetNodeDetailsByTreeItem(HTREEITEM tree_item) { DCHECK(tree_view_ && tree_item); TV_ITEM tv_item = {0}; |