added TScreen handlers, implemented TMainIDE.UnHideIDE

git-svn-id: trunk@2633 -
This commit is contained in:
mattias 2002-08-17 23:41:32 +00:00
parent 89f8378cf9
commit 2549812cff

View File

@ -41,6 +41,7 @@ type
public public
destructor Destroy; override; destructor Destroy; override;
function Count: integer; function Count: integer;
function NextDownIndex(var Index: integer): boolean;
function IndexOf(AMethod: TMethod): integer; function IndexOf(AMethod: TMethod): integer;
procedure Delete(Index: integer); procedure Delete(Index: integer);
procedure Remove(AMethod: TMethod); procedure Remove(AMethod: TMethod);
@ -300,17 +301,34 @@ end;
function TMethodList.Count: integer; function TMethodList.Count: integer;
begin begin
Result:=FCount; if Self<>nil then
Result:=FCount
else
Result:=0;
end;
function TMethodList.NextDownIndex(var Index: integer): boolean;
begin
if Self<>nil then begin
dec(Index);
if (Index>=FCount) then
Index:=FCount-1;
end else
Index:=-1;
Result:=(Index>=0);
end; end;
function TMethodList.IndexOf(AMethod: TMethod): integer; function TMethodList.IndexOf(AMethod: TMethod): integer;
begin begin
Result:=FCount-1; if Self<>nil then begin
while Result>=0 do begin Result:=FCount-1;
if (FItems[Result].Code=AMethod.Code) while Result>=0 do begin
and (FItems[Result].Data=AMethod.Data) then exit; if (FItems[Result].Code=AMethod.Code)
dec(Result); and (FItems[Result].Data=AMethod.Data) then exit;
end; dec(Result);
end;
end else
Result:=-1;
end; end;
procedure TMethodList.Delete(Index: integer); procedure TMethodList.Delete(Index: integer);
@ -325,8 +343,10 @@ procedure TMethodList.Remove(AMethod: TMethod);
var var
i: integer; i: integer;
begin begin
i:=IndexOf(AMethod); if Self<>nil then begin
if i>=0 then Delete(i); i:=IndexOf(AMethod);
if i>=0 then Delete(i);
end;
end; end;
procedure TMethodList.Add(AMethod: TMethod); procedure TMethodList.Add(AMethod: TMethod);