mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-04 17:58:18 +02:00
published TEdit.OnEditingDone
git-svn-id: trunk@6733 -
This commit is contained in:
parent
b32ca7cca8
commit
77284fb222
@ -22,7 +22,7 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, LCLType, LCLIntf, {$IFDEF VER1_0}Linux{$ELSE}Unix{$ENDIF},
|
||||
Forms, Controls, Graphics, LMessages, InterfaceBase, WSLCLClasses, WSControls,
|
||||
LResources, GTKInt, GLib, Gtk, NVGL,
|
||||
LResources, GTKInt, Gtk, NVGL,
|
||||
{$IFDEF UseGtkGlAreaLib}
|
||||
GTKGLArea_Int
|
||||
{$ELSE}
|
||||
|
@ -47,6 +47,8 @@ type
|
||||
end;
|
||||
PAvgLvlTreeNode = ^TAvgLvlTreeNode;
|
||||
|
||||
{ TAvgLvlTree }
|
||||
|
||||
TAvgLvlTree = class
|
||||
private
|
||||
FCount: integer;
|
||||
@ -64,7 +66,9 @@ type
|
||||
function Compare(Data1, Data2: Pointer): integer;
|
||||
function Find(Data: Pointer): TAvgLvlTreeNode;
|
||||
function FindKey(Key: Pointer;
|
||||
OnCompareKeyWithData: TListSortCompare): TAvgLvlTreeNode;
|
||||
OnCompareKeyWithData: TListSortCompare): TAvgLvlTreeNode;
|
||||
function FindNearestKey(Key: Pointer;
|
||||
OnCompareKeyWithData: TListSortCompare): TAvgLvlTreeNode;
|
||||
function FindSuccessor(ANode: TAvgLvlTreeNode): TAvgLvlTreeNode;
|
||||
function FindPrecessor(ANode: TAvgLvlTreeNode): TAvgLvlTreeNode;
|
||||
function FindLowest: TAvgLvlTreeNode;
|
||||
@ -74,9 +78,9 @@ type
|
||||
function FindLeftMost(Data: Pointer): TAvgLvlTreeNode;
|
||||
function FindRightMost(Data: Pointer): TAvgLvlTreeNode;
|
||||
function FindLeftMostKey(Key: Pointer;
|
||||
OnCompareKeyWithData: TListSortCompare): TAvgLvlTreeNode;
|
||||
OnCompareKeyWithData: TListSortCompare): TAvgLvlTreeNode;
|
||||
function FindRightMostKey(Key: Pointer;
|
||||
OnCompareKeyWithData: TListSortCompare): TAvgLvlTreeNode;
|
||||
OnCompareKeyWithData: TListSortCompare): TAvgLvlTreeNode;
|
||||
function FindLeftMostSameKey(ANode: TAvgLvlTreeNode): TAvgLvlTreeNode;
|
||||
function FindRightMostSameKey(ANode: TAvgLvlTreeNode): TAvgLvlTreeNode;
|
||||
procedure Add(ANode: TAvgLvlTreeNode);
|
||||
@ -685,6 +689,28 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TAvgLvlTree.FindNearestKey(Key: Pointer;
|
||||
OnCompareKeyWithData: TListSortCompare): TAvgLvlTreeNode;
|
||||
var Comp: integer;
|
||||
begin
|
||||
Result:=Root;
|
||||
while (Result<>nil) do begin
|
||||
Comp:=OnCompareKeyWithData(Key,Result.Data);
|
||||
if Comp=0 then exit;
|
||||
if Comp<0 then begin
|
||||
if Result.Left<>nil then
|
||||
Result:=Result.Left
|
||||
else
|
||||
exit;
|
||||
end else begin
|
||||
if Result.Right<>nil then
|
||||
Result:=Result.Right
|
||||
else
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TAvgLvlTree.FindLeftMostKey(Key: Pointer;
|
||||
OnCompareKeyWithData: TListSortCompare): TAvgLvlTreeNode;
|
||||
begin
|
||||
|
@ -680,6 +680,7 @@ type
|
||||
property OnChange;
|
||||
property OnChangeBounds;
|
||||
property OnClick;
|
||||
property OnEditingDone;
|
||||
property OnEnter;
|
||||
property OnExit;
|
||||
Property OnKeyDown;
|
||||
@ -1217,6 +1218,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.190 2005/02/04 15:24:56 mattias
|
||||
published TEdit.OnEditingDone
|
||||
|
||||
Revision 1.189 2005/02/03 15:10:23 micha
|
||||
implement shortcut handling, tcustomlabel accelerator focuscontrol functionality
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user