rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Manager Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvManagerViewDragDropInteractor Class Reference

Manager interactor class. More...

#include <ilviews/manager/ddinter.h>

Inheritance diagram for IlvManagerViewDragDropInteractor:
IlvManagerViewInteractor

List of all members.

Public Member Functions

 IlvManagerViewDragDropInteractor (IlvManager *manager, IlvView *view, IlvView *target=0, IlvGraphic *ghost=0, IlUShort button=IlvLeftButton)
 Constructor.
virtual void abort ()
 Aborts the interaction.
virtual void checkLocation (IlvPoint &position)
 Allows you to modify the position when dragging the mouse.
virtual void doIt (IlvView *target, IlvGraphic *ghost, const IlvPoint &position) const =0
 Finalizes the interaction.
virtual IlBoolean dragStarted (IlUInt count, IlvGraphic **objects) const
 Called when the drag operation starts.
virtual void drawGhost ()
 Visual feedback during the interaction.
IlUShort getButton () const
 Returns the mouse button used by the interactor.
IlvGraphicgetGhost () const
 Returns the ghost image.
IlUInt getMaxSelections () const
 Returns the maximum number of objects the interactor can drag.
IlvViewgetTarget () const
 Returns the target view.
virtual void handleEvent (IlvEvent &event)
 Handles events for the manager view.
virtual void init ()
 Initialization, when the interactor is attached to a view.
virtual IlBoolean inTarget (const IlvPoint &position)
 Indicates whether a position is a valid drop site.
void setButton (IlUShort button)
 Sets the mouse button involved in the drag-and-drop interaction.
void setGhost (IlvGraphic *ghost)
 Sets the ghost image.
void setMaxSelections (IlUInt m)
 Sets the maximum number of objects the interactor can drag.
void setTarget (IlvView *target)
 Sets the target view.

Detailed Description

Manager interactor class.

Library: ilvmgr

Use this class to move objects to another view using a drag-and-drop operation to perform a particular action. dropped to perform a particular action. This class is abstract and designed to be subtyped so you can implement your own drop mechanism.

See also:
IlvViewDragDropInteractor, IlvManagerDragDropInteractor.

Constructor & Destructor Documentation

IlvManagerViewDragDropInteractor::IlvManagerViewDragDropInteractor ( IlvManager manager,
IlvView view,
IlvView target = 0,
IlvGraphic ghost = 0,
IlUShort  button = IlvLeftButton 
)

Constructor.

The constructor specifies the manager and the view to which you attach the interactor. You can also specify the target view where the object can be released and the ghost graphic object moved by the interactor. If the ghost graphic object is not specified, the interactor uses the object which is being clicked.

Parameters:
manager The manager.
view The view to which the interactor is attached.
target The target view.
ghost The graphic object moved during a drag operation.
button Specifies the mouse button used for drag-and-drop.

Member Function Documentation

virtual void IlvManagerViewDragDropInteractor::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.

virtual void IlvManagerViewDragDropInteractor::checkLocation ( IlvPoint position  )  [virtual]

Allows you to modify the position when dragging the mouse.

Called when you move the pointing device by providing a new pair of coordinates in position. You can overload this method to modify these coordinates.

Parameters:
position The event coordinates.
virtual void IlvManagerViewDragDropInteractor::doIt ( IlvView target,
IlvGraphic ghost,
const IlvPoint position 
) const [pure virtual]

Finalizes the interaction.

Called when you release the object over the target view. You need to define this function in your subtyped class.

Parameters:
target The target view.
ghost The graphic object used as ghost.
position The ButtonDown event coordinates.
Warning:
[note] If you plan to create a new object from the ghost parameter you receive, you must create a copy of it.
virtual IlBoolean IlvManagerViewDragDropInteractor::dragStarted ( IlUInt  count,
IlvGraphic **  objects 
) const [virtual]

Called when the drag operation starts.

Called by handleEvent in the treatment of the IlvButtonDown event.

Parameters:
count The number of graphic objects in the array.
objects The array of graphic objects being dragged.
Returns:
IlTrue if the objects can be dragged, or IlFalse otherwise.
virtual void IlvManagerViewDragDropInteractor::drawGhost (  )  [virtual]

Visual feedback during the interaction.

Draws the ghost image.

Reimplemented from IlvManagerViewInteractor.

IlUShort IlvManagerViewDragDropInteractor::getButton (  )  const

Returns the mouse button used by the interactor.

Returns:
The number indicating the current mouse button involved in the drag-and-drop interaction.
IlvGraphic* IlvManagerViewDragDropInteractor::getGhost (  )  const

Returns the ghost image.

Returns:
The graphic object used as ghost image.
IlUInt IlvManagerViewDragDropInteractor::getMaxSelections (  )  const

Returns the maximum number of objects the interactor can drag.

Returns:
The maximum number of objects the interactor can drag.
IlvView* IlvManagerViewDragDropInteractor::getTarget (  )  const

Returns the target view.

Returns:
The target view.
virtual void IlvManagerViewDragDropInteractor::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.

Implements IlvManagerViewInteractor.

virtual void IlvManagerViewDragDropInteractor::init (  )  [virtual]

Initialization, when the interactor is attached to a view.

Resets the interactor to its initial state.
Called by the manager whenever the interactor is associated with a view. An association of this kind is established by the member function IlvManager::setInteractor.

Reimplemented from IlvManagerViewInteractor.

virtual IlBoolean IlvManagerViewDragDropInteractor::inTarget ( const IlvPoint position  )  [virtual]

Indicates whether a position is a valid drop site.

Called by handleEvent in the treatment of the IlvButtonDown event.

Parameters:
position The ButtonDown event coordinates.
Returns:
IlTrue if the point is at a valid location to drop the objects, or IlFalse otherwise.
void IlvManagerViewDragDropInteractor::setButton ( IlUShort  button  ) 

Sets the mouse button involved in the drag-and-drop interaction.

Parameters:
button Specifies the mouse button. It can have the following values: IlvLeftButton, IlvMiddleButton, or IlvRightButton (see IlvEvent).
void IlvManagerViewDragDropInteractor::setGhost ( IlvGraphic ghost  ) 

Sets the ghost image.

Sets the graphic object used as ghost image by the interactor.

Parameters:
ghost Specifies the graphic object.
void IlvManagerViewDragDropInteractor::setMaxSelections ( IlUInt  m  ) 

Sets the maximum number of objects the interactor can drag.

Parameters:
m The maximum number of objects.
void IlvManagerViewDragDropInteractor::setTarget ( IlvView target  ) 

Sets the target view.

Parameters:
target The target view.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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