widget can specify it want to be shown as modal form

This commit is contained in:
Basile Burg 2015-02-23 06:17:39 +01:00
parent 038246a56f
commit 2f2808005d
1 changed files with 12 additions and 0 deletions

View File

@ -36,6 +36,7 @@ type
procedure optset_UpdaterDelay(aReader: TReader); procedure optset_UpdaterDelay(aReader: TReader);
protected protected
fDockable: boolean; fDockable: boolean;
fModal: boolean;
fID: string; fID: string;
// a descendant overrides to implementi a periodic update. // a descendant overrides to implementi a periodic update.
procedure UpdateByLoop; virtual; procedure UpdateByLoop; virtual;
@ -51,6 +52,8 @@ type
procedure sesoptBeforeSave; virtual; procedure sesoptBeforeSave; virtual;
procedure sesoptDeclareProperties(aFiler: TFiler); virtual; procedure sesoptDeclareProperties(aFiler: TFiler); virtual;
procedure sesoptAfterLoad; virtual; procedure sesoptAfterLoad; virtual;
//
function getIfModal: boolean;
published published
property updaterByLoopInterval: Integer read fLoopInter write setLoopInt; property updaterByLoopInterval: Integer read fLoopInter write setLoopInt;
property updaterByDelayDuration: Integer read fDelayDur write setDelayDur; property updaterByDelayDuration: Integer read fDelayDur write setDelayDur;
@ -77,6 +80,8 @@ type
property updating: boolean read fUpdating; property updating: boolean read fUpdating;
// true by default, allow a widget to be docked. // true by default, allow a widget to be docked.
property isDockable: boolean read fDockable; property isDockable: boolean read fDockable;
// not if isDockable, otherwise a the widget is shown as modal form.
property isModal: boolean read getIfModal;
end; end;
(** (**
@ -138,6 +143,13 @@ begin
EntitiesConnector.removeObserver(self); EntitiesConnector.removeObserver(self);
inherited; inherited;
end; end;
function TCEWidget.getIfModal: boolean;
begin
if isDockable then result := false
else result := fModal;
end;
{$ENDREGION} {$ENDREGION}
{$REGION ICESessionOptionsObserver ---------------------------------------------} {$REGION ICESessionOptionsObserver ---------------------------------------------}