RADLib
RADical C++ application framework
RADUi::MessageBoxModel Class Reference

Message box state model. More...

#include <RADWidgets.h>

+ Inheritance diagram for RADUi::MessageBoxModel:
+ Collaboration diagram for RADUi::MessageBoxModel:

Public Member Functions

void configure (std::string title, std::string text, MessageBoxIcon icon=MessageBoxIcon::Information)
 Sets title, text, and icon in one update. More...
 
const std::string & title () const
 Returns message box title. More...
 
const std::string & text () const
 Returns message body text. More...
 
MessageBoxIcon icon () const
 Returns message icon category. More...
 
bool isOpen () const
 Returns true when the message box should be visible. More...
 
void open ()
 Opens the message box. More...
 
void accept ()
 Accepts and closes the message box. More...
 
void reject ()
 Rejects and closes the message box. More...
 
- Public Member Functions inherited from RADCore::RADObject
 RADObject ()
 Creates a RADObject bound to the current thread. More...
 
virtual ~RADObject ()
 Disconnects tracked event links and releases lifetime token. More...
 
void registerLink (const ConnectionRecord &record)
 Registers a connection for cleanup when this object is destroyed. More...
 
std::thread::id threadId () const
 Returns the thread id this object is currently associated with. More...
 
EventLoopassociatedEventLoop () const
 Returns the associated event loop, if any. More...
 
ThreadAffinity threadAffinity () const
 Returns both thread id and associated loop atomically. More...
 
std::weak_ptr< void > lifetimeToken () const
 Returns a weak token used to drop queued callbacks after destruction. More...
 
void moveToThread (std::thread::id tId, EventLoop *loop=nullptr)
 Moves the object's affinity to tId and optional loop. More...
 

Public Attributes

RADCore::Event< void() > changed
 Raised when message box configuration or open state changes. More...
 
RADCore::Event< void(RADUi::DialogResult) > finished
 Raised when the message box accepts or rejects. More...
 

Detailed Description

Message box state model.

Member Function Documentation

◆ accept()

void RADUi::MessageBoxModel::accept ( )

Accepts and closes the message box.

◆ configure()

void RADUi::MessageBoxModel::configure ( std::string  title,
std::string  text,
MessageBoxIcon  icon = MessageBoxIcon::Information 
)

Sets title, text, and icon in one update.

◆ icon()

MessageBoxIcon RADUi::MessageBoxModel::icon ( ) const

Returns message icon category.

◆ isOpen()

bool RADUi::MessageBoxModel::isOpen ( ) const

Returns true when the message box should be visible.

◆ open()

void RADUi::MessageBoxModel::open ( )

Opens the message box.

◆ reject()

void RADUi::MessageBoxModel::reject ( )

Rejects and closes the message box.

◆ text()

const std::string& RADUi::MessageBoxModel::text ( ) const

Returns message body text.

◆ title()

const std::string& RADUi::MessageBoxModel::title ( ) const

Returns message box title.

Member Data Documentation

◆ changed

RADCore::Event<void () > RADUi::MessageBoxModel::changed

Raised when message box configuration or open state changes.

◆ finished

RADCore::Event<void (RADUi::DialogResult) > RADUi::MessageBoxModel::finished

Raised when the message box accepts or rejects.


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