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
InternalFrame.h
Go to the documentation of this file.
1
7
#ifndef __SCV_WINDOW_H__
8
#define __SCV_WINDOW_H__
9
10
#include "
Label.h
"
11
12
#include "
Component.h
"
13
#include "
ComponentTexture.h
"
14
#include "
Panel.h
"
15
16
#include "
Timer.h
"
17
18
namespace
scv {
19
20
class
InternalFrameHolder;
21
22
class
InternalFrame
:
public
Component
{
23
friend
class
WindowHolder
;
24
public
:
25
InternalFrame
(GLsizei width, GLsizei height,
const
std::string &title);
26
27
virtual
void
onOpen
(
void
);
28
virtual
void
onClose
(
void
);
29
30
virtual
void
setVisible
(
bool
state);
31
32
inline
void
setPanel
(
scv::Panel
*panel);
33
inline
scv::Panel
*
getPanel
(
void
)
const
;
34
35
Point
getInternalSize
()
const
;
36
void
setInternalSize
(GLsizei width, GLsizei height);
37
38
inline
void
setTitle
(
const
std::string &title);
39
inline
std::string
getTitle
(
void
)
const
;
40
41
void
processMouse
(
const
scv::MouseEvent
&evt);
42
void
processKey
(
const
scv::KeyEvent
&evt);
43
44
void
display
(
void
);
45
46
protected
:
47
void
createTexture
(
void
);
48
ComponentTexture
*
_cTexture
;
49
50
bool
isOnTopBar
(
const
scv::Point
&p);
51
bool
isOnCloseButton
(
const
scv::Point
&p);
52
void
configPanel
(
void
);
53
54
static
const
int
s_borderTop
,
s_borderWidth
;
55
static
const
int
s_closeWidth
,
s_closeHeight
;
56
57
std::string
_title
;
58
59
bool
_overClose
,
_clickClose
;
60
bool
_refreshPosition
,
_rolluped
;
61
scv::Panel
*
_panel
;
62
};
63
65
66
void
InternalFrame::setPanel
(
scv::Panel
*panel) {
67
if
(
_panel
!= NULL) {
68
removeChild
(
getPanel
());
69
}
70
71
if
(panel != NULL) {
72
_panel
= panel;
73
addChild
(
_panel
);
74
}
75
}
76
77
78
Panel
*
InternalFrame::getPanel
(
void
)
const
{
79
return
_panel
;
80
}
81
82
void
InternalFrame::setTitle
(
const
std::string &title) {
83
_title
= title;
84
}
85
86
std::string
InternalFrame::getTitle
(
void
)
const
{
87
return
_title
;
88
}
89
90
}
// namespace scv
91
92
#endif // __SCV_WINDOW_H__
include
SCV
InternalFrame.h
Generated on Fri Dec 14 2012 09:44:49 for SCV by
1.8.2