TGUI  0.10-beta
tgui::Outline Class Reference

Public Member Functions

TGUI_CONSTEXPR Outline (AbsoluteOrRelativeValue size=0)
 Default constructor that initializes the outline. More...
 
template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type>
TGUI_CONSTEXPR Outline (T size)
 Constructor that initializes the outline. More...
 
TGUI_CONSTEXPR Outline (AbsoluteOrRelativeValue width, AbsoluteOrRelativeValue height)
 Constructor that initializes the outline. More...
 
TGUI_CONSTEXPR Outline (AbsoluteOrRelativeValue leftBorderWidth, AbsoluteOrRelativeValue topBorderHeight, AbsoluteOrRelativeValue rightBorderWidth, AbsoluteOrRelativeValue bottomBorderHeight)
 Constructor that initializes the outline. More...
 
TGUI_CONSTEXPR float getLeft () const
 Returnes the width of the left border. More...
 
TGUI_CONSTEXPR float getTop () const
 Returnes the height of the top border. More...
 
TGUI_CONSTEXPR float getRight () const
 Returnes the width of the right border. More...
 
TGUI_CONSTEXPR float getBottom () const
 Returnes the height of the bottom border. More...
 
TGUI_CONSTEXPR Vector2f getOffset () const
 Returnes the width of the left and top borders. More...
 
TGUI_CONSTEXPR bool operator== (const Outline &outline) const
 Compares two outlines. More...
 
TGUI_CONSTEXPR bool operator!= (const Outline &outline) const
 Compares two outlines. More...
 
TGUI_CONSTEXPR Outline operator+ (const Outline &other) const
 Adds two outlines together (e.g. to add padding and borders) More...
 
TGUI_CONSTEXPR Outline operator- (const Outline &other) const
 Subtracts two outlines from each other. More...
 
TGUI_CONSTEXPR Outlineoperator+= (const Outline &other)
 Adds an outline to this instance (e.g. to add padding and borders) More...
 
TGUI_CONSTEXPR Outlineoperator-= (const Outline &other)
 Subtracts an outline from this instance. More...
 
TGUI_CONSTEXPR void updateParentSize (Vector2f newParentSize)
 
String toString () const
 

Constructor & Destructor Documentation

◆ Outline() [1/4]

TGUI_CONSTEXPR tgui::Outline::Outline ( AbsoluteOrRelativeValue  size = 0)
inline

Default constructor that initializes the outline.

Parameters
sizeWidth and height of the outline in all directions

◆ Outline() [2/4]

template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type>
TGUI_CONSTEXPR tgui::Outline::Outline ( size)
inline

Constructor that initializes the outline.

Parameters
sizeWidth and height of the outline in all directions

◆ Outline() [3/4]

TGUI_CONSTEXPR tgui::Outline::Outline ( AbsoluteOrRelativeValue  width,
AbsoluteOrRelativeValue  height 
)
inline

Constructor that initializes the outline.

Parameters
widthWidth of the left and right outline
heightHeight of the top and bottom outline

◆ Outline() [4/4]

TGUI_CONSTEXPR tgui::Outline::Outline ( AbsoluteOrRelativeValue  leftBorderWidth,
AbsoluteOrRelativeValue  topBorderHeight,
AbsoluteOrRelativeValue  rightBorderWidth,
AbsoluteOrRelativeValue  bottomBorderHeight 
)
inline

Constructor that initializes the outline.

Parameters
leftBorderWidthWidth of the left outline
topBorderHeightHeight of the top outline
rightBorderWidthWidth of the right outline
bottomBorderHeightHeight of the bottom outline

Member Function Documentation

◆ getBottom()

TGUI_CONSTEXPR float tgui::Outline::getBottom ( ) const
inline

Returnes the height of the bottom border.

Returns
Bottom border height

◆ getLeft()

TGUI_CONSTEXPR float tgui::Outline::getLeft ( ) const
inline

Returnes the width of the left border.

Returns
Left border width

◆ getOffset()

TGUI_CONSTEXPR Vector2f tgui::Outline::getOffset ( ) const
inline

Returnes the width of the left and top borders.

Returns
Left and top borders

◆ getRight()

TGUI_CONSTEXPR float tgui::Outline::getRight ( ) const
inline

Returnes the width of the right border.

Returns
Right border width

◆ getTop()

TGUI_CONSTEXPR float tgui::Outline::getTop ( ) const
inline

Returnes the height of the top border.

Returns
Top border height

◆ operator!=()

TGUI_CONSTEXPR bool tgui::Outline::operator!= ( const Outline outline) const
inline

Compares two outlines.

Parameters
outlineThe outline to compare with this instance
Returns
Whether the outlines are equal or not

◆ operator+()

TGUI_CONSTEXPR Outline tgui::Outline::operator+ ( const Outline other) const
inline

Adds two outlines together (e.g. to add padding and borders)

Parameters
otherThe outline to add together with this instance

◆ operator+=()

TGUI_CONSTEXPR Outline & tgui::Outline::operator+= ( const Outline other)
inline

Adds an outline to this instance (e.g. to add padding and borders)

Parameters
otherThe outline to add to this instance

◆ operator-()

TGUI_CONSTEXPR Outline tgui::Outline::operator- ( const Outline other) const
inline

Subtracts two outlines from each other.

Parameters
otherThe outline to subtract from this instance

◆ operator-=()

TGUI_CONSTEXPR Outline & tgui::Outline::operator-= ( const Outline other)
inline

Subtracts an outline from this instance.

Parameters
otherThe outline to subtract from this instance

◆ operator==()

TGUI_CONSTEXPR bool tgui::Outline::operator== ( const Outline outline) const
inline

Compares two outlines.

Parameters
outlineThe outline to compare with this instance
Returns
Whether the outlines are equal or not

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