rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Foundation Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvReshapeInteractor Class Reference

Interactor to resize graphic objects. More...

#include <ilviews/graphics/inter.h>

Inheritance diagram for IlvReshapeInteractor:
IlvInteractor

List of all members.

Public Member Functions

virtual void doIt (IlvGraphic *object, IlvRect &rect, const IlvTransformer *t=0)
 Finalizes the interaction by resizing the object.
virtual void drawGhost (IlvRect &rect, IlvView *view)
 Visual feedback during the interaction.
virtual IlBoolean handleEvent (IlvGraphic *obj, IlvEvent &event, const IlvTransformer *t)
 Handles events received by the interactor.
virtual void validate (IlvGraphic *obj, IlvRect &rect, const IlvTransformer *t=0)
 Allows you to modify the intermediate rectangle during the interaction.

Detailed Description

Interactor to resize graphic objects.

Library: views

The IlvReshapeInteractor class lets the user resize an object by dragging its bounding box with the middle mouse button.

The registered name of this interactor is "Reshape".

See also:
IlvMoveInteractor, IlvMoveReshapeInteractor.

Member Function Documentation

virtual void IlvReshapeInteractor::doIt ( IlvGraphic object,
IlvRect rect,
const IlvTransformer t = 0 
) [virtual]

Finalizes the interaction by resizing the object.

Called to resize the object to the new geometry provided by rect. After reshaping the object, this method calls the object's callback corresponding to the Reshape symbol.

Parameters:
object The graphic object.
rect The rectangle, in the object coordinate system.
t The transformer applied to the view.
See also:
IlvGraphic::setCallback
virtual void IlvReshapeInteractor::drawGhost ( IlvRect rect,
IlvView view 
) [virtual]

Visual feedback during the interaction.

Called to draw a preview image of the resulting user action. It is generally invoked by handleEvent as a response to user events.

Parameters:
rect The rectangle.
view The view where the object is displayed.
virtual IlBoolean IlvReshapeInteractor::handleEvent ( IlvGraphic g,
IlvEvent event,
const IlvTransformer t 
) [virtual]

Handles events received by the interactor.

This method is the entry point of all events dispatched to this interactor.

Parameters:
g The graphic object that receives the event.
event The received event.
t The transformer applied to the view in which the event occurred.
Returns:
IlTrue if the event was successfully handled and IlFalse otherwise.

Implements IlvInteractor.

virtual void IlvReshapeInteractor::validate ( IlvGraphic obj,
IlvRect rect,
const IlvTransformer t = 0 
) [virtual]

Allows you to modify the intermediate rectangle during the interaction.

Called for each mouse movement to modify the bounding box. The rectangle is provided in the view coordinate system and can be modified to satisfy any given constraint. When the mouse button is released, the IlvReshapeInteractor::doIt method is called.

Parameters:
obj The graphic object.
rect The rectangle provided by the interaction.
t The transformer applied to the view.

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