25#ifndef TGUI_DEFINES_HPP
26#define TGUI_DEFINES_HPP
30#include <TGUI/Config.hpp>
31#include <TGUI/Borders.hpp>
32#include <TGUI/Exception.hpp>
34#include <SFML/Graphics.hpp>
50 extern TGUI_API
bool TGUI_TabKeyUsageEnabled;
54 const float pi = 3.14159265358979f;
59 std::string to_string(T value)
61 std::ostringstream oss;
62 oss.imbue(std::locale::classic());
108 TGUI_API
bool compareFloats(
float x,
float y);
115 TGUI_API
bool isWhitespace(
char character);
122 TGUI_API
int stoi(
const std::string& value);
129 TGUI_API
float stof(
const std::string& value);
136 TGUI_API
bool extractBoolFromString(
const std::string& property,
const std::string& value);
143 TGUI_API
bool removeWhitespace(
const std::string& line, std::string::const_iterator& c);
150 TGUI_API std::string toLower(std::string str);
157 TGUI_API std::string trim(std::string str);
164 TGUI_API std::vector<std::string> split(
const std::string& str,
char delim);
171 TGUI_API sf::Color calcColorOpacity(
const sf::Color& color,
float alpha);
180 float getTextVerticalCorrection(
const std::shared_ptr<sf::Font>& font,
unsigned int characterSize, sf::Uint32 style = 0);
192 unsigned int findBestTextSize(
const std::shared_ptr<sf::Font>& font,
float height,
int fit = 0);
Namespace that contains all TGUI functions and classes.
Definition: Animation.hpp:34
TGUI_API void setResourcePath(const std::string &path)
Set a new resource path.
TGUI_API const std::string & getResourcePath()
Return the resource path.
TGUI_API void disableTabKeyUsage()
When disabling the tab key usage, pressing tab will no longer focus another widget.
TGUI_API void enableTabKeyUsage()
While tab key usage is enabled (default), pressing tab will focus another widget.