Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Grapher interactor to create nodes. More...
#include <ilviews/grapher/inters.h>
Public Member Functions | |
IlvMakeNodeInteractor (IlvManager *mgr, IlvView *v) | |
Constructor. More... | |
virtual void | doIt (IlvRect &rect) |
Creates and adds the node. More... | |
IlvMakeNodeInteractorFactory * | getFactory () const |
Returns the node factory associated with the instance. More... | |
IlvMakeNodeInteractorFactory * | setFactory (IlvMakeNodeInteractorFactory *factory) |
Changes the node factory associated with the instance. More... | |
Protected Member Functions | |
virtual IlvGraphic * | createNode (const IlvRect &rect) |
Creates a new node. More... | |
Grapher interactor to create nodes.
Library: ilvgrapher
This interactor class enables the user to interactively create nodes in an IlvGrapher
instance. There are three ways of specifying what type of graphic object should be created:
IlvMakeNodeInteractor::createNode
method. IlvMakeNodeInteractorFactory
class and overloading its IlvMakeNodeInteractorFactory::createNode
method to return the appropriate graphic instance. You can then associate the node factory with the interactor using the IlvMakeNodeInteractor::setFactory
method. IlvGrapher::setDefaultNodeClass
method. IlvMakeNodeInteractorFactory
. IlvMakeNodeInteractor::IlvMakeNodeInteractor | ( | IlvManager * | mgr, |
IlvView * | v | ||
) |
Constructor.
The constructor initializes a new instance of the IlvMakeNodeInteractor
class for the view v and the grapher mgr.
mgr | The grapher to which the interactor is attached. |
v | The view to which the interactor is attached. |
|
protectedvirtual |
Creates a new node.
The default implementation uses the associated factory (see IlvMakeNodeInteractor::setFactory
). If no factory is defined, it returns an instance of the default node class registered with the IlvGrapher::setDefaultNodeClass
method.
rect | The size of the new node, in manager coordinates. |
Reimplemented in IlvMakeReliefNodeInteractor, and IlvMakeShadowNodeInteractor.
|
virtual |
Creates and adds the node.
Called when the user has created a rectangular region in the working view. The default implementation uses the IlvMakeNodeInteractor::createNode
method to create the graphic object that will be added as a node to the grapher.
rect | The size of the new node, in manager coordinates. |
Reimplemented from IlvDragRectangleInteractor.
IlvMakeNodeInteractorFactory* IlvMakeNodeInteractor::getFactory | ( | ) | const |
Returns the node factory associated with the instance.
0
if there is none. IlvMakeNodeInteractorFactory* IlvMakeNodeInteractor::setFactory | ( | IlvMakeNodeInteractorFactory * | factory | ) |
Changes the node factory associated with the instance.
Returns the previous factory if there was one. It can therefore be deleted or kept for future use.
factory | The new node factory. |
© Copyright 2012, 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.