TMtxDialog Class

Component→TMtxComponent→TMtxDialog

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

NameTypeDescription
BlockAssignBooleanBlock streaming of specific properties when storing only a "template".
EditorActiveBooleanReturns True, if the component editor is displayed.
ReferenceTReferenceListStores a list of components that have to be notified, when this component is destroyed.
SourceTMtxComponent

Methods

NameDescription
AllowStreamingReturns the negatated value of BlockAssign.
AssignAssign values of all published properties from Source.
AssignTemplateAssign values of "template-like" published properties from Source.
CreateCreate the component.
CurrentSourceReturns the current component to be edited.
DestroyDestroy the component.
EditorClassTo be overriden in descendanr classses.
Execute (2)Call execute to show the component editor.
ExecuteModal
LoadFromStreamLoad the component from Src stream.
LoadTemplateFromFileLoad a template from file.
LoadTemplateFromStreamLoad a template from stream.
ResetReset is called after loading the data from stream or file.
SaveTemplateToFileSave template to file.
SaveTemplateToStreamSave template to stream.
SaveToStreamSave the component to Dst stream.