rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Manager Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvMatrixHook Class Reference

Manager view hook class. More...

#include <ilviews/gadmgr/mathook.h>

Inheritance diagram for IlvMatrixHook:
IlvManagerViewHook

List of all members.

Public Member Functions

 IlvMatrixHook (IlvManager *mgr, IlvView *view, IlvContainer *cont, IlvMatrix *matrix)
 Constructor.
void add (IlUShort posx, IlUShort posy, IlvAbstractMatrixItem *item, IlvManagerViewInteractor *interactor)
 Adds a new item in the matrix and associates the interactor with this item.
IlvContainergetContainer () const
 Returns the container in which the matrix is stored.
IlvMatrix * getMatrix () const
 Returns the matrix used by this object.
virtual void interactorChanged (IlvManagerViewInteractor *current, IlvManagerViewInteractor *previous)
 Called when the interactor of the manager view changes.
void set (IlUShort posx, IlUShort posy, IlvManagerViewInteractor *interactor)
 Associates a manager view interactor with a matrix item.
void setCallback (IlvMatrixHookCallback callback, IlAny arg=0)
 Sets a callback on this hook.

Detailed Description

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.

Warning:
[note] This class is obsolete. You should use the IlvManagerViewInteractorSelector class instead.

Constructor & Destructor Documentation

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.

Warning:
[note] The client data of matrix is overwritten if you use a matrix hook.
Parameters:
mgr The manager.
view The manager view.
cont The container of matrix.
matrix The matrix.

Member Function Documentation

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.

Parameters:
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.

Returns:
The container in which the matrix is stored.
IlvMatrix* IlvMatrixHook::getMatrix (  )  const

Returns the matrix used by this object.

Returns:
The matrix used by this object.
virtual void IlvMatrixHook::interactorChanged ( IlvManagerViewInteractor current,
IlvManagerViewInteractor previous 
) [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.

Parameters:
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.

Parameters:
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.
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.

Parameters:
callback The callback function.
arg A pointer to user data that will be passed to the callback function.
 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.