Manager hook class.
More...
#include <ilviews/manager/hook.h>
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
.
◆ IlvManagerViewHook()
IlvManagerViewHook::IlvManagerViewHook |
( |
IlvManager * |
manager = 0 , |
|
|
IlvView * |
view = 0 |
|
) |
| |
Constructor.
The constructor initializes a new view hook.
- Parameters
-
manager | Specifies the manager. |
view | The view on which to detect events. The view must be connected to manager. |
◆ afterDraw()
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
-
rect | The rectangular area exposed. |
◆ beforeDraw()
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
-
dst | The output port for the drawing functions. It can be different from the view itself. |
t | The transformer applied by the manager to the view. |
region | Contains the areas to be refreshed (in the view coordinate system). |
clip | The 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()
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 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
-
manager | The 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
-
view | Specifies the view. It must be connected to the manager. |
◆ transformerChanged()
Called when you change the transformer of the view to which the hook is connected.
- Parameters
-
current | The new transformer set on the view. |
previous | The 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.