Rogue Wave Views
Manager Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvManagerObjectInteractor Class Referenceabstract

Manager interactor class. More...

#include <ilviews/manager/manager.h>

Inherited by IlvManagerGadgetInteractor.

Public Member Functions

virtual IlBoolean accept (const IlvGraphic *obj) const
 Allows the interactor to accept or refuse to work with an object. More...
 
virtual const char * className () const
 Returns the interactor class name. More...
 
virtual IlBoolean handleEvent (IlvManager *manager, IlvGraphic *obj, IlvEvent &event, IlvView *view, IlvTransformer *t)=0
 Handles user events that occur over the graphic object. More...
 

Detailed Description

Manager interactor class.

Library: ilvmgr
Use instances of the IlvManagerObjectInteractor class to associate a specific behavior with an object in a view controlled by a manager. As this is an abstract class, you must derive subclasses. Objects of this class can be compared with those of the IlvManagerViewInteractor class, which are mostly used for editing operations affecting all the objects in the view. Whenever an event is received by a managed view that has no associated view interactor, the manager attempts to send it to an object by a call to an attached object interactor. If there is an object at the event location, and if this object is associated with an object interactor, then the manager sends the event to that interactor. If the interactor does not manage this event, or if the situation is not applicable, then the manager tries to handle the event by means of an accelerator.

You can create an IlvManagerObjectInteractor instance when given a manager, and bind it to an object or a set of objects by means of the member function IlvManager::setObjectInteractor() of the manager. The object then receives user events and deals with them through its interactor.

See also
IlvManager::dispatchToObjects(), IlvManager::getObjectInteractor(), IlvManager::setObjectInteractor().

Member Function Documentation

§ accept()

virtual IlBoolean IlvManagerObjectInteractor::accept ( const IlvGraphic obj) const
virtual

Allows the interactor to accept or refuse to work with an object.

Called when the object interactor is associated with an object in a manager.

Parameters
objThe graphic object.
Returns
IlTrue if the interactor can be associated with the object or IlFalse if it cannot. The default implementation returns IlTrue.

§ className()

virtual const char* IlvManagerObjectInteractor::className ( ) const
virtual

Returns the interactor class name.

Returns
A string identifying this object interactor class. The same string is returned by the equivalent interactor for containers.

§ handleEvent()

virtual IlBoolean IlvManagerObjectInteractor::handleEvent ( IlvManager manager,
IlvGraphic obj,
IlvEvent event,
IlvView view,
IlvTransformer t 
)
pure virtual

Handles user events that occur over the graphic object.

Called for each event the manager has located above the graphic object obj associated with the interactor.

Parameters
managerThe manager.
objThe graphic object associated with the interactor.
eventThe event.
viewThe view where the event occurred.
tThe transformer applied to the view by the manager.
Returns
IlTrue if it succeeds in handling the event, or IlFalse if it does not.

© Copyright 2018, 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.