mirror of https://gitlab.com/basile.b/dexed.git
added service ICEMultiDocHandler
This commit is contained in:
parent
302a758612
commit
7ea99ede61
|
@ -171,6 +171,26 @@ type
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(**
|
||||||
|
* Single service related to the collection of document
|
||||||
|
*)
|
||||||
|
ICEMultiDocHandler = interface(ICESingleService)
|
||||||
|
// returns the count of opened document
|
||||||
|
function documentCount: Integer;
|
||||||
|
// returns the index-th document
|
||||||
|
function getDocument(index: Integer): TCESynMemo;
|
||||||
|
// returns true if the document matching aFielanme is already opened.
|
||||||
|
function findDocument(aFilename: string): TCESynMemo;
|
||||||
|
// open or set the focus on the document matching aFilename
|
||||||
|
procedure openDocument(aFilename: string);
|
||||||
|
// close the index-th document
|
||||||
|
function closeDocument(index: Integer): boolean;
|
||||||
|
// conveniance property
|
||||||
|
property document[index: integer]: TCESynMemo read getDocument;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
subject Primitives:
|
subject Primitives:
|
||||||
|
|
||||||
|
@ -203,15 +223,22 @@ type
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
Services assignements:
|
Service assignators:
|
||||||
|
|
||||||
lazily get the interface of a service when needed or for a ponctual usage
|
Lazily get the interface of a service when needed or for a punctual usage.
|
||||||
|
The first overload assign the variable only when not yet set, the second is
|
||||||
|
designed for a punctual usage, for example if a widget needs the service in
|
||||||
|
a single and rarely called method.
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMessageDisplay(var obj: ICEMessagesDisplay): ICEMessagesDisplay; overload;
|
function getMessageDisplay(var obj: ICEMessagesDisplay): ICEMessagesDisplay; overload;
|
||||||
function getMessageDisplay: ICEMessagesDisplay;overload;
|
function getMessageDisplay: ICEMessagesDisplay; overload;
|
||||||
function getprocInputHandler(var obj: ICEProcInputHandler): ICEProcInputHandler;overload;
|
|
||||||
function getprocInputHandler: ICEProcInputHandler;overload;
|
function getprocInputHandler(var obj: ICEProcInputHandler): ICEProcInputHandler; overload;
|
||||||
|
function getprocInputHandler: ICEProcInputHandler; overload;
|
||||||
|
|
||||||
|
function getMultiDocHandler(var obj: ICEMultiDocHandler): ICEMultiDocHandler; overload;
|
||||||
|
function getMultiDocHandler: ICEMultiDocHandler; overload;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -346,7 +373,7 @@ begin
|
||||||
end;
|
end;
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
|
{$REGION ICESingleService assignators ------------------------------------------}
|
||||||
function getMessageDisplay(var obj: ICEMessagesDisplay): ICEMessagesDisplay;
|
function getMessageDisplay(var obj: ICEMessagesDisplay): ICEMessagesDisplay;
|
||||||
begin
|
begin
|
||||||
if obj = nil then
|
if obj = nil then
|
||||||
|
@ -371,4 +398,17 @@ begin
|
||||||
exit(EntitiesConnector.getSingleService('ICEProcInputHandler') as ICEProcInputHandler);
|
exit(EntitiesConnector.getSingleService('ICEProcInputHandler') as ICEProcInputHandler);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function getMultiDocHandler(var obj: ICEMultiDocHandler): ICEMultiDocHandler;
|
||||||
|
begin
|
||||||
|
if obj = nil then
|
||||||
|
obj := EntitiesConnector.getSingleService('ICEMultiDocHandler') as ICEMultiDocHandler;
|
||||||
|
exit(obj);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function getMultiDocHandler: ICEMultiDocHandler;
|
||||||
|
begin
|
||||||
|
exit(EntitiesConnector.getSingleService('ICEMultiDocHandler') as ICEMultiDocHandler);
|
||||||
|
end;
|
||||||
|
{$ENDREGION}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
Loading…
Reference in New Issue