Defines the base class for all LCL TComponents including controls. Represents a Long value as low- and high-order signed SmallInt values.

SysUtils has a LongRec structure which uses an unsigned Word type for Lo and Hi. LazLongRec provides a similar record with signed SmallInt members.

The low-order signed small integer value. The high-order signed small integer value. The base class for LCL components which have an associated widget.

TLCLComponent is a TComponent descendant which is used as the ancestor for many components in the Lazarus Component Library (LCL), including:

  • TApplicationProperties
  • TCommonDialog
  • TControl
  • TCustomImageList
  • TCustomTrayIcon
  • TLCLReferenceComponent
  • TMenu
  • TMenuItem
  • TScreen
TComponent
Registers this component class with the current WidgetSet. This method allows descendants to override the WidgetSetClass.

GetWSComponentClass is a TWSLCLComponentClass class function which allows descendants to override the WidgetSetClass class type used to create instances of the component. When WidgetSetClass has not been assigned (contains Nil), the return value is set to the TWSLCLComponent type.

Class type used to create instances of the specified component. Component instance examined in the method. Constructor for the class instance.

Create is the overridden constructor for the class instance. Create calls the inherited constructor. It also provides support for additional debugging information when DebugLCLComponents has been defined.

Owner of the class instance. Destructor for the class instance.

Destroy is the overridden destructor for the class instance. Destroy provides support for additional debugging information when DebugLCLComponents has been defined. Destroy calls the inherited destructor prior to exiting from the method.

Creates and registers a new instance of the class, and initializes the WidgetSetClass property. Class instance created in the method. Override this method to remove all references to notification handlers in AnObject.

An override is required as soon as a component allows one to add notification handlers. Then all such handlers must be removed, when their owner (AnObject) is destroyed.

The object whose handlers shall be removed. Decrements the reference counter for the LCL component.

When the internal counter reaches 0, the FreeComponent method in the application is called to free resources allocated for the LCL component.

Modified in LCL version 3.0 to signal the OnDecLCLRefcountToZero event in lclclasses.pas when the counter reaches 0. TLCLComponent.LCLRefCount
The number of references to this component.

LCLRefCount is a read-only Integer property that contains the number of references to this component. The value in LCLRefCount is updated when the IncLCLRefCount and DecLCLRefCount methods are called while handling messages where the component instance is the target.

TWinControl.IntfUTF8KeyPress
The class type used to create instances of this component.

WidgetSetClass is a read-only TWSLCLComponentClass property which contains the class type used to create new instances of the component. The value for the property is set in the NewInstance method.

Base class for all components having an associated widget with a handle.

The widget is created by the LCL control whenever required, and its reference is stored in the FReferencePtr member. This reference is for internal use by the LCL control, and not by application code.

This reference is different from the OS/window manager-specific window Handle.

Applications only can send messages to a windowed control, using its window Handle.

Pointer to a widget class Reference. Set while we are creating the Reference. Gets the value for the ReferenceAllocated property. Value for the ReferenceAllocated property. Override this method to supply specific widget creation parameters. The parameter record to update. Destroys the reference object. Override this method to return the Handle from the reference. True if both the component reference pointer and its Handle have been allocated. Called after the Reference is created. Called before the Reference is destroyed. Creates a Reference, if not already done. Tells the widgetset to create a Reference.

This implementation returns Nil, and should be overridden in derived classes.

Pointer to the reference for the widgetset class instance, or Nil when not allocated. Creation parameters for the reference. Tells the widgetset to destroy the Reference. Destructor for the class instance.

Destroy is the overridden destructor for the class instance. Destroy calls DestroyReference to release an assigned internal reference for the widgetset class. Destroy calls the inherited destructor prior to exiting from the method.

If True, a Reference has been allocated for this component. Event handler signalled when a reference counted LCL component is released.

OnDecLCLRefcountToZero is a TNotifyEvent variable which contains the event handler signalled when reference counted TLCLComponent instances are released. It is signalled (when assigned) from the DecLCLRefCount method in TLCLComponent using the component instance as an argument.

The handler routine is assigned to the variable when the ReleaseComponent method is called in TApplication. It is set to the DoDecLCLRefcountToZero method in the Application. The routine will continue to be called until the LCLRefCount for the TLCLComponent reaches 0. At time, the handler is unassigned and FreeComponent is called.

Added in LCL version 3.0.