SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SDL::MessageBox Struct Reference

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

Inheritance diagram for SDL::MessageBox:
Inheritance graph
[legend]
Collaboration diagram for SDL::MessageBox:
Collaboration graph
[legend]

Public Member Functions

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

Detailed Description

Since
This struct is available since SDL 3.2.0.

Constructor & Destructor Documentation

◆ MessageBox() [1/2]

constexpr SDL::MessageBox::MessageBox ( const MessageBoxRaw messageBox = {})
inlineconstexprnoexcept
Parameters
messageBoxthe value to be wrapped

◆ MessageBox() [2/2]

constexpr SDL::MessageBox::MessageBox ( MessageBoxFlags  flags,
WindowParam  window,
const char *  title,
const char *  message,
std::span< const MessageBoxButtonData buttons,
OptionalRef< const MessageBoxColorScheme colorScheme 
)
inlineconstexprnoexcept
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()

constexpr std::span< const MessageBoxButtonData > SDL::MessageBox::GetButtons ( ) const
inlineconstexprnoexcept
Returns
current buttons.

◆ GetColorScheme()

constexpr const MessageBoxColorScheme * SDL::MessageBox::GetColorScheme ( ) const
inlineconstexprnoexcept
Returns
current colorScheme value.

◆ GetFlags()

constexpr MessageBoxFlags SDL::MessageBox::GetFlags ( ) const
inlineconstexprnoexcept
Returns
current flags value.

◆ GetMessage()

constexpr const char * SDL::MessageBox::GetMessage ( ) const
inlineconstexprnoexcept
Returns
current message value.

◆ GetNumbuttons()

constexpr int SDL::MessageBox::GetNumbuttons ( ) const
inlineconstexprnoexcept
Returns
current numbuttons value.

◆ GetTitle()

constexpr const char * SDL::MessageBox::GetTitle ( ) const
inlineconstexprnoexcept
Returns
current title value.

◆ GetWindow()

constexpr WindowRef SDL::MessageBox::GetWindow ( ) const
inlineconstexprnoexcept
Returns
current window value.

◆ SetButtons()

constexpr MessageBox & SDL::MessageBox::SetButtons ( std::span< const MessageBoxButtonData newButtons)
inlineconstexprnoexcept
Parameters
newButtonsthe new buttons value.
Returns
Reference to self.

◆ SetColorScheme()

constexpr MessageBox & SDL::MessageBox::SetColorScheme ( OptionalRef< const MessageBoxColorScheme newColorScheme)
inlineconstexprnoexcept
Parameters
newColorSchemethe new colorScheme value.
Returns
Reference to self.

◆ SetFlags()

constexpr MessageBox & SDL::MessageBox::SetFlags ( MessageBoxFlags  newFlags)
inlineconstexprnoexcept
Parameters
newFlagsthe new flags value.
Returns
Reference to self.

◆ SetMessage()

constexpr MessageBox & SDL::MessageBox::SetMessage ( const char *  newMessage)
inlineconstexprnoexcept
Parameters
newMessagethe new message value.
Returns
Reference to self.

◆ SetNumbuttons()

constexpr MessageBox & SDL::MessageBox::SetNumbuttons ( int  newNumbuttons)
inlineconstexprnoexcept
Parameters
newNumbuttonsthe new numbuttons value.
Returns
Reference to self.

◆ SetTitle()

constexpr MessageBox & SDL::MessageBox::SetTitle ( const char *  newTitle)
inlineconstexprnoexcept
Parameters
newTitlethe new title value.
Returns
Reference to self.

◆ SetWindow()

constexpr MessageBox & SDL::MessageBox::SetWindow ( WindowParam  newWindow)
inlineconstexprnoexcept
Parameters
newWindowthe new window value.
Returns
Reference to self.

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