mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-14 21:54:27 +02:00
undo
git-svn-id: trunk@36964 -
This commit is contained in:
parent
735a0623c4
commit
f9d8e01a08
@ -175,8 +175,6 @@ type
|
|||||||
procedure SwitchPositionWithSuccessor(aNode, aSuccessor: TAvgLvlTreeNode); override;
|
procedure SwitchPositionWithSuccessor(aNode, aSuccessor: TAvgLvlTreeNode); override;
|
||||||
public
|
public
|
||||||
function GetNodeAtIndex(Index: integer): TIndexedAVLTreeNode;
|
function GetNodeAtIndex(Index: integer): TIndexedAVLTreeNode;
|
||||||
function NodeToIndex(Node: TAvgLvlTreeNode): SizeInt;
|
|
||||||
function IndexOf(Data: Pointer): SizeInt;
|
|
||||||
property Items[Index: SizeInt]: Pointer read GetItems; default;
|
property Items[Index: SizeInt]: Pointer read GetItems; default;
|
||||||
procedure ConsistencyCheck; override;
|
procedure ConsistencyCheck; override;
|
||||||
function NodeToReportStr(aNode: TAvgLvlTreeNode): string; override;
|
function NodeToReportStr(aNode: TAvgLvlTreeNode): string; override;
|
||||||
@ -1961,39 +1959,6 @@ begin
|
|||||||
until false;
|
until false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TIndexedAVLTree.NodeToIndex(Node: TAvgLvlTreeNode): SizeInt;
|
|
||||||
var
|
|
||||||
CurNode: TIndexedAVLTreeNode;
|
|
||||||
CurParent: TIndexedAVLTreeNode;
|
|
||||||
begin
|
|
||||||
if Node=nil then exit(-1);
|
|
||||||
|
|
||||||
if fLastNode=Node then
|
|
||||||
exit(fLastIndex);
|
|
||||||
|
|
||||||
CurNode:=TIndexedAVLTreeNode(Node);
|
|
||||||
Result:=CurNode.LeftCount;
|
|
||||||
repeat
|
|
||||||
CurParent:=TIndexedAVLTreeNode(CurNode.Parent);
|
|
||||||
if CurParent=nil then break;
|
|
||||||
if CurParent.Right=CurNode then
|
|
||||||
inc(Result,CurParent.LeftCount+1);
|
|
||||||
CurNode:=CurParent;
|
|
||||||
until false;
|
|
||||||
|
|
||||||
fLastNode:=TIndexedAVLTreeNode(Node);
|
|
||||||
fLastIndex:=Result;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TIndexedAVLTree.IndexOf(Data: Pointer): SizeInt;
|
|
||||||
var
|
|
||||||
Node: TAvgLvlTreeNode;
|
|
||||||
begin
|
|
||||||
Node:=FindPointer(Data);
|
|
||||||
if Node=nil then exit(-1);
|
|
||||||
Result:=NodeToIndex(Node);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TIndexedAVLTree.ConsistencyCheck;
|
procedure TIndexedAVLTree.ConsistencyCheck;
|
||||||
|
|
||||||
procedure E(Msg: string);
|
procedure E(Msg: string);
|
||||||
@ -2015,19 +1980,8 @@ begin
|
|||||||
LeftCount:=0;
|
LeftCount:=0;
|
||||||
if TIndexedAVLTreeNode(Node).LeftCount<>LeftCount then
|
if TIndexedAVLTreeNode(Node).LeftCount<>LeftCount then
|
||||||
E(Format('Node.LeftCount=%d<>%d',[TIndexedAVLTreeNode(Node).LeftCount,LeftCount]));
|
E(Format('Node.LeftCount=%d<>%d',[TIndexedAVLTreeNode(Node).LeftCount,LeftCount]));
|
||||||
|
|
||||||
if GetNodeAtIndex(i)<>Node then
|
if GetNodeAtIndex(i)<>Node then
|
||||||
E(Format('GetNodeAtIndex(%d)<>%P',[i,Node]));
|
E(Format('GetNodeAtIndex(%d)<>%P',[i,Node]));
|
||||||
fLastNode:=nil;
|
|
||||||
if GetNodeAtIndex(i)<>Node then
|
|
||||||
E(Format('GetNodeAtIndex(%d)<>%P',[i,Node]));
|
|
||||||
|
|
||||||
if NodeToIndex(Node)<>i then
|
|
||||||
E(Format('NodeToIndex(%P)<>%d',[Node,i]));
|
|
||||||
fLastNode:=nil;
|
|
||||||
if NodeToIndex(Node)<>i then
|
|
||||||
E(Format('NodeToIndex(%P)<>%d',[Node,i]));
|
|
||||||
|
|
||||||
inc(i);
|
inc(i);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -396,7 +396,8 @@ type
|
|||||||
procedure SetIdleEvent(Enable: boolean);
|
procedure SetIdleEvent(Enable: boolean);
|
||||||
|
|
||||||
procedure WMVScroll(var Msg: TLMScroll); message LM_VSCROLL;
|
procedure WMVScroll(var Msg: TLMScroll); message LM_VSCROLL;
|
||||||
procedure WMMouseWheel(var Message: TLMMouseEvent); message LM_MOUSEWHEEL;
|
procedure WMMouseWheel(var Message: TLMMouseEvent); message
|
||||||
|
LM_MOUSEWHEEL;
|
||||||
procedure SetBackgroundColor(const AValue: TColor);
|
procedure SetBackgroundColor(const AValue: TColor);
|
||||||
procedure SetReferences(const AValue: TColor);
|
procedure SetReferences(const AValue: TColor);
|
||||||
procedure SetSubPropertiesColor(const AValue: TColor);
|
procedure SetSubPropertiesColor(const AValue: TColor);
|
||||||
@ -1082,7 +1083,7 @@ begin
|
|||||||
then TopY := TopY -
|
then TopY := TopY -
|
||||||
(Message.WheelDelta * (ClientHeight - DefaultItemHeight)) div 120
|
(Message.WheelDelta * (ClientHeight - DefaultItemHeight)) div 120
|
||||||
// scrolling one line -> scroll half an item, see SB_LINEDOWN and SB_LINEUP
|
// scrolling one line -> scroll half an item, see SB_LINEDOWN and SB_LINEUP
|
||||||
// handler in WMVScroll
|
// handler in WMVScrol
|
||||||
else TopY := TopY -
|
else TopY := TopY -
|
||||||
(Message.WheelDelta * Mouse.WheelScrollLines*DefaultItemHeight) div 240;
|
(Message.WheelDelta * Mouse.WheelScrollLines*DefaultItemHeight) div 240;
|
||||||
Message.Result := 1;
|
Message.Result := 1;
|
||||||
|
@ -2675,7 +2675,6 @@ type
|
|||||||
tvsManualNotify,
|
tvsManualNotify,
|
||||||
tvsUpdating,
|
tvsUpdating,
|
||||||
tvsPainting,
|
tvsPainting,
|
||||||
tvoFocusedPainting,
|
|
||||||
tvsDblClicked,
|
tvsDblClicked,
|
||||||
tvsTripleClicked,
|
tvsTripleClicked,
|
||||||
tvsQuadClicked,
|
tvsQuadClicked,
|
||||||
@ -3066,7 +3065,6 @@ type
|
|||||||
property DragCursor;
|
property DragCursor;
|
||||||
property DragMode;
|
property DragMode;
|
||||||
property Enabled;
|
property Enabled;
|
||||||
property ExpandSignColor;
|
|
||||||
property ExpandSignType;
|
property ExpandSignType;
|
||||||
property Font;
|
property Font;
|
||||||
property HideSelection;
|
property HideSelection;
|
||||||
@ -3142,6 +3140,7 @@ type
|
|||||||
property Items;
|
property Items;
|
||||||
property TreeLineColor;
|
property TreeLineColor;
|
||||||
property TreeLinePenStyle;
|
property TreeLinePenStyle;
|
||||||
|
property ExpandSignColor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -4407,10 +4407,6 @@ begin
|
|||||||
if [tvsUpdating,tvsPainting] * FStates <> [] then Exit;
|
if [tvsUpdating,tvsPainting] * FStates <> [] then Exit;
|
||||||
Include(FStates, tvsPainting);
|
Include(FStates, tvsPainting);
|
||||||
try
|
try
|
||||||
if Focused then
|
|
||||||
Include(FStates,tvoFocusedPainting)
|
|
||||||
else
|
|
||||||
Exclude(FStates,tvoFocusedPainting);
|
|
||||||
if (tvoAutoItemHeight in fOptions) then
|
if (tvoAutoItemHeight in fOptions) then
|
||||||
UpdateDefaultItemHeight;
|
UpdateDefaultItemHeight;
|
||||||
UpdateScrollbars;
|
UpdateScrollbars;
|
||||||
@ -4775,7 +4771,7 @@ var
|
|||||||
if (tvoRowSelect in Options) and IsSelected then
|
if (tvoRowSelect in Options) and IsSelected then
|
||||||
if tvoThemedDraw in Options then
|
if tvoThemedDraw in Options then
|
||||||
begin
|
begin
|
||||||
if tvoFocusedPainting in FStates then
|
if Focused then
|
||||||
Details := ThemeServices.GetElementDetails(ttItemSelected)
|
Details := ThemeServices.GetElementDetails(ttItemSelected)
|
||||||
else
|
else
|
||||||
Details := ThemeServices.GetElementDetails(ttItemSelectedNotFocus);
|
Details := ThemeServices.GetElementDetails(ttItemSelectedNotFocus);
|
||||||
@ -4804,7 +4800,7 @@ var
|
|||||||
begin
|
begin
|
||||||
if IsSelected then
|
if IsSelected then
|
||||||
begin
|
begin
|
||||||
if tvoFocusedPainting in FStates then
|
if Focused then
|
||||||
Details := ThemeServices.GetElementDetails(ttItemSelected)
|
Details := ThemeServices.GetElementDetails(ttItemSelected)
|
||||||
else
|
else
|
||||||
Details := ThemeServices.GetElementDetails(ttItemSelectedNotFocus);
|
Details := ThemeServices.GetElementDetails(ttItemSelectedNotFocus);
|
||||||
|
Loading…
Reference in New Issue
Block a user