Pyrogenesis
trunk
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
source
gui
CButton.h
Go to the documentation of this file.
1
/* Copyright (C) 2015 Wildfire Games.
2
* This file is part of 0 A.D.
3
*
4
* 0 A.D. is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 2 of the License, or
7
* (at your option) any later version.
8
*
9
* 0 A.D. is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#ifndef INCLUDED_CBUTTON
19
#define INCLUDED_CBUTTON
20
21
#include "
GUI.h
"
22
23
/**
24
* Button
25
*
26
* @see IGUIObject
27
* @see IGUIButtonBehavior
28
*/
29
class
CButton
:
public
IGUIButtonBehavior
,
public
IGUITextOwner
30
{
31
GUI_OBJECT
(
CButton
)
32
33
public
:
34
CButton
();
35
virtual
~CButton
();
36
37
/**
38
* @see IGUIObject#ResetStates()
39
*/
40
virtual
void
ResetStates
() {
IGUIButtonBehavior::ResetStates
(); }
41
42
/**
43
* @see IGUIObject#HandleMessage()
44
*/
45
virtual
void
HandleMessage
(
SGUIMessage
& Message);
46
47
/**
48
* Draws the Button
49
*/
50
virtual
void
Draw
();
51
52
protected
:
53
/**
54
* Sets up text, should be called every time changes has been
55
* made that can change the visual.
56
*/
57
void
SetupText
();
58
59
/**
60
* Placement of text.
61
*/
62
CPos
m_TextPos
;
63
};
64
65
#endif // INCLUDED_CBUTTON
GUI.h
CButton::CButton
CButton()
Definition:
CButton.cpp:24
CButton::HandleMessage
virtual void HandleMessage(SGUIMessage &Message)
Definition:
CButton.cpp:79
CButton::~CButton
virtual ~CButton()
Definition:
CButton.cpp:52
IGUITextOwner
Framework for handling Output text.
Definition:
IGUITextOwner.h:45
CButton::SetupText
void SetupText()
Sets up text, should be called every time changes has been made that can change the visual...
Definition:
CButton.cpp:56
CButton::ResetStates
virtual void ResetStates()
Definition:
CButton.h:40
CButton::m_TextPos
CPos m_TextPos
Placement of text.
Definition:
CButton.h:62
IGUIButtonBehavior::ResetStates
virtual void ResetStates()
Definition:
IGUIButtonBehavior.h:92
CPos
Made to represent screen positions and delta values.
Definition:
Shapes.h:169
IGUIButtonBehavior
Appends button behaviours to the IGUIObject.
Definition:
IGUIButtonBehavior.h:49
CButton::Draw
virtual void Draw()
Draws the Button.
Definition:
CButton.cpp:86
SGUIMessage
Message send to IGUIObject::HandleMessage() in order to give life to Objects manually with a derived ...
Definition:
GUIbase.h:91
GUI_OBJECT
#define GUI_OBJECT(obj)
Definition:
GUIbase.h:48
CButton
Button.
Definition:
CButton.h:29
Generated by
1.8.11