Unit 'Controls' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#lcl]

TDragManager

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

The abstract base class used to manage dragging of controls (for drop or dock operations).

Declaration

Source position: controls.pp line 568

type TDragManager = class(TComponent)

protected

  procedure KeyUp(); virtual; abstract;

  

Handler for keyboard key released.

  procedure KeyDown(); virtual; abstract;

  

Handler for keyboard key pressed.

  procedure CaptureChanged(); virtual; abstract;

  

Aborts the dragging operation, when the capturing control has changed.

  procedure MouseMove(); virtual; abstract;

  

Generates visual feedback for mouse movement in a drag operation.

  procedure MouseUp(); virtual; abstract;

  

Ends dragging.

  procedure MouseDown(); virtual; abstract;

  

NOP.

public

  constructor Create(); override;

  

Initializes the Delphi default dragging parameters.

  function IsDragging; virtual; abstract;

  

Check if dragging is in progress.

  function Dragging(); virtual; abstract;

  

True if the specified control is being dragged.

  procedure RegisterDockSite(); virtual; abstract;

  

Adds the control to the list of registered docking sites.

  procedure DragStart(); virtual; abstract;

  

Starts dragging a control.

  procedure DragMove(); virtual; abstract;

  

Updates the visual dragging feedback.

  procedure DragStop(); virtual; abstract;

  

Ends dragging.

  function CanStartDragging(); virtual; abstract;

  

Indicates if the mouse coordinates are within the drag threshold for the specified control.

  property DragImmediate: Boolean; [rw]

  

Start dragging immediately, on MouseDown?

  property DragThreshold: Integer; [rw]

  

The threshold amount for mouse movement before delayed dragging starts (default is 5 pixels).

end;

Inheritance

TDragManager

  

The abstract base class used to manage dragging of controls (for drop or dock operations).

|

TObject

Description

TDragManager specifies an object-oriented version of the Delphi drag manager. It is implemented by the TDragManagerDefault descendant.

Remark: The registered dock sites should be stored in a persistent list, not in a DragManager instance.