rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvIMessageDialog Class Reference

Dialog class. More...

#include <ilviews/gadgets/stdialog.h>

Inheritance diagram for IlvIMessageDialog:
IlvDialog IlvGadgetContainer IlvContainer IlvDrawingView IlvView IlvAbstractView IlvSystemPort IlvPort IlvIErrorDialog IlvIInformationDialog IlvIQuestionDialog IlvIWarner

List of all members.

Public Member Functions

 IlvIMessageDialog (IlvDisplay *display, const char *const *strings, IlUShort count, IlBoolean copy=IlTrue, const char *fileordata=0, IlvIDialogType type=IlvDialogOkCancel, IlvSystemView transientFor=0)
 Constructor.
 IlvIMessageDialog (IlvDisplay *display, const char *string, const char *fileordata=0, IlvIDialogType type=IlvDialogOkCancel, IlvSystemView transientFor=0)
 Constructor.
IlBoolean get (IlBoolean grab=IlFalse, IlvCursor *cursor=0)
 Displays the dialog as a modal dialog.
IlBoolean getResult ()
 Returns a Boolean value indicating whether the user clicked on Apply or Cancel in the dialog.
void setString (const char *const *strings, IlUShort count, IlBoolean copy=IlTrue)
 Sets a message with multiple lines to the dialog.
void setString (const char *string)
 Sets a message with a single line to the dialog.

Detailed Description

Dialog class.

Library: ilvgadgt

The IlvIMessageDialog class asks the user a question and expects a yes or no answer. IlvIMessageDialog has predefined subclasses for questions (IlvIQuestionDialog), warnings (IlvIWarner), errors (IlvIErrorDialog), and information (IlvIInformationDialog). The names of the graphic object are displayed to let you modify the default look of the dialog box.

IlvIMessageDialoga.gif


- A Message Dialog -

See also:
IlvIQuestionDialog, IlvIInformationDialog, IlvIErrorDialog, IlvIWarner.


Constructor & Destructor Documentation

IlvIMessageDialog::IlvIMessageDialog ( IlvDisplay display,
const char *  string,
const char *  fileordata = 0,
IlvIDialogType  type = IlvDialogOkCancel,
IlvSystemView  transientFor = 0 
)

Constructor.

Initializes a new instance of the IlvIMessageDialog class that initially displays a message with a single line.

Parameters:
display The connection to the display.
string The message to be displayed.
fileordata Specifies an alternative source of Rogue Wave Views data defining the user interface of this dialog. This data can be stored in a file, in which case fileordata represents the name of the file, or in a C++ string, in which case fileordata stands for the string itself. If fileordata is not specified, the default dialog is used.
type The type of the dialog. For details,see IlvIDialogType.
transientFor A system view for which the dialog is transient. For details,see the IlvView constructors.
IlvIMessageDialog::IlvIMessageDialog ( IlvDisplay display,
const char *const *  strings,
IlUShort  count,
IlBoolean  copy = IlTrue,
const char *  fileordata = 0,
IlvIDialogType  type = IlvDialogOkCancel,
IlvSystemView  transientFor = 0 
)

Constructor.

Initializes a new instance of the IlvIMessageDialog class that initially displays a message with multiple lines.

Parameters:
display The connection to the display.
strings An array of strings representing the message to be displayed.
count The number of elements in the strings array.
copy Not used.
fileordata Specifies an alternative source of Rogue Wave Views data defining the user interface of this dialog. This data can be stored in a file, in which case fileordata represents the name of the file, or in a C++ string, in which case fileordata stands for the string itself. If fileordata is not specified, the default dialog is used.
type The type of the dialog. For details, see IlvIDialogType.
transientFor The system view for which the dialog is transient. For details, see the IlvView constructors.

Member Function Documentation

IlBoolean IlvIMessageDialog::get ( IlBoolean  grab = IlFalse,
IlvCursor cursor = 0 
)

Displays the dialog as a modal dialog.

Parameters:
grab A Boolean value specifying whether the dialog should be system modal. A system modal dialog grabs input events occurring on the entire system so that other applications are not able to catch any keyboard or mouse event until the member function returns. In this case, you can specify the cursor to be used with the cursor parameter. If grab is set to IlFalse (the default), the dialog is application modal, which means that the application does not receive input events in other windows.
Warning:
[note] Some operating systems, such as Windows NT and Windows 95, do not allow system modal dialogs. On these operating system dialogs are always application modal.
Parameters:
cursor The cursor used to make the selection.
Returns:
The result. See IlvIMessageDialog::getResult.
See also:
getResult
IlBoolean IlvIMessageDialog::getResult (  ) 

Returns a Boolean value indicating whether the user clicked on Apply or Cancel in the dialog.

Returns:
IlTrue if the dialog was closed by calling the IlvDialog::apply method, or IlFalse if the dialog was closed by calling the IlvDialog::cancel method.
See also:
IlvDialog::wasCanceled, get
void IlvIMessageDialog::setString ( const char *const *  strings,
IlUShort  count,
IlBoolean  copy = IlTrue 
)

Sets a message with multiple lines to the dialog.

The dialog is resized to fit the size of the new message.

Parameters:
strings An array of strings representing the message to be displayed.
count The number of elements in the strings array. param copy Not used.
See also:
setString(const char*)
void IlvIMessageDialog::setString ( const char *  string  ) 

Sets a message with a single line to the dialog.

The dialog is resized to fit the size of the new message.

Parameters:
string The new message displayed by the dialog.
See also:
setString(const char* const*, IlUShort, IlBoolean)
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, 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.