C# Class UMD.HCIL.Piccolo.Event.PDragSequenceEventHandler

PDragSequenceEventHandler is designed to support mouse pressed, dragged, and released interaction sequences. Support is also provided for running a continuous activity during the drag sequence.
PDragSequenceEventHandler should be subclassed by a concrete event handler that implements a particular interaction. See PPanEventHandler, PZoomEventHandler, and PDragEventHandler for examples
Inheritance: UMD.HCIL.Piccolo.Event.PBasicInputEventHandler, PActivity.PActivityDelegate
Datei anzeigen Open project: ME3Explorer/ME3Explorer

Public Properties

Property Type Description
Drag DragDelegate
DragActivityFinalStep DragActivityFinalStepDelegate
DragActivityFirstStep DragActivityFirstStepDelegate
DragActivityStep DragActivityStepDelegate
EndDrag EndDragDelegate
StartDrag StartDragDelegate

Public Methods

Method Description
ActivityFinished ( UMD.HCIL.Piccolo.Activities.PActivity activity ) : void

Called when the drag activity stops running.

ActivityStarted ( UMD.HCIL.Piccolo.Activities.PActivity activity ) : void

Called when the drag activity starts running.

ActivityStepped ( UMD.HCIL.Piccolo.Activities.PActivity activity ) : void

Called when the drag activity is running.

OnMouseDown ( object sender, PInputEventArgs e ) : void

Overridden. See PBasicInputEventHandler.OnMouseDown.

OnMouseDrag ( object sender, PInputEventArgs e ) : void

Overridden. See PBasicInputEventHandler.OnMouseDrag.

OnMouseUp ( object sender, PInputEventArgs e ) : void

Overridden. See PBasicInputEventHandler.OnMouseUp.

PDragSequenceEventHandler ( ) : System

Constructs a new PDragSequenceEventHandler.

Protected Methods

Method Description
OnDrag ( object sender, PInputEventArgs e ) : void

Subclasses should override this method to get notified of the drag events in a drag sequence.

This method is called in the middle of a drag sequence, between the OnStartDrag and the OnEndDrag methods.

Unlike the OnMouseDrag method, this method will not get called until after the MinDragStartDistance has been reached.

Notes to Inheritors: Overriding methods must still call base.OnDrag() for correct behavior.

OnDragActivityFinalStep ( object sender, PInputEventArgs e ) : void

Override this method to get notified when the drag activity stops stepping.

OnDragActivityFirstStep ( object sender, PInputEventArgs e ) : void

Override this method to get notified when the drag activity is stepping.

During a drag sequence an activity is scheduled that runs continuously while the drag sequence is active. This can be used to support some additional behavior that is not driven directly by mouse events. For example PZoomEventHandler uses it for zooming and PPanEventHandler uses it for auto panning.

OnDragActivityStep ( object sender, PInputEventArgs e ) : void

Override this method to get notified when the drag activity starts stepping.

OnEndDrag ( object sender, PInputEventArgs e ) : void

Subclasses should override this method to get notified of the end event in a drag sequence.

This method is called at the end of a drag sequence.

Unlike the OnMouseDrag method, this method will not get called until after the MinDragStartDistance has been reached.

Notes to Inheritors: Overriding methods must still call base.OnEndDrag() for correct behavior.

OnStartDrag ( object sender, PInputEventArgs e ) : void

Subclasses should override this method to get notified of the start of a new drag sequence.

This method is called at the beginning of a drag sequence.

Unlike the OnMouseDrag method, this method will not get called until after the MinDragStartDistance has been reached.

Notes to Inheritors: Overriding methods must still call base.OnStartDrag() for correct behavior.

ShouldStartDragInteraction ( PInputEventArgs e ) : bool

Returns true if a drag sequence should be initiated.

StartDragActivity ( PInputEventArgs e ) : void

Schedules the drag activity to run.

Private Methods

Method Description
StopDragActivity ( PInputEventArgs e ) : void

Stops the drag activity.

Method Details

ActivityFinished() public method

Called when the drag activity stops running.
public ActivityFinished ( UMD.HCIL.Piccolo.Activities.PActivity activity ) : void
activity UMD.HCIL.Piccolo.Activities.PActivity The drag activity.
return void

ActivityStarted() public method

Called when the drag activity starts running.
public ActivityStarted ( UMD.HCIL.Piccolo.Activities.PActivity activity ) : void
activity UMD.HCIL.Piccolo.Activities.PActivity The drag activity.
return void

ActivityStepped() public method

Called when the drag activity is running.
public ActivityStepped ( UMD.HCIL.Piccolo.Activities.PActivity activity ) : void
activity UMD.HCIL.Piccolo.Activities.PActivity The drag activity.
return void

OnDrag() protected method

Subclasses should override this method to get notified of the drag events in a drag sequence.
This method is called in the middle of a drag sequence, between the OnStartDrag and the OnEndDrag methods.

Unlike the OnMouseDrag method, this method will not get called until after the MinDragStartDistance has been reached.

Notes to Inheritors: Overriding methods must still call base.OnDrag() for correct behavior.

protected OnDrag ( object sender, PInputEventArgs e ) : void
sender object The source of the end drag event.
e PInputEventArgs A PInputEventArgs that contains the event data.
return void

OnDragActivityFinalStep() protected method

Override this method to get notified when the drag activity stops stepping.
protected OnDragActivityFinalStep ( object sender, PInputEventArgs e ) : void
sender object The source of the drag event.
e PInputEventArgs A PInputEventArgs that contains the event data.
return void

OnDragActivityFirstStep() protected method

Override this method to get notified when the drag activity is stepping.
During a drag sequence an activity is scheduled that runs continuously while the drag sequence is active. This can be used to support some additional behavior that is not driven directly by mouse events. For example PZoomEventHandler uses it for zooming and PPanEventHandler uses it for auto panning.
protected OnDragActivityFirstStep ( object sender, PInputEventArgs e ) : void
sender object The source of the drag event.
e PInputEventArgs A PInputEventArgs that contains the event data.
return void

OnDragActivityStep() protected method

Override this method to get notified when the drag activity starts stepping.
protected OnDragActivityStep ( object sender, PInputEventArgs e ) : void
sender object The source of the drag event.
e PInputEventArgs A PInputEventArgs that contains the event data.
return void

OnEndDrag() protected method

Subclasses should override this method to get notified of the end event in a drag sequence.
This method is called at the end of a drag sequence.

Unlike the OnMouseDrag method, this method will not get called until after the MinDragStartDistance has been reached.

Notes to Inheritors: Overriding methods must still call base.OnEndDrag() for correct behavior.

protected OnEndDrag ( object sender, PInputEventArgs e ) : void
sender object The source of the end drag event.
e PInputEventArgs A PInputEventArgs that contains the event data.
return void

OnMouseDown() public method

Overridden. See PBasicInputEventHandler.OnMouseDown.
public OnMouseDown ( object sender, PInputEventArgs e ) : void
sender object
e PInputEventArgs
return void

OnMouseDrag() public method

Overridden. See PBasicInputEventHandler.OnMouseDrag.
public OnMouseDrag ( object sender, PInputEventArgs e ) : void
sender object
e PInputEventArgs
return void

OnMouseUp() public method

Overridden. See PBasicInputEventHandler.OnMouseUp.
public OnMouseUp ( object sender, PInputEventArgs e ) : void
sender object
e PInputEventArgs
return void

OnStartDrag() protected method

Subclasses should override this method to get notified of the start of a new drag sequence.
This method is called at the beginning of a drag sequence.

Unlike the OnMouseDrag method, this method will not get called until after the MinDragStartDistance has been reached.

Notes to Inheritors: Overriding methods must still call base.OnStartDrag() for correct behavior.

protected OnStartDrag ( object sender, PInputEventArgs e ) : void
sender object The source of the start drag event.
e PInputEventArgs A PInputEventArgs that contains the event data.
return void

PDragSequenceEventHandler() public method

Constructs a new PDragSequenceEventHandler.
public PDragSequenceEventHandler ( ) : System
return System

ShouldStartDragInteraction() protected method

Returns true if a drag sequence should be initiated.
protected ShouldStartDragInteraction ( PInputEventArgs e ) : bool
e PInputEventArgs A PInputEventArgs that contains the event data.
return bool

StartDragActivity() protected method

Schedules the drag activity to run.
protected StartDragActivity ( PInputEventArgs e ) : void
e PInputEventArgs A PInputEventArgs that contains the event data.
return void

Property Details

Drag public_oe property

Used to notify classes of drag events in a drag sequence.
public DragDelegate Drag
return DragDelegate

DragActivityFinalStep public_oe property

Used to notify classes that the drag activity has stopped stepping.
public DragActivityFinalStepDelegate DragActivityFinalStep
return DragActivityFinalStepDelegate

DragActivityFirstStep public_oe property

Used to notify classes that the drag activity has started stepping.
public DragActivityFirstStepDelegate DragActivityFirstStep
return DragActivityFirstStepDelegate

DragActivityStep public_oe property

Used to notify classes that the drag activity is stepping.
public DragActivityStepDelegate DragActivityStep
return DragActivityStepDelegate

EndDrag public_oe property

Used to notify classes of the end of a drag sequence.
public EndDragDelegate EndDrag
return EndDragDelegate

StartDrag public_oe property

Used to notify classes of the start of a new drag sequence.
public StartDragDelegate StartDrag
return StartDragDelegate