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
Label.h
Go to the documentation of this file.
1
7
#ifndef __SCV_WIDGET_LABEL_H__
8
#define __SCV_WIDGET_LABEL_H__
9
10
#include "
Component.h
"
11
#include "
ComponentTexture.h
"
12
#include "
FontTahoma.h
"
13
#include "
Color4f.h
"
14
#include "
ColorScheme.h
"
15
16
namespace
scv {
17
18
class
Label
:
public
Component
{
19
public
:
20
Label
(
const
scv::Point
&p1,
const
scv::Point
&p2,
const
std::string& str);
21
Label
(
const
scv::Point
&p,
unsigned
int
width,
const
std::string& str);
22
Label
(
const
scv::Point
&p,
const
std::string& str);
23
24
virtual
void
onStringChange
(
void
) {}
25
26
inline
const
std::string &
getString
(
void
)
const
;
27
virtual
void
setString
(
const
std::string& str);
28
29
inline
virtual
void
setWidth
(
int
width);
30
inline
virtual
void
setHeight
(
int
height);
31
32
virtual
void
display
(
void
);
33
34
protected
:
35
void
createTexture
(
void
) {}
36
ComponentTexture
*
_cTexture
;
37
std::string
_str
;
38
};
39
40
inline
const
std::string&
Label::getString
(
void
)
const
{
41
return
_str
;
42
}
43
44
inline
void
Label::setWidth
(
const
int
width) {
45
Component::setWidth
(width);
46
}
47
48
inline
void
Label::setHeight
(
const
int
height) {
49
Component::setHeight
(height);
50
}
51
52
}
// namespace scv
53
54
55
#endif // __SCV_WIDGET_LABEL_H__
include
SCV
Label.h
Generated on Fri Dec 14 2012 09:44:49 for SCV by
1.8.2