TGUI  1.3-dev
Loading...
Searching...
No Matches
tgui::Outline Class Reference

Public Member Functions

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

Constructor & Destructor Documentation

◆ Outline() [1/4]

constexpr tgui::Outline::Outline ( AbsoluteOrRelativeValue size = 0)
inlineconstexpr

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_t<std::is_arithmetic<T>::value, T>>
constexpr tgui::Outline::Outline ( T size)
inlineconstexpr

Constructor that initializes the outline.

Parameters
sizeWidth and height of the outline in all directions

◆ Outline() [3/4]

constexpr tgui::Outline::Outline ( AbsoluteOrRelativeValue width,
AbsoluteOrRelativeValue height )
inlineconstexpr

Constructor that initializes the outline.

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

◆ Outline() [4/4]

constexpr tgui::Outline::Outline ( AbsoluteOrRelativeValue leftBorderWidth,
AbsoluteOrRelativeValue topBorderHeight,
AbsoluteOrRelativeValue rightBorderWidth,
AbsoluteOrRelativeValue bottomBorderHeight )
inlineconstexpr

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_NODISCARD constexpr float tgui::Outline::getBottom ( ) const
inlineconstexpr

Returnes the height of the bottom border.

Returns
Bottom border height

◆ getLeft()

TGUI_NODISCARD constexpr float tgui::Outline::getLeft ( ) const
inlineconstexpr

Returnes the width of the left border.

Returns
Left border width

◆ getOffset()

TGUI_NODISCARD constexpr Vector2f tgui::Outline::getOffset ( ) const
inlineconstexpr

Returnes the width of the left and top borders.

Returns
Left and top borders

◆ getRight()

TGUI_NODISCARD constexpr float tgui::Outline::getRight ( ) const
inlineconstexpr

Returnes the width of the right border.

Returns
Right border width

◆ getTop()

TGUI_NODISCARD constexpr float tgui::Outline::getTop ( ) const
inlineconstexpr

Returnes the height of the top border.

Returns
Top border height

◆ operator!=()

TGUI_NODISCARD constexpr bool tgui::Outline::operator!= ( const Outline & outline) const
inlineconstexpr

Compares two outlines.

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

◆ operator+()

TGUI_NODISCARD constexpr Outline tgui::Outline::operator+ ( const Outline & other) const
inlineconstexpr

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

Parameters
otherThe outline to add together with this instance

◆ operator+=()

constexpr Outline & tgui::Outline::operator+= ( const Outline & other)
inlineconstexpr

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

Parameters
otherThe outline to add to this instance

◆ operator-()

TGUI_NODISCARD constexpr Outline tgui::Outline::operator- ( const Outline & other) const
inlineconstexpr

Subtracts two outlines from each other.

Parameters
otherThe outline to subtract from this instance

◆ operator-=()

constexpr Outline & tgui::Outline::operator-= ( const Outline & other)
inlineconstexpr

Subtracts an outline from this instance.

Parameters
otherThe outline to subtract from this instance

◆ operator==()

TGUI_NODISCARD constexpr bool tgui::Outline::operator== ( const Outline & outline) const
inlineconstexpr

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: