UTFWin::IButton class

An interface that declares all the functions needed by a button component.

Base classes

class UTFWinObject
class UTFWinObject

Derived classes

class WinButton

Public static variables

static const uint32_t TYPE
static const uint32_t WinButton_ID

Public static functions

static auto Create() -> IButton*

Public functions

auto ToWindow() -> IWindow* pure virtual
Returns the UTFWin::IWindow representation of this button.
void func5(int arg_0) pure virtual
auto GetButtonType() -> ButtonTypes pure virtual
Tells the type of this button (standard, toggle, radio).
void SetButtonType(ButtonTypes buttonType) pure virtual
Sets the type of this button (standard, toggle, radio).
auto GetButtonStateFlags() -> int pure virtual
Returns the flags that define the state of this button; a combination of the values in the UTFWin::ButtonStateFlags enum.
void SetButtonStateFlags(int flags) pure virtual
Sets the flags that define the state of this button; a combination of the values in the UTFWin::ButtonStateFlags enum.
void SetButtonStateFlag(int flag, bool bValue) pure virtual
Sets the value of a specific flag that defines the state of this button.
auto GetButtonFlags() -> int pure virtual
Gets the flags of this button, which define certain properties about it; it's the combination of values in the UTFWin::ButtonFlags enum.
void SetButtonFlags(int flags) pure virtual
Sets the flags of this button, which define certain properties about it; it's the combination of values in the UTFWin::ButtonFlags enum.
void SetButtonFlag(int flag, bool bValue) pure virtual
Sets the value of a specific flag of this button, which defines certain properties about it; it's the combination of values in the UTFWin::ButtonFlags enum.
auto GetAlignment() -> AlignmentH pure virtual
Gets the horizontal alignment of the button within the window area whenever a fixed width flag is set.
void SetAlignment(AlignmentH alignment) pure virtual
Set the horizontal alignment of the button within the window area whenever a fixed width flag is set.
auto GetButtonGroupID() -> uint32_t pure virtual
Allows to group buttons together.
void SetButtonGroupID(uint32_t groupID) pure virtual
Allows to group buttons together.
auto GetCaptionColor(StateIndices index) -> uint32_t pure virtual
Gets the caption color for the given state.
void SetCaptionColor(StateIndices index, Color color) pure virtual
Sets the caption color for the given state.
void GetCaptionBorders(union Math::Rectangle& dst) pure virtual
Gets the caption borders.
void SetCaptionBorders(const union Math::Rectangle& borders) pure virtual
Sets the caption borders.
void GetCaptionOffset(struct Point& dst) pure virtual
Gets the caption offset to be used when the button is selected/depressed.
void SetCaptionOffset(const struct Point& offset) pure virtual
Set the caption offset to be used when the button is selected/depressed.
void SetButtonDrawable(IButtonDrawable* pDrawable) pure virtual
Sets the object to render button appearance, which must be an UTFWin::IButtonDrawable.
auto GetButtonDrawable() -> IButtonDrawable* pure virtual
Gets the object to render button appearance, which must be an UTFWin::IButtonDrawable.
auto GetTextOutline() -> OutlineFormat& pure virtual
Gets the text outline format.
void SetTextOutline(OutlineFormat& format) pure virtual
Sets the text outline format.
auto ToWindow() -> IWindow* pure virtual
void func5(int arg_0) pure virtual
auto GetButtonType() -> ButtonTypes pure virtual
void SetButtonType(ButtonTypes buttonType) pure virtual
auto GetButtonStateFlags() -> ButtonStateFlags::Type pure virtual
void SetButtonStateFlags(ButtonStateFlags::Type flags) pure virtual
void SetButtonStateFlag(ButtonStateFlags::Type flag, bool value) pure virtual
auto GetButtonFlags() -> ButtonFlags::Type pure virtual
void SetButtonFlags(ButtonFlags::Type flags) pure virtual
void SetButtonFlag(ButtonFlags::Type flag, bool value) pure virtual
auto GetAlignment() -> AlignmentH pure virtual
void SetAlignment(AlignmentH alignment) pure virtual
auto GetButtonGroupID() -> unsigned long pure virtual
void SetButtonGroupID(unsigned long groupID) pure virtual
auto GetCaptionColor(StateIndices index) -> Color pure virtual
void SetCaptionColor(StateIndices index, Color& color) pure virtual
void GetCaptionBorders(struct Borders& dst) pure virtual
void SetCaptionBorders(struct Borders& borders) pure virtual
void GetCaptionOffset(struct Point& dst) pure virtual
void SetCaptionOffset(struct Point& offset) pure virtual
void SetButtonDrawable(IButtonDrawable* drawable) pure virtual
auto GetButtonDrawable() -> IButtonDrawable* pure virtual
auto GetTextOutline() -> OutlineFormat& pure virtual
void SetTextOutline(OutlineFormat& format) pure virtual

Function documentation

ButtonTypes UTFWin::IButton::GetButtonType() pure virtual

Tells the type of this button (standard, toggle, radio).

Returns A value in the enum UTFWin::ButtonTypes.

void UTFWin::IButton::SetButtonType(ButtonTypes buttonType) pure virtual

Sets the type of this button (standard, toggle, radio).

Parameters
buttonType A value in the enum UTFWin::ButtonTypes.

void UTFWin::IButton::SetButtonStateFlags(int flags) pure virtual

Sets the flags that define the state of this button; a combination of the values in the UTFWin::ButtonStateFlags enum.

Parameters
flags

void UTFWin::IButton::SetButtonStateFlag(int flag, bool bValue) pure virtual

