SCV
4.2.1
Simple Components for Visual
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
SCV
SCV Documentation
Compiladores suportados
Créditos
SCV
SCV Designer
SCV Free Form Designer
Modules
Namespaces
Classes
Files
File List
include
SCV
Button.h
ButtonGroup.h
Callbacks.h
Canvas.h
CheckBox.h
Color4f.h
ColorPicker.h
ColorRGBA.h
ColorScheme.h
ComboBox.h
ComboBoxMenuStyle.h
Component.h
ComponentSpring.h
ComponentTexture.h
ContextMenu.h
Counter.h
Cursor.h
data.h
FileOpen.h
Font.h
FontTahoma.h
GapSpring.h
GenericNode.h
GenericTree.h
GlslShader.h
Group.h
GroupLayout.h
Image.h
ImgLoader.h
InternalFrame.h
InternalFrameHolder.h
Kernel.h
Keyboard.h
KeyEvent.h
Label.h
Mathematic.h
MatrixTemplate.h
MenuBar.h
MenuHolder.h
MouseEvent.h
Panel.h
ParallelGroup.h
Point.h
PopupMenuStyle.h
ProgressBar.h
RadioButton.h
Scissor.h
ScrollComponent.h
SCV.h
SCVCallbacks.h
Separator.h
SequentialGroup.h
Singleton.h
Slider.h
Spinner.h
Spring.h
StateButton.h
StaticLabel.h
stb_image.h
stdafx.h
TabbedPane.h
Table.h
TextBox.h
TextField.h
TextFilter.h
Texture2D.h
TextureInterface.h
Timer.h
ToggleButton.h
Tree.h
util.h
VistaMenuStyle.h
SCV
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
TextBox.h
Go to the documentation of this file.
1
7
#ifndef __SCV_TEXTBOX_H__
8
#define __SCV_TEXTBOX_H__
9
10
#include "
Component.h
"
11
#include "
ComponentTexture.h
"
12
#include "
TextFilter.h
"
13
14
namespace
scv {
15
16
class
TextBox
:
public
Component
{
17
friend
class
Table
;
18
public
:
19
TextBox
(
const
scv::Point
&p1,
const
scv::Point
&p2,
const
std::string &str);
20
TextBox
(
const
scv::Point
&p,
unsigned
int
width,
unsigned
int
lines,
const
std::string &str);
21
TextBox
(
const
scv::Point
&p,
unsigned
int
width,
const
std::string &str);
22
23
virtual
void
onStringChange
(
void
) {}
24
25
inline
virtual
bool
isEditable
(
void
)
const
;
26
virtual
void
setEditable
(
bool
editable);
27
28
virtual
void
setString
(
const
std::string& str);
29
inline
virtual
const
std::string&
getString
(
void
);
30
31
void
setCursorPosition
(
int
position);
32
void
setFilter
(
TextFilter
filter);
33
34
virtual
void
removeSelection
(
void
);
35
virtual
void
removeSelectedText
(
void
);
36
37
virtual
void
selectLine
(
int
line);
38
virtual
void
selectAll
(
void
);
39
40
virtual
void
setWidth
(
int
width);
41
virtual
void
setHeight
(
int
height);
42
43
bool
hasSelectedText
(
void
);
44
45
void
processMouse
(
const
scv::MouseEvent
&evt);
46
void
processKey
(
const
scv::KeyEvent
&evt);
47
48
virtual
void
display
(
void
);
49
50
Point
getInternalSize
();
51
52
protected
:
53
virtual
void
createTexture
(
void
);
54
ComponentTexture
*
_cTexture
;
55
virtual
void
refreshText
(
void
);
56
virtual
void
refreshCursor
(
void
);
57
58
bool
_editable
;
59
60
int
_currChar
;
61
int
_selectStart
,
_selectEnd
;
62
63
TextFilter
_filter
;
64
std::string
_str
;
65
66
private
:
67
static
const
int
s_lineSpacing = 16;
68
static
const
int
s_borderWidth = 8;
69
static
const
int
s_borderHeight = 3;
70
71
void
upLine(
void
);
72
void
downLine(
void
);
73
74
bool
_refreshText, _refreshCursor;
75
76
Point
_desloc;
77
int
_firstLine, _nLines;
78
std::vector <int> _lineIndex;
79
};
80
82
bool
TextBox::isEditable
(
void
)
const
{
83
return
_editable
;
84
}
85
86
const
std::string&
TextBox::getString
(
void
) {
87
return
_str
;
88
}
89
90
}
// namespace scv
91
92
#endif // __SCV_TEXTBOX_H__
include
SCV
TextBox.h
Generated on Fri Dec 14 2012 09:44:49 for SCV by
1.8.2