TGUI  0.8.9
tgui Namespace Reference

Namespace that contains all TGUI functions and classes. More...

Namespaces

 Signals
 Lists the names of all signals for all widgets.
 

Classes

class  AbsoluteOrRelativeValue
 Class to store the a value that is either a constant or a ratio. More...
 
struct  RelativeValue
 Helper class to create an AbsoluteOrRelativeValue object containing a relative value without using a string. More...
 
struct  Any
 
class  Clipboard
 
class  Clipping
 
class  Color
 Wrapper for colors. More...
 
class  Container
 Container widget. More...
 
class  GuiContainer
 
class  CopiedSharedPtr
 
class  CustomWidgetForBindings
 Class used by bindings to implement custom widgets withing these bindings (e.g. a custom C# widget in TGUI.Net) More...
 
class  Exception
 
class  Filesystem
 Helper functionality for filesystem access. More...
 
class  FloatRect
 
class  Font
 
class  Gui
 Gui class. More...
 
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  ObjectConverter
 Implicit converter for settable properties. More...
 
class  Outline
 
class  Signal
 Signal to which the user can subscribe to get callbacks from. More...
 
class  SignalRange
 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  SignalAnimation
 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  SignalWidgetBase
 Base class for Widget which provides functionality to connect signals based on their name. More...
 
class  SignalManager
 
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  Text
 
class  TextStyle
 Wrapper for text styles. More...
 
class  Texture
 
struct  TextureData
 
struct  TextureDataHolder
 
class  TextureManager
 
class  ToolTip
 Interface to set the settings for the tool tips. More...
 
class  Variant
 
class  Vector2f
 
class  Widget
 The parent class for every widget. More...
 
class  DataIO
 Parser and emitter for widget files.
 
class  Deserializer
 Deserializes a settable property. More...
 
class  Serializer
 Serializes an settable property. More...
 
class  Theme
 This class can be used to manage the widget renderers. More...
 
class  BaseThemeLoader
 Base class for theme loader implementations. More...
 
class  DefaultThemeLoader
 Default implementation for theme loading. More...
 
class  WidgetFactory
 
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  Button
 Button widget. More...
 
class  Canvas
 
class  ChatBox
 
class  CheckBox
 CheckBox widget. More...
 
class  ChildWindow
 Child window widget. More...
 
class  ClickableWidget
 Clickable widget. More...
 
class  ColorPicker
 Color picker widget. More...
 
class  ComboBox
 Combo box widget. More...
 
class  EditBox
 Edit box widget. More...
 
class  Grid
 
class  Group
 Group widget. 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  Label
 Label widget. More...
 
class  ListBox
 List box widget. More...
 
class  ListView
 List view widget. More...
 
class  MenuBar
 Menu bar widget. More...
 
class  MessageBox
 Message box widget. More...
 
class  Panel
 Group of widgets that has a background color and optional borders. More...
 
class  Picture
 Picture widget. More...
 
class  ProgressBar
 Progress bar widget. More...
 
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  RangeSlider
 RangeSlider widget. More...
 
class  ScrollablePanel
 Group of widgets that has a background color and optional borders. More...
 
class  Scrollbar
 Scrollbar widget. More...
 
class  ScrollbarChildWidget
 Wrapper around scrollbar to be used inside widgets that need a scrollbar. More...
 
class  Slider
 Slider widget. More...
 
class  SpinButton
 Spin button widget. More...
 
class  Tabs
 Tabs widget. More...
 
class  TextBox
 Text box widget. More...
 
class  TreeView
 Tree view widget. More...
 
class  VerticalLayout
 Container that automatically resizes children to fit the entire available space between children. More...
 
class  BoxLayoutRenderer
 
class  ButtonRenderer
 
class  ChatBoxRenderer
 
class  ChildWindowRenderer
 
class  ColorPickerRenderer
 
class  ComboBoxRenderer
 
class  EditBoxRenderer
 
class  GroupRenderer
 
class  KnobRenderer
 
class  LabelRenderer
 
class  ListBoxRenderer
 
class  ListViewRenderer
 
class  MenuBarRenderer
 Renderer for the MenuBar widget. More...
 
class  MessageBoxRenderer
 
class  PanelRenderer
 
class  PictureRenderer
 
class  ProgressBarRenderer
 
class  RadioButtonRenderer
 
class  RangeSliderRenderer
 
class  ScrollablePanelRenderer
 
class  ScrollbarRenderer
 
class  SliderRenderer
 
class  SpinButtonRenderer
 
class  TabsRenderer
 
class  TextBoxRenderer
 
class  TreeViewRenderer
 
struct  RendererData
 Shared data used in renderer classes. More...
 
class  WidgetRenderer
 Base class for all renderer classes. More...
 

Enumerations

enum class  ShowAnimationType {
  Fade , Scale , SlideToRight , SlideToLeft ,
  SlideToBottom , SlideToTop , SlideFromLeft = SlideToRight , SlideFromRight = SlideToLeft ,
  SlideFromTop = SlideToBottom , SlideFromBottom = SlideToTop
}
 Type of animation to show/hide widget. More...
 

Functions

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 setGlobalFont (const Font &font)
 Sets the default font used by widgets.
 
TGUI_API Font getGlobalFont ()
 Retrieves the default font used for all new widgets. More...
 
TGUI_API void setDoubleClickTime (unsigned int milliseconds)
 Sets the double-click time for the mouse.
 
TGUI_API unsigned int getDoubleClickTime ()
 Retrieves the double-click time for the mouse.
 
TGUI_API void setEditCursorBlinkRate (unsigned int blinkRateMilliseconds)
 Changes the blink rate of the cursor in edit fields such as EditBox and TextBox.
 
TGUI_API unsigned int getEditCursorBlinkRate ()
 Returns the blink rate of the cursor in edit fields such as EditBox and TextBox.
 
TGUI_API void setResourcePath (const std::string &path)
 Sets a new resource path. More...
 
TGUI_API const std::string & getResourcePath ()
 Returns the resource path. More...
 
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 (Gui &gui)
 Bind to the width of the gui view.
 
TGUI_API Layout bindHeight (Gui &gui)
 Bind to the height of the gui view.
 
TGUI_API Layout2d bindSize (Gui &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.
 
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 (sf::Uint32 character)
 Checks if a character is a whitespace character (space, tab, carriage return or line feed)
 
TGUI_API int strToInt (const std::string &str, int defaultValue=0)
 Converts a string to an int. More...
 
TGUI_API unsigned int strToUInt (const std::string &str, unsigned int defaultValue=0)
 Converts a string to an unsigned int. More...
 
TGUI_API float strToFloat (const std::string &str, float defaultValue=0)
 Converts a string to a float. More...
 
TGUI_API std::string toLower (const std::string &str)
 Converts a string to lowercase.
 
TGUI_API std::string toUpper (const std::string &str)
 Converts a string to uppercase.
 
TGUI_API std::string trim (const std::string &str)
 Trims the whitespace from a string.
 
TGUI_CONSTEXPR Vector2f operator- (const Vector2f &right)
 Overload of unary operator -.
 
TGUI_CONSTEXPR Vector2foperator+= (Vector2f &left, const Vector2f &right)
 Overload of binary operator +=.
 
TGUI_CONSTEXPR Vector2foperator-= (Vector2f &left, const Vector2f &right)
 Overload of binary operator -=.
 
TGUI_CONSTEXPR Vector2f operator+ (const Vector2f &left, const Vector2f &right)
 Overload of binary operator +.
 
TGUI_CONSTEXPR Vector2f operator- (const Vector2f &left, const Vector2f &right)
 Overload of binary operator -.
 
TGUI_CONSTEXPR Vector2f operator* (const Vector2f &left, float right)
 Overload of binary operator *.
 
TGUI_CONSTEXPR Vector2f operator* (float left, const Vector2f &right)
 Overload of binary operator *.
 
TGUI_CONSTEXPR Vector2foperator*= (Vector2f &left, float right)
 Overload of binary operator *=.
 
TGUI_CONSTEXPR Vector2f operator/ (const Vector2f &left, float right)
 Overload of binary operator /.
 
TGUI_CONSTEXPR Vector2foperator/= (Vector2f &left, float right)
 Overload of binary operator /=.
 
TGUI_CONSTEXPR bool operator== (const Vector2f &left, const Vector2f &right)
 Overload of binary operator ==.
 
TGUI_CONSTEXPR bool operator!= (const Vector2f &left, const Vector2f &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.

Function Documentation

◆ getGlobalFont()

TGUI_API Font tgui::getGlobalFont ( )

Retrieves the default font used for all new widgets.

This function will create the font if there was no global font yet.

◆ getResourcePath()

TGUI_API const std::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

◆ setResourcePath()

TGUI_API void tgui::setResourcePath ( const std::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

◆ strToFloat()

TGUI_API float tgui::strToFloat ( const std::string &  str,
float  defaultValue = 0 
)

Converts a string to a float.

Parameters
strThe string to parse
defaultValueValue to return when the string didn't contain a float

◆ strToInt()

TGUI_API int tgui::strToInt ( const std::string &  str,
int  defaultValue = 0 
)

Converts a string to an int.

Parameters
strThe string to parse
defaultValueValue to return when the string didn't contain an int

◆ strToUInt()

TGUI_API unsigned int tgui::strToUInt ( const std::string &  str,
unsigned int  defaultValue = 0 
)

Converts a string to an unsigned int.

Parameters
strThe string to parse
defaultValueValue to return when the string didn't contain an int