Pyrogenesis
13997
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
source
gui
CButton.h
Go to the documentation of this file.
1
/* Copyright (C) 2009 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
/*
19
GUI Object - Button
20
21
--Overview--
22
23
GUI Object representing a simple button
24
25
--More info--
26
27
Check GUI.h
28
29
*/
30
31
#ifndef INCLUDED_CBUTTON
32
#define INCLUDED_CBUTTON
33
34
//--------------------------------------------------------
35
// Includes / Compiler directives
36
//--------------------------------------------------------
37
#include "
GUI.h
"
38
39
//--------------------------------------------------------
40
// Macros
41
//--------------------------------------------------------
42
43
//--------------------------------------------------------
44
// Types
45
//--------------------------------------------------------
46
47
//--------------------------------------------------------
48
// Declarations
49
//--------------------------------------------------------
50
51
/**
52
* Button
53
*
54
* @see IGUIObject
55
* @see IGUIButtonBehavior
56
*/
57
class
CButton
:
public
IGUIButtonBehavior
,
public
IGUITextOwner
58
{
59
GUI_OBJECT
(
CButton
)
60
61
public
:
62
CButton
();
63
virtual
~CButton
();
64
65
/**
66
* @see IGUIObject#ResetStates()
67
*/
68
virtual
void
ResetStates
() {
IGUIButtonBehavior::ResetStates
(); }
69
70
/**
71
* @see IGUIObject#HandleMessage()
72
*/
73
virtual
void
HandleMessage
(
SGUIMessage
&Message);
74
75
/**
76
* Draws the Button
77
*/
78
virtual
void
Draw
();
79
80
protected
:
81
/**
82
* Sets up text, should be called every time changes has been
83
* made that can change the visual.
84
*/
85
void
SetupText
();
86
87
/**
88
* Placement of text.
89
*/
90
CPos
m_TextPos
;
91
};
92
93
#endif
GUI.h
CButton::CButton
CButton()
Definition:
CButton.cpp:32
CButton::HandleMessage
virtual void HandleMessage(SGUIMessage &Message)
Definition:
CButton.cpp:87
CButton::~CButton
virtual ~CButton()
Definition:
CButton.cpp:60
IGUITextOwner
Framework for handling Output text.
Definition:
IGUITextOwner.h:60
CButton::SetupText
void SetupText()
Sets up text, should be called every time changes has been made that can change the visual...
Definition:
CButton.cpp:64
CButton::ResetStates
virtual void ResetStates()
Definition:
CButton.h:68
CButton::m_TextPos
CPos m_TextPos
Placement of text.
Definition:
CButton.h:90
IGUIButtonBehavior::ResetStates
virtual void ResetStates()
Definition:
IGUIButtonBehavior.h:113
CPos
Made to represent screen positions and delta values.
Definition:
Overlay.h:167
IGUIButtonBehavior
Appends button behaviours to the IGUIObject.
Definition:
IGUIButtonBehavior.h:64
CButton::Draw
virtual void Draw()
Draws the Button.
Definition:
CButton.cpp:94
SGUIMessage
Message send to IGUIObject::HandleMessage() in order to give life to Objects manually with a derived ...
Definition:
GUIbase.h:106
GUI_OBJECT
#define GUI_OBJECT(obj)
Definition:
GUIbase.h:62
CButton
Button.
Definition:
CButton.h:57
Generated on Mon Oct 14 2013 00:58:06 for Pyrogenesis by
1.8.5