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={})
 Wraps MessageBox. More...
 
constexpr MessageBox (MessageBoxFlags flags, WindowRef window, const char *title, const char *message, std::span< const MessageBoxButtonData > buttons, OptionalRef< const MessageBoxColorScheme > colorScheme)
 Constructs from its fields. More...
 
constexpr SDL_MessageBoxFlags GetFlags () const
 Get the flags. More...
 
constexpr MessageBoxSetFlags (SDL_MessageBoxFlags newFlags)
 Set the flags. More...
 
constexpr SDL_Window * GetWindow () const
 Get the window. More...
 
constexpr MessageBoxSetWindow (SDL_Window *newWindow)
 Set the window. More...
 
constexpr const char * GetTitle () const
 Get the title. More...
 
constexpr MessageBoxSetTitle (const char *newTitle)
 Set the title. More...
 
constexpr const char * GetMessage () const
 Get the message. More...
 
constexpr MessageBoxSetMessage (const char *newMessage)
 Set the message. More...
 
constexpr int GetNumbuttons () const
 Get the numbuttons. More...
 
constexpr MessageBoxSetNumbuttons (int newNumbuttons)
 Set the numbuttons. More...
 
constexpr std::span< const MessageBoxButtonDataGetButtons () const
 Get the buttons. More...
 
constexpr MessageBoxSetButtons (std::span< const MessageBoxButtonData > newButtons)
 Set the buttons. More...
 
constexpr const MessageBoxColorSchemeGetColorScheme () const
 Get the colorScheme. More...
 
constexpr MessageBoxSetColorScheme (OptionalRef< const MessageBoxColorScheme > newColorScheme)
 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 = {})
inlineconstexpr
Parameters
messageBoxthe value to be wrapped

◆ MessageBox() [2/2]

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

◆ GetColorScheme()

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

◆ GetFlags()

constexpr SDL_MessageBoxFlags SDL::MessageBox::GetFlags ( ) const
inlineconstexpr
Returns
current flags value.

◆ GetMessage()

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

◆ GetNumbuttons()

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

◆ GetTitle()

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

◆ GetWindow()

constexpr SDL_Window * SDL::MessageBox::GetWindow ( ) const
inlineconstexpr
Returns
current window value.

◆ SetButtons()

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

◆ SetColorScheme()

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

◆ SetFlags()

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

◆ SetMessage()

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

◆ SetNumbuttons()

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

◆ SetTitle()

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

◆ SetWindow()

constexpr MessageBox & SDL::MessageBox::SetWindow ( SDL_Window *  newWindow)
inlineconstexpr
Parameters
newWindowthe new window value.
Returns
Reference to self.

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