SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
SDL::MessageBox Struct Reference

MessageBox structure containing title, text, window, etc. More...

Inheritance diagram for SDL::MessageBox:
[legend]

Public Member Functions

constexpr MessageBox (const MessageBoxRaw &messageBox={}) noexcept
 Wraps MessageBox.
 MessageBox (MessageBoxFlags flags, WindowRef window, const char *title, const char *message, std::span< const MessageBoxButtonData > buttons, OptionalRef< const MessageBoxColorScheme > colorScheme) noexcept
 Constructs from its fields.
constexpr MessageBoxFlags GetFlags () const noexcept
 Get the flags.
constexpr MessageBoxSetFlags (MessageBoxFlags newFlags) noexcept
 Set the flags.
WindowRef GetWindow () const noexcept
 Get the window.
MessageBoxSetWindow (WindowRef newWindow) noexcept
 Set the window.
constexpr const char * GetTitle () const noexcept
 Get the title.
constexpr MessageBoxSetTitle (const char *newTitle) noexcept
 Set the title.
constexpr const char * GetMessage () const noexcept
 Get the message.
constexpr MessageBoxSetMessage (const char *newMessage) noexcept
 Set the message.
constexpr int GetNumbuttons () const noexcept
 Get the numbuttons.
constexpr MessageBoxSetNumbuttons (int newNumbuttons) noexcept
 Set the numbuttons.
constexpr std::span< const MessageBoxButtonDataGetButtons () const noexcept
 Get the buttons.
constexpr MessageBoxSetButtons (std::span< const MessageBoxButtonData > newButtons) noexcept
 Set the buttons.
constexpr const MessageBoxColorSchemeGetColorScheme () const noexcept
 Get the colorScheme.
constexpr MessageBoxSetColorScheme (OptionalRef< const MessageBoxColorScheme > newColorScheme) noexcept
 Set the colorScheme.
void Show (int *buttonid) const
 Create a modal message box.

Detailed Description

MessageBox structure containing title, text, window, etc.

Since
This struct is available since SDL 3.2.0.

Constructor & Destructor Documentation

◆ MessageBox() [1/2]

SDL::MessageBox::MessageBox ( const MessageBoxRaw & messageBox = {})
inlineconstexprnoexcept

Wraps MessageBox.

Parameters
messageBoxthe value to be wrapped

◆ MessageBox() [2/2]

SDL::MessageBox::MessageBox ( MessageBoxFlags flags,
WindowRef window,
const char * title,
const char * message,
std::span< const MessageBoxButtonData > buttons,
OptionalRef< const MessageBoxColorScheme > colorScheme )
inlinenoexcept

Constructs from its fields.

Parameters
flagsthe value for flags.
windowthe value for window.
titlethe value for title.
messagethe value for message.
buttonsthe value for buttons.
colorSchemethe value for colorScheme.

Member Function Documentation

◆ GetButtons()

std::span< const MessageBoxButtonData > SDL::MessageBox::GetButtons ( ) const
inlineconstexprnoexcept

Get the buttons.

Returns
current buttons.

◆ GetColorScheme()

const MessageBoxColorScheme * SDL::MessageBox::GetColorScheme ( ) const
inlineconstexprnoexcept

Get the colorScheme.

Returns
current colorScheme value.

◆ GetFlags()

MessageBoxFlags SDL::MessageBox::GetFlags ( ) const
inlineconstexprnoexcept

Get the flags.

Returns
current flags value.

◆ GetMessage()

const char * SDL::MessageBox::GetMessage ( ) const
inlineconstexprnoexcept

Get the message.

Returns
current message value.

◆ GetNumbuttons()

int SDL::MessageBox::GetNumbuttons ( ) const
inlineconstexprnoexcept

Get the numbuttons.

Returns
current numbuttons value.

◆ GetTitle()

const char * SDL::MessageBox::GetTitle ( ) const
inlineconstexprnoexcept

Get the title.

Returns
current title value.

◆ GetWindow()

WindowRef SDL::MessageBox::GetWindow ( ) const
inlinenoexcept

Get the window.

Returns
current window value.

◆ SetButtons()

MessageBox & SDL::MessageBox::SetButtons ( std::span< const MessageBoxButtonData > newButtons)
inlineconstexprnoexcept

Set the buttons.

Parameters
newButtonsthe new buttons value.
Returns
Reference to self.

◆ SetColorScheme()

MessageBox & SDL::MessageBox::SetColorScheme ( OptionalRef< const MessageBoxColorScheme > newColorScheme)
inlineconstexprnoexcept

Set the colorScheme.

Parameters
newColorSchemethe new colorScheme value.
Returns
Reference to self.

◆ SetFlags()

MessageBox & SDL::MessageBox::SetFlags ( MessageBoxFlags newFlags)
inlineconstexprnoexcept

Set the flags.

Parameters
newFlagsthe new flags value.
Returns
Reference to self.

◆ SetMessage()

MessageBox & SDL::MessageBox::SetMessage ( const char * newMessage)
inlineconstexprnoexcept

Set the message.

Parameters
newMessagethe new message value.
Returns
Reference to self.

◆ SetNumbuttons()

MessageBox & SDL::MessageBox::SetNumbuttons ( int newNumbuttons)
inlineconstexprnoexcept

Set the numbuttons.

Parameters
newNumbuttonsthe new numbuttons value.
Returns
Reference to self.

◆ SetTitle()

MessageBox & SDL::MessageBox::SetTitle ( const char * newTitle)
inlineconstexprnoexcept

Set the title.

Parameters
newTitlethe new title value.
Returns
Reference to self.

◆ SetWindow()

MessageBox & SDL::MessageBox::SetWindow ( WindowRef newWindow)
inlinenoexcept

Set the window.

Parameters
newWindowthe new window value.
Returns
Reference to self.

The documentation for this struct was generated from the following file: