ToyGine2 26.2.0
Game Engine for retro consoles
Loading...
Searching...
No Matches
toy::platform::ui Namespace Reference

Platform UI: orientation, window show state, window style flags, message box (icon, buttons, return value). More...

Enumerations

enum class  MessageBoxButtons {
  Ok , OkCancel , AbortRetryIgnore , YesNoCancel ,
  YesNo , RetryCancel , CancelTryContinue , OkHelp
}
 Which buttons to show on a message box or dialog. More...
enum class  MessageBoxIcon {
  None , Error , Question , Warning ,
  Information
}
 Icon shown in a message box or dialog. More...
enum class  MessageBoxReturn {
  Ok , Cancel , Abort , Retry ,
  Ignore , Yes , No , Close ,
  Help , TryAgain , Continue
}
 User choice when dismissing a message box or dialog. More...
enum class  Orientation : uint8_t {
  Landscape = 1 , Portrait = 2 , LandscapeFlipped = 4 , PortraitFlipped = 8 ,
  LandscapeAny = Landscape | LandscapeFlipped , PortraitAny = Portrait | PortraitFlipped , Any = LandscapeAny | PortraitAny
}
 Screen orientation for UI layout and device rotation. More...
enum class  WindowShowState : uint8_t { Hidden , Normal , Maximized , Minimized }
 Visibility and display state of a window. More...
enum class  WindowStyle : uint8_t {
  Simple = 0x00 , Close = 0x01 , MinMax = 0x02 , Popup = 0x04 ,
  TopMost = 0x08 , FullScreen = 0x10 , Resized = 0x20
}
 Bitmask flags for window decoration, modality, and display mode. More...

Detailed Description

Platform UI: orientation, window show state, window style flags, message box (icon, buttons, return value).

See also
toy::platform::ui::WindowShowState, toy::platform::ui::WindowStyle, toy::platform::ui::MessageBoxButtons

Enumeration Type Documentation

◆ MessageBoxButtons

Which buttons to show on a message box or dialog.

Platform APIs take a value to configure the button set. Exact layout and labels are platform-dependent; use for branching after showing a message box together with toy::platform::ui::MessageBoxReturn.

Enumerator
Ok 

Single OK button.

OkCancel 

OK and Cancel.

AbortRetryIgnore 

Abort, Retry, and Ignore.

YesNoCancel 

Yes, No, and Cancel.

YesNo 

Yes and No.

RetryCancel 

Retry and Cancel.

CancelTryContinue 

Cancel, Try Again, and Continue.

OkHelp 

OK and Help.

◆ MessageBoxIcon

Icon shown in a message box or dialog.

Used when displaying a native message box to indicate severity or kind of message. Exact appearance is platform-dependent.

Enumerator
None 

No icon.

Error 

Error icon (e.g. stop/critical).

Question 

Question icon (e.g. help/inquiry).

Warning 

Warning icon (e.g. caution).

Information 

Information icon (e.g. info).

◆ MessageBoxReturn

User choice when dismissing a message box or dialog.

Maps to common dialog button results (OK, Cancel, Yes/No, Abort/Retry/Ignore, etc.). Exact semantics are platform-dependent; use for branching after showing a message box.

Enumerator
Ok 

User confirmed (OK button).

Cancel 

User cancelled the dialog.

Abort 

User chose Abort (e.g. Abort/Retry/Ignore).

Retry 

User chose Retry.

Ignore 

User chose Ignore.

Yes 

User chose Yes.

No 

User chose No.

Close 

User closed the dialog (e.g. window close).

Help 

User requested help.

TryAgain 

User chose Try Again.

Continue 

User chose Continue.

◆ Orientation

enum class toy::platform::ui::Orientation : uint8_t
strong

Screen orientation for UI layout and device rotation.

Values use bit flags so they can be combined (e.g. to accept both landscape variants). Use toy::platform::ui::Orientation::LandscapeAny or toy::platform::ui::Orientation::PortraitAny when the rotation direction does not matter.

Enumerator
Landscape 

Landscape: width greater than height (normal).

Portrait 

Portrait: height greater than width (normal).

LandscapeFlipped 

Landscape rotated 180 degrees.

PortraitFlipped 

Portrait rotated 180 degrees.

LandscapeAny 

Either landscape variant.

PortraitAny 

Either portrait variant.

Any 

Any orientation.

◆ WindowShowState

enum class toy::platform::ui::WindowShowState : uint8_t
strong

Visibility and display state of a window.

Values are mutually exclusive. Typical use: pass to platform show-window APIs or store the result of a get-window-state query.

Enumerator
Hidden 

Window is not visible.

Normal 

Window is visible in normal (restored) size and position.

Maximized 

Window is visible and maximized (fills the work area or screen).

Minimized 

Window is visible but minimized (e.g. to taskbar or dock).

◆ WindowStyle

enum class toy::platform::ui::WindowStyle : uint8_t
strong

Bitmask flags for window decoration, modality, and display mode.

Values can be combined (e.g. Close | MinMax for a standard title bar). Used when creating or configuring platform windows.

See also
operator&, operator|, operator^
Enumerator
Simple 

No decoration (plain window).

Close 

Close button on title bar.

MinMax 

Minimize and maximize buttons.

Popup 

Popup/modal behavior.

TopMost 

Window stays above others.

FullScreen 

Full-screen mode.

Resized 

Window has been resized.