TGUI  0.9-beta
tgui Namespace Reference

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...
 
struct  Any
 
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  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  ButtonRenderer
 
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  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  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  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  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...
 
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  Optional
 
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  Serializer
 Serializes an settable property. More...
 
class  Signal
 Signal to which the user can subscribe to get callbacks from. More...
 
class  SignalAnimation
 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  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  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 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 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.
 

Enumerations

enum  ShowAnimationType {
  ShowAnimationType::Fade, ShowAnimationType::Scale, ShowAnimationType::SlideToRight, ShowAnimationType::SlideToLeft,
  ShowAnimationType::SlideToBottom, ShowAnimationType::SlideToTop, ShowAnimationType::SlideFromLeft = SlideToRight, ShowAnimationType::SlideFromRight = SlideToLeft,
  ShowAnimationType::SlideFromTop = SlideToBottom, ShowAnimationType::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

TGUI_API bool isBackendSet ()
 Checks whether the backend differs from a nullptr. More...
 
TGUI_API void setBackend (std::shared_ptr< BackendBase > backend)
 Changes the global backend. More...
 
TGUI_API std::shared_ptr< BackendBasegetBackend ()
 Returns the global backend. More...
 
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 String &path)
 Sets a new resource path. More...
 
TGUI_API const StringgetResourcePath ()
 Returns the resource path. More...
 
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 Layout operator- (Layout right)
 Unary minus operator for the Layout class.
 
TGUI_API Layout operator+ (Layout left, Layout right)
 
  • operator for the Layout class

 
TGUI_API Layout operator- (Layout left, Layout right)
 
  • operator for the Layout class

 
TGUI_API Layout operator* (Layout left, Layout right)
 
  • operator for the Layout class

 
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 bindLeft (std::shared_ptr< Widget > widget)
 Bind to the x position of the widget.
 
TGUI_API Layout bindTop (std::shared_ptr< Widget > widget)
 Bind to the y 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)
 
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 !=.
 

Detailed Description

Namespace that contains all TGUI functions and classes.

Enumeration Type Documentation

◆ ShowAnimationType

Type of animation to show/hide widget.

Enumerator
Fade 

Fade widget in or out.

Scale 

Shrink to the center of the widget to hide or grow from its center to show.

SlideToRight 

Slide to the right to hide or from left to show.

SlideToLeft 

Slide to the left to hide or from right to show.

SlideToBottom 

Slide to the bottom to hide or from top to show.

SlideToTop 

Slide to the top to hide or from bottom to show.

SlideFromLeft 

Slide from left to show or to the right to hide.

SlideFromRight 

Slide from right to show or to the left to hide.

SlideFromTop 

Slide from top to show or to the bottom to hide.

SlideFromBottom 

Slide from bottom to show or to the top to hide.

◆ TextStyle

Enumeration of the text drawing styles.

Enumerator
Regular 

Regular characters, no style.

Bold 

Bold characters.

Italic 

Italic characters.

Underlined 

Underlined characters.

StrikeThrough 

Strike through characters.

Function Documentation

◆ getBackend()

TGUI_API std::shared_ptr<BackendBase> tgui::getBackend ( )

Returns the global backend.

Returns
Global backend
Warning
This function will assert if no backend has been created yet or after it has been destroyed.
See also
isBackendSet()

◆ getResourcePath()

TGUI_API const String& tgui::getResourcePath ( )

Returns the resource path.

This pathname is placed in front of every filename that is used to load a resource.

Returns
The current resource path

◆ isBackendSet()

TGUI_API bool tgui::isBackendSet ( )

Checks whether the backend differs from a nullptr.

Returns
Has setBackend been called with a valid backend?

◆ setBackend()

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.

Warning
When calling the function directly, it has to be the first call to TGUI and you must call setBackend(nullptr) before the end of the main() function.

◆ setResourcePath()

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.

Parameters
pathNew resource path