]> git.llucax.com Git - z.facultad/75.52/treemulator.git/blobdiff - viewer/view_btree.h
Fix en conversion a string.
[z.facultad/75.52/treemulator.git] / viewer / view_btree.h
index 918a377d5b05f90bba1153d9e0394386b4162615..d8e585ad62752e04931e1e909b92f8f4b0b85bf5 100644 (file)
@@ -6,6 +6,7 @@
 #include <string>
 
 #include "btree.h"
 #include <string>
 
 #include "btree.h"
+#include "view_node.h"
 
 #define NODE_WIDTH 500
 #define NODE_HEIGHT 50
 
 #define NODE_WIDTH 500
 #define NODE_HEIGHT 50
@@ -16,6 +17,22 @@ class ViewBTree : public Canvas::Group, public BTree {
        public:
                ViewBTree (Canvas::Group *parent, std::string filename);
 
        public:
                ViewBTree (Canvas::Group *parent, std::string filename);
 
+               static double byte_to_pixels;
+
+               typedef SigC::Signal2<void, BTreeData *, BTreeNodeHeader&> type_signal_selected;
+               type_signal_selected signal_selected ();
+       protected:
+               type_signal_selected m_signal_selected;
+               int max_level; /* Lo saco de la raiz */
+               /* Posicion X por nivel */
+               std::map<uint,double> pos_x;
+               /* Control para no poner 2 veces un nodo */
+               /* Un nodo que quiera ser puesto 2 veces es un bug :) */
+               std::map<uint,bool> node_placed;
+
+               void AddNode (uint num);
+               void on_item_selected (BTreeData *, uint);
+
 };
 
 #endif
 };
 
 #endif