[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

 

LDragAndDrop



Overview:

LDragAndDrop is a PowerPlant mix-in class that is used for adding drag and drop features to a Pane.

Methods :

The methods in this class are:

 

LDragAndDrop()  
FocusDropArea()  
HiliteDropArea()  
PointInDropArea()  

Data Members:

The data members in this class are:

 

mPane  
 

Operation:

LDragAndDrop inherits from LDropArea and is a concrete implementation of that class. A pane that supports drag and drop should inherit from LDragAndDrop, not LDropArea.

For more information on drag and drop using PowerPlant, refer to PowerPlant Advanced Topics.

Source files:

(Feature Classes)

LDragAndDrop.h

LDragAndDrop.cp

Ancestors:

LDropArea

LDragAndDrop()

Purpose:

This creates a drag and drop object from the passed-in parameters.

Access:

Public

Prototype:

LDragAndDrop( WindowPtr inMacWindow, 
LPane *inPane );
Parameters:

The parameters for this constructor are:

 

WindowPtr  
inMacWindow  
Toolbox window containing the drag and drop. It may be nil if the drag and drop is not in a window (e.g., if printing the drag and drop).  
LPane*  
inPane  
Pane associated with the drag and drop. The drop area of the drag and drop is the Frame of the Pane.  

FocusDropArea()

Purpose:

Set up a local coordinate system and clipping region for a drop area.

Access:

Virtual, Public

Prototype:

virtual void FocusDropArea();
Parameters:

None

Return:

None

HiliteDropArea()

Purpose:

Hilite a drop area to indicate that it can accept the current drag.

For a drag and drop, the drop area is the Frame of its associated Pane inset by one pixel to account for the border which usually surrounds a drop-capable Pane.

Access:

Virtual, Protected

Prototype:

virtual void HiliteDropArea( 
DragReference inDragRef);
Parameters:

The parameter for this method is:

 

DragReference  
inDragRef  
A reference to a drop area to hilite.  

Return:

None

PointInDropArea()

Purpose:

Check whether a Point, in global coordinates, is inside a drop area.

Access:

Virtual, Public

Prototype:

virtual Boolean PointInDropArea( Point inPoint );
Parameters:

The parameter for this method is:

 

Point  
inPoint  
A point to check.  

Return:

Boolean true if the point is within the drop area, else false.

mPane

Purpose:

This data member stores the Pane that we're operating with.

Access:

Protected

Prototype:

LPane *mPane;

 


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: July 21, 2000