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

Dialog class. More...

#include <ilviews/gadgets/idialog.h>

Inheritance diagram for IlvDialog:
IlvGadgetContainer IlvContainer IlvDrawingView IlvView IlvAbstractView IlvSystemPort IlvStylist IlvStylable IlvPort IlvValueInterface IlvColorSelector IlvFileChooser IlvFontSelector IlvGradientSelector IlvIFileSelector IlvIMessageDialog IlvIPromptString IlvPageMarginDialog IlvPostScriptPrinterDialog IlvPrinterPreviewDialog

Public Member Functions

 IlvDialog (IlvDisplay *display, const char *name, const char *title, const char *filename, const IlvRect *rect=0)
 Constructor. More...
 
 IlvDialog (IlvDisplay *display, const char *name, const char *title, const char *filename, IlUInt properties, const IlvRect *rect=0, IlvSystemView transientFor=0)
 Constructor. More...
 
 IlvDialog (IlvDisplay *display, const char *name, const char *title, const IlvRect &rect, IlUInt properties=0, IlvSystemView transientFor=0)
 Constructor. More...
 
virtual void apply ()
 Is called when the callback associated with the apply symbol is triggered. More...
 
virtual void cancel ()
 Is called when the callback associated with the cancel symbol is triggered. More...
 
virtual void wait (IlBoolean grab=IlFalse, IlvCursor *cursor=0)
 Displays a modal dialog. More...
 
IlBoolean wasCanceled () const
 Returns the status of the dialog after closing it. More...
 
- Public Member Functions inherited from IlvGadgetContainer
 IlvGadgetContainer (IlvAbstractView *parent, const IlvRect &rect, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue, const char *cssElementName="IlvGadgetContainer")
 Initializes a new instance of the IlvGadgetContainer class as a child view of another view. More...
 
 IlvGadgetContainer (IlvDisplay *display, const char *name, const char *title, const IlvRect &rect, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue, const char *cssElementName="IlvGadgetContainer")
 Initializes a new instance of the IlvGadgetContainer class as a top view. More...
 
 IlvGadgetContainer (IlvDisplay *display, const char *name, const char *title, const IlvRect &rect, IlUInt properties, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue, IlvSystemView transientFor=0, const char *cssElementName="IlvGadgetContainer")
 Initializes a new instance of the IlvGadgetContainer class as a top view. More...
 
 IlvGadgetContainer (IlvDisplay *display, IlvSystemView parent, const IlvRect &rect, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue, const char *cssElementName="IlvGadgetContainer")
 Initializes a new instance of the IlvGadgetContainer class as a child view of a system view. More...
 
 IlvGadgetContainer (IlvDisplay *display, IlvSystemView window, IlBoolean useacc=IlFalse, const char *cssElementName="IlvGadgetContainer")
 Initializes a new instance of the IlvGadgetContainer class using an existing system view. More...
 
virtual IlBoolean allowFocus (IlBoolean value)
 Specifies whether the container manages the focus. More...
 
virtual void applyResize (IlFloat sx, IlFloat sy, IlBoolean redraw=IlTrue)
 Is called to carry out the resize events applying to the gadget container. More...
 
IlBoolean autoResize (IlBoolean a)
 Sets the auto resize mode of the gadget container. More...
 
IlvButtongetDefaultButton () const
 Returns the default button of the gadget container. More...
 
virtual IlvGraphicgetFirstFocusGraphic () const
 Returns the first object that receives the focus in this container. More...
 
virtual IlvGraphicgetFocus () const
 Returns the object that has the keyboard focus in the gadget container. More...
 
virtual IlvGraphicgetGrab () const
 Returns the object that is currently grabbing events in the container. More...
 
virtual IlvGraphicgetLastFocusGraphic () const
 Returns the last object that receives the focus in this container. More...
 
virtual IlvLookFeelHandlergetLookFeelHandler () const
 Returns the look and feel handler associated with this container. More...
 
virtual IlvGraphicgetNextFocusGraphic (IlvGraphic *object) const
 Returns the next object that will receive the focus after the specified object. More...
 
IlvGraphicgetOverriddenFocus () const
 Returns the object that will receive the focus after calling setFocus(). More...
 
virtual IlvGraphicgetPreviousFocusGraphic (IlvGraphic *object) const
 Returns the previous object that received the focus before the specified object. More...
 
IlBoolean isAutoResizing () const
 Indicates whether the gadget container gets resized when loading a file. More...
 
virtual IlBoolean isFocusAllowed () const
 Indicates whether the focus is allowed in the container. More...
 
virtual void moveFocusAfter (IlBoolean redraw=IlTrue)
 Is called to find the next focusable object. More...
 
