Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
View container class. More...
#include <ilviews/gadgets/gadcont.h>
Public Member Functions | |
IlvGadgetContainer (IlvDisplay *display, const char *name, const char *title, const IlvRect &rect, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue) | |
Constructor. More... | |
IlvGadgetContainer (IlvDisplay *display, const char *name, const char *title, const IlvRect &rect, IlUInt properties, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue, IlvSystemView transientFor=0) | |
Constructor. More... | |
IlvGadgetContainer (IlvAbstractView *parent, const IlvRect &rect, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue) | |
Constructor. More... | |
IlvGadgetContainer (IlvDisplay *display, IlvSystemView parent, const IlvRect &rect, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue) | |
Constructor. More... | |
IlvGadgetContainer (IlvDisplay *display, IlvSystemView window, IlBoolean useacc=IlFalse) | |
Constructor. 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... | |
IlvButton * | getDefaultButton () const |
Returns the default button of the gadget container. More... | |
virtual IlvGraphic * | getFirstFocusGraphic () const |
Returns the first object that receives the focus in this container. More... | |
virtual IlvGraphic * | getFocus () const |
Returns the object that has the keyboard focus in the gadget container. More... | |
virtual IlvGraphic * | getGrab () const |
Returns the object that is currently grabbing events in the container. More... | |
virtual IlvGraphic * | getLastFocusGraphic () const |
Returns the last object that receives the focus in this container. More... | |
IlvLookFeelHandler * | getLookFeelHandler () const |
Returns the look and feel handler associated with this container. More... | |
virtual IlvGraphic * | getNextFocusGraphic (IlvGraphic *object) const |
Returns the next object that will receive the focus after the specified object. More... | |
IlvGraphic * | getOverriddenFocus () const |
Returns the object that will receive the focus after calling setFocus . More... | |
virtual IlvGraphic * | getPreviousFocusGraphic (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 *, 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... | |
void | setLookFeelHandler (IlvLookFeelHandler *lfh) |
Sets the look and feel handler of this container. More... | |
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.
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.
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.
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.
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.
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.
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. |
Specifies whether the container manages the focus.
value | A Boolean value specifying whether the container manages the focus (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.
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. |
Sets the auto resize mode of the gadget container.
value | A Boolean value specifying whether the gadget container should be resized automatically when data containing size information is loaded. |
IlTrue
if the container should be resized automatically and IlFalse
otherwise. IlvButton* IlvGadgetContainer::getDefaultButton | ( | ) | const |
Returns the default button of the gadget container.
0
if this gadget container has no default button.
|
virtual |
Returns the first object that receives the focus in this container.
IlvGadgetContainer::getNextFocusGraphic
.
|
virtual |
Returns the object that has the keyboard focus in the gadget container.
0
if no object has the focus.
|
virtual |
Returns the object that is currently grabbing events in the container.
0
if there is no grabbing object in this container.
|
virtual |
Returns the last object that receives the focus in this container.
IlvGadgetContainer::getNextFocusGraphic
. IlvLookFeelHandler* IlvGadgetContainer::getLookFeelHandler | ( | ) | const |
Returns the look and feel handler associated with this container.
|
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:
Is visible (method IlvContainer::isVisible
)
Is sensitive (method IlvGraphic::isSensitive
)
Has an associated interactor (or is active and focusable if the object is a gadget)
The search is performed down the focus chain, starting after object.
object | The graphic object. |
IlvGadgetContainer::getFirstFocusGraphic
when object is 0
. If no valid object is found, the method returns 0
. IlvGraphic* IlvGadgetContainer::getOverriddenFocus | ( | ) | const |
Returns the object that will receive the focus after calling setFocus
.
setFocus
.
|
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:
Is visible (method IlvContainer::isVisible
)
Is sensitive (method IlvGraphic::isSensitive
)
Has an associated interactor (or is active and focusable if the object is a gadget)
The search is performed up the focus chain, starting before object.
object | The graphic object. |
IlvGadgetContainer::getFirstFocusGraphic
when object is 0
. If no valid object is found, the method returns 0
. IlBoolean IlvGadgetContainer::isAutoResizing | ( | ) | const |
Indicates whether the gadget container gets resized when loading a file.
IlTrue
if this gadget container gets resized automatically when data containing size information is loaded. Otherwise, the container keeps its original dimensions.
|
virtual |
Indicates whether the focus is allowed in the container.
IlTrue
if this gadget container handles the focus for the objects it stores and IlFalse
otherwise. 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.
redraw | A Boolean value specifying whether the gadget container should be redrawn. |
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.
redraw | A Boolean value specifying whether the gadget container should be redrawn. |
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.
|
virtual |
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.
button | The new default button. |
redraw | A Boolean value specifying whether the dialog should be redrawn. |
|
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.
graphic | The object that is given the keyboard focus. |
redraw | A Boolean value specifying whether the gadget container should be redrawn. |
|
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.
object | The grabbing object. |
void IlvGadgetContainer::setLookFeelHandler | ( | IlvLookFeelHandler * | lfh | ) |
Sets the look and feel handler of this container.
lfh | The new look and feel handler. |
© 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.