Views
Foundation Package API Reference Guide
Product Documentation:
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)
 Initializes a new IlvQuestionDialog instance. 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::IlvQuestionDialog ( IlvSystemView  parent,
const char *  message 
)

Initializes a new IlvQuestionDialog instance.

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::~IlvQuestionDialog ( )

Destructor.

The encapsulated widget is destroyed.

Member Function Documentation

◆ setTitle()

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.

◆ show() [1/2]

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.

◆ show() [2/2]

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.