25 #ifndef TGUI_GLOBAL_HPP 26 #define TGUI_GLOBAL_HPP 34 #include <SFML/Graphics.hpp> 36 #include <TGUI/Config.hpp> 37 #include <TGUI/Borders.hpp> 39 #include <TGUI/TextureManager.hpp> 44 #define TGUI_OUTPUT(x) sf::err() << x << std::endl; 47 #define TGUI_MINIMUM(x, y) ((x < y) ? x : y) 49 #define TGUI_MAXIMUM(x, y) ((x > y) ? x : y) 59 std::string to_string(T value)
61 std::ostringstream oss;
70 WidgetPhase_Hover = 1,
71 WidgetPhase_MouseDown = 2,
72 WidgetPhase_Focused = 4,
73 WidgetPhase_Selected = 8
161 extern TGUI_API
Clipboard TGUI_Clipboard;
164 extern TGUI_API
bool TGUI_TabKeyUsageEnabled;
167 extern TGUI_API std::string TGUI_ResourcePath;
175 TGUI_API sf::Color extractColor(std::string
string);
183 TGUI_API std::string convertColorToString(
const sf::Color& color);
190 TGUI_API
bool extractVector2f(std::string
string, sf::Vector2f& vector);
197 TGUI_API
bool extractVector2u(std::string
string, sf::Vector2u& vector);
204 TGUI_API
bool extractBorders(std::string
string,
Borders& borders);
212 void encodeString(
const std::string& origString, std::string& encodedString);
219 void decodeString(
const std::string& encodedString, std::string& decodedString);
226 TGUI_API
void encodeList(
const std::vector<sf::String>& list, std::string& encodedString);
233 TGUI_API
void decodeList(
const std::string& encodedString, std::vector<sf::String>& list);
240 std::string toLower(std::string str);
246 #endif // TGUI_GLOBAL_HPP Namespace that contains all TGUI functions and classes.
Definition: AnimatedPicture.hpp:33
WidgetTypes
A list of all widget types.
Definition: Global.hpp:80
Definition: TextureManager.hpp:71
TGUI_API void enableTabKeyUsage()
While tab key usage is enabled (default), pressing tab will focus another widget. ...
Definition: Clipboard.hpp:38
TGUI_API void disableTabKeyUsage()
When disabling the tab key usage, pressing tab will no longer focus another widget.
Definition: Borders.hpp:35
TGUI_API const std::string & getResourcePath()
Return the resource path.
TGUI_API void setResourcePath(const std::string &path)
Set a new resource path.