Views
Foundation Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IlvInformationDialog Class Reference

System dialog box class. More...

#include <ilviews/util/dialogs.h>

Public Member Functions

 IlvInformationDialog (IlvSystemView parent, const char *message, IlvDialogStyle style=IlvDialogStyleInformation, IlvDialogCallback ok=0, IlvDialogCallback cancel=0, IlAny userArg=0)
 Initializes a new IlvInformationDialog instance. More...
 
 ~IlvInformationDialog ()
 Destructor. More...
 
void hide ()
 Hides the dialog from the screen. More...
 
void setTitle (const char *title)
 Sets the dialog's title. More...
 
void show (IlBoolean blocking=IlTrue)
 Displays the dialog. More...
 
void show (IlvPos x, IlvPos y, IlBoolean blocking=IlTrue)
 Displays the dialog at a given position. More...
 

Detailed Description

System dialog box class.

Library: xviews or winviews or mviews (mutually exclusive)

This class encapsulates a system dialog box to display questions, information, or warnings.

This class is dependent on the standard toolkit used in conjunction with Rogue Wave Views. It can be used only if you link your final application with the system toolkit supported by Rogue Wave Views (on Unix platforms, you must use the library libmviews instead of libxviews and link with the Motif library). If you do not want to use these libraries, you can use one of the dialog box classes (IlvIMessageDialog, IlvIQuestionDialog, IlvIInformationDialog, IlvIErrorDialog or IlvIWarner); these classes are based on Rogue Wave Views gadgets only and do not depend on the system toolkit.

See also
IlvPromptDialog.

Constructor & Destructor Documentation

◆ IlvInformationDialog()

IlvInformationDialog::IlvInformationDialog ( IlvSystemView  parent,
const char *  message,
IlvDialogStyle  style = IlvDialogStyleInformation,
IlvDialogCallback  ok = 0,
IlvDialogCallback  cancel = 0,
IlAny  userArg = 0 
)

Initializes a new IlvInformationDialog instance.

Two callbacks can be set to react to the answer of the user.

Parameters
parentThe system view (that you usually get by calling the method IlvAbstractView::getSystemView of an existing view) for which this dialog is created.

The dialog, when displayed, is transient for this view.

Parameters
messageThe message that is displayed next to the icon.
styleThe type of dialog that is created (see the different available styles in the documentation of the type IlvDialogStyle).
okThe function that is called when the user chooses the OK button. This can be left unspecified or set to 0 if you do not need any specific callback.
cancelThe function that is called when the user chooses the Cancel button. This can be left unspecified or set to 0 if you do not need any specific callback.
userArgA user-defined parameter that is sent to the ok and cancel callbacks.

◆ ~IlvInformationDialog()

IlvInformationDialog::~IlvInformationDialog ( )

Destructor.

The encapsulated widget is destroyed.

Member Function Documentation

◆ hide()

void IlvInformationDialog::hide ( )

Hides the dialog from the screen.

The encapsulated system dialog box is not destroyed.

◆ setTitle()

void IlvInformationDialog::setTitle ( const char *  title)

Sets the dialog's title.

The default title is "IlogViews". Use this method to change it.

Parameters
titleThe new title of this dialog. The string is copied.

◆ show() [1/2]

void IlvInformationDialog::show ( IlBoolean  blocking = IlTrue)

Displays the dialog.

Pops the dialog box on the screen and waits until the user has pressed the OK or the Cancel button.

Parameters
blockingCan be set to IlFalse if you do not want this dialog to be blocking (that is, the call to show() returns immediately, without waiting for the user response).
Warning
The parameter blocking is meaningless in Windows. It is considered to be set to IlTrue no matter what you specify.

◆ show() [2/2]

void IlvInformationDialog::show ( IlvPos  x,
IlvPos  y,
IlBoolean  blocking = IlTrue 
)

Displays the dialog at a given position.

This member function is similar to show(), but you can specify the location of the dialog box.

Parameters
xThe x coordinate, relative to the upper-left corner of the screen, where the dialogs appears.
yThe y coordinate, relative to the upper-left corner of the screen, where the dialogs appears.
blockingCan be set to IlFalse if you do not want this dialog to be blocking (that is, the call to show() returns immediately, without waiting for the user response).
Warning
The parameter blocking is meaningless in Windows. It is considered to be set to IlTrue no matter what you specify.