Sets the value of a specific flag that defines the state of this button.

Parameters
flag The flag that must be changed, which belongs to the enum UTFWin::ButtonStateFlags.
bValue The new boolean value of the flag.

void UTFWin::IButton::SetButtonFlags(int flags) pure virtual

Sets the flags of this button, which define certain properties about it; it's the combination of values in the UTFWin::ButtonFlags enum.

Parameters
flags

void UTFWin::IButton::SetButtonFlag(int flag, bool bValue) pure virtual

Sets the value of a specific flag of this button, which defines certain properties about it; it's the combination of values in the UTFWin::ButtonFlags enum.

Parameters
flag The flag that must be changed, which belongs to the enum UTFWin::ButtonFlags.
bValue The new boolean value of the flag.

AlignmentH UTFWin::IButton::GetAlignment() pure virtual

Gets the horizontal alignment of the button within the window area whenever a fixed width flag is set.

Returns A value in the UTFWin::AlignmentH enum.

This is only the horizontal alignment, the button is always centered vertically. The caption text area always complements the alignment of the button.

void UTFWin::IButton::SetAlignment(AlignmentH alignment) pure virtual

Set the horizontal alignment of the button within the window area whenever a fixed width flag is set.

Parameters
alignment A value in the UTFWin::AlignmentH enum.

This is only the horizontal alignment, the button is always centered vertically. The caption text area always complements the alignment of the button.

uint32_t UTFWin::IButton::GetButtonGroupID() pure virtual

Allows to group buttons together.

Returns An ID that represents this button group.

Combined with radio button type this enables radio button group control.

void UTFWin::IButton::SetButtonGroupID(uint32_t groupID) pure virtual

Allows to group buttons together.

Parameters
groupID An ID that represents the button group.

Combined with radio button type this enables radio button group control.

uint32_t UTFWin::IButton::GetCaptionColor(StateIndices index) pure virtual

Gets the caption color for the given state.

Parameters
index The state whose color must be returned, in the UTFWin::StateIndices enum.

The return value can be casted to Math::Color

void UTFWin::IButton::SetCaptionColor(StateIndices index, Color color) pure virtual

Sets the caption color for the given state.

Parameters
index The state whose color must be changed, in the UTFWin::StateIndices enum.
color The new color.

void UTFWin::IButton::GetCaptionBorders(union Math::Rectangle& dst) pure virtual

Gets the caption borders.

Parameters
dst out The Math::Rectangle where the borders will be written.

void UTFWin::IButton::SetCaptionBorders(const union Math::Rectangle& borders) pure virtual

Sets the caption borders.

Parameters
borders The Math::Rectangle that contains the new borders.

void UTFWin::IButton::GetCaptionOffset(struct Point& dst) pure virtual

Gets the caption offset to be used when the button is selected/depressed.

Parameters
dst out The Math::Point where the offset will be written.

void UTFWin::IButton::SetCaptionOffset(const struct Point& offset) pure virtual

Set the caption offset to be used when the button is selected/depressed.

Parameters
offset The Math::Point that contains the new offset.

void UTFWin::IButton::SetButtonDrawable(IButtonDrawable* pDrawable) pure virtual

Sets the object to render button appearance, which must be an UTFWin::IButtonDrawable.

Parameters
pDrawable

void UTFWin::IButton::SetTextOutline(OutlineFormat& format) pure virtual

Sets the text outline format.

Parameters
format

IWindow* UTFWin::IButton::ToWindow() pure virtual

void UTFWin::IButton::func5(int arg_0) pure virtual

ButtonTypes UTFWin::IButton::GetButtonType() pure virtual

void UTFWin::IButton::SetButtonType(ButtonTypes buttonType) pure virtual

ButtonStateFlags::Type UTFWin::IButton::GetButtonStateFlags() pure virtual

void UTFWin::IButton::SetButtonStateFlags(ButtonStateFlags::Type flags) pure virtual

void UTFWin::IButton::SetButtonStateFlag(ButtonStateFlags::Type flag, bool value) pure virtual

ButtonFlags::Type UTFWin::IButton::GetButtonFlags() pure virtual

void UTFWin::IButton::SetButtonFlags(ButtonFlags::Type flags) pure virtual

void UTFWin::IButton::SetButtonFlag(ButtonFlags::Type flag, bool value) pure virtual

AlignmentH UTFWin::IButton::GetAlignment() pure virtual

void UTFWin::IButton::SetAlignment(AlignmentH alignment) pure virtual

unsigned long UTFWin::IButton::GetButtonGroupID() pure virtual

void UTFWin::IButton::SetButtonGroupID(unsigned long groupID) pure virtual

Color UTFWin::IButton::GetCaptionColor(StateIndices index) pure virtual

void UTFWin::IButton::SetCaptionColor(StateIndices index, Color& color) pure virtual

void UTFWin::IButton::GetCaptionBorders(struct Borders& dst) pure virtual

void UTFWin::IButton::SetCaptionBorders(struct Borders& borders) pure virtual

void UTFWin::IButton::GetCaptionOffset(struct Point& dst) pure virtual

void UTFWin::IButton::SetCaptionOffset(struct Point& offset) pure virtual

void UTFWin::IButton::SetButtonDrawable(IButtonDrawable* drawable) pure virtual

IButtonDrawable* UTFWin::IButton::GetButtonDrawable() pure virtual

OutlineFormat& UTFWin::IButton::GetTextOutline() pure virtual

void UTFWin::IButton::SetTextOutline(OutlineFormat& format) pure virtual