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