virtual void moveFocusBefore (IlBoolean redraw=IlTrue)
 Is called to find the previous focusable object. More...
 
void overrideFocus (IlvGraphic *obj)
 Sets the object that will receive the focus after calling setFocus(). More...
 
virtual void removeGrab ()
 Cancels the grabbing settings defined with setGrab(). More...
 
void setDefaultButton (IlvButton *button, IlBoolean redraw=IlTrue)
 Sets the default button of the gadget container. More...
 
virtual void setFocus (IlvGraphic *graphic=0, IlBoolean redraw=IlTrue)
 Sets the focus to the specified object of the gadget container. More...
 
virtual void setGrab (IlvGraphic *object)
 Sets the specified object as the grabbing object. More...
 
virtual void setLookFeelHandler (IlvLookFeelHandler *lfh)
 Sets the look and feel handler of this container. More...
 

Detailed Description

Dialog class.

Library: ilvgadgt

The IlvDialog class is a predefined gadget container with two predefined callbacks: apply and cancel.

See also
IlvIMessageDialog, IlvColorSelector, IlvFontSelector, IlvIFileSelector, IlvIPromptString

Constructor & Destructor Documentation

◆ IlvDialog() [1/3]

IlvDialog::IlvDialog ( IlvDisplay display,
const char *  name,
const char *  title,
const IlvRect rect,
IlUInt  properties = 0,
IlvSystemView  transientFor = 0 
)

Constructor.

Initializes a new instance of the IlvDialog class as a top view.

Parameters
displayThe connection to the display.
nameThe name of the dialog.
titleThe title of the dialog.
rectThe size and position of the dialog.
propertiesThe properties of the dialog. See the IlvView constructors for more details.
transientForA system view for which the dialog is transient. See the IlvView constructors for more details.

◆ IlvDialog() [2/3]

IlvDialog::IlvDialog ( IlvDisplay display,
const char *  name,
const char *  title,
const char *  filename,
const IlvRect rect = 0 
)

Constructor.

Initializes a new instance of the IlvDialog class as a top view, and reads the file specified by filename.

Parameters
displayThe connection to the display.
nameThe name of the dialog.
titleThe title of the dialog.
filenameThe name of the file to be read.
rectThe size and position of the dialog. If this parameter is not provided, the size used is the one found in the file read.

◆ IlvDialog() [3/3]

IlvDialog::IlvDialog ( IlvDisplay display,
const char *  name,
const char *  title,
const char *  filename,
IlUInt  properties,
const IlvRect rect = 0,
IlvSystemView  transientFor = 0 
)

Constructor.

Initializes a new instance of the IlvDialog class as a top view.

Parameters
displayThe connection to the display.
nameThe name of the dialog.
titleThe title of the dialog.
filenameThe name of the file to be read.
propertiesThe properties of the dialog. See the IlvView constructors for more details.
rectThe size and position of the dialog. If this parameter is not provided, the size used is the one found in the file read.
transientForA system view for which the dialog is transient. See the IlvView constructors for more details.

Member Function Documentation

◆ apply()

virtual void IlvDialog::apply ( )
virtual

Is called when the callback associated with the apply symbol is triggered.

Sets this object so that wasCanceled returns IlFalse, then hides the dialog box.

See also
cancel, wasCanceled

Reimplemented in IlvIFileSelector.

◆ cancel()

virtual void IlvDialog::cancel ( )
virtual

Is called when the callback associated with the cancel symbol is triggered.

Sets this object so that wasCanceled returns IlTrue, then hides the dialog box.

◆ wait()

virtual void IlvDialog::wait ( IlBoolean  grab = IlFalse,
IlvCursor cursor = 0 
)
virtual

Displays a modal dialog.

This method is used to implement modal and preemptive dialogs. It basically calls the IlvView method showModal(grab, cursor), which calls show and enters a modal event loop. If an event player (IlvEventPlayer) is active, it tries to use it as a source of events. This method is often used by subclasses of IlvDialog to implement a method that returns a value from the user.

Parameters
grabA Boolean value specifying whether the dialog should be system modal, that is, it grabs input events on the whole system so that, until the function returns, other applications will not be able to get any keyboard or mouse event. In this case, you can specify a cursor to be displayed in through cursor. If grab is set to IlFalse(default), the dialog is application modal, that is, the application does not receive input events in other windows.
cursorThe cursor that will be used when the dialog is system modal.

◆ wasCanceled()

IlBoolean IlvDialog::wasCanceled ( ) const

Returns the status of the dialog after closing it.

Returns
IlTrue if the dialog has disappeared by calling the cancel method, or IlFalse if the dialog box has disappeared by calling the apply.
See also
apply, cancel