mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 23:00:38 +02:00
IDEIntf: fixed typo
git-svn-id: trunk@36963 -
This commit is contained in:
parent
322f9edf5d
commit
735a0623c4
@ -175,6 +175,8 @@ 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;
|
||||||
@ -1959,6 +1961,39 @@ 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);
|
||||||
@ -1980,8 +2015,19 @@ 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,8 +396,7 @@ 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
|
procedure WMMouseWheel(var Message: TLMMouseEvent); message LM_MOUSEWHEEL;
|
||||||
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);
|
||||||
@ -1083,7 +1082,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 WMVScrol
|
// handler in WMVScroll
|
||||||
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,6 +2675,7 @@ type
|
|||||||
tvsManualNotify,
|
tvsManualNotify,
|
||||||
tvsUpdating,
|
tvsUpdating,
|
||||||
tvsPainting,
|
tvsPainting,
|
||||||
|
tvoFocusedPainting,
|
||||||
tvsDblClicked,
|
tvsDblClicked,
|
||||||
tvsTripleClicked,
|
tvsTripleClicked,
|
||||||
tvsQuadClicked,
|
tvsQuadClicked,
|
||||||
@ -3065,6 +3066,7 @@ 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;
|
||||||
@ -3140,7 +3142,6 @@ type
|
|||||||
property Items;
|
property Items;
|
||||||
property TreeLineColor;
|
property TreeLineColor;
|
||||||
property TreeLinePenStyle;
|
property TreeLinePenStyle;
|
||||||
property ExpandSignColor;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -4407,6 +4407,10 @@ 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;
|
||||||
@ -4771,7 +4775,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 Focused then
|
if tvoFocusedPainting in FStates then
|
||||||
Details := ThemeServices.GetElementDetails(ttItemSelected)
|
Details := ThemeServices.GetElementDetails(ttItemSelected)
|
||||||
else
|
else
|
||||||
Details := ThemeServices.GetElementDetails(ttItemSelectedNotFocus);
|
Details := ThemeServices.GetElementDetails(ttItemSelectedNotFocus);
|
||||||
@ -4800,7 +4804,7 @@ var
|
|||||||
begin
|
begin
|
||||||
if IsSelected then
|
if IsSelected then
|
||||||
begin
|
begin
|
||||||
if Focused then
|
if tvoFocusedPainting in FStates 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