UTFWin::ILayoutStyle class

This class represents an object that can apply a certain layout to a given Rectangle area.

Since this is used to apply layouts on windows, it has a method to convert this ILayoutStyle to a IWinProc, that then can be added onto an IWindow. ILayoutStyle receives an area and a parent area, and transform the first accordingly.

Base classes

class UTFWinObject

Derived classes

class ProportionalLayout
class SimpleLayout

Public static variables

static const uint32_t TYPE

Public functions

auto ToWinProc() const -> IWinProc* pure virtual
Returns the IWinProc representation of this ILayoutStyle, so that it can be used on an IWindow.
auto ApplyLayout(Math::Rectangle& area, const Math::Rectangle& parentArea) -> void pure virtual
Applies this layout to the given area.
auto RevertLayout(Math::Rectangle& area, const Math::Rectangle& parentArea) -> bool pure virtual
Reverts this layout to the given area.

Function documentation

IWinProc* UTFWin::ILayoutStyle::ToWinProc() const pure virtual

Returns the IWinProc representation of this ILayoutStyle, so that it can be used on an IWindow.

This is preferred to the Cast method.

void UTFWin::ILayoutStyle::ApplyLayout(Math::Rectangle& area, const Math::Rectangle& parentArea) pure virtual

Applies this layout to the given area.

Parameters
area in/out The current area of the window. The result will be written here as well.
parentArea in The area of the parent window, some layouts might use this. Even if this parameter is used, the resulting area will be relative to the parent window position.

The parent area of the window must also be specified as some layouts might use it; the resulting area will still be relative to the parent window position, however.

bool UTFWin::ILayoutStyle::RevertLayout(Math::Rectangle& area, const Math::Rectangle& parentArea) pure virtual

Reverts this layout to the given area.

Parameters
area in/out The current area of the window. The result will be written here as well.
parentArea in The area of the parent window, some layouts might use this. Even if this parameter is used, the resulting area will be relative to the parent window position.
Returns True if the layout was successfully reverted.

The parent area of the window must also be specified as some layouts might use it; the resulting area will still be relative to the parent window position, however. This is the inverse of ApplyLayout().