|
@@ -45,6 +45,8 @@ type
|
|
|
FFormStyle: TFormStyle;
|
|
|
fMouseDownElement: TFresnelElement;
|
|
|
fMouseUpElement : TFresnelElement;
|
|
|
+ FOnCreate: TNotifyEvent;
|
|
|
+ FOnDestroy: TNotifyEvent;
|
|
|
FVisible: boolean;
|
|
|
FWSForm: TFresnelWSForm;
|
|
|
function GetCaption: TFresnelCaption;
|
|
@@ -61,6 +63,8 @@ type
|
|
|
procedure SetFormWidth(const AValue: TFresnelLength);
|
|
|
procedure SetVisible(const AValue: boolean);
|
|
|
protected
|
|
|
+ procedure DoCreate; virtual;
|
|
|
+ procedure DoDestroy; virtual;
|
|
|
procedure Loaded; override;
|
|
|
procedure Notification(AComponent: TComponent; Operation: TOperation);
|
|
|
override;
|
|
@@ -76,6 +80,8 @@ type
|
|
|
constructor Create(AOwner: TComponent); override;
|
|
|
constructor CreateNew(AOwner: TComponent); virtual;
|
|
|
destructor Destroy; override;
|
|
|
+ procedure AfterConstruction; override;
|
|
|
+ procedure BeforeDestruction; override;
|
|
|
procedure DomChanged; override;
|
|
|
procedure Hide; virtual;
|
|
|
procedure Show; virtual;
|
|
@@ -102,6 +108,8 @@ type
|
|
|
property FormWidth: TFresnelLength read GetFormWidth write SetFormWidth;
|
|
|
property FormHeight: TFresnelLength read GetFormHeight write SetFormHeight;
|
|
|
property Visible: boolean read FVisible write SetVisible default True;
|
|
|
+ property OnCreate: TNotifyEvent read FOnCreate write FOnCreate;
|
|
|
+ property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy;
|
|
|
end;
|
|
|
TFresnelCustomFormClass = Class of TFresnelCustomForm;
|
|
|
|
|
@@ -115,6 +123,8 @@ type
|
|
|
property FormWidth;
|
|
|
property FormHeight;
|
|
|
property Stylesheet;
|
|
|
+ property OnCreate;
|
|
|
+ property OnDestroy;
|
|
|
end;
|
|
|
TFresnelFormClass = class of TFresnelForm;
|
|
|
|
|
@@ -405,6 +415,18 @@ begin
|
|
|
Hide;
|
|
|
end;
|
|
|
|
|
|
+procedure TFresnelCustomForm.DoCreate;
|
|
|
+begin
|
|
|
+ if Assigned(OnCreate) then
|
|
|
+ OnCreate(Self);
|
|
|
+end;
|
|
|
+
|
|
|
+procedure TFresnelCustomForm.DoDestroy;
|
|
|
+begin
|
|
|
+ if Assigned(OnDestroy) then
|
|
|
+ OnDestroy(Self);
|
|
|
+end;
|
|
|
+
|
|
|
procedure TFresnelCustomForm.Loaded;
|
|
|
begin
|
|
|
FLLog(etDebug,['TFresnelCustomForm.Loaded ',ToString]);
|
|
@@ -505,6 +527,18 @@ begin
|
|
|
inherited Destroy;
|
|
|
end;
|
|
|
|
|
|
+procedure TFresnelCustomForm.AfterConstruction;
|
|
|
+begin
|
|
|
+ DoCreate;
|
|
|
+ inherited AfterConstruction;
|
|
|
+end;
|
|
|
+
|
|
|
+procedure TFresnelCustomForm.BeforeDestruction;
|
|
|
+begin
|
|
|
+ inherited BeforeDestruction;
|
|
|
+ DoDestroy;
|
|
|
+end;
|
|
|
+
|
|
|
procedure TFresnelCustomForm.DomChanged;
|
|
|
begin
|
|
|
LayoutQueued:=true;
|