TGUI  0.8.0
tgui::Layout2d Class Reference

Class to store the position or size of a widget. More...

#include <TGUI/Layout.hpp>

Public Member Functions

 Layout2d (Vector2f constant={0, 0})
 Default constructor to implicitly construct from a tgui::Vector2f. More...
 
 Layout2d (sf::Vector2f constant)
 Default constructor to implicitly construct from a sf::Vector2f. More...
 
 Layout2d (Layout layoutX, Layout layoutY)
 Constructor to create the Layout2d from two Layout classes. More...
 
 Layout2d (const char *expression)
 Constructs the Layout2d based on a string which will be parsed to determine the value of the layouts. More...
 
 Layout2d (const std::string &expression)
 Constructs the Layout2d based on a string which will be parsed to determine the value of the layouts. More...
 
Vector2f getValue () const
 Returns the cached value of the layout. More...
 

Detailed Description

Class to store the position or size of a widget.

You don't have to explicitly create an instance of this class, sf::Vector2f and tgui::Vector2f are implicitly converted.

Constructor & Destructor Documentation

◆ Layout2d() [1/5]

tgui::Layout2d::Layout2d ( Vector2f  constant = {0, 0})
inline

Default constructor to implicitly construct from a tgui::Vector2f.

Parameters
constantValue of the layout

◆ Layout2d() [2/5]

tgui::Layout2d::Layout2d ( sf::Vector2f  constant)
inline

Default constructor to implicitly construct from a sf::Vector2f.

Parameters
constantValue of the layout

◆ Layout2d() [3/5]

tgui::Layout2d::Layout2d ( Layout  layoutX,
Layout  layoutY 
)
inline

Constructor to create the Layout2d from two Layout classes.

Parameters
layoutXx component
layoutYy component

◆ Layout2d() [4/5]

tgui::Layout2d::Layout2d ( const char *  expression)
inline

Constructs the Layout2d based on a string which will be parsed to determine the value of the layouts.

Parameters
expressionString to parse

The expression will be passed to both the x and y layouts.

◆ Layout2d() [5/5]

tgui::Layout2d::Layout2d ( const std::string &  expression)
inline

Constructs the Layout2d based on a string which will be parsed to determine the value of the layouts.

Parameters
expressionString to parse

The expression will be passed to both the x and y layouts.

Member Function Documentation

◆ getValue()

Vector2f tgui::Layout2d::getValue ( ) const
inline

Returns the cached value of the layout.

Returns
Value of the layout

The documentation for this class was generated from the following file: