5 #include <libgnomecanvasmm.h>
11 #define NODE_WIDTH 500
12 #define NODE_HEIGHT 50
14 using namespace Gnome;
16 class ViewBTree : public Canvas::Group, public BTree {
18 ViewBTree (Canvas::Group *parent, std::string filename);
20 static double byte_to_pixels;
22 typedef SigC::Signal2<void, BTreeData *, BTreeNodeHeader&> type_signal_selected;
23 type_signal_selected signal_selected ();
25 type_signal_selected m_signal_selected;
26 int max_level; /* Lo saco de la raiz */
27 /* Posicion X por nivel */
28 std::map<uint,double> pos_x;
29 /* Control para no poner 2 veces un nodo */
30 /* Un nodo que quiera ser puesto 2 veces es un bug :) */
31 std::map<uint,bool> node_placed;
33 void AddNode (uint num);
34 void on_item_selected (BTreeData *, uint);