TComponent class
Base class for all components that need owner-owned functionality.
Declaration
TComponent = class(TPersistent)Inheritance
- TComponent
- TPersistent
- TObject
Descends from it: TBaseMediator TBaseSingleInstance TBasicAction TBuildEngine TCustomApplication TCustomConnection TCustomDaemonMapper TCustomInstaller TCustomLazComponentQueue TCustomPropertyStorage TCustomSession TCustomSQLStatement TCustomTimer TDaemonController TDataModule TDataSet TDataSource TDBLookup TDBTransaction TDictionary TDragManager TEventLog TExprBuiltInManager TField TFileVersionInfo TFPCustomHTTPClient TFPCustomTimer TFPExpressionParser TFPMimeTypes THelpDatabase THelpViewer THTTPContentProducer THTTPRouter TIPCBase TJSONApplier TJSONToPascal TLCLComponent TPascalCodeGenerator TPopupNotifier TProcess TSessionFactory TSimpleIPC TWebHandler TXMLConfig
Description
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 altogether 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.
Properties
ComObject | public | Interface reference implemented by the component. |
Components | public | Indexed list (zero-based) of all owned components. |
ComponentCount | public | Count of owned components. |
ComponentIndex | public | Index of component in it's owner's list. |
ComponentState | public | Current component's state. |
ComponentStyle | public | Current component's style. |
DesignInfo | public | Information for IDE designer. |
Owner | public | Owner of this component. |
VCLComObject | public | Not implemented. |
Observers | public | |
Name | published | Name of the component. |
Tag | published | Tag value of the component. |
Methods
GetObservers | protected | |
CanObserve | protected | |
ObserverAdded | protected | |
GetDeltaStreams | protected | |
ReadDeltaStream | protected | |
ReadDeltaState | protected | |
ChangeName | protected | Actually sets the component name. |
DefineProperties | protected | Defines fake top,left properties for handling in the IDE. |
GetChildren | protected | Must be overridden by descendants to return all child components that must be streamed. |
GetChildOwner | protected | Returns the owner of any children. |
GetChildParent | protected | Returns the parent of any children. |
GetOwner | protected | Returns the owner of this component. |
Loaded | protected | Called when the component has finished loading. |
Loading | protected | |
Notification | protected | Called by components that are freed and which received a FreeNotification. |
PaletteCreated | protected | |
ReadState | protected | Read the component's state from a stream. |
RemoveFreeNotifications | protected | |
SetAncestor | protected | Sets the csAncestor state of the component. |
SetDesigning | protected | Sets the csDesigning state of the component. |
SetDesignInstance | protected | |
SetInline | protected | |
SetName | protected | Write handler for Name property. |
SetChildOrder | protected | Determines the order in which children are streamed/created. |
SetParentComponent | protected | Set the parent component. |
Updating | protected | Sets the state to csUpdating. |
Updated | protected | Ends the csUpdating state. |
UpdateRegistry | protected | For compatibility only. |
ValidateRename | protected | Called when a name change must be validated. |
ValidateContainer | protected | ?? |
ValidateInsert | protected | Called when an insert must be validated. |
QueryInterface | protected | |
_AddRef | protected | |
_Release | protected | |
iicrGetComponent | protected | |
GetTypeInfoCount | protected | |
GetTypeInfo | protected | |
GetIDsOfNames | protected | |
Invoke | protected | |
WriteState | public | Writes the component to a stream. |
Create | public | Creates a new instance of the component. |
Destroy | public | Destroys the instance of the component. |
BeforeDestruction | public | Overrides standard BeforeDestruction. |
DestroyComponents | public | Destroy child components. |
Destroying | public | Called when the component is being destroyed. |
ExecuteAction | public | Standard action execution method. |
FindComponent | public | Finds and returns the named component in the owned components. |
FreeNotification | public | Ask the component to notify called when it is being destroyed. |
RemoveFreeNotification | public | Remove a component from the Free Notification list. |
FreeOnRelease | public | Part of the IVCLComObject interface. |
GetEnumerator | public | Create an IEnumerator instance. |
GetNamePath | public | Returns the name path of this component. |
GetParentComponent | public | Returns the parent component. |
HasParent | public | Does the component have a parent ? |
InsertComponent | public | Insert the given component in the list of owned components. |
RemoveComponent | public | Remove the given component from the list of owned components. |
SafeCallException | public | Part of the IVCLComObject Interface. |
SetSubComponent | public | Sets the csSubComponent style. |
UpdateAction | public | Updates the state of an action. |
IsImplementorOf | public | Checks if the current component is the implementor of the interface. |
ReferenceInterface | public | Interface implementation of Notification. |
ToString | public | Return a string representation for the object. |
Events
OnGetDeltaStreams | public |
Fields
FComponentStyle | protected | Contains the component's style. |
ToStringNameMode | public |
Types and constants
TToStringNameMode | public |
Inherited
From TPersistent (5)
Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers
From TObject (37)
AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
