rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvGadgetContainer Class Reference

View container class. More...

#include <ilviews/gadgets/gadcont.h>

Inheritance diagram for IlvGadgetContainer:
IlvContainer IlvDrawingView IlvView IlvAbstractView IlvSystemPort IlvPort IlvDialog IlvPanedContainer IlvScrolledView IlvViewFrame IlvColorSelector IlvFileChooser IlvFontSelector IlvGradientSelector IlvIFileSelector IlvIMessageDialog IlvIPromptString IlvPageMarginDialog IlvPostScriptPrinterDialog IlvPrinterPreviewDialog IlvDockableContainer

List of all members.

Public Member Functions

 IlvGadgetContainer (IlvDisplay *display, IlvSystemView window, IlBoolean useacc=IlFalse)
 Constructor.
 IlvGadgetContainer (IlvDisplay *display, IlvSystemView parent, const IlvRect &rect, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue)
 Constructor.
 IlvGadgetContainer (IlvAbstractView *parent, const IlvRect &rect, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue)
 Constructor.
 IlvGadgetContainer (IlvDisplay *display, const char *name, const char *title, const IlvRect &rect, IlUInt properties, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue, IlvSystemView transientFor=0)
 Constructor.
 IlvGadgetContainer (IlvDisplay *display, const char *name, const char *title, const IlvRect &rect, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue)
 Constructor.
virtual IlBoolean allowFocus (IlBoolean value)
 Specifies whether the container manages the focus.
virtual void applyResize (IlFloat sx, IlFloat sy, IlBoolean redraw=IlTrue)
 Is called to carry out the resize events applying to the gadget container.
IlBoolean autoResize (IlBoolean a)
 Sets the auto resize mode of the gadget container.
IlvButtongetDefaultButton () const
 Returns the default button of the gadget container.
virtual IlvGraphicgetFirstFocusGraphic () const
 Returns the first object that receives the focus in this container.
virtual IlvGraphicgetFocus () const
 Returns the object that has the keyboard focus in the gadget container.
virtual IlvGraphicgetGrab () const
 Returns the object that is currently grabbing events in the container.
virtual IlvGraphicgetLastFocusGraphic () const
 Returns the last object that receives the focus in this container.
IlvLookFeelHandlergetLookFeelHandler () const
 Returns the look and feel handler associated with this container.
virtual IlvGraphicgetNextFocusGraphic (IlvGraphic *object) const
 Returns the next object that will receive the focus after the specified object.
IlvGraphicgetOverriddenFocus () const
 Returns the object that will receive the focus after calling setFocus.
virtual IlvGraphicgetPreviousFocusGraphic (IlvGraphic *object) const
 Returns the previous object that received the focus before the specified object.
IlBoolean isAutoResizing () const
 Indicates whether the gadget container gets resized when loading a file.
virtual IlBoolean isFocusAllowed () const
 Indicates whether the focus is allowed in the container.
virtual void moveFocusAfter (IlBoolean redraw=IlTrue)
 Is called to find the next focusable object.
virtual void moveFocusBefore (IlBoolean redraw=IlTrue)
 Is called to find the previous focusable object.
void overrideFocus (IlvGraphic *obj)
 Sets the object that will receive the focus after calling setFocus.
virtual void removeGrab ()
 Cancels the grabbing settings defined with setGrab.
void setDefaultButton (IlvButton *, IlBoolean redraw=IlTrue)
 Sets the default button of the gadget container.
virtual void setFocus (IlvGraphic *graphic=0, IlBoolean redraw=IlTrue)
 Sets the focus to the specified object of the gadget container.
virtual void setGrab (IlvGraphic *object)
 Sets the specified object as the grabbing object.
void setLookFeelHandler (IlvLookFeelHandler *lfh)
 Sets the look and feel handler of this container.

Detailed Description

View container class.

Library: ilvgadgt

IlvGadgetContainer is a predefined subtype of the IlvContainer class used for storing, displaying, and manipulating gadgets. It has special member functions for handling the keyboard focus, the grabbing of an object (so that the object interactor attached to the grabbing object receives every event). This class also manages the attachments of objects to the container. The keyboard focus determines which gadget must receive keyboard events when the view gets the focus. The IlvGadgetContainer class features a keyboard navigation mechanism that lets the end user give the keyboard focus to any gadget by cycling through the list of objects using the Tab key (and sometimes the arrow keys). The IlvGadgetContainer class determines which gadget will be the next to get the keyboard focus at each step of keyboard navigation; the default algorithm is based on the geometry of the gadgets (from left to right and from top to bottom). The programmer can force the container to use a given order in keyboard navigation, that is, define its own focus chain.

See also:
IlvGadget, IlvDialog

Constructor & Destructor Documentation

IlvGadgetContainer::IlvGadgetContainer ( IlvDisplay display,
const char *  name,
const char *  title,
const IlvRect rect,
IlBoolean  useacc = IlFalse,
IlBoolean  visible = IlTrue 
)

Constructor.

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

Parameters:
display The connection to the display.
name The name of the gadget container.
title The title of the gadget container.
rect The size and position of the gadget container.
useacc A Boolean value specifying whether the gadget container should install the default keyboard accelerators.
visible A Boolean value specifying whether the gadget container should be visible.
IlvGadgetContainer::IlvGadgetContainer ( IlvDisplay display,
const char *  name,
const char *  title,
const IlvRect rect,
IlUInt  properties,
IlBoolean  useacc = IlFalse,
IlBoolean  visible = IlTrue,
IlvSystemView  transientFor = 0 
)

Constructor.

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

Parameters:
display The connection to the display.
name The name of the gadget container.
title The title of the gadget container.
rect The size and position of the gadget container.
properties The properties of the gadget container. For more details, see the IlvView constructors.
useacc A Boolean value specifying whether the gadget container should install the default keyboard accelerators.
visible A Boolean value specifying whether the gadget container should be visible.
transientFor A system view for which the gadget container is transient. For more details, see the IlvView constructors.
IlvGadgetContainer::IlvGadgetContainer ( IlvAbstractView parent,
const IlvRect rect,
IlBoolean  useacc = IlFalse,
IlBoolean  visible = IlTrue 
)

Constructor.

Initializes a new instance of the IlvGadgetContainer class as a child view of parent.

Parameters:
parent The parent view of the gadget container.
rect The size and position of the gadget container.
useacc A Boolean value specifying whether the gadget container should install the default keyboard accelerators.
visible A Boolean value specifying whether the gadget container should be visible.
IlvGadgetContainer::IlvGadgetContainer ( IlvDisplay display,
IlvSystemView  parent,
const IlvRect rect,
IlBoolean  useacc = IlFalse,
IlBoolean  visible = IlTrue 
)

Constructor.

Initializes a new instance of the IlvGadgetContainer class as a child view of the system view specified by parent.

Parameters:
display The connection to the display.
parent The parent view of the gadget container.
rect The size and position of the gadget container.
useacc A Boolean value specifying whether the gadget container should install the default keyboard accelerators.
visible A Boolean value specifying whether the gadget container should be visible.
IlvGadgetContainer::IlvGadgetContainer ( IlvDisplay display,
IlvSystemView  window,
IlBoolean  useacc = IlFalse 
)

Constructor.

Initializes a new instance of the IlvGadgetContainer class mapped to the existing system view specified by parent.

Parameters:
display The connection to the display.
window The system view to which the gadget container will be mapped.
useacc A Boolean value specifying whether the gadget container should install the default keyboard accelerators.

Member Function Documentation

virtual IlBoolean IlvGadgetContainer::allowFocus ( IlBoolean  value  )  [virtual]

Specifies whether the container manages the focus.

Parameters:
value A Boolean value specifying whether the container manages the focus (IlTrue).
See also:
isFocusAllowed, setFocus
virtual void IlvGadgetContainer::applyResize ( IlFloat  sx,
IlFloat  sy,
IlBoolean  redraw = IlTrue 
) [virtual]

Is called to carry out the resize events applying to the gadget container.

This method is called internally to carry out any resize events applying to the view, and to manage the objects changes according to their attachments. It deals with the old Rogue Wave Views attachment model. If you want to use the new one, see the IlvGraphicHolder::attach method.

Parameters:
sx The scale factor that applies to the container width.
sy The scale factor that applies to the container height.
redraw A Boolean value specifying whether the container should be redrawn.
See also:
IlvSetAttachment
IlBoolean IlvGadgetContainer::autoResize ( IlBoolean  a  ) 

Sets the auto resize mode of the gadget container.

Parameters:
value A Boolean value specifying whether the gadget container should be resized automatically when data containing size information is loaded.
Returns:
IlTrue if the container should be resized automatically and IlFalse otherwise.
See also:
isAutoResizing
IlvButton* IlvGadgetContainer::getDefaultButton (  )  const

Returns the default button of the gadget container.

Returns:
A pointer to the default button of the gadget container, or 0 if this gadget container has no default button.
See also:
IlvGadgetContainer::setDefaultButton
virtual IlvGraphic* IlvGadgetContainer::getFirstFocusGraphic (  )  const [virtual]

Returns the first object that receives the focus in this container.

Warning:
[note] This member function links the objects using their names. Redefining them would break this mechanism.
Returns:
The first object that receives the focus in this container. The object must satisfy the conditions listed in the description of IlvGadgetContainer::getNextFocusGraphic.
See also:
getPreviousFocusGraphic, getLastFocusGraphic
virtual IlvGraphic* IlvGadgetContainer::getFocus (  )  const [virtual]

Returns the object that has the keyboard focus in the gadget container.

Returns:
The object that has the keyboard focus in this gadget container or 0 if no object has the focus.
See also:
setFocus, allowFocus
virtual IlvGraphic* IlvGadgetContainer::getGrab (  )  const [virtual]

Returns the object that is currently grabbing events in the container.

Returns:
The object that is currently grabbing events in this container, or 0 if there is no grabbing object in this container.
See also:
setGrab, removeGrab
virtual IlvGraphic* IlvGadgetContainer::getLastFocusGraphic (  )  const [virtual]

Returns the last object that receives the focus in this container.

Warning:
[note] This member function links the objects using their names. Redefining them would break this mechanism.
Returns:
The last object that receives the focus in this container. The object must satisfy the conditions listed in the description of IlvGadgetContainer::getNextFocusGraphic.
See also:
getNextFocusGraphic, getFirstFocusGraphic
IlvLookFeelHandler* IlvGadgetContainer::getLookFeelHandler (  )  const

Returns the look and feel handler associated with this container.

Returns:
The look and feel handler associated with this container.
virtual IlvGraphic* IlvGadgetContainer::getNextFocusGraphic ( IlvGraphic object  )  const [virtual]

Returns the next object that will receive the focus after the specified object.

By default, the focus chain goes from left to right and from top to bottom. The method looks for an object that satisfies the following conditions:

The search is performed down the focus chain, starting after object.

Warning:
[note] This member function links the objects using their names. Redefining them would break this mechanism.
Parameters:
object The graphic object.
Returns:
The object that will receive the focus after object. The method returns IlvGadgetContainer::getFirstFocusGraphic when object is 0. If no valid object is found, the method returns 0.
See also:
getPreviousFocusGraphic, getFocus, getLastFocusGraphic
IlvGraphic* IlvGadgetContainer::getOverriddenFocus (  )  const

Returns the object that will receive the focus after calling setFocus.

Returns:
The object that will receive the focus after calling setFocus.
See also:
overrideFocus, setFocus
virtual IlvGraphic* IlvGadgetContainer::getPreviousFocusGraphic ( IlvGraphic object  )  const [virtual]

Returns the previous object that received the focus before the specified object.

By default, the focus chain goes from left to right and from top to bottom. The method looks for an object that satisfies the following conditions:

The search is performed up the focus chain, starting before object.

Warning:
[note] This member function links the objects using their names. Redefining them would break this mechanism.
Parameters:
object The graphic object.
Returns:
The object that had the focus before object. The method returns IlvGadgetContainer::getFirstFocusGraphic when object is 0. If no valid object is found, the method returns 0.
See also:
getNextFocusGraphic, getFocus, getFirstFocusGraphic
IlBoolean IlvGadgetContainer::isAutoResizing (  )  const

Indicates whether the gadget container gets resized when loading a file.

Returns:
IlTrue if this gadget container gets resized automatically when data containing size information is loaded. Otherwise, the container keeps its original dimensions.
See also:
autoResize
virtual IlBoolean IlvGadgetContainer::isFocusAllowed (  )  const [virtual]

Indicates whether the focus is allowed in the container.

Returns:
IlTrue if this gadget container handles the focus for the objects it stores and IlFalse otherwise.
See also:
setFocus, allowFocus
virtual void IlvGadgetContainer::moveFocusAfter ( IlBoolean  redraw = IlTrue  )  [virtual]

Is called to find the next focusable object.

Calls IlvGadgetContainer::getNextFocusGraphic with the object currently having the focus to get the next valid object in the focus chain, then calls IlvGadgetContainer::setFocus on it. If getNextFocusGraphic returns 0, the result of IlvGadgetContainer::getFirstFocusGraphic is used instead.

Parameters:
redraw A Boolean value specifying whether the gadget container should be redrawn.
See also:
moveFocusBefore, getFirstFocusGraphic, getFocus
virtual void IlvGadgetContainer::moveFocusBefore ( IlBoolean  redraw = IlTrue  )  [virtual]

Is called to find the previous focusable object.

Calls IlvGadgetContainer::getPreviousFocusGraphic with the object currently having the focus to get the previous valid object in the focus chain, then calls IlvGadgetContainer::setFocus on it. If getPreviousFocusGraphic returns 0, the result of IlvGadgetContainer::getLastFocusGraphic is used instead.

Parameters:
redraw A Boolean value specifying whether the gadget container should be redrawn.
See also:
moveFocusAfter, getLastFocusGraphic, getFocus
void IlvGadgetContainer::overrideFocus ( IlvGraphic obj  ) 

Sets the object that will receive the focus after calling setFocus.

Has no effect if it is not called from a Focus Out callback or from the IlvGadget::focusOut member function.

See also:
getOverriddenFocus, setFocus
virtual void IlvGadgetContainer::removeGrab (  )  [virtual]

Cancels the grabbing settings defined with setGrab.

See also:
getGrab, setGrab
void IlvGadgetContainer::setDefaultButton ( IlvButton ,
IlBoolean  redraw = IlTrue 
)

Sets the default button of the gadget container.

The default button is triggered when the user presses the Return or Enter key in the dialog, even though it does not have the keyboard focus. Note that button doesn't need to be located in this gadget container.

Parameters:
button The new default button.
redraw A Boolean value specifying whether the dialog should be redrawn.
See also:
IlvGadgetContainer::getDefaultButton, IlvGadget::usesDefaultButtonKeys
virtual void IlvGadgetContainer::setFocus ( IlvGraphic graphic = 0,
IlBoolean  redraw = IlTrue 
) [virtual]

Sets the focus to the specified object of the gadget container.

Sends an IlvKeyboardFocusOut event to the previous focused object, and an IlvKeyboardFocusIn event to graphic. If you set a Focus Out callback (see IlvGadget::setFocusOutCallback) on the previous focused object, It is possible inside this callback to tell the gadget container not to give the focus to graphic, but to another object by using the method IlvGadgetContainer::overrideFocus. This is useful if the "Focus Out" callback validates the previous focused object. In this case, if validation does not succeed, you may want to keep the focus on this object to give the user another try. If the focus mechanism has been disallowed, this method has no effect.

Parameters:
graphic The object that is given the keyboard focus.
redraw A Boolean value specifying whether the gadget container should be redrawn.
See also:
getFocus, isFocusAllowed, IlvGadget::setFocusOutCallback, overrideFocus
virtual void IlvGadgetContainer::setGrab ( IlvGraphic object  )  [virtual]

Sets the specified object as the grabbing object.

Events will be sent to object. If this object has no associated interactor, the events will be lost.

Parameters:
object The grabbing object.
See also:
getGrab, removeGrab
void IlvGadgetContainer::setLookFeelHandler ( IlvLookFeelHandler lfh  ) 

Sets the look and feel handler of this container.

Parameters:
lfh The new look and feel handler.
 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.