rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Grapher Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions | Protected Member Functions
IlvMakeNodeInteractor Class Reference

Grapher interactor to create nodes. More...

#include <ilviews/grapher/inters.h>

Inheritance diagram for IlvMakeNodeInteractor:
IlvDragRectangleInteractor IlvManagerViewInteractor IlvMakeReliefNodeInteractor IlvMakeShadowNodeInteractor

Public Member Functions

 IlvMakeNodeInteractor (IlvManager *mgr, IlvView *v)
 Constructor. More...
 
virtual void doIt (IlvRect &rect)
 Creates and adds the node. More...
 
IlvMakeNodeInteractorFactorygetFactory () const
 Returns the node factory associated with the instance. More...
 
IlvMakeNodeInteractorFactorysetFactory (IlvMakeNodeInteractorFactory *factory)
 Changes the node factory associated with the instance. More...
 

Protected Member Functions

virtual IlvGraphiccreateNode (const IlvRect &rect)
 Creates a new node. More...
 

Detailed Description

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:

See Also
IlvMakeNodeInteractorFactory.

Constructor & Destructor Documentation

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.

Parameters
mgrThe grapher to which the interactor is attached.
vThe view to which the interactor is attached.

Member Function Documentation

virtual IlvGraphic* IlvMakeNodeInteractor::createNode ( const IlvRect rect)
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.

Parameters
rectThe size of the new node, in manager coordinates.
Returns
The created graphic object.
See Also
IlvMakeNodeInteractorFactory::createNode.

Reimplemented in IlvMakeReliefNodeInteractor, and IlvMakeShadowNodeInteractor.

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.

Parameters
rectThe size of the new node, in manager coordinates.

Reimplemented from IlvDragRectangleInteractor.

IlvMakeNodeInteractorFactory* IlvMakeNodeInteractor::getFactory ( ) const

Returns the node factory associated with the instance.

Returns
The current node factory, or 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.

Parameters
factoryThe new node factory.
Returns
The previous 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.