]> git.llucax.com Git - z.facultad/75.52/treemulator.git/blob - viewer/view_btree_data.h
Agrego posibilidad de ir al nodo anterior.
[z.facultad/75.52/treemulator.git] / viewer / view_btree_data.h
1
2 #ifndef _VIEW_BTREE_DATA_H_
3 #define _VIEW_BTREE_DATA_H_
4
5 #include <libgnomecanvasmm.h>
6 #include <string>
7 #include <gtkmm/button.h>
8
9 #include "btree.h"
10 #include "btree_data.h"
11
12 using namespace Gnome;
13
14 class ViewBTreeData :public Canvas::Rect {
15         public:
16                 ViewBTreeData (BTreeData *data, Canvas::Group *parent, double x1, double y1, double x2, double y2);
17                 virtual ~ViewBTreeData () {}
18
19                 static ViewBTreeData *Create (BTreeData *data, Canvas::Group *parent, double x1, double y1, double x2, double y2);
20
21                 typedef SigC::Signal2<void, BTreeData *, ViewBTreeData *> type_signal_clicked;
22                 type_signal_clicked signal_clicked ();
23                 typedef SigC::Signal2<void, BTreeData *, ViewBTreeData *> type_signal_double_clicked;
24                 type_signal_double_clicked signal_double_clicked ();
25
26                 void SetSelected (bool b);
27                 bool operator == (Clave &k) const;
28         protected:
29                 type_signal_clicked m_signal_clicked;
30                 type_signal_double_clicked m_signal_double_clicked;
31
32                 virtual void init (Canvas::Group *parent);
33                 BTreeData *data;
34
35                 virtual bool on_event (GdkEvent *p1);
36 };
37
38 class ViewBTreeChildData :public ViewBTreeData {
39         public:
40                 ViewBTreeChildData (BTreeData *data, Canvas::Group *parent, double x1, double y1, double x2, double y2);
41                 virtual ~ViewBTreeChildData () {}
42
43         protected:
44                 virtual void init (Canvas::Group *parent);
45 };
46 #endif
47