Views
Manager Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions | Friends
IlvManagerViewHook Class Reference

Manager hook class. More...

#include <ilviews/manager/hook.h>

Inheritance diagram for IlvManagerViewHook:
IlvManagerViewInteractorSelector IlvMatrixHook

Public Member Functions

 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.
 
IlvManagergetManager () const
 Returns the manager. More...
 
IlvViewgetView () const
 Returns the manager view. More...
 
virtual void interactorChanged (IlvManagerViewInteractor *current, IlvManagerViewInteractor *previous)
 Called when the interactor of the manager view changes. 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...
 

Friends

class IlvMgrView
 

Detailed Description

Manager hook class.

Library: ilvmgr

There is a mechanism that lets you detect events such as drawing in a view, changing a transformer, and so on. This mechanism is implemented by using view hooks. A view hook is an instance of the IlvManagerViewHook class. This class has a number of virtual member functions that are automatically called by Rogue Wave Views when particular operations occur in a manager.

See also
IlvManager::installViewHook, IlvManager::removeViewHook, IlvMatrixHook.

Constructor & Destructor Documentation

◆ IlvManagerViewHook()

IlvManagerViewHook::IlvManagerViewHook ( IlvManager manager = 0,
IlvView view = 0 
)

Constructor.

The constructor initializes a new view hook.

Parameters
managerSpecifies the manager.
viewThe view on which to detect events. The view must be connected to manager.

Member Function Documentation

◆ afterDraw()

virtual void IlvManagerViewHook::afterDraw ( IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion region = 0,
const IlvRegion clip = 0 
)
virtual

Called after the manager has drawn its contents.

Acts the same way as IlvManagerViewHook::beforeDraw but is called after the manager has updated the view. This lets you create additional drawings on top of those drawn by the manager.

◆ afterExpose()

virtual void IlvManagerViewHook::afterExpose ( const IlvRect rect)
virtual

Called after the manager has received an Expose event in the view to which the hook is connected.

Parameters
rectThe rectangular area exposed.

◆ beforeDraw()

virtual void IlvManagerViewHook::beforeDraw ( IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion region = 0,
const IlvRegion clip = 0 
)
virtual

Called before the manager draws its contents.

Called internally by the manager to which this hook is connected, just before it redraws the hook view. Use this function if you need to perform additional drawings in the view before the manager draws it.

Parameters
dstThe output port for the drawing functions. It can be different from the view itself.
tThe transformer applied by the manager to the view.
regionContains the areas to be refreshed (in the view coordinate system).
clipThe clipping region to be used.

◆ getManager()

IlvManager* IlvManagerViewHook::getManager ( ) const

Returns the manager.

Returns
The manager for which this hook was created.

◆ getView()

IlvView* IlvManagerViewHook::getView ( ) const

Returns the manager view.

Returns
The view this hook acts on.

◆ interactorChanged()

virtual void IlvManagerViewHook::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
currentThe new interactor set on the view.
previousThe interactor previously set on the view.

Reimplemented in IlvManagerViewInteractorSelector, and IlvMatrixHook.

◆ setManager()

void IlvManagerViewHook::setManager ( IlvManager manager)

Sets the manager.

Connects the hook to a manager. This lets you use the same hook in several managers, one after the other. Use the member function IlvManagerViewHook::setView to modify the view you want this hook to act on.

Parameters
managerThe manager to connect to.

◆ setView()

void IlvManagerViewHook::setView ( IlvView view)

Sets the manager view.

Sets the view on which to watch events. This lets you use the same hook in several views in the same manager, one after the other.

Parameters
viewSpecifies the view. It must be connected to the manager.

◆ transformerChanged()

virtual void IlvManagerViewHook::transformerChanged ( const IlvTransformer current,
const IlvTransformer previous 
)
virtual

Called when you change the transformer of the view to which the hook is connected.

Parameters
currentThe new transformer set on the view.
previousThe transformer previously set on the view.

◆ viewResized()

virtual void IlvManagerViewHook::viewResized ( )
virtual

Called when the manager view is resized.

Called when the view to which the hook is connected is resized.