UTFWin::IWindow class

An interface that represents a component in the user interface.

Windows occupy a rectangle in the screen and are fit inside a hierarchy: a window can have multiple children and only one parent. For more information, check the User Interface page.

Base classes

class UTFWinObject
struct Window_intrusive_list_node

Derived classes

class Window

Public static variables

static const uint32_t TYPE

Public static functions

static void FitParentArea(IWindow* pWindow)
Sets the given UTFWin::IWindow to fit the entire area of its parent.
static auto CreatePanel(IWindow* pParent) -> IWindow*
Creates a new window with standard properties, and adds it to fit the given window (if any is given).
static void SetOpacity(IWindow* pWindow, float fOpacity)
Changes the opacity (opposite of transparency) of a window, which is done modifying the 'alpha' value of the shade color.

Public functions

auto GetParent() const -> IWindow* pure virtual
Returns the parent IWindow of this window, or nullptr if it has no parent window.
auto GetWindowManager() const -> IWindowManager* pure virtual
Returns the WindowManager that is operating on this window.
auto func6() const -> int pure virtual
auto GetControlID() const -> uint32_t pure virtual
Sets the unique ID of this object.
auto GetCommandID() const -> uint32_t pure virtual
Get the message ID sent by this window.
auto func9() const -> int pure virtual
auto GetFlags() const -> WindowFlags pure virtual
Gets the current window flags.
auto GetState() const -> int pure virtual
Gets the current state (selected, pressed, mouse hover, etc) of this window.
auto GetShadeColor() const -> Math::Color pure virtual
Returns the color modulation value.
auto GetArea() const -> const Math::Rectangle& pure virtual
Gets the rectangular extent of this window, relative to the window's parent.
auto GetRealArea() const -> const Math::Rectangle& pure virtual
Gets the real rectangular extent of this window, in window coordinates.
auto GetCaption() const -> const char16_t* pure virtual
Returns the text contents or title of the window.
auto GetTextFontID() const -> uint32_t pure virtual
Returns the text font style ID used in this window.
auto func17() const -> const char16_t* pure virtual
auto func18() const -> int pure virtual
auto func19() const -> int pure virtual
void SetControlID(uint32_t controlID) pure virtual
Sets the unique ID of this object.
void SetCommandID(uint32_t commandID) pure virtual
Set the message ID sent by this window.
void SetState(int state) pure virtual
Sets the current state (selected, pressed, mouse hover, etc) of this window.
void SetShadeColor(Color color) pure virtual
Returns the color modulation value.
void SetArea(const Math::Rectangle& area) pure virtual
Sets the rectangular extent of this window.
void SetLocation(float fX, float fY) pure virtual
Sets the location of this window, relative to its parent.
void SetSize(float fWidth, float fHeight) pure virtual
Assigns the width and height of this window.
void SetLayoutArea(const Math::Rectangle& layoutArea) pure virtual
Sets the area that this component should have, relative to its parent window, after all layout styles are applied.
void SetLayoutLocation(float fX, float fY) pure virtual
Assigns the location, relative to the parent window, that this window should have after all layouts are applied.
void SetLayoutSize(float fWidth, float fHeight) pure virtual
Assigns the width and height that this window should have after all layouts are applied.
void func30(int) pure virtual
void SetFlag(WindowFlags nFlag, bool bValue) pure virtual
Assigns the given value to the specified window flag.
void SetCaption(const char16_t* pCaption) pure virtual
Assigns the text contents or title of the window.
void SetTextFontID(uint32_t styleID) pure virtual
Sets the text font style ID used in this window.
void func34(int) pure virtual
void func35(int) pure virtual
auto Invalidate() -> int pure virtual
void Revalidate() pure virtual
Updates the real area of this window and all its children, using the 'area' property and applying all the ILayoutStyle objects (added as IWinProc) in this window.
auto InvalidateTransform() -> int pure virtual
auto func39() -> int pure virtual
auto func40() -> int pure virtual
auto GetFillColor() const -> Color pure virtual
Returns the fill color of this window.
auto GetDrawable() const -> IDrawable* pure virtual
Returns the fill drawable of this window.
void SetFillColor(Color color) pure virtual
Sets the fill color of this window.
void SetDrawable(IDrawable* drawable) pure virtual
Sets the fill drawable of this window.
auto func45(int) -> int pure virtual
auto func46(int, int) -> int pure virtual
auto func47(float, float) -> int pure virtual
auto func48(float, float) -> Point pure virtual
auto func49(float, float) -> Point pure virtual
auto func50(float, float, Point& dst) -> bool pure virtual
auto GetChildrenBegin() -> IWindowList_t::iterator pure virtual
Returns the begin iterator of the list of children windows contained in this window.
auto GetChildrenEnd() -> IWindowList_t::iterator pure virtual
Returns the end iterator of the list of children windows contained in this window.
auto LocateChild(const IWindow* pChild) const -> IWindowList_t::iterator pure virtual
Converts a pointer to a child window in the list back to an iterator, or returns end() if it is not part of the children list.
void AddWindow(IWindow* pWindow) pure virtual
Adds the given window to this IWindow's children.
void RemoveWindow(IWindow* pWindow) pure virtual
Removes the given window from this IWindow's children.
void DisposeWindowFamily(IWindow* pChildWindow) pure virtual
Disposes the given window and all its hierarchy.
void DisposeAllWindowFamilies() pure virtual
Disposes all the children windows and all their hierarchy.
void BringToFront(IWindow* pWindow) pure virtual
Moves the specified child window at the front of the rest of its siblings, so it is the last one to be rendered.
void SendToBack(IWindow* pWindow) pure virtual
Moves the specified child window at the back of the rest of its siblings, so it is the first one to be rendered.
auto FindWindowByID(uint32_t controlID, bool bRecursive = true) -> IWindow* pure virtual
Returns the first child window that has the given controlID.
auto FindWindowTypeByID(uint32_t controlID, uint32_t type, bool bRecursive = true) -> IWindow* pure virtual
Returns the first child window that has the given controlID and is of the given type.
auto IsAncestorOf(const IWindow* pChildWindow) -> bool pure virtual
Checks if the given window is contained in the component hierarchy of this IWindow.
auto func63(int index) -> bool pure virtual
auto func64(int index) -> bool pure virtual
void AddWinProc(IWinProc* pWinProc) pure virtual
Adds the given IWinProc at the end of this window's list.
void RemoveWinProc(IWinProc* pWinProc) pure virtual
Removes the given IWinProc from this window's list.
auto GetNextWinProc(const IWinProc* pWinProc = nullptr) const -> IWinProc* pure virtual
Gets the IWinProc in this window that follows the given procedure.
auto func68(int) -> int pure virtual
auto SendMsg(Message& msg) -> bool pure virtual
Sends the given message through this window, using this window as the source.
auto GetComponentName() const -> const char* pure virtual
Returns the name of this component type (e.g.
auto children() -> WindowChildren
Returns an structure that allows to iterate through the children of this window.
auto procedures() -> WindowProcedures
Returns an structure that allows to iterate through the IWinProc objects of this window.
auto AddWinProc(HandleUILambda_t pFunction, int eventFlags = kEventFlagBasicInput|kEventFlagAdvanced, int priority = 0) -> intrusive_ptr<IWinProc>
Adds an event listener, defined using a lambda function or by referencing a static function.
auto AddWinProcFilter(HandleUILambda_t function, const vector<MessageType> types, int priority = 0) -> intrusive_ptr<IWinProc>
Adds an even listener that only handles the specified message types.
auto IsVisible() const -> bool
Tells whether the window is visible.
void SetVisible(bool bVisible)
Switches the visibility of this window.
auto IsEnabled() const -> bool
Tells whether the window is visible.
void SetEnabled(bool bEnabled)
Switches the visibility of this window.

Function documentation

static void UTFWin::IWindow::FitParentArea(IWindow* pWindow)

Sets the given UTFWin::IWindow to fit the entire area of its parent.

Parameters
pWindow

static IWindow* UTFWin::IWindow::CreatePanel(IWindow* pParent)

Creates a new window with standard properties, and adds it to fit the given window (if any is given).

Parameters
pParent The parent window where the new window will be added. It can be nullptr.

The properties are the following:

  • ControlID = 0
  • CommandID = 0
  • ShadeColor = 0xFFFFFFFF
  • FillColor = 0x00FFFFFF
  • Area = (0, 0, 100, 100), except if a parent is given; then it fits the parent.
  • kWinFlagVisible = true
  • kWinFlagEnabled = true
  • kWinFlagIgnoreMouse = false

static void UTFWin::IWindow::SetOpacity(IWindow* pWindow, float fOpacity)

Changes the opacity (opposite of transparency) of a window, which is done modifying the 'alpha' value of the shade color.

Parameters
pWindow The component whose opacity must be changed.
fOpacity How opaque the window must be. This follows the rule alpha = 1 - fOpacity.

IWindow* UTFWin::IWindow::GetParent() const pure virtual

Returns the parent IWindow of this window, or nullptr if it has no parent window.

Returns A pointer to the IWindow parent of this window, or nullptr if there is none.

IWindowManager* UTFWin::IWindow::GetWindowManager() const pure virtual

Returns the WindowManager that is operating on this window.

Returns A pointer to the WindowManager being used in this window.

uint32_t UTFWin::IWindow::GetControlID() const pure virtual

Sets the unique ID of this object.

Returns The value of the 'controlID' property.

This ID is used to identfy windows, as it is the one used by FindWindowByID(). This ID can also be used on message handling, to check what window raised the message.

uint32_t UTFWin::IWindow::GetCommandID() const pure virtual

Get the message ID sent by this window.

Returns The value of the 'commandID' property.

WindowFlags UTFWin::IWindow::GetFlags() const pure virtual

Gets the current window flags.

Returns The value of the 'flags' property.

This can be used, for example, to check if a window is visible:

IWindow* pWindow = ....;

if (pWindow->GetFlags() & kWinFlagVisible) ...

int UTFWin::IWindow::GetState() const pure virtual

Gets the current state (selected, pressed, mouse hover, etc) of this window.

Returns The value of the 'state' property.

Only certain types use this, like buttons.

Math::Color UTFWin::IWindow::GetShadeColor() const pure virtual

Returns the color modulation value.

Returns The integer color representation of the value of the 'shadeColor' property.

This color acts as a tint: after the window is painted, it gets multiplied by this color.

const Math::Rectangle& UTFWin::IWindow::GetArea() const pure virtual

Gets the rectangular extent of this window, relative to the window's parent.

Returns The area of this window, in screen coordinates.

Note this is the 'area' property, but the real area of the window might be different depending on its parent and the IWinProcs operating in this window.

const Math::Rectangle& UTFWin::IWindow::GetRealArea() const pure virtual

Gets the real rectangular extent of this window, in window coordinates.

Returns The real Math::Rectangle area of this window, in screen coordinates.

This has all the IWinProcs and parent position applied, so this is the real area of the window that gets painted onto the screen.

const char16_t* UTFWin::IWindow::GetCaption() const pure virtual

Returns the text contents or title of the window.

Returns The char16_t* caption used in this window.

This value might be used or not depending on the implementation and type of window.

uint32_t UTFWin::IWindow::GetTextFontID() const pure virtual

Returns the text font style ID used in this window.

Returns The text font ID used in this window.

This value might be used or not depending on the implementation and type of window.

void UTFWin::IWindow::SetControlID(uint32_t controlID) pure virtual

Sets the unique ID of this object.

Parameters
controlID The new value of the 'controlID' property.

This ID is used to identfy windows, as it is the one used by FindWindowByID(). This ID can also be used on message handling, to check what window raised the message.

void UTFWin::IWindow::SetCommandID(uint32_t commandID) pure virtual

Set the message ID sent by this window.

Parameters
commandID The new value of the 'commandID' property.

void UTFWin::IWindow::SetState(int state) pure virtual

Sets the current state (selected, pressed, mouse hover, etc) of this window.

Parameters
state The new value of the 'state' property.

Only certain types use this, like buttons. This will generate a StateChanged message.

void UTFWin::IWindow::SetShadeColor(Color color) pure virtual

Returns the color modulation value.

Parameters
color The color to use as the 'shadeColor' property.

This color acts as a tint: after the window is painted, it gets multiplied by this color.

void UTFWin::IWindow::SetArea(const Math::Rectangle& area) pure virtual

Sets the rectangular extent of this window.

Parameters
area The new value of the 'area' property.

Note that this will only affect the 'area' property of the window; the real area might use these values differently depending on the IWinProc objects operating on this window (e.g. SimpleLayout). Calling this method effectively calls the Revalidate() method, which ensures the real area of the window is updated using the new values.

void UTFWin::IWindow::SetLocation(float fX, float fY) pure virtual

Sets the location of this window, relative to its parent.

Parameters
fX The X coordinate to use in the 'area' property.
fY The Y coordinate to use in the 'area' property.

Note that this will only affect the 'area' property of the window; the real area might use these values differently depending on the IWinProc objects operating on this window (e.g. SimpleLayout). Calling this method effectively calls the Revalidate() method, which ensures the real area of the window is updated using the new values.

void UTFWin::IWindow::SetSize(float fWidth, float fHeight) pure virtual

Assigns the width and height of this window.

Parameters
fWidth The width to use in the 'area' property.
fHeight The height to use in the 'area' property.

Note that this will only affect the 'area' property of the window; the real area might use these values differently depending on the IWinProc objects operating on this window (e.g. SimpleLayout). Calling this method effectively calls the Revalidate() method, which ensures the real area of the window is updated using the new values.

void UTFWin::IWindow::SetLayoutArea(const Math::Rectangle& layoutArea) pure virtual

Sets the area that this component should have, relative to its parent window, after all layout styles are applied.

Parameters
layoutArea The area this window should have.

This will call the ILayoutStyle::RevertLayout() method on all the layout styles in this window, starting with the last one (so the first layout applied will be the last one to be reverted), and then SetArea is called. This ensures that the given layoutArea parameter will be the real area of this window, but relative to the parent.

void UTFWin::IWindow::SetLayoutLocation(float fX, float fY) pure virtual

Assigns the location, relative to the parent window, that this window should have after all layouts are applied.

Parameters
fX The X coordinate, relative to the parent, that this window's location should have.
fY The Y coordinate, relative to the parent, that this window's location should have.

This will call the ILayoutStyle::RevertLayout() method on all the layout styles in this window, starting with the last one (so the first layout applied will be the last one to be reverted), and then SetArea is called. This ensures that the given location parameters will be the real loctions of this window (relative to its parent). Calling this method effectively calls the Revalidate() method, which ensures the real area of the window is updated using the new values.

void UTFWin::IWindow::SetLayoutSize(float fWidth, float fHeight) pure virtual

Assigns the width and height that this window should have after all layouts are applied.

Parameters
fWidth The width this window should have.
fHeight The height this window should have.

This will call the ILayoutStyle::RevertLayout() method on all the layout styles in this window, starting with the last one (so the first layout applied will be the last one to be reverted), and then SetArea is called. This ensures that the given width and height parameters will be the real dimensions of this window. Calling this method effectively calls the Revalidate() method, which ensures the real area of the window is updated using the new values.

void UTFWin::IWindow::SetFlag(WindowFlags nFlag, bool bValue) pure virtual

Assigns the given value to the specified window flag.

Parameters
nFlag The window flag whose value will be changed.
bValue The value that will be assigned to the flag.

This can be used, for example, to toggle visibility:

IWindow* pWindow = ....;

pWindow->SetFlag(kWinFlagVisible, false);  // hide this window

void UTFWin::IWindow::SetCaption(const char16_t* pCaption) pure virtual

Assigns the text contents or title of the window.

Parameters
pCaption The text to be used as caption.

This value might be used or not depending on the implementation and type of window.

void UTFWin::IWindow::SetTextFontID(uint32_t styleID) pure virtual

Sets the text font style ID used in this window.

Parameters
styleID The ID of the text font to use.

This value might be used or not depending on the implementation and type of window. This method will not update the current text font.

Color UTFWin::IWindow::GetFillColor() const pure virtual

Returns the fill color of this window.

Returns The integer color representation of the value of the 'fillColor' property.

The fill color acts as a background color: when rendering the window, the area will be filled with the fill color and then the fill drawable will be drawn on top of it.

IDrawable* UTFWin::IWindow::GetDrawable() const pure virtual

Returns the fill drawable of this window.

Returns The drawable used in this window.

When rendering the window, the area will be filled with the fill color and then the fill drawable will be drawn on top of it.

void UTFWin::IWindow::SetFillColor(Color color) pure virtual

Sets the fill color of this window.

Parameters
color The color to use as the 'fillColor' property.

The fill color acts as a background color: when rendering the window, the area will be filled with the fill color and then the fill drawable will be drawn on top of it.

void UTFWin::IWindow::SetDrawable(IDrawable* drawable) pure virtual

Sets the fill drawable of this window.

When rendering the window, the area will be filled with the fill color and then the fill drawable will be drawn on top of it.

IWindowList_t::iterator UTFWin::IWindow::GetChildrenBegin() pure virtual

Returns the begin iterator of the list of children windows contained in this window.

Pair it with GetChildrenEnd() to iterate through the children. Children windows are listed according to their Z-index; that is, the first children is the one on front, and the last children is the one on the bottom.

IWindowList_t::iterator UTFWin::IWindow::GetChildrenEnd() pure virtual

Returns the end iterator of the list of children windows contained in this window.

Pair it with GetChildrenBegin() to iterate through the children. Children windows are listed according to their Z-index; that is, the first children is the one on front, and the last children is the one on the bottom.

IWindowList_t::iterator UTFWin::IWindow::LocateChild(const IWindow* pChild) const pure virtual

Converts a pointer to a child window in the list back to an iterator, or returns end() if it is not part of the children list.

Parameters
pChild The IWindow whose next sibling will be returned.
Returns The iterator to the next sibling of pChild.

This can be used to check if a window is a direct child of this window, using "LocateChild(pChild) != GetChildrenEnd()

void UTFWin::IWindow::AddWindow(IWindow* pWindow) pure virtual

Adds the given window to this IWindow's children.

Parameters
pWindow The window to add to this object's children.

The window will be added last, so it will have the lowest Z-index. The parent of pWindow will be set to this object.

void UTFWin::IWindow::RemoveWindow(IWindow* pWindow) pure virtual

Removes the given window from this IWindow's children.

Parameters
pWindow The window to remove from this object's children.

pWindow will be removed from its parent hierarchy even if its parent is not this object. The parent of pWindow will be set to nullptr.

void UTFWin::IWindow::DisposeWindowFamily(IWindow* pChildWindow) pure virtual

Disposes the given window and all its hierarchy.

Parameters
pChildWindow The IWindow to dispose.

If pChildWindow is a child of this window, it will be removed from it. The pChildWindow hierarchy will be disposed even if it is not a child of this window.

void UTFWin::IWindow::DisposeAllWindowFamilies() pure virtual

Disposes all the children windows and all their hierarchy.

After this method is called, this window will not have any children.

void UTFWin::IWindow::BringToFront(IWindow* pWindow) pure virtual

Moves the specified child window at the front of the rest of its siblings, so it is the last one to be rendered.

Parameters
pWindow The child window to bring to the front.

This is the equivalent to setting the Z-index to the highest. Note that the window will remain behind of windows with the flag kWinFlagAlwaysInFront set to true.

void UTFWin::IWindow::SendToBack(IWindow* pWindow) pure virtual

Moves the specified child window at the back of the rest of its siblings, so it is the first one to be rendered.

Parameters
pWindow The child window to send to the back.

This is the equivalent to setting the Z-index to the lowest. Note that the window will remain behind of windows with the flag kWinFlagAlwaysInFront set to true.

IWindow* UTFWin::IWindow::FindWindowByID(uint32_t controlID, bool bRecursive = true) pure virtual

Returns the first child window that has the given controlID.

Parameters
controlID The controlID of the window to find.
bRecursive Whether the children hierarchy should be checked as well, true by default.
Returns The first window in the hierarchy that has the given controlID, or nullptr if there is no match.

By default, this also checks on the children' children, so the controlID is searched in all the window hierarchy.

IWindow* UTFWin::IWindow::FindWindowTypeByID(uint32_t controlID, uint32_t type, bool bRecursive = true) pure virtual

Returns the first child window that has the given controlID and is of the given type.

Parameters
controlID The controlID of the window to find.
type The type of the window to find. It will be used calling Cast(type) on the match.
bRecursive Whether the children hierarchy should be checked as well, true by default.
Returns The first window in the hierarchy that has the given controlID and type, or nullptr if there is no match.

The type is something like WinButton::TYPE, so it is safe to assume that the returned type will be a WinButton in this case. If a window with the given controlID is found but calling Cast(type) on it returns nullptr, nullptr will be returned (so it will stop searching). By default, this also checks on the children' children, so the controlID is searched in all the window hierarchy.

bool UTFWin::IWindow::IsAncestorOf(const IWindow* pChildWindow) pure virtual

Checks if the given window is contained in the component hierarchy of this IWindow.

Parameters
pChildWindow The child window to check.
Returns True if pChildWindow is contained in the hierarchy of this window, false otherwise.

All the hierarchy will be checked, so the function can return true even if this window is not a direct parent of pChildWindow.

void UTFWin::IWindow::AddWinProc(IWinProc* pWinProc) pure virtual

Adds the given IWinProc at the end of this window's list.

Parameters
pWinProc The IWinProc to add.

IWinProcs are called when a message is received in the window. Also some of them might be called on layout-related methods. Some IWinProcs can also act as effects.

void UTFWin::IWindow::RemoveWinProc(IWinProc* pWinProc) pure virtual

Removes the given IWinProc from this window's list.

Parameters
pWinProc The IWinProc to remove from this window.

IWinProcs are called when a message is received in the window. Also some of them might be called on layout-related methods. Some IWinProcs can also act as effects.

IWinProc* UTFWin::IWindow::GetNextWinProc(const IWinProc* pWinProc = nullptr) const pure virtual

Gets the IWinProc in this window that follows the given procedure.

Parameters
pWinProc The IWinProc that comes after this one will be returned. nullptr to return the first one.
Returns The next IWinProc, or nullptr if there's none.

If pWinProc is not included in this window, nullptr will be returned. If pWinProc is nullptr, the first IWinProc in this window will be returned.

bool UTFWin::IWindow::SendMsg(Message& msg) pure virtual

Sends the given message through this window, using this window as the source.

Parameters
msg The message.
Returns True if the message was handled successfully.

const char* UTFWin::IWindow::GetComponentName() const pure virtual

Returns the name of this component type (e.g.

"Window", "WinButton").

WindowChildren UTFWin::IWindow::children()

Returns an structure that allows to iterate through the children of this window.

Example usage:

IWindow* pWindow = ...;

for (IWindow* pChild : children())
{
    ...
}

WindowProcedures UTFWin::IWindow::procedures()

Returns an structure that allows to iterate through the IWinProc objects of this window.

Example usage:

IWindow* pWindow = ...;

for (IWinProc* pProcedure : pWindow->procedures())
{
    ...
}

intrusive_ptr<IWinProc> UTFWin::IWindow::AddWinProc(HandleUILambda_t pFunction, int eventFlags = kEventFlagBasicInput|kEventFlagAdvanced, int priority = 0)

Adds an event listener, defined using a lambda function or by referencing a static function.

Parameters
pFunction
eventFlags [Optional] A combination of kEventFlag... that defines which messages are received.
priority [Optional] The priority of this event listener.
Returns The generated IWinProc object, that can be used to remove this listener.

This listener will be called for the messages that are accepted by the event flags given; by default, this listens to basic input events and advanced events, defined by the kEventFlagBasicInput | kEventFlagAdvanced flags. The priority can also be specified, with 0 being default priority.

The method returns an IWinProc that can be used to remove this listener, by using IWindow::RemoveWinProc();

intrusive_ptr<IWinProc> UTFWin::IWindow::AddWinProcFilter(HandleUILambda_t function, const vector<MessageType> types, int priority = 0)

Adds an even listener that only handles the specified message types.

Parameters
function The lambda function that is called when a message is received.
types A vector of message types that this procedure receives.
priority [Optional] The priority of this event listener.
Returns The generated IWinProc object, that can be used to remove this listener.

The listener is defined using a lambda function or by referencing a static function. This listener will be called for the specified message types. The priority can also be specified, with 0 being default priority.

The method returns an IWinProc that can be used to remove this listener, by using IWindow::RemoveWinProc();

bool UTFWin::IWindow::IsVisible() const

Tells whether the window is visible.

This is equivalent to GetFlags() & kWinFlagVisible.

void UTFWin::IWindow::SetVisible(bool bVisible)

Switches the visibility of this window.

This is equivalent to SetFlag(kWinFlagVisible, bVisible).

bool UTFWin::IWindow::IsEnabled() const

Tells whether the window is visible.

This is equivalent to GetFlags() & kWinFlagEnabled.

void UTFWin::IWindow::SetEnabled(bool bEnabled)

Switches the visibility of this window.

This is equivalent to SetFlag(kWinFlagEnabled, bEnabled).