SCV
4.2.1
Simple Components for Visual
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
GenericTree.h
Go to the documentation of this file.
1
7
#ifndef _SCV_GENERIC_TREE_H_
8
#define _SCV_GENERIC_TREE_H_
9
10
#include "
GenericNode.h
"
11
#include "
Component.h
"
12
#include "
ComponentTexture.h
"
13
14
namespace
scv {
15
20
struct
GenericNodeDisplay;
21
22
class
GenericTree
:
public
Component
23
{
24
public
:
25
GenericTree
(
scv::Point
p1,
scv::Point
p2,
GenericNode
* root);
26
virtual
~GenericTree
(
void
);
27
28
GenericNode
*
getSelectedNode
(
void
);
29
GenericNode
*
getRootNode
();
30
void
refreshDisplay
();
31
32
virtual
void
onItemSelected
(
void
);
33
34
virtual
void
processMouse
(
const
scv::MouseEvent
&evt);
35
virtual
void
processKey
(
const
scv::KeyEvent
&evt);
36
37
virtual
void
display
(
void
);
38
39
private
:
40
GenericNode
* findSelected(
GenericNode
*,
int
,
int
espacos);
41
virtual
void
createTexture(
void
);
42
ComponentTexture
* _cTexture;
43
44
static
const
int
s_lineSpacing = 12;
45
static
const
int
s_borderWidth = 4;
46
static
const
int
s_borderHeight = 3;
47
static
const
int
s_imageSpace = 26;
48
49
int
m_selectStart, m_selectEnd;
50
int
m_firstLine, m_nLines, spaceBack;
51
52
GenericNode
* _nodeSelected;
53
GenericNode
* _nodeRoot;
54
int
_jumpOnFindSelected;
55
std::vector<GenericNodeDisplay> _nodesDisplay;
56
};
57
58
inline
GenericNode
*
GenericTree::getSelectedNode
(
void
) {
59
return
_nodeSelected;
60
}
61
65
inline
GenericNode
*
GenericTree::getRootNode
() {
66
return
_nodeRoot;
67
}
68
69
}
//namespace scv
70
71
#endif
include
SCV
GenericTree.h
Generated on Fri Dec 14 2012 09:44:49 for SCV by
1.8.2