Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvQuestionDialog Class Reference

A system dialog box that asks a question. More...

#include <ilviews/util/dialogs.h>

Public Member Functions

 IlvQuestionDialog (IlvSystemView parent, const char *message)
 Constructor. More...
 
 ~IlvQuestionDialog ()
 Destructor. More...
 
void setTitle (const char *title)
 Sets the dialog's title. More...
 
IlBoolean show ()
 Displays the dialog. More...
 
IlBoolean show (IlvPos x, IlvPos y)
 Displays the dialog at a given location. More...
 

Detailed Description

A system dialog box that asks a question.

Library: xviews or winviews or mviews (mutually exclusive)

This class builds a system dialog box that allows the user to respond yes or no to a question.


- An IlvQuestionDialog on a Windows platform -

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 IlvIQuestionDialog; this dialog box class is built on Rogue Wave Views gadgets only and does not depend on the system toolkit.

See also
IlvIQuestionDialog, IlvInformationDialog, IlvPromptDialog.

Constructor & Destructor Documentation

IlvQuestionDialog::IlvQuestionDialog ( IlvSystemView  parent,
const char *  message 
)

Constructor.

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.
messageThe message that is displayed in the dialog.
IlvQuestionDialog::~IlvQuestionDialog ( )

Destructor.

The encapsulated widget is destroyed.

Member Function Documentation

void IlvQuestionDialog::setTitle ( const char *  title)

Sets the dialog's title.

The default title is "IlogViews". Use this method to change this to whatever you need.

Parameters
titleThe new title of this dialog. The string is copied.
IlBoolean IlvQuestionDialog::show ( )

Displays the dialog.

Pops the dialog box and waits until the user presses one of the two buttons that close it.

Returns
IlTrue if the user has closed the dialog box providing a positive answer, and IlFalse if the user has pressed the button that corresponds to a negative answer.
IlBoolean IlvQuestionDialog::show ( IlvPos  x,
IlvPos  y 
)

Displays the dialog at a given location.

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.
Returns
IlTrue if the user has closed the dialog box providing a positive answer, and IlFalse if the user has pressed the button that corresponds to a negative answer.

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