]> git.llucax.com Git - z.facultad/75.52/treemulator.git/blob - viewer/view_btree_data.h
Fix.
[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         protected:
28                 type_signal_clicked m_signal_clicked;
29                 type_signal_double_clicked m_signal_double_clicked;
30
31                 virtual void init (Canvas::Group *parent);
32                 BTreeData *data;
33
34                 virtual bool on_event (GdkEvent *p1);
35 };
36
37 class ViewBTreeChildData :public ViewBTreeData {
38         public:
39                 ViewBTreeChildData (BTreeData *data, Canvas::Group *parent, double x1, double y1, double x2, double y2);
40                 virtual ~ViewBTreeChildData () {}
41
42         protected:
43                 virtual void init (Canvas::Group *parent);
44 };
45 #endif
46