TGUI
0.9.5
|
Namespace that contains all TGUI functions and classes. More...
Classes | |
class | AbsoluteOrRelativeValue |
Class to store the a value that is either a constant or a ratio. More... | |
class | BackendBase |
Base class for the backend. More... | |
class | BackendFontBase |
Base class for font implementations that depend on the backend. More... | |
class | BackendRenderTargetBase |
Base class for render targets. More... | |
class | BackendSDL |
Backend that uses SDL. More... | |
class | BackendSFML |
Backend that uses SFML. More... | |
class | BackendTextBase |
Base class for text implementations that depend on the backend. More... | |
class | BackendTextureBase |
Base class for texture implementations that depend on the backend. More... | |
class | BaseThemeLoader |
Base class for theme loader implementations. More... | |
class | BitmapButton |
Button widget with an image displayed next to the text (or centered in the button without text) More... | |
class | BoxLayout |
Abstract class for box layout containers. More... | |
class | BoxLayoutRatios |
Abstract class for box layout containers. More... | |
class | BoxLayoutRenderer |
class | Button |
Button widget. More... | |
class | ButtonBase |
Base class for button widgets. More... | |
class | ButtonRenderer |
class | CanvasSFML |
class | ChatBox |
class | ChatBoxRenderer |
class | CheckBox |
CheckBox widget. More... | |
class | CheckBoxRenderer |
class | ChildWindow |
Child window widget. More... | |
class | ChildWindowRenderer |
class | ClickableWidget |
Clickable widget. More... | |
class | Color |
Wrapper for colors. More... | |
class | ColorPicker |
Color picker widget. More... | |
class | ColorPickerRenderer |
class | ComboBox |
Combo box widget. More... | |
class | ComboBoxRenderer |
class | Container |
Container widget. More... | |
class | CopiedSharedPtr |
class | Cursor |
Class that allows the cursor to be changed. More... | |
class | CustomWidgetForBindings |
Class used by bindings to implement custom widgets withing these bindings (e.g. a custom C# widget in TGUI.Net) More... | |
class | DataIO |
Parser and emitter for widget files. | |
class | DefaultBackendWindow |
This class abstracts the backend-specific window and gui creation code. More... | |
class | DefaultThemeLoader |
Default implementation for theme loading. More... | |
class | Deserializer |
Deserializes a settable property. More... | |
class | Duration |
Wrapper for durations. More... | |
class | EditBox |
Edit box widget. More... | |
class | EditBoxRenderer |
struct | Event |
class | Exception |
class | FileDialog |
File dialog widget. More... | |
class | FileDialogIconLoader |
class | FileDialogRenderer |
class | Filesystem |
Helper functionality for filesystem access. More... | |
class | Font |
struct | FontGlyph |
Information about a glyph in the font. More... | |
class | Grid |
class | Group |
Group widget. More... | |
class | GroupRenderer |
class | GuiBase |
Base class for the Gui. More... | |
class | GuiSDL |
Gui class for the SDL backend. More... | |
class | GuiSFML |
Gui class for the SFML backend. More... | |
class | HorizontalLayout |
Container that automatically resizes children to fit the entire available space between children. More... | |
class | HorizontalWrap |
Container that automatically arranges children in lines, adding a new line when a horizontal line is full. More... | |
struct | ImageLoader |
Class that is internally used to load an image from a file or from memory. More... | |
class | Knob |
Knob widget. More... | |
class | KnobRenderer |
class | Label |
Label widget. More... | |
class | LabelRenderer |
class | Layout |
Class to store the left, top, width or height of a widget. More... | |
class | Layout2d |
Class to store the position or size of a widget. More... | |
class | ListBox |
List box widget. More... | |
class | ListBoxRenderer |
class | ListView |
List view widget. More... | |
class | ListViewRenderer |
class | MenuBar |
Menu bar widget. More... | |
class | MenuBarMenuPlaceholder |
Widget that is added to a container when the user clicks on the menu bar. This widget will be added in front of all other widgets to ensure that the menus from the menu bar are always drawn in front of other widgets. More... | |
class | MenuBarRenderer |
Renderer for the MenuBar widget. More... | |
class | MessageBox |
Message box widget. More... | |
class | MessageBoxRenderer |
class | ObjectConverter |
Implicit converter for settable properties. More... | |
class | Outline |
class | Panel |
Group of widgets that has a background color and optional borders. More... | |
class | PanelRenderer |
class | Picture |
Picture widget. More... | |
class | PictureRenderer |
class | ProgressBar |
Progress bar widget. More... | |
class | ProgressBarRenderer |
class | RadioButton |
Radio button widget. More... | |
class | RadioButtonGroup |
Can be used as parent of radio buttons so that different groups of radio buttons can be isolated. More... | |
class | RadioButtonRenderer |
class | RangeSlider |
RangeSlider widget. More... | |
class | RangeSliderRenderer |
class | Rect |
struct | RelativeValue |
Helper class to create an AbsoluteOrRelativeValue object containing a relative value without using a string. More... | |
struct | RelFloatRect |
FloatRect that can contain absolute values or values relative to the parent size. More... | |
struct | RendererData |
Shared data used in renderer classes. More... | |
struct | RenderStates |
States used for drawing. More... | |
class | RootContainer |
class | ScrollablePanel |
Group of widgets that has a background color and optional borders. More... | |
class | ScrollablePanelRenderer |
class | Scrollbar |
Scrollbar widget. More... | |
class | ScrollbarChildWidget |
Wrapper around scrollbar to be used inside widgets that need a scrollbar. More... | |
class | ScrollbarRenderer |
class | SeparatorLine |
Widget that is drawn as a filled rectangle and can be used as a line to visually separate widgets from each other. More... | |
class | SeparatorLineRenderer |
class | Serializer |
Serializes an settable property. More... | |
class | Signal |
Signal to which the user can subscribe to get callbacks from. More... | |
class | SignalChildWindow |
Signal to which the user can subscribe to get callbacks from. More... | |
class | SignalItem |
Signal to which the user can subscribe to get callbacks from. More... | |
class | SignalItemHierarchy |
Signal to which the user can subscribe to get callbacks from. More... | |
class | SignalManager |
class | SignalShowEffect |
Signal to which the user can subscribe to get callbacks from. More... | |
class | SignalTyped |
Signal to which the user can subscribe to get callbacks from. More... | |
class | SignalTyped2 |
Signal to which the user can subscribe to get callbacks from. More... | |
class | Slider |
Slider widget. More... | |
class | SliderRenderer |
class | SpinButton |
Spin button widget. More... | |
class | SpinButtonRenderer |
class | SpinControl |
Spin control widget. More... | |
class | Sprite |
class | String |
Wrapper class to store strings. More... | |
class | SubwidgetContainer |
Base class for widgets that consist of subwidgets that act together as if they are a single widget. More... | |
class | SvgImage |
class | TabContainer |
TabContainer widget. More... | |
class | Tabs |
Tabs widget. More... | |
class | TabsRenderer |
class | Text |
class | TextArea |
Text area widget. More... | |
class | TextAreaRenderer |
class | TextStyles |
Wrapper for text styles. More... | |
class | Texture |
struct | TextureData |
struct | TextureDataHolder |
class | TextureManager |
class | Theme |
This class can be used to manage the widget renderers. More... | |
class | Timer |
Executes callbacks after a certain amount of time. More... | |
class | ToggleButton |
ToggleButton widget. More... | |
class | ToolTip |
Interface to set the settings for the tool tips. More... | |
class | Transform |
Defines a transform matrix. More... | |
class | TreeView |
Tree view widget. More... | |
class | TreeViewRenderer |
class | Variant |
class | Vector2 |
struct | Vertex |
class | VerticalLayout |
Container that automatically resizes children to fit the entire available space between children. More... | |
class | Widget |
The parent class for every widget. More... | |
class | WidgetFactory |
class | WidgetRenderer |
Base class for all renderer classes. More... | |
Typedefs | |
using | ShowAnimationType = ShowEffectType |
using | Any = std::any |
template<typename T > | |
using | Optional = std::optional< T > |
using | Borders = Outline |
using | Padding = Outline |
using | FloatRect = Rect< float > |
using | IntRect = Rect< int > |
using | UIntRect = Rect< unsigned int > |
using | SignalInt = SignalTyped< int > |
Signal with one "int" as optional unbound parameter. | |
using | SignalUInt = SignalTyped< unsigned int > |
Signal with one "unsigned int" as optional unbound parameter. | |
using | SignalBool = SignalTyped< bool > |
Signal with one "bool" as optional unbound parameter. | |
using | SignalFloat = SignalTyped< float > |
Signal with one "float" as optional unbound parameter. | |
using | SignalColor = SignalTyped< Color > |
Signal with one "Color" as optional unbound parameter. | |
using | SignalString = SignalTyped< const String & > |
Signal with one "String" as optional unbound parameter. | |
using | SignalPathList = SignalTyped< const std::vector< Filesystem::Path > & > |
Signal with a vector of Filesystem::Path as optional unbound parameter. | |
using | SignalVector2f = SignalTyped< Vector2f > |
Signal with one "Vector2f" as optional unbound parameter. | |
using | SignalFloatRect = SignalTyped< FloatRect > |
Signal with one "FloatRect" as optional unbound parameter. | |
using | SignalRange = SignalTyped2< float, float > |
Signal with two floats as optional unbound parameters. | |
using | SignalAnimation = SignalShowEffect |
using | StringView = std::u32string_view |
using | CharStringView = std::string_view |
using | Vector2f = Vector2< float > |
using | Vector2u = Vector2< unsigned int > |
using | Vector2i = Vector2< int > |
using | Canvas = CanvasSFML |
using | ToggleButtonRenderer = ButtonRenderer |
using | BitmapButtonRenderer = ButtonRenderer |
using | TextBoxRenderer = TextAreaRenderer |
Enumerations | |
enum class | ShowEffectType { Fade , Scale , SlideToRight , SlideToLeft , SlideToBottom , SlideToTop , SlideFromLeft = SlideToRight , SlideFromRight = SlideToLeft , SlideFromTop = SlideToBottom , SlideFromBottom = SlideToTop } |
Type of animation to show/hide widget. More... | |
enum | TextStyle { Regular = 0 , Bold = 1 << 0 , Italic = 1 << 1 , Underlined = 1 << 2 , StrikeThrough = 1 << 3 } |
Enumeration of the text drawing styles. More... | |
Functions | |
template<typename T > | |
T | AnyCast (const Any &obj) |
TGUI_API bool | isBackendSet () |
Checks whether the backend differs from a nullptr. | |
TGUI_API void | setBackend (std::shared_ptr< BackendBase > backend) |
Changes the global backend. | |
TGUI_API std::shared_ptr< BackendBase > | getBackend () |
Returns the global backend. | |
TGUI_CONSTEXPR bool | operator== (const Duration &lhs, const Duration &rhs) |
TGUI_CONSTEXPR bool | operator!= (const Duration &lhs, const Duration &rhs) |
TGUI_CONSTEXPR bool | operator> (const Duration &lhs, const Duration &rhs) |
TGUI_CONSTEXPR bool | operator>= (const Duration &lhs, const Duration &rhs) |
TGUI_CONSTEXPR bool | operator< (const Duration &lhs, const Duration &rhs) |
TGUI_CONSTEXPR bool | operator<= (const Duration &lhs, const Duration &rhs) |
TGUI_CONSTEXPR Duration | operator+ (const Duration &lhs, const Duration &rhs) |
TGUI_CONSTEXPR Duration | operator- (const Duration &lhs, const Duration &rhs) |
template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type> | |
TGUI_CONSTEXPR Duration | operator* (const Duration &lhs, T rhs) |
template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type> | |
TGUI_CONSTEXPR Duration | operator* (T lhs, const Duration &rhs) |
template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type> | |
TGUI_CONSTEXPR Duration | operator/ (const Duration &lhs, T rhs) |
TGUI_CONSTEXPR float | operator/ (const Duration &lhs, const Duration &rhs) |
template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type> | |
TGUI_CONSTEXPR Duration | operator% (const Duration &lhs, T rhs) |
TGUI_CONSTEXPR Duration | operator% (const Duration &lhs, const Duration &rhs) |
TGUI_CONSTEXPR Duration & | operator+= (Duration &lhs, const Duration &rhs) |
TGUI_CONSTEXPR Duration & | operator-= (Duration &lhs, const Duration &rhs) |
template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type> | |
TGUI_CONSTEXPR Duration & | operator*= (Duration &lhs, T rhs) |
template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type> | |
TGUI_CONSTEXPR Duration & | operator/= (Duration &lhs, T rhs) |
template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type> | |
TGUI_CONSTEXPR Duration & | operator%= (Duration &lhs, T rhs) |
TGUI_CONSTEXPR Duration & | operator%= (Duration &lhs, const Duration &rhs) |
template<typename T > | |
std::unique_ptr< T > | MakeUniqueForOverwrite (const std::size_t size) |
Create a unique_ptr containing an uninitialized array. | |
TGUI_API void | setGlobalTextSize (unsigned int textSize) |
Sets the default text size for all widgets created after calling the function. | |
TGUI_API unsigned int | getGlobalTextSize () |
Retrieves the default text size used for all new widgets. | |
TGUI_API void | setDoubleClickTime (Duration duration) |
Sets the double-click time for the mouse. | |
TGUI_API Duration | getDoubleClickTime () |
Retrieves the double-click time for the mouse. | |
TGUI_API void | setResourcePath (const Filesystem::Path &path) |
Sets a new resource path. | |
TGUI_API void | setResourcePath (const String &path) |
Sets a new resource path. | |
TGUI_API const Filesystem::Path & | getResourcePath () |
Returns the resource path. | |
TGUI_API void | setEditCursorBlinkRate (Duration blinkRate) |
Changes the blink rate of the cursor in edit fields such as EditBox and TextArea. | |
TGUI_API Duration | getEditCursorBlinkRate () |
Returns the blink rate of the cursor in edit fields such as EditBox and TextArea. | |
TGUI_API std::unique_ptr< std::uint8_t[]> | readFileToMemory (const String &filename, std::size_t &fileSize) |
Opens a file and reads its contents into memory. | |
TGUI_API bool | writeFile (const String &filename, std::stringstream &textToWrite) |
Opens a file and writes the given contents to it. | |
TGUI_API bool | writeFile (const String &filename, const CharStringView &textToWrite) |
Opens a file and writes the given contents to it. | |
TGUI_API Layout | operator- (Layout right) |
Unary minus operator for the Layout class. | |
TGUI_API Layout | operator+ (Layout left, Layout right) |
| |
TGUI_API Layout | operator- (Layout left, Layout right) |
| |
TGUI_API Layout | operator* (Layout left, Layout right) |
| |
TGUI_API Layout | operator/ (Layout left, Layout right) |
/ operator for the Layout class | |
TGUI_API Layout2d | operator- (Layout2d right) |
Unary minus operator for the Layout2d class. | |
TGUI_API Layout2d | operator+ (Layout2d left, Layout2d right) |
| |
TGUI_API Layout2d | operator- (Layout2d left, Layout2d right) |
| |
TGUI_API Layout2d | operator* (Layout2d left, const Layout &right) |
| |
TGUI_API Layout2d | operator* (const Layout &left, Layout2d right) |
| |
TGUI_API Layout2d | operator/ (Layout2d left, const Layout &right) |
/ operator for the Layout2d class | |
TGUI_API Layout | bindPosX (std::shared_ptr< Widget > widget) |
Bind to the x position of the widget (same as bindLeft unless widget origin is changed) | |
TGUI_API Layout | bindPosY (std::shared_ptr< Widget > widget) |
Bind to the y position of the widget (same as bindTop unless widget origin is changed) | |
TGUI_API Layout | bindLeft (std::shared_ptr< Widget > widget) |
Bind to the left position of the widget. | |
TGUI_API Layout | bindTop (std::shared_ptr< Widget > widget) |
Bind to the top position of the widget. | |
TGUI_API Layout | bindWidth (std::shared_ptr< Widget > widget) |
Bind to the width of the widget. | |
TGUI_API Layout | bindHeight (std::shared_ptr< Widget > widget) |
Bind to the height of the widget. | |
TGUI_API Layout | bindInnerWidth (std::shared_ptr< Container > container) |
Bind to the inner width of the container widget. | |
TGUI_API Layout | bindInnerHeight (std::shared_ptr< Container > container) |
Bind to the inner height of the container widget. | |
TGUI_API Layout | bindRight (std::shared_ptr< Widget > widget) |
Bind to the right position of the widget. | |
TGUI_API Layout | bindBottom (std::shared_ptr< Widget > widget) |
Bind to the bottom of the widget. | |
TGUI_API Layout2d | bindPosition (std::shared_ptr< Widget > widget) |
Bind to the position of the widget. | |
TGUI_API Layout2d | bindSize (std::shared_ptr< Widget > widget) |
Bind to the size of the widget. | |
TGUI_API Layout2d | bindInnerSize (std::shared_ptr< Container > container) |
Bind to the inner size of the container widget. | |
TGUI_API Layout | bindWidth (GuiBase &gui) |
Bind to the width of the gui view. | |
TGUI_API Layout | bindHeight (GuiBase &gui) |
Bind to the height of the gui view. | |
TGUI_API Layout2d | bindSize (GuiBase &gui) |
Bind to the size of the gui view. | |
TGUI_API Layout | bindMin (const Layout &value1, const Layout &value2) |
Bind to the minimum value of two layouts. | |
TGUI_API Layout | bindMax (const Layout &value1, const Layout &value2) |
Bind to the maximum value of two layouts. | |
template<typename T > | |
TGUI_CONSTEXPR bool | operator== (const Rect< T > &left, const Rect< T > &right) |
Checks if two Rect objects are equal. | |
template<typename T > | |
TGUI_CONSTEXPR bool | operator!= (const Rect< T > &left, const Rect< T > &right) |
Checks if two Rect objects are different. | |
TGUI_API bool | isWhitespace (char character) |
Checks if a character is a whitespace character (space, tab, carriage return or line feed) | |
TGUI_API bool | isWhitespace (char32_t character) |
Checks if a character is a whitespace character (space, tab, carriage return or line feed) | |
bool | operator== (const String &left, const String &right) |
bool | operator!= (const String &left, const String &right) |
bool | operator< (const String &left, const String &right) |
bool | operator<= (const String &left, const String &right) |
bool | operator> (const String &left, const String &right) |
bool | operator>= (const String &left, const String &right) |
String | operator+ (const String &left, const String &right) |
String | operator+ (String &&left, String &&right) |
String | operator+ (String &&left, const String &right) |
String | operator+ (const String &left, String &&right) |
TGUI_API std::basic_ostream< char > & | operator<< (std::basic_ostream< char > &os, const String &str) |
TGUI_API std::basic_ostream< wchar_t > & | operator<< (std::basic_ostream< wchar_t > &os, const String &str) |
template<typename T > | |
TGUI_CONSTEXPR Vector2< T > | operator- (const Vector2< T > &right) |
Overload of unary operator -. | |
template<typename T > | |
TGUI_CONSTEXPR Vector2< T > & | operator+= (Vector2< T > &left, const Vector2< T > &right) |
Overload of binary operator +=. | |
template<typename T > | |
TGUI_CONSTEXPR Vector2< T > & | operator-= (Vector2< T > &left, const Vector2< T > &right) |
Overload of binary operator -=. | |
template<typename T > | |
TGUI_CONSTEXPR Vector2< T > | operator+ (const Vector2< T > &left, const Vector2< T > &right) |
Overload of binary operator +. | |
template<typename T > | |
TGUI_CONSTEXPR Vector2< T > | operator- (const Vector2< T > &left, const Vector2< T > &right) |
Overload of binary operator -. | |
template<typename T > | |
TGUI_CONSTEXPR Vector2< T > | operator* (const Vector2< T > &left, float right) |
Overload of binary operator *. | |
template<typename T > | |
TGUI_CONSTEXPR Vector2< T > | operator* (float left, const Vector2< T > &right) |
Overload of binary operator *. | |
template<typename T > | |
TGUI_CONSTEXPR Vector2< T > & | operator*= (Vector2< T > &left, float right) |
Overload of binary operator *=. | |
template<typename T > | |
TGUI_CONSTEXPR Vector2< T > | operator/ (const Vector2< T > &left, float right) |
Overload of binary operator /. | |
template<typename T > | |
TGUI_CONSTEXPR Vector2< T > & | operator/= (Vector2< T > &left, float right) |
Overload of binary operator /=. | |
template<typename T > | |
TGUI_CONSTEXPR bool | operator== (const Vector2< T > &left, const Vector2< T > &right) |
Overload of binary operator ==. | |
template<typename T > | |
TGUI_CONSTEXPR bool | operator!= (const Vector2< T > &left, const Vector2< T > &right) |
Overload of binary operator !=. | |
Namespace that contains all TGUI functions and classes.
|
strong |
Type of animation to show/hide widget.
enum tgui::TextStyle |
TGUI_API std::shared_ptr< BackendBase > tgui::getBackend | ( | ) |
Returns the global backend.
TGUI_API const Filesystem::Path & tgui::getResourcePath | ( | ) |
Returns the resource path.
This pathname is placed in front of every filename that is used to load a resource.
TGUI_API bool tgui::isBackendSet | ( | ) |
Checks whether the backend differs from a nullptr.
TGUI_API std::unique_ptr< std::uint8_t[]> tgui::readFileToMemory | ( | const String & | filename, |
std::size_t & | fileSize | ||
) |
Opens a file and reads its contents into memory.
filename | Path to the file to read |
fileSize | Size of the file, to be filled in by this function if loading succeeds (untouched on failure) |
On android, the file will be read using the asset manager if a relative filename is passed.
TGUI_API void tgui::setBackend | ( | std::shared_ptr< BackendBase > | backend | ) |
Changes the global backend.
This function is automatically called when the first Gui object is created. When all Gui objects have been destructed, this function will be called again with a nullptr as parameter to destroy all global resources.
If you want to use TGUI functionality before creating a Gui object then you should call this function directly.
TGUI_API void tgui::setResourcePath | ( | const Filesystem::Path & | path | ) |
Sets a new resource path.
This pathname is placed in front of every filename that is used to load a resource.
path | New resource path |
TGUI_API void tgui::setResourcePath | ( | const String & | path | ) |
Sets a new resource path.
This pathname is placed in front of every filename that is used to load a resource.
path | New resource path |
TGUI_API bool tgui::writeFile | ( | const String & | filename, |
const CharStringView & | textToWrite | ||
) |
Opens a file and writes the given contents to it.
filename | Path to the file to write |
textToWrite | Contents to be written to the file |
TGUI_API bool tgui::writeFile | ( | const String & | filename, |
std::stringstream & | textToWrite | ||
) |
Opens a file and writes the given contents to it.
filename | Path to the file to write |
textToWrite | Contents to be written to the file |