]> git.llucax.com Git - z.facultad/75.52/treemulator.git/blob - viewer/view_node.h
Fix.
[z.facultad/75.52/treemulator.git] / viewer / view_node.h
1
2 #ifndef _VIEW_NODE_H_
3 #define _VIEW_NODE_H_
4
5 #include <libgnomecanvasmm.h>
6 #include "view_btree.h"
7 #include "view_btree_data.h"
8
9 using namespace Gnome;
10
11 class ViewNode : public Canvas::Group {
12         public:
13                 ViewNode (Canvas::Group *parent, uint num, uint padre, BTreeNodeHeader &header, std::list<BTreeData *> &keys);
14
15                 std::list<uint>& getChilds () { return hijos; } 
16
17                 typedef SigC::Signal3<void, BTreeData *, uint, ViewNode *> type_signal_selected;
18                 type_signal_selected signal_selected ();
19
20                 typedef SigC::Signal3<void, BTreeData *, uint, ViewNode *> type_signal_activated;
21                 type_signal_activated signal_activated ();
22
23                 void SetSelected (bool);
24         private:
25                 void on_item_clicked (BTreeData *data, ViewBTreeData *);
26                 void on_item_activated (BTreeData *data, ViewBTreeData *);
27                 std::list<uint> hijos;
28                 type_signal_selected m_signal_selected;
29                 type_signal_activated m_signal_activated;
30                 uint num, padre;
31                 Canvas::Rect *fondo;
32                 ViewBTreeData *last_selected;
33 };
34
35 #endif
36