[Overview][Constants][Types][Classes][Procedures and functions][Variables] | Reference for unit 'Classes' (#rtl) |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Base class for all components that need owner-owned functionality.
Source position: classesh.inc line 1306
type TComponent = class(TPersistent) |
||
public |
||
procedure WriteState(); virtual; |
|
Writes the component to a stream. |
constructor Create(); virtual; |
|
Creates a new instance of the component. |
procedure BeforeDestruction; override; |
|
Overrides standard BeforeDestruction. |
destructor Destroy; override; |
|
Destroys the instance of the component. |
procedure DestroyComponents; |
|
Destroy child components. |
procedure Destroying; |
|
Called when the component is being destroyed |
function ExecuteAction(); dynamic; |
|
Standard action execution method. |
function FindComponent(); |
|
Finds and returns the named component in the owned components. |
procedure FreeNotification(); |
|
Ask the component to notify called when it is being destroyed. |
procedure RemoveFreeNotification(); |
|
Remove a component from the Free Notification list. |
procedure FreeOnRelease; |
|
Part of the IVCLComObject interface. |
function GetParentComponent; dynamic; |
|
Returns the parent component. |
function HasParent; dynamic; |
|
Does the component have a parent ? |
procedure InsertComponent(); |
|
Insert the given component in the list of owned components. |
procedure RemoveComponent(); |
|
Remove the given component from the list of owned components. |
function SafeCallException(); override; |
|
Part of the IVCLComObject Interface. |
procedure SetSubComponent(); |
|
Sets the csSubComponent style. |
function UpdateAction(); dynamic; |
|
Updates the state of an action. |
property Components: TComponent; [r] |
|
Indexed list (zero-based) of all owned components. |
property ComponentCount: Integer; [r] |
|
Count of owned components |
property ComponentIndex: Integer; [rw] |
|
Index of component in it's owner's list. |
property ComponentState: TComponentState; [r] |
|
Current component's state. |
property ComponentStyle: TComponentStyle; [r] |
|
Current component's style. |
property DesignInfo: LongInt; [rw] |
|
Information for IDE designer. |
property Owner: TComponent; [r] |
|
Owner of this component. |
property VCLComObject: Pointer; [rw] |
|
Not implemented. |
published |
||
property Name: TComponentName; [rws] |
|
Name of the component. |
property Tag: LongInt; [rw] |
|
Tag value of the component. |
end; |
|
Base class for all components that need owner-owned functionality. |
|
| | ||
|
Base class for streaming system and persistent properties. |
|
| | ||
TObject |
TComponent is the base class for any set of classes that needs owner-owned functionality, and which needs support for property streaming. All classes that should be handled by an IDE (Integrated Development Environment) must descend from TComponent, as it includes all support for streaming all its published properties.
Components can 'own' other components. TComponent introduces methods for enumerating the child components. It also allows to name the owned components with a unique name. Furthermore, functionality for sending notifications when a component is removed from the list or removed from memory alltogether is also introduced in TComponent
TComponent introduces a form of automatic memory management: When a component is destroyed, all its child components will be destroyed first.
No notes exist for this page yet.