Pyrogenesis  trunk
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  */
30 {
32 
33 public:
34  CButton();
35  virtual ~CButton();
36 
37  /**
38  * @see IGUIObject#ResetStates()
39  */
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  */
63 };
64 
65 #endif // INCLUDED_CBUTTON
CButton()
Definition: CButton.cpp:24
virtual void HandleMessage(SGUIMessage &Message)
Definition: CButton.cpp:79
virtual ~CButton()
Definition: CButton.cpp:52
Framework for handling Output text.
Definition: IGUITextOwner.h:45
void SetupText()
Sets up text, should be called every time changes has been made that can change the visual...
Definition: CButton.cpp:56
virtual void ResetStates()
Definition: CButton.h:40
CPos m_TextPos
Placement of text.
Definition: CButton.h:62
virtual void ResetStates()
Definition: IGUIButtonBehavior.h:92
Made to represent screen positions and delta values.
Definition: Shapes.h:169
Appends button behaviours to the IGUIObject.
Definition: IGUIButtonBehavior.h:49
virtual void Draw()
Draws the Button.
Definition: CButton.cpp:86
Message send to IGUIObject::HandleMessage() in order to give life to Objects manually with a derived ...
Definition: GUIbase.h:91
#define GUI_OBJECT(obj)
Definition: GUIbase.h:48
Button.
Definition: CButton.h:29