UTFWin::SimpleLayout class

Base classes

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

Constructors, destructors, conversion operators

SimpleLayout()
SimpleLayout(int anchor)
~SimpleLayout() virtual

Public functions

auto AddRef() -> int override
auto Release() -> int override
auto Cast(uint32_t typeID) const -> void* override
auto GetEventFlags() const -> int override
Gets the flags that represent which type of messages this IWinProc can handle.
void OnLayout(IWindow* window, Math::Rectangle& parentBounds) override
An event listener called every time the window layout is recalculated on a window this procedure is listening.
void SetSerializer(Serializer& dst) override
auto GetProxyID() const -> uint32_t override
Returns the ID that identifies this type of element in a SPUI file.
auto ToWinProc() const -> IWinProc* override
Returns the IWinProc representation of this ILayoutStyle, so that it can be used on an IWindow.
void ApplyLayout(Math::Rectangle& area, const Math::Rectangle& parentArea) override
Applies this layout to the given area.
auto RevertLayout(Math::Rectangle& area, const Math::Rectangle& parentArea) -> bool override
Reverts this layout to the given area.
auto GetAnchor() const -> int virtual
void SetAnchor(int value) virtual

Protected variables

int mAnchor

Function documentation

int UTFWin::SimpleLayout::GetEventFlags() const override

Gets the flags that represent which type of messages this IWinProc can handle.

This allows for better performance, since generally a procedure only needs to listen specific events. The flags are in the kEventFlag... values.

void UTFWin::SimpleLayout::OnLayout(IWindow* window, Math::Rectangle& parentBounds) override

An event listener called every time the window layout is recalculated on a window this procedure is listening.

Parameters
window
parentBounds

IWinProc* UTFWin::SimpleLayout::ToWinProc() const override

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::SimpleLayout::ApplyLayout(Math::Rectangle& area, const Math::Rectangle& parentArea) override

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::SimpleLayout::RevertLayout(Math::Rectangle& area, const Math::Rectangle& parentArea) override

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().