Rogue Wave Views Manager Package API Reference Guide |
Rogue Wave Views Documentation Home |
Listener class. More...
#include <ilviews/manager/applylst.h>
Public Member Functions | |
IlvApplyListener () | |
Constructor. More... | |
virtual void | applied (IlvGraphic *object, const IlvRect &oldBBox, const IlvRect &newBBox, IlBoolean reDraw)=0 |
Called by IlvManager::applyToObject . More... | |
void | set (IlvGraphic *object) |
Sets the IlvApplyListener on a graphic object. More... | |
Static Public Member Functions | |
static IlvApplyListener * | Get (const IlvGraphic *object) |
Returns the IlvApplyListener of a graphic object. More... | |
static IlUInt | GetCardinal (IlvGraphic *object) |
Returns the number of listeners set on an object. More... | |
static IlvApplyListener * | Remove (IlvGraphic *object, IlvApplyListener *lst) |
Removes an IlvApplyListener of a graphic object. More... | |
static IlvApplyListener * | Remove (IlvGraphic *object) |
Removes all the listeners of a graphic object. More... | |
Listener class.
Library: ilvmgr
IlvApplyListener
is an abstract class that makes it possible to watch (or "listen" to) calls to IlvManager::applyToObject
for a given object. This feature allows you to trigger further actions after a function was "applied" to an object. For example, when an object is moved using the parameter IlvSelectInteractor
or by calling IlvManager::translateObject
or IlvManager::applyToObject
, you are notified of the event. This notification allows you to find the new location of the object and request that other objects (for example, decorations) follow the object. Note that, although IlvApplyListener
is a subclass of IlvNamedProperty
, you must not use IlvGraphic::setNamedProperty
to associate it with an object; you should use IlvApplyListener::set
instead. If you do not use IlvApplyListener::set
, your listener will never be notified.
IlvApplyListener::IlvApplyListener | ( | ) |
Constructor.
Initializes the listener by assigning the proper symbol required by the IlvNamedProperty
class.
|
pure virtual |
Called by IlvManager::applyToObject
.
This virtual member function, which makes the class abstract, is called by the manager when a function has just been applied to an object in IlvManager::applyToObject
. This member function receives the previous and the new bounding boxes, which you can use for your own purpose, such as computing the location of another object you want to move. The reDraw
parameter has the same value as the one that was provided in the initial call to IlvManager::applyToObject
.
object | The graphic object. |
oldBBox | Previous bounding box of the object. |
newBBox | New bounding box of the object. |
reDraw | Indicates whether the manager will redraw the affected areas. |
|
static |
Returns the IlvApplyListener
of a graphic object.
IlvApplyListener
of an object, or 0
if there is none. object | The graphic object. |
|
static |
Returns the number of listeners set on an object.
object | The graphic object. |
|
static |
Removes an IlvApplyListener
of a graphic object.
Removes the listener lst of the graphic object object and returns it. You can then delete the listener, or set it to another object.
object | The graphic object. |
lst | The listener to remove. |
0
if lst is not set on the object.
|
static |
Removes all the listeners of a graphic object.
object | The graphic object. |
0
if there are no listener set on the object. void IlvApplyListener::set | ( | IlvGraphic * | object | ) |
Sets the IlvApplyListener
on a graphic object.
object | The graphic object. This member function sets the listener on the object. |
IlvApplyListener
and a graphic object. Typically, you will write: © Copyright 2016, 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.