Rogue Wave Views Manager Package API Reference Guide |
Rogue Wave Views Documentation Home |
Manager view hook class. More...
#include <ilviews/gadmgr/mathook.h>
Public Member Functions | |
IlvMatrixHook (IlvManager *mgr, IlvView *view, IlvContainer *cont, IlvMatrix *matrix) | |
Constructor. More... | |
void | add (IlUShort posx, IlUShort posy, IlvAbstractMatrixItem *item, IlvManagerViewInteractor *interactor) |
Adds a new item in the matrix and associates the interactor with this item. More... | |
IlvContainer * | getContainer () const |
Returns the container in which the matrix is stored. More... | |
IlvMatrix * | getMatrix () const |
Returns the matrix used by this object. More... | |
virtual void | interactorChanged (IlvManagerViewInteractor *current, IlvManagerViewInteractor *previous) |
Called when the interactor of the manager view changes. More... | |
void | set (IlUShort posx, IlUShort posy, IlvManagerViewInteractor *interactor) |
Associates a manager view interactor with a matrix item. More... | |
void | setCallback (IlvMatrixHookCallback callback, IlAny arg=0) |
Sets a callback on this hook. More... | |
Public Member Functions inherited from IlvManagerViewHook | |
IlvManagerViewHook (IlvManager *manager=0, IlvView *view=0) | |
Constructor. More... | |
virtual void | afterDraw (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *region=0, const IlvRegion *clip=0) |
Called after the manager has drawn its contents. More... | |
virtual void | afterExpose (const IlvRect &rect) |
Called after the manager has received an Expose event in the view to which the hook is connected. More... | |
virtual void | beforeDraw (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *region=0, const IlvRegion *clip=0) |
Called before the manager draws its contents. More... | |
virtual void | contentsChanged () |
Called when the contents of the manager change. | |
IlvManager * | getManager () const |
Returns the manager. More... | |
IlvView * | getView () const |
Returns the manager view. More... | |
void | setManager (IlvManager *manager) |
Sets the manager. More... | |
void | setView (IlvView *view) |
Sets the manager view. More... | |
virtual void | transformerChanged (const IlvTransformer *current, const IlvTransformer *previous) |
Called when you change the transformer of the view to which the hook is connected. More... | |
virtual void | viewRemoved () |
Called when the view to which the hook is connected is removed from the list of views that the manager handles. | |
virtual void | viewResized () |
Called when the manager view is resized. More... | |
Manager view hook class.
Library: ilvgadmgr
Rogue Wave Views provides a predefined hook to help the user control a set of view interactors with a manager. It also updates a selector matrix of tools depending on which view interactor is set in a view connected to a manager.
Most of the editors that you develop will have an interface panel stored in an IlvGadgetContainer
, and a working area controlled by a manager.
Items of the matrix can be associated with view interactors. When the user selects one of the items that has an associated interactor, this interactor is set as the current interactor of the view. On the other hand, if the user changes the current interactor of the view, the hook tries to locate a matrix item that is associated with this interactor. If there is such an item, it is selected in the matrix.
This hook for manager views makes it easy to associate a series of interactors with a series of matrix items. It also handles the settings in both the view and the matrix.
IlvManagerViewInteractorSelector
class instead. IlvMatrixHook::IlvMatrixHook | ( | IlvManager * | mgr, |
IlvView * | view, | ||
IlvContainer * | cont, | ||
IlvMatrix * | matrix | ||
) |
Constructor.
The constructor initializes a new instance of the IlvMatrixHook
class that will let matrix control the interactors of mgr in view. The matrix should be stored in cont.
mgr | The manager. |
view | The manager view. |
cont | The container of matrix. |
matrix | The matrix. |
void IlvMatrixHook::add | ( | IlUShort | posx, |
IlUShort | posy, | ||
IlvAbstractMatrixItem * | item, | ||
IlvManagerViewInteractor * | interactor | ||
) |
Adds a new item in the matrix and associates the interactor with this item.
The action is similar to adding an item to the matrix at the location specified in posx and posy, and then calling the member function set()
.
posx | The column of the matrix where the item will be added. |
posy | The row of the matrix where the item will be added. |
item | The item to add. |
interactor | The manager view interactor. |
IlvContainer* IlvMatrixHook::getContainer | ( | ) | const |
Returns the container in which the matrix is stored.
IlvMatrix* IlvMatrixHook::getMatrix | ( | ) | const |
Returns the matrix used by this object.
|
virtual |
Called when the interactor of the manager view changes.
Called when you change the view interactor for the view to which the hook is connected.
current | The new interactor set on the view. |
previous | The interactor previously set on the view. |
Reimplemented from IlvManagerViewHook.
void IlvMatrixHook::set | ( | IlUShort | posx, |
IlUShort | posy, | ||
IlvManagerViewInteractor * | interactor | ||
) |
Associates a manager view interactor with a matrix item.
Associates the item located at (posx, posy) in the matrix with interactor for this item. When the user selects this item, the interactor is set as the new view interactor of the view associated with the manager. If the view interactor of the view becomes interactor, the indicated item is automatically selected in the matrix.
posx | The column of the matrix where the item will be added. |
posy | The row of the matrix where the item will be added. |
interactor | The manager view interactor. |
void IlvMatrixHook::setCallback | ( | IlvMatrixHookCallback | callback, |
IlAny | arg = 0 |
||
) |
Sets a callback on this hook.
Specifies a callback function to be called when the interactor changes in the view of this hook. This lets you perform some additional actions when new tools are selected in the manager.
callback | The callback function. |
arg | A pointer to user data that will be passed to the callback function. |
© 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.