TGUI  v0.5.2
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
TGUI.hpp
1 //
3 // TGUI - Texus's Graphical User Interface
4 // Copyright (C) 2012 Bruno Van de Velde (VDV_B@hotmail.com)
5 //
6 // This software is provided 'as-is', without any express or implied warranty.
7 // In no event will the authors be held liable for any damages arising from the use of this software.
8 //
9 // Permission is granted to anyone to use this software for any purpose,
10 // including commercial applications, and to alter it and redistribute it freely,
11 // subject to the following restrictions:
12 //
13 // 1. The origin of this software must not be misrepresented;
14 // you must not claim that you wrote the original software.
15 // If you use this software in a product, an acknowledgment
16 // in the product documentation would be appreciated but is not required.
17 //
18 // 2. Altered source versions must be plainly marked as such,
19 // and must not be misrepresented as being the original software.
20 //
21 // 3. This notice may not be removed or altered from any source distribution.
22 //
24 
25 #ifndef _TGUI_INCLUDED_
26 #define _TGUI_INCLUDED_
27 
29 
30 #include <iostream>
31 
32 #include <fstream>
33 #include <string>
34 #include <sstream>
35 
36 #include <queue>
37 #include <stack>
38 
39 #include <SFML/Graphics.hpp>
40 
42 
43 namespace tgui
44 {
45  struct OBJECT;
46  struct OBJECT_BORDERS;
47  struct OBJECT_ANIMATION;
48  struct Callback;
49 
50  struct Label;
51  struct Picture;
52  struct Button;
53  struct Checkbox;
54  struct RadioButton;
55  struct EditBox;
56  struct Slider;
57  struct Scrollbar;
58  struct ListBox;
59  struct LoadingBar;
60  struct ComboBox;
61  struct TextBox;
62  struct SpriteSheet;
63  struct AnimatedPicture;
64  struct AnimatedButton;
65  struct SpinButton;
66  struct Slider2D;
67  struct Tab;
68 
69  struct InfoFileParser;
70  struct EventManager;
71  struct TextureManager;
72 
73  struct Group;
74  struct Panel;
75  struct ChildWindow;
76  struct Grid;
77  struct Window;
78 
79 
81 
82  template <typename T>
83  std::string to_string(T value)
84  {
85  std::ostringstream oss;
86  oss << value;
87  return oss.str();
88  }
89 
91 
92  enum ObjectPhase
93  {
94  ObjectPhase_Hover = 1,
95  ObjectPhase_MouseDown = 2,
96  ObjectPhase_Focused = 4,
97  ObjectPhase_Selected = 8
98  };
99 
100 
108  {
109  window,
110  picture,
111  button,
112  checkbox,
113  radioButton,
114  label,
115  editBox,
116  listBox,
117  comboBox,
118  slider,
119  scrollbar,
120  loadingBar,
121  textBox,
122  spriteSheet,
123  animatedPicture,
124  animatedButton,
125  spinButton,
126  slider2D,
127  tab,
128  chatBox,
129 
130  panel,
131  childWindow,
132  grid,
133 
134  custom
135  };
136 }
137 
139 
140 #include <TGUI/Config.hpp>
141 
142 namespace tgui
143 {
145  extern TGUI_API TextureManager TGUI_TextureManager;
146 
148  extern TGUI_API bool tabKeyUsageEnabled;
149 }
150 
152 
153 #include <TGUI/Vectors.hpp>
154 
155 #include <TGUI/Objects.hpp>
156 #include <TGUI/Label.hpp>
157 #include <TGUI/Picture.hpp>
158 #include <TGUI/Button.hpp>
159 #include <TGUI/Checkbox.hpp>
160 #include <TGUI/RadioButton.hpp>
161 #include <TGUI/EditBox.hpp>
162 #include <TGUI/Slider.hpp>
163 #include <TGUI/Scrollbar.hpp>
164 #include <TGUI/ListBox.hpp>
165 #include <TGUI/LoadingBar.hpp>
166 #include <TGUI/ComboBox.hpp>
167 #include <TGUI/TextBox.hpp>
168 #include <TGUI/SpriteSheet.hpp>
169 #include <TGUI/AnimatedPicture.hpp>
170 #include <TGUI/AnimatedButton.hpp>
171 #include <TGUI/SpinButton.hpp>
172 #include <TGUI/Slider2D.hpp>
173 #include <TGUI/Tab.hpp>
174 #include <TGUI/ChatBox.hpp>
175 
176 #include <TGUI/InfoFileParser.hpp>
177 #include <TGUI/EventManager.hpp>
178 #include <TGUI/TextureManager.hpp>
179 
180 #include <TGUI/Group.hpp>
181 #include <TGUI/GroupObject.hpp>
182 #include <TGUI/Panel.hpp>
183 #include <TGUI/ChildWindow.hpp>
184 #include <TGUI/Grid.hpp>
185 #include <TGUI/Window.hpp>
186 #include <TGUI/Form.hpp>
187 
189 
190 #ifndef TGUI_OUTPUT
191  #define TGUI_OUTPUT(x) sf::err() << x << std::endl;
192 #endif
193 
194 #define TGUI_MINIMUM(x, y) (x < y) ? x : y
195 
196 #define TGUI_MAXIMUM(x, y) (x > y) ? x : y
197 
198 #define TGUI_UNUSED_PARAM(x) (void)x
199 
200 #define TGUI_MAX_OBJECTS 10000
201 
202 
204 
215 #endif //_TGUI_INCLUDED_
216 
TGUI_API TextureManager TGUI_TextureManager
The texture manager will not only load the textures, but will also make sure that the textures are on...
ObjectTypes
A list of all objects in tgui.
Definition: TGUI.hpp:107
TGUI_API bool tabKeyUsageEnabled
When disabling the tab key usage, pressing tab will no longer focus another object, but in the future this will allow to use tabs in TextBox.