5 #include <libgnomecanvasmm.h>
11 using namespace Gnome;
15 class ViewBTree : public Canvas::Group, public BTree {
17 ViewBTree (Canvas::Group *parent, std::string filename, uint block_size, int tree_type, int type);
20 void HighliteKey (Clave &k);
22 static double byte_to_pixels;
23 static double node_width;
24 static double node_height;
26 typedef SigC::Signal2<void, BTreeData *, BTreeNodeHeader&> type_signal_selected;
27 type_signal_selected signal_selected ();
29 type_signal_selected m_signal_selected;
30 int max_level; /* Lo saco de la raiz */
31 /* Posicion X por nivel */
32 std::map<uint,double> pos_x;
33 /* Control para no poner 2 veces un nodo */
34 /* Un nodo que quiera ser puesto 2 veces es un bug :) */
35 std::map<uint,bool> node_placed;
38 void AddNode (uint num, uint padre = 0);
39 void on_item_selected (BTreeData *, uint, ViewNode *);
40 void on_item_activated (BTreeData *, uint, ViewNode *);
42 ViewNode *last_selected;