mirror of https://gitlab.com/basile.b/dexed.git
interfaces, prevent strings to be copied
This commit is contained in:
parent
102407898a
commit
b7afbbe0ba
|
@ -159,8 +159,8 @@ type
|
||||||
function SingleServiceName: string;
|
function SingleServiceName: string;
|
||||||
function documentCount: Integer;
|
function documentCount: Integer;
|
||||||
function getDocument(index: Integer): TCESynMemo;
|
function getDocument(index: Integer): TCESynMemo;
|
||||||
function findDocument(fname: string): TCESynMemo;
|
function findDocument(const fname: string): TCESynMemo;
|
||||||
procedure openDocument(fname: string);
|
procedure openDocument(const fname: string);
|
||||||
function closeDocument(index: Integer): boolean;
|
function closeDocument(index: Integer): boolean;
|
||||||
function closeDocument(doc: TCESynMemo): boolean;
|
function closeDocument(doc: TCESynMemo): boolean;
|
||||||
public
|
public
|
||||||
|
@ -474,7 +474,7 @@ begin
|
||||||
exit(TCESynMemo(pageControl.Pages[index].Controls[0]));
|
exit(TCESynMemo(pageControl.Pages[index].Controls[0]));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TCEEditorWidget.findDocument(fname: string): TCESynMemo;
|
function TCEEditorWidget.findDocument(const fname: string): TCESynMemo;
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
|
@ -487,7 +487,7 @@ begin
|
||||||
result := nil;
|
result := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEEditorWidget.openDocument(fname: string);
|
procedure TCEEditorWidget.openDocument(const fname: string);
|
||||||
var
|
var
|
||||||
doc: TCESynMemo;
|
doc: TCESynMemo;
|
||||||
begin
|
begin
|
||||||
|
|
|
@ -271,9 +271,9 @@ type
|
||||||
// returns the nth document.
|
// returns the nth document.
|
||||||
function getDocument(index: Integer): TCESynMemo;
|
function getDocument(index: Integer): TCESynMemo;
|
||||||
// returns true if the document matching aFilename is already opened.
|
// returns true if the document matching aFilename is already opened.
|
||||||
function findDocument(fname: string): TCESynMemo;
|
function findDocument(const fname: string): TCESynMemo;
|
||||||
// opens or set the focus on the document matching aFilename.
|
// opens or set the focus on the document matching aFilename.
|
||||||
procedure openDocument(fname: string);
|
procedure openDocument(const fname: string);
|
||||||
// closes the nth document.
|
// closes the nth document.
|
||||||
function closeDocument(index: Integer): boolean;
|
function closeDocument(index: Integer): boolean;
|
||||||
// closes a particular document.
|
// closes a particular document.
|
||||||
|
|
Loading…
Reference in New Issue