rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Grapher Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvMakeNodeInteractor Class Reference

Grapher interactor to create nodes. More...

#include <ilviews/grapher/inters.h>

Inheritance diagram for IlvMakeNodeInteractor:
IlvDragRectangleInteractor IlvManagerViewInteractor IlvMakeReliefNodeInteractor IlvMakeShadowNodeInteractor

List of all members.

Public Member Functions

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

Protected Member Functions

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

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:
mgr The grapher to which the interactor is attached.
v The view to which the interactor is attached.

Member Function Documentation

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.

Parameters:
rect The size of the new node, in manager coordinates.
Returns:
The created graphic object.
See also:
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.

Parameters:
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.

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:
factory The new node factory.
Returns:
The previous node factory.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends

© 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.