| GL Studio C++ Runtime API

Public Member Functions | List of all members
RuntimeMessageDialogs Class Reference

`#include <runtime_message_dialogs.h>`

Inheritance diagram for RuntimeMessageDialogs:

## Public Member Functions
virtual void | MsgBox (const char *s) override
virtual void | Error (const char *s) override
virtual int | Question (const char *s) override
virtual int | Choice (const char *b0, const char *b1, const char *b2, const char *s) override
virtual int | ChoiceWithDefault (const char *b0, const char *b1, const char *b2, const int defaultChoice, const char *s) override
Public Member Functions inherited from MessageDialogs
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 RuntimeMessageDialogs class. Implements message dialogs for the runtime.

## Member Function Documentation

## ◆ Choice()

virtual int Choice | ( | const char * | b0,
|  | const char * | b1,
|  | const char * | b2,
|  | const char * | s
| ) |  |
| override 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

  b0 | The label for button 0 (ESC is shortcut for this Right button).
  b1 | The label for button 1 (RET is shortcut for this Center button)
  b2 | The label for button 3 (left-most button).
  s | The text string to display.

Returns
  Equals 0 if b0 pressed, 1 if b1 pressed, 2 if b2 pressed.

Implements MessageDialogs.

## ◆ ChoiceWithDefault()

virtual int ChoiceWithDefault | ( | const char * | b0,
|  | const char * | b1,
|  | const char * | b2,
|  | const int | defaultChoice,
|  | const char * | s
| ) |  |
| override 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

  b0 | The label for button 0 (ESC is shortcut for this Right button).
  b1 | The label for button 1 (RET is shortcut for this Center button).
  b2 | The label for button 3 (left-most button).
  defaultChoice | The value returned when in command-line mode.
  s | The text string to display.

Returns
  Equals 0 if b0 pressed, 1 if b1 pressed, 2 if b2 pressed.

Implements MessageDialogs.

## ◆ Error()

virtual void Error | ( | const char * | s | ) |
| override 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

  s | The text string to display.

Implements MessageDialogs.

## ◆ MsgBox()

virtual void MsgBox | ( | const char * | s | ) |
| override 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

  s | The text string to display.

Implements MessageDialogs.

## ◆ Question()

virtual int Question | ( | const char * | s | ) |
| override 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

  s | The text string to display.

Returns
  Equals 1 if user pressed 'Yes', otherwise 0

Implements MessageDialogs.

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

- runtime_message_dialogs.h