![]() Rogue Wave Views 5.5.1 |
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. | |
| virtual void | doIt (IlvRect &rect) |
| Creates and adds the node. | |
| IlvMakeNodeInteractorFactory * | getFactory () const |
| Returns the node factory associated with the instance. | |
| IlvMakeNodeInteractorFactory * | setFactory (IlvMakeNodeInteractorFactory *factory) |
| Changes the node factory associated with the instance. | |
Protected Member Functions | |
| virtual IlvGraphic * | createNode (const IlvRect &rect) |
| Creates a new node. | |
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. |
| virtual IlvGraphic* IlvMakeNodeInteractor::createNode | ( | const IlvRect & | rect | ) | [protected, virtual] |
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. |
IlvMakeNodeInteractorFactory::createNode. Reimplemented in IlvMakeShadowNodeInteractor, and IlvMakeReliefNodeInteractor.
| virtual void IlvMakeNodeInteractor::doIt | ( | IlvRect & | rect | ) | [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.