Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvGadgetInteractor Class Reference

The base class for gadget interactors. More...

#include <ilviews/base/gadget.h>

Inheritance diagram for IlvGadgetInteractor:
IlvInteractor

Public Member Functions

virtual IlBoolean accept (const IlvGraphic *) const
 Indicates whether the current interactor can be associated with a given object. More...
 
virtual void getCallbackTypes (IlUInt &, const char *const **, const IlSymbol *const **) const
 Gets the number of register callback types for the interactor. More...
 
virtual IlBoolean handleEvent (IlvGraphic *, IlvEvent &, const IlvTransformer *)
 Handles events received by the interactor. More...
 
- Public Member Functions inherited from IlvInteractor
virtual void abort (IlvGraphic *obj)
 Aborts the interactor. More...
 
virtual void endOperation ()
 Performs the actions needed when the interaction ends. More...
 
const char * getRegisteredName () const
 Returns the name of the predefined shared instance. More...
 
IlBoolean isAborted () const
 Indicates whether the current interactor is in an aborted state. More...
 
IlBoolean isInOperation () const
 Indicates whether the current interactor is in an interaction state. More...
 
void lock ()
 Locks the current instance. Increments the counter that is used to know how many objects reference the current instance. More...
 
virtual void startOperation ()
 Performs the actions needed when the interaction starts. More...
 
void unLock ()
 Unlocks the current instance. Decrements the reference counter. When the counter drops down to zero, the current instance is deleted. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvInteractor
static IlvInteractorGet (const char *name, IlBoolean=IlTrue)
 Returns a predefined shared interactor instance. More...
 

Detailed Description

The base class for gadget interactors.

Library: views
The IlvGadgetInteractor class is the base class for gadget interactors. It forwards the events received by the interactor to the gadget it is connected to by calling its IlvGadget::handleEvent method. This interactor is automatically set on a gadget when it's added to a container or a manager.

See also
IlvGadget.

Member Function Documentation

§ accept()

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

Indicates whether the current interactor can be associated with a given object.

Parameters
objThe considered graphic object.
Returns
IlTrue if the interactor can safely be attached to obj, and IlFalse otherwise.
See also
IlvGraphic::setInteractor().

Reimplemented from IlvInteractor.

§ getCallbackTypes()

virtual void IlvGadgetInteractor::getCallbackTypes ( IlUInt count,
const char *const **  names,
const IlSymbol *const **  types 
) const
virtual

Gets the number of register callback types for the interactor.

If you provide a non-0 pointer to an array of strings in the parameter names, it is set on return to point to an array of strings that describe each of the callback types. Some of these descriptions may be 0. You must not modify nor delete this array.

If you provide a non-0 pointer to an array of symbols in the parameter types, it is set on return to point to an array of symbols that define each of the callback types. You must not modify nor delete this array.

If you create a new callback type and want it returned by a call to getCallbackTypes(), you can use the static member function IlvGraphic::AddToCallbackTypeList().

The default implementation registers one callback with the shared name of the interactor as symbol. For example, the IlvMoveInteractor class has a callback registered on the symbol "Move".

Parameters
countThe number of elements in the returned arrays names and types. This parameter must be set to 0 before calling this method.
namesAn array of strings.
typesAn array of symbols.
Returns
The number of register callback types for this object.

Reimplemented from IlvInteractor.

§ handleEvent()

virtual IlBoolean IlvGadgetInteractor::handleEvent ( IlvGraphic g,
IlvEvent event,
const IlvTransformer t 
)
virtual

Handles events received by the interactor.

This method is the entry point of all events dispatched to this interactor.

Parameters
gThe graphic object that receives the event.
eventThe received event.
tThe transformer applied to the view in which the event occurred.
Returns
IlTrue if the event was successfully handled and IlFalse otherwise.

Implements IlvInteractor.


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