C# Class Smrf.NodeXL.Visualization.Wpf.DraggedVertices

Represents one or more vertices that might be dragged with the mouse.
Create an instance of this class when a vertex is clicked. When the mouse is moved, check MouseDrag.OnMouseMove to determine whether the mouse has moved far enough to begin a vertex drag. If returns true, call to create a Visual to represent the dragged vertices.

Call CancelDrag if the user wants to cancel the drag operation.

Call RemoveMetadataFromVertices when the drag operation completes or is cancelled.

Inheritance: MouseDragWithVisual
Mostrar archivo Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Property Type Description
m_aoVertices IVertex[]

Public Methods

Method Description
AssertValid ( ) : void
CancelDrag ( ) : void
CreateVisual ( Point currentMouseLocation, Color backColor, VertexDrawer vertexDrawer ) : Visual
DraggedVertices ( IVertex vertices, Point mouseDownLocation, Rect graphRectangle, Int32 margin ) : System

Initializes a new instance of the DraggedVertices class.

RemoveMetadataFromVertices ( ) : void

Protected Methods

Method Description
AddMetadataToVertices ( ) : void
GetOriginalVertexLocation ( IVertex oVertex ) : System.Drawing.PointF

Method Details

AddMetadataToVertices() protected method

protected AddMetadataToVertices ( ) : void
return void

AssertValid() public method

public AssertValid ( ) : void
return void

CancelDrag() public method

public CancelDrag ( ) : void
return void

CreateVisual() public method

public CreateVisual ( Point currentMouseLocation, Color backColor, VertexDrawer vertexDrawer ) : Visual
currentMouseLocation Point
backColor Color
vertexDrawer VertexDrawer
return Visual

DraggedVertices() public method

Initializes a new instance of the DraggedVertices class.
public DraggedVertices ( IVertex vertices, Point mouseDownLocation, Rect graphRectangle, Int32 margin ) : System
vertices IVertex /// An array of one or more vertices being dragged. ///
mouseDownLocation Point /// Location where the vertex was clicked, in client coordinates. ///
graphRectangle System.Windows.Rect /// The graph rectangle. ///
margin System.Int32 /// The graph margin. ///
return System

GetOriginalVertexLocation() protected method

protected GetOriginalVertexLocation ( IVertex oVertex ) : System.Drawing.PointF
oVertex IVertex
return System.Drawing.PointF

RemoveMetadataFromVertices() public method

public RemoveMetadataFromVertices ( ) : void
return void

Property Details

m_aoVertices protected_oe property

protected IVertex[] m_aoVertices
return IVertex[]