Added different textures for each ptolemaic camel rank
[0ad.git] / source / gui / CText.h
blob455cb09aa8151fe6a92da4a01f5ee4549ad22378
1 /* Copyright (C) 2009 Wildfire Games.
2 * This file is part of 0 A.D.
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.
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.
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/>.
19 GUI Object - Text [field]
21 --Overview--
23 GUI Object representing a text field
25 --More info--
27 Check GUI.h
31 #ifndef INCLUDED_CTEXT
32 #define INCLUDED_CTEXT
34 //--------------------------------------------------------
35 // Includes / Compiler directives
36 //--------------------------------------------------------
37 #include "GUI.h"
39 // TODO Gee: Remove
40 class IGUIScrollBar;
42 //--------------------------------------------------------
43 // Macros
44 //--------------------------------------------------------
46 //--------------------------------------------------------
47 // Types
48 //--------------------------------------------------------
50 //--------------------------------------------------------
51 // Declarations
52 //--------------------------------------------------------
54 /**
55 * Text field that just displays static text.
57 * @see IGUIObject
59 class CText : public IGUIScrollBarOwner, public IGUITextOwner
61 GUI_OBJECT(CText)
63 public:
64 CText();
65 virtual ~CText();
67 /**
68 * @see IGUIObject#ResetStates()
70 virtual void ResetStates() { IGUIScrollBarOwner::ResetStates(); }
72 /**
73 * Test if mouse position is over an icon
75 virtual bool MouseOverIcon();
77 protected:
78 /**
79 * Sets up text, should be called every time changes has been
80 * made that can change the visual.
82 void SetupText();
84 /**
85 * @see IGUIObject#HandleMessage()
87 virtual void HandleMessage(SGUIMessage &Message);
89 /**
90 * Draws the Text
92 virtual void Draw();
94 /**
95 * Placement of text. Ignored when scrollbars are active.
97 CPos m_TextPos;
100 #endif