Rogue Wave Views
Manager Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvMakeLineInteractor Class Reference

Manager interactor class. More...

#include <ilviews/manager/mklinein.h>

Inheritance diagram for IlvMakeLineInteractor:
IlvManagerViewInteractor IlvValueInterface IlvMakeArrowLineInteractor IlvMakeReliefLineInteractor

Public Member Functions

 IlvMakeLineInteractor (IlvManager *manager, IlvView *view)
 Constructor. More...
 
virtual void abort ()
 Aborts the interaction. More...
 
virtual void doIt (IlvPoint &from, IlvPoint &to)
 Finalizes the interaction by creating an IlvLine object. More...
 
virtual void drawGhost ()
 Visual feedback during the interaction. More...
 
void getLine (IlvPoint &from, IlvPoint &to)
 Returns the coordinates of the two points defining the line. More...
 
IlBoolean handleEvent (IlvEvent &event)
 Handles events for the manager view. More...
 
- Public Member Functions inherited from IlvManagerViewInteractor
 IlvManagerViewInteractor (IlvManager *manager, IlvView *view)
 Initializes a new IlvManagerViewInteractor. More...
 
virtual void ensureVisible (const IlvPoint &point)
 Ensures the visibility of a given location. More...
 
IlvDisplaygetDisplay () const
 Returns the display of the manager view. More...
 
IlvManagergetManager () const
 Returns the manager. More...
 
IlvTransformergetTransformer () const
 Returns the transformer used with the manager view. More...
 
IlvViewgetView () const
 Returns the manager view. More...
 
virtual void handleExpose (IlvRegion *clip=0)
 Called when the manager view receives an expose event. More...
 
virtual void init ()
 Initialization, when the interactor is attached to a view. More...
 

Detailed Description

Manager interactor class.

Library: ilvmgr

Use this class to create IlvLine objects in a view controlled by a manager. The virtual member function handleEvent monitors mouse events. To draw a line, the user:

  1. Clicks the left mouse button to set the start point.

  2. Drags the other end of the line by moving the mouse with the button held down.

  3. Releases the mouse button to indicate the end point.

The member function drawGhost displays the intermediate states of the line being defined.

See also
IlvLine, IlvMakeArrowLineInteractor, IlvMakeReliefLineInteractor.

Constructor & Destructor Documentation

§ IlvMakeLineInteractor()

IlvMakeLineInteractor::IlvMakeLineInteractor ( IlvManager manager,
IlvView view 
)

Constructor.

Initializes a new instance of the IlvMakeLineInteractor class.

Parameters
managerThe manager.
viewThe manager view.

Member Function Documentation

§ abort()

virtual void IlvMakeLineInteractor::abort ( )
virtual

Aborts the interaction.

Called by the manager when the user changes the current interactor. It resets the interactor to a state in which it appears to have never been launched. A common implementation is to erase the ghost image. Call this member function to inhibit the interactor action in particular circumstances.

Reimplemented from IlvManagerViewInteractor.

§ doIt()

virtual void IlvMakeLineInteractor::doIt ( IlvPoint from,
IlvPoint to 
)
virtual

Finalizes the interaction by creating an IlvLine object.

Creates an IlvLine object in the manager using the two points provided by the interaction.

Parameters
fromThe first point.
toThe second point.

Reimplemented in IlvMakeReliefLineInteractor, and IlvMakeArrowLineInteractor.

§ drawGhost()

virtual void IlvMakeLineInteractor::drawGhost ( )
virtual

Visual feedback during the interaction.

Draws a relief line in XOR mode.

Reimplemented from IlvManagerViewInteractor.

Reimplemented in IlvMakeArrowLineInteractor.

§ getLine()

void IlvMakeLineInteractor::getLine ( IlvPoint from,
IlvPoint to 
)

Returns the coordinates of the two points defining the line.

Parameters
fromUsed to return the first point.
toUsed to return the second point.

§ handleEvent()

IlBoolean IlvMakeLineInteractor::handleEvent ( IlvEvent event)
virtual

Handles events for the manager view.

Called by the manager for which the interactor was created with every event it receives in the interactor view.

Returns
IlTrue if the event is consumed, IlFalse otherwise.

Implements IlvManagerViewInteractor.


© Copyright 2017, 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.