GL Studio C++ Runtime API
MessageDialogs Class Referenceabstract

#include <message_dialogs.h>

Inheritance diagram for MessageDialogs:
RuntimeMessageDialogs

Public Member Functions

void EnableDialogs (bool value)
 
bool AreDialogsEnabled () const
 
virtual void MsgBox (const char *s)=0
 
virtual void Error (const char *s)=0
 
virtual int Question (const char *s)=0
 
virtual int Choice (const char *b0, const char *b1, const char *b2, const char *s)=0
 
virtual int ChoiceWithDefault (const char *b0, const char *b1, const char *b2, const int defaultChoice, const char *s)=0
 

Detailed Description

The MessageDialogs class. Runtime support for messagebox popups via FLTK.

Member Function Documentation

◆ AreDialogsEnabled()

bool AreDialogsEnabled ( ) const
inline
Returns
Whether or not dialogs are enabled.

◆ Choice()

virtual int Choice ( const char *  b0,
const char *  b1,
const char *  b2,
const char *  s 
)
pure virtual

Creates and shows a pop-up dialog box and displays a text string and up to (3) buttons labeled according to the last three input parameters. To hide any of the buttons, pass a NULL string to the corresponding param. A question icon is displayed.

Parameters
b0The label for button 0 (ESC is shortcut for this Right button).
b1The label for button 1 (RET is shortcut for this Center button)
b2The label for button 3 (left-most button).
sThe text string to display.
Returns
Equals 0 if b0 pressed, 1 if b1 pressed, 2 if b2 pressed.

Implemented in RuntimeMessageDialogs.

◆ ChoiceWithDefault()

virtual int ChoiceWithDefault ( const char *  b0,
const char *  b1,
const char *  b2,
const int  defaultChoice,
const char *  s 
)
pure virtual

Creates and shows a pop-up dialog box and displays a text string and up to (3) buttons labeled according to the last three input parameters. To hide any of the buttons, pass a NULL string to the corresponding param. A question icon is displayed.

Parameters
b0The label for button 0 (ESC is shortcut for this Right button).
b1The label for button 1 (RET is shortcut for this Center button).
b2The label for button 3 (left-most button).
defaultChoiceThe value returned when in command-line mode.
sThe text string to display.
Returns
Equals 0 if b0 pressed, 1 if b1 pressed, 2 if b2 pressed.

Implemented in RuntimeMessageDialogs.

◆ EnableDialogs()

void EnableDialogs ( bool  value)
inline

Suppresses popup messages when false, defaults to true.

Parameters
valueThe new popup suppression flag to set.

◆ Error()

virtual void Error ( const char *  s)
pure virtual

Creates and shows a pop-up dialog box and displays a text string and (1) button labeled 'OK'. An exclamation icon is displayed.

Parameters
sThe text string to display.

Implemented in RuntimeMessageDialogs.

◆ MsgBox()

virtual void MsgBox ( const char *  s)
pure virtual

Creates and shows a pop-up dialog box and displays a text string and (1) button labeled 'OK'. An 'i' (information) icon is displayed.

Parameters
sThe text string to display.

Implemented in RuntimeMessageDialogs.

◆ Question()

virtual int Question ( const char *  s)
pure virtual

Creates and shows a pop-up dialog box and displays a text string and (2) buttons labeled 'Yes' and 'No'. A question mark icon is displayed.

Parameters
sThe text string to display.
Returns
Equals 1 if user pressed 'Yes', otherwise 0

Implemented in RuntimeMessageDialogs.


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