X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/c8b8148848e31e0e39a01ed45c19ccc0d0702a34..0fd0b8da8e1e9c889282ad4cb41f4b4cf2e63838:/viewer/view_btree.h diff --git a/viewer/view_btree.h b/viewer/view_btree.h index d8e585a..bb955bd 100644 --- a/viewer/view_btree.h +++ b/viewer/view_btree.h @@ -8,16 +8,20 @@ #include "btree.h" #include "view_node.h" -#define NODE_WIDTH 500 -#define NODE_HEIGHT 50 - using namespace Gnome; +class ViewNode; + class ViewBTree : public Canvas::Group, public BTree { public: - ViewBTree (Canvas::Group *parent, std::string filename); + ViewBTree (Canvas::Group *parent, std::string filename, uint block_size, int type); + + void Clear (); + void HighliteKey (Clave &k); static double byte_to_pixels; + static double node_width; + static double node_height; typedef SigC::Signal2 type_signal_selected; type_signal_selected signal_selected (); @@ -30,9 +34,12 @@ class ViewBTree : public Canvas::Group, public BTree { /* Un nodo que quiera ser puesto 2 veces es un bug :) */ std::map node_placed; - void AddNode (uint num); - void on_item_selected (BTreeData *, uint); + public: + void AddNode (uint num, uint padre = 0); + void on_item_selected (BTreeData *, uint, ViewNode *); + void on_item_activated (BTreeData *, uint, ViewNode *); + ViewNode *last_selected; }; #endif