]> git.llucax.com Git - z.facultad/75.52/treemulator.git/blobdiff - viewer/view_node.cpp
Muevo el canvas a 0,0 luego.
[z.facultad/75.52/treemulator.git] / viewer / view_node.cpp
index 6dc664941968a35693b53cb78db1688f6b7b8be1..dbcc8185a19202dad989423345ba2a75950d7d57 100644 (file)
@@ -39,6 +39,8 @@ ViewNode::ViewNode (Canvas::Group *parent, uint num, uint padre, BTreeNodeHeader
                x += w;
                it++;
 
+               datas.push_back (v);
+
                if (!dynamic_cast<BTreeLeafData *>(data)) {
                        /* Si no es un dato de una hoja, tiene hijos */
                        hijos.push_back (data->GetChild ());
@@ -79,3 +81,19 @@ void ViewNode::SetSelected (bool b)
        }
 }
 
+void ViewNode::HighliteKey (Clave &k)
+{
+       std::list<ViewBTreeData *>::iterator it;
+
+       it = datas.begin ();
+       while (it != datas.end ()) {
+               if ((*(*it)) == k) {
+                       if (last_selected)
+                               last_selected->SetSelected (false);
+                       last_selected = *it;
+                       last_selected->SetSelected (true);
+               }
+               it++;
+       }
+}
+