added ICEProcInputHandler function to retrieve current process

This commit is contained in:
Basile Burg 2015-05-11 02:45:32 +02:00
parent 6a53686123
commit 917ea7a23c
2 changed files with 9 additions and 1 deletions

View File

@ -218,8 +218,10 @@ type
ICEProcInputHandler = interface(ICESingleService) ICEProcInputHandler = interface(ICESingleService)
// add an entry to the list of process which can receive an user input. // add an entry to the list of process which can receive an user input.
procedure addProcess(aProcess: TProcess); procedure addProcess(aProcess: TProcess);
// remove an entry. // removes an entry.
procedure removeProcess(aProcess: TProcess); procedure removeProcess(aProcess: TProcess);
// indicates the current process
function process(): TProcess;
end; end;

View File

@ -28,6 +28,7 @@ type
function singleServiceName: string; function singleServiceName: string;
procedure addProcess(aProcess: TProcess); procedure addProcess(aProcess: TProcess);
procedure removeProcess(aProcess: TProcess); procedure removeProcess(aProcess: TProcess);
function process(): TProcess;
public public
constructor create(aOwner: TComponent); override; constructor create(aOwner: TComponent); override;
destructor destroy; override; destructor destroy; override;
@ -103,6 +104,11 @@ begin
if fProc = aProcess then if fProc = aProcess then
addProcess(nil); addProcess(nil);
end; end;
function TCEProcInputWidget.process(): TProcess;
begin
exit(fProc);
end;
{$ENDREGION} {$ENDREGION}
{$REGION Process input things --------------------------------------------------} {$REGION Process input things --------------------------------------------------}