Contains types used to represent references to widget set classes and their handles.

wsreferences.pp contains types used as skeleton widget set component classes. These classes are never directly instantiated and may only contain class functions. Includes type used represent a handle and a pointer to a handle in widget set classes and LCL components.

wsreferences.pp is part of the Lazarus Component Library (LCL).

The type used for handles in LCL applications, components, controls, and widget set classes.

TLCLHandle is an alias for the PtrUInt (Pointer to Unsigned Integer) type, and the type used to represent handles in the Lazarus Component Library (LCL).

TLCLHandle differentiates the handle type used in LCL from the THandle type used in the FPC Run-time Library (RTL) and numerous other libraries. It is needed because the RTL THandle type is a longint (signed) value on 64-bit Linux platforms and not suitable for use as a window handle in the multi-platform LCL.

TLCLHandle is the type used to represent all handles for an application, controls, and components in the LCL - including those in widgetset class instances. In the LCL type system, it is equivalent to HWND (and related identifiers like HDC, HFONT, HICON, HBRUSH, et. al.) used to identify window objects and resources. TLCLHandle is one of the values that can be returned by the TWSReference class used for widgetset class references (The other is a Pointer to the TLCLHandle type).

TLCLHandle is used in the implementation of classes like:

  • TApplication
  • TLCLComponent
  • TLCLReferenceComponent
  • TCustomBitBtn
  • TCustomTimer
  • TCommonDialog
  • TScreen
  • TGraphic
  • TPicture
  • TSharedRasterImage
  • TRasterImage
  • TCustomBitmap
  • TSharedIcon
  • TCustomIcon
  • TIcon
  • TBrush
  • TPen
  • TCursorImage
  • TCustomImageList
  • TCustomImageListResolution
  • TChangeLink
  • TRegion
  • TTreeNode
  • TTreeNodes
TLCLHandle is the replacement for the redefined THandle alias in LCL versions prior to 4.0. THandle is deprecated in LCL 4.0; TLCLHandle is used instead. THandle is still used in the FPC RTL (and in LazUtils) to represent files, file or handle streams, sockets, IO devices, processes, etc.
LCLType.TLCLHandle TLCLComponent TLCLReferenceComponent
Pointer to a TLCLHandle instance.

Used when accessing cached resource items in the LCL.

ComparePHandleWithResourceCacheItem
Pointer to a widget set reference instance.

Used in the implementation of the TLCLReferenceComponent and descendants, and returned by their WSCreateReference methods.

TLCLReferenceComponent.WSCreateReference TCustomImageListResolution.WSCreateReference
Represents a reference to a widget set class instance.

Abstract (temporary) base object for all references to widgetset classes. This reference replaces the functionality of a Handle. An object is used to disallow assignments using different types of handles. It is used as the base class for widgetset descendants like TWSCustomImageListReference, TWSGDIObjReference, TWSDeviceContextReference, and TWSIconReference.

Variant record type which allows access to TLCLHandle and Pointer values in the reference. Clears the handle assigned in the reference.

Sets the internal Pointer for the reference to Nil.

This method, and the others with a '_' prefix, are temporary and for widgetset use only. They can be removed at any time, and without any prior notice.
Stores the specified handle or pointer to an internal member in the reference. This method, and the others with a '_' prefix, are temporary and for widgetset use only. They can be removed at any time, and without any prior notice. Pointer to the handle stored in the reference. TLCLHandle instance stored in the reference.

Gets the TLCLHandle instance assigned to the reference.

This method, and the others with a '_' prefix, are temporary and for widgetset use only. They can be removed at any time, and without any prior notice.
Contains True if a handle has been assigned in the reference. Returns a Pointer with the handle for the reference.