type TMtxDialog = class(TMtxComponent);
Abstract class for component editors.
Derive classes from this component to create component specific dialogs. The new class should override InternalExecute method which provides a way to update the dialog with the property values of the edited component and redeclare the Source property to reflect the new type of the component for which to display the dialog. The dialog (TForm) class type will be determined by calling the TMtxComponent.EditorClass function. The displayed dialog should write new values directly to the edited component. The cancel feature can be implemented by creating a copy of the edited component while the dialog is being updated by the InternalExecute method. Pointer to the edited component is being passed via the TForm.Tag property.
Properties
| Name | Type | Description |
|---|---|---|
| BlockAssign | Boolean | Block streaming of specific properties when storing only a "template". |
| EditorActive | Boolean | Returns True, if the component editor is displayed. |
| Reference | TReferenceList | Stores a list of components that have to be notified, when this component is destroyed. |
| Source | TMtxComponent |
Methods
| Name | Description |
|---|---|
| AllowStreaming | Returns the negatated value of BlockAssign. |
| Assign | Assign values of all published properties from Source. |
| AssignTemplate | Assign values of "template-like" published properties from Source. |
| Create | Create the component. |
| CurrentSource | Returns the current component to be edited. |
| Destroy | Destroy the component. |
| EditorClass | To be overriden in descendanr classses. |
| Execute (2) | Call execute to show the component editor. |
| ExecuteModal | |
| LoadFromStream | Load the component from Src stream. |
| LoadTemplateFromFile | Load a template from file. |
| LoadTemplateFromStream | Load a template from stream. |
| Reset | Reset is called after loading the data from stream or file. |
| SaveTemplateToFile | Save template to file. |
| SaveTemplateToStream | Save template to stream. |
| SaveToStream | Save the component to Dst stream. |