rwlogo

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave 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)
 Constructor. 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: display

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 ( IlvSystemView  parent,
const char *  message,
IlvDialogStyle  style = IlvDialogStyleInformation,
IlvDialogCallback  ok = 0,
IlvDialogCallback  cancel = 0,
IlAny  userArg = 0 
)

Constructor.

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 ( )

Destructor.

The encapsulated widget is destroyed.

Member Function Documentation

void IlvInformationDialog::hide ( )

Hides the dialog from the screen.

The encapsulated system dialog box is not destroyed.

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.
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.
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.

© Copyright 2014, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.