Sign in Join
FPDoc Onlineexperiment

TDragImageList class

In unit Controls

A multi-resolution list of Images used during Drag operations.

Declaration

pascal
TDragImageList = class(TCustomImageList)

Inheritance

  1. TDragImageList
  2. TCustomImageList
  3. TLCLComponent
  4. TComponent
  5. TPersistent
  6. TObject

Descends from it: TImageList

Description

TDragImageList is a TCustomImageList descendant which provides a multi-resolution container for images displayed when a drop-drop operation is active. A drag image is shown when a drag operation is active and a DragImageList has been supplied.

TDragImageList overrides and reimplements methods from the ancestor to support the TDragImageListResolution type used in the image Resolution property. Additional properties and methods are provided to work with a drag image and its hot spot when the operation is started or stopped, and when the mouse position is changed.

In drag-dock operations, a drag image is not typically displayed since the DockRect frame already provides visual feedback.

This is a general overview of the usage of this class:

  • SetDragImage selects an image from the list, and defines the hotspot within this image. Te hotspot typically is the offset of the mouse position to the origin of the dragged control.
  • BeginDrag starts dragging, the image is shown at the starting location.
  • DragMove moves the image.
  • EndDrag stops dragging, the image is removed from the screen.

TDragImageList is the ancestor for the TImageList class defined in the LCL. It is also the type returned from the GetDragImages method in TControl.

See also

Properties

DragCursorpublicThe cursor shape to use while dragging.
DragHotspotpublicThe position of the HotSpot image, i.e. the offset to the mouse position while dragging.
DraggingpublicTrue if dragging in progress.
DraggingResolutionpublicGets the scaled image resolution with the drag images for the list.
ResolutionpublicGets the image resolution for the specified image width.

Methods

GetResolutionClassprotectedGets the class type used to create image resolutions in the list.
Initializeprotectedinitializes the cursor shape and image index for the list.
BeginDragpublicStart dragging an image; returns True if successful.
DragLockpublicShow drag image during drag operation.
DragMovepublicShows the drag image at a new location.
DragUnlockpublicHide the drag image.
EndDragpublicFinish dragging of the image, restore the old cursor shape.
HideDragImagepublicHides the drag image without unlocking the window.
SetDragImagepublicSet index of dragged image and hotspot.
ShowDragImagepublicDisplays the drag image.

Inherited

From TCustomImageList (87)

Add AddIcon AddImages AddLazarusResource AddMasked AddMultipleResolutions AddResourceName AddSlice AddSliceCentered AddSliced AllocBy Assign AssignTo BeginUpdate BkColor BlendColor Change CheckIndex Clear ClearOverlays Count Create CreateSize DefineProperties Delete DeleteResolution Destroy DoAfterUpdateStarted DoBeforeUpdateEnded Draw DrawForPPI DrawingStyle DrawOverlay EndUpdate Equals FindResolution GetBitmap GetFullBitmap GetFullRawImage GetHotSpot GetIcon GetRawImage GetResolution Handle HasOverlays Height HeightForPPI HeightForWidth ImageType Insert InsertIcon InsertMasked MarkAsChanged Masked Move OnChange OnGetWidthForPPI Overlay Overlays ReadAdvData ReadData Reference ReferenceForPPI RegisterChanges RegisterResolutions Replace ReplaceIcon ReplaceMasked ReplaceSlice ReplaceSliceCentered ResolutionByIndex ResolutionCount ResolutionForPPI Resolutions ResolutionsDesc Scaled ScaleImage SetSize SetWidthHeight ShareImages SizeForPPI StretchDraw UnRegisterChanges Width WidthForPPI WriteAdvData WriteData

From TLCLComponent (8)

DecLCLRefCount GetWSComponentClass IncLCLRefCount LCLRefCount NewInstance RemoveAllHandlersOfObject WidgetSetClass WSRegisterClass

From TComponent (73)

_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loaded Loading Name Notification ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReadState ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetName SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState

From TPersistent (3)

FPOAttachObserver FPODetachObserver FPONotifyObservers

From TObject (35)

AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.