From a48a638bad85f7171a81572e044f58fda27fede9 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sun, 19 Sep 2021 17:12:55 +0200 Subject: [PATCH 01/70] V7.6.1 --- Source/VirtualTrees.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index aea270260..8609b58d1 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -87,7 +87,7 @@ interface {$ENDIF} const - VTVersion = '7.6.0' deprecated 'This const is going to be removed in a future version'; + VTVersion = '7.6.1' deprecated 'This const is going to be removed in a future version'; const VTTreeStreamVersion = 3; From a6869849f3aa94eef04a774f928e23de97520e34 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sun, 26 Sep 2021 20:50:35 +0200 Subject: [PATCH 02/70] Fixed issue #1065: Compile error in older Delphi versions --- Source/VirtualTrees.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 8609b58d1..937bf9bc8 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -10021,7 +10021,7 @@ procedure TVTHeader.SetStyle(Value: TVTHeaderStyle); procedure TVTHeader.StyleChanged(); begin {$IF CompilerVersion < 31} // See issue #1043 - AutoScale(False); //Elements may have changed in size + AutoScale(); //Elements may have changed in size {$IFEND} end; From 52b5ea2aa56ad48f0b5d2d0ab2498934a97dec06 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sun, 14 Nov 2021 12:11:14 +0100 Subject: [PATCH 03/70] Fixed #1073: Prevent premature creation of control handle while the control is read. --- Source/VirtualTrees.pas | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 937bf9bc8..13da5afd5 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -7072,20 +7072,23 @@ procedure TVirtualTreeColumn.SetWidth(Value: Integer); Inc(TotalFixedMinWidth, FColumns[I].MinWidth); end; - // The percentage values have precedence over the pixel values. - If FMaxWidthPercent > 0 then - TotalFixedMinWidth:= Min((ClientWidth * FMaxWidthPercent) div 100, TotalFixedMinWidth); - If FMinWidthPercent > 0 then - TotalFixedMaxWidth := Max((ClientWidth * FMinWidthPercent) div 100, TotalFixedMaxWidth); - - EffectiveMaxWidth := Min(TotalFixedMaxWidth - (GetVisibleFixedWidth - Self.FWidth), FMaxWidth); - EffectiveMinWidth := Max(TotalFixedMinWidth - (GetVisibleFixedWidth - Self.FWidth), FMinWidth); - Value := Min(Max(Value, EffectiveMinWidth), EffectiveMaxWidth); - - if FMinWidthPercent > 0 then - Value := Max((ClientWidth * FMinWidthPercent) div 100 - GetVisibleFixedWidth + Self.FWidth, Value); - if FMaxWidthPercent > 0 then - Value := Min((ClientWidth * FMaxWidthPercent) div 100 - GetVisibleFixedWidth + Self.FWidth, Value); + if HandleAllocated then // Prevent premature creation of window handle, see issue #1073 + begin + // The percentage values have precedence over the pixel values. + If FMaxWidthPercent > 0 then + TotalFixedMinWidth:= Min((ClientWidth * FMaxWidthPercent) div 100, TotalFixedMinWidth); + If FMinWidthPercent > 0 then + TotalFixedMaxWidth := Max((ClientWidth * FMinWidthPercent) div 100, TotalFixedMaxWidth); + + EffectiveMaxWidth := Min(TotalFixedMaxWidth - (GetVisibleFixedWidth - Self.FWidth), FMaxWidth); + EffectiveMinWidth := Max(TotalFixedMinWidth - (GetVisibleFixedWidth - Self.FWidth), FMinWidth); + Value := Min(Max(Value, EffectiveMinWidth), EffectiveMaxWidth); + + if FMinWidthPercent > 0 then + Value := Max((ClientWidth * FMinWidthPercent) div 100 - GetVisibleFixedWidth + Self.FWidth, Value); + if FMaxWidthPercent > 0 then + Value := Min((ClientWidth * FMaxWidthPercent) div 100 - GetVisibleFixedWidth + Self.FWidth, Value); + end;// if HandleAllocated end; end else From 03284888d6642f1a02b8ff3bd62e5b1115ca5a8d Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Mon, 27 Dec 2021 19:42:17 +0100 Subject: [PATCH 04/70] Fixed issue #1067: Mouse cursor indicates a column width change, but starts a selection or a drag operation --- Source/VirtualTrees.pas | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 13da5afd5..45c84569c 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -87,7 +87,7 @@ interface {$ENDIF} const - VTVersion = '7.6.1' deprecated 'This const is going to be removed in a future version'; + VTVersion = '7.6.2' deprecated 'This const is going to be removed in a future version'; const VTTreeStreamVersion = 3; @@ -10567,9 +10567,10 @@ function TVTHeader.HandleMessage(var Message: TMessage): Boolean; Result := (hoColumnResize in FOptions) and DetermineSplitterIndex(P); if Result and not InHeader(P) then begin - NextCol := FColumns.GetNextVisibleColumn(FColumns.TrackIndex); - if not (coFixed in FColumns[FColumns.TrackIndex].Options) or (NextCol <= NoColumn) or - (coFixed in FColumns[NextCol].Options) or (P.Y > Integer(Treeview.FRangeY)) then + // Code commented due to issue #1067. What was the orginal inention of this code? It does not make much sense unless you allow column resize outside the header. + //NextCol := FColumns.GetNextVisibleColumn(FColumns.TrackIndex); + //if not (coFixed in FColumns[FColumns.TrackIndex].Options) or (NextCol <= NoColumn) or + // (coFixed in FColumns[NextCol].Options) or (P.Y > Integer(Treeview.FRangeY)) then Result := False; end; end; From 21727e02e027174187fe4423d33a33fb4fb3ba0d Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Mon, 27 Dec 2021 19:54:15 +0100 Subject: [PATCH 05/70] Remove unused variable. Issue #1067 --- Source/VirtualTrees.pas | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 45c84569c..32989bb13 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -10559,10 +10559,6 @@ function TVTHeader.HandleMessage(var Message: TMessage): Boolean; //--------------- local function -------------------------------------------- function HSplitterHit: Boolean; - - var - NextCol: TColumnIndex; - begin Result := (hoColumnResize in FOptions) and DetermineSplitterIndex(P); if Result and not InHeader(P) then From b77a9c874f2cf2920193b04a335ba4e99d0f087a Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Tue, 28 Dec 2021 11:41:31 +0100 Subject: [PATCH 06/70] Fixed issue #1067 Mouse cursor indicates a column width change, but starts a selection or a drag operation --- Source/VirtualTrees.pas | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 13da5afd5..67f5b72fb 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -10559,17 +10559,14 @@ function TVTHeader.HandleMessage(var Message: TMessage): Boolean; //--------------- local function -------------------------------------------- function HSplitterHit: Boolean; - - var - NextCol: TColumnIndex; - begin Result := (hoColumnResize in FOptions) and DetermineSplitterIndex(P); if Result and not InHeader(P) then begin - NextCol := FColumns.GetNextVisibleColumn(FColumns.TrackIndex); - if not (coFixed in FColumns[FColumns.TrackIndex].Options) or (NextCol <= NoColumn) or - (coFixed in FColumns[NextCol].Options) or (P.Y > Integer(Treeview.FRangeY)) then + // Code commented due to issue #1067. What was the orginal inention of this code? It does not make much sense unless you allow column resize outside the header. + // NextCol := FColumns.GetNextVisibleColumn(FColumns.TrackIndex); + // if not (coFixed in FColumns[FColumns.TrackIndex].Options) or (NextCol <= NoColumn) or + // (coFixed in FColumns[NextCol].Options) or (P.Y > Integer(Treeview.FRangeY)) then Result := False; end; end; From 69236072fe26adcae92c9e3ecbf224b13b0c32e6 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Wed, 29 Dec 2021 20:29:22 +0100 Subject: [PATCH 07/70] Fix designtime theming in Delphi 11 --- Source/VirtualTrees.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 32989bb13..c5f7b0627 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -25826,7 +25826,7 @@ procedure TBaseVirtualTree.VclStyleChanged(); // Updates the member FVclStyleEnabled, should be called initially and when the VCL style changes begin - FVclStyleEnabled := StyleServices.Enabled and not StyleServices.IsSystemStyle and not (csDesigning in ComponentState); + FVclStyleEnabled := StyleServices.Enabled and not StyleServices.IsSystemStyle {$IF CompilerVersion < 35} and not (csDesigning in ComponentState) {$ifend}; Header.StyleChanged(); end; From 9b82cda04539693f3b03fe01cf87b1e654f67f13 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sun, 9 Jan 2022 21:09:51 +0100 Subject: [PATCH 08/70] Fixed #1075: Alt + left-click + mouse-move behavior differs from Windows Explorer --- Source/VirtualTrees.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index d6fed9b82..9c4b74373 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -22703,7 +22703,7 @@ procedure TBaseVirtualTree.HandleMouseDown(var Message: TWMMouse; var HitInfo: T IsLabelHit := not AltPressed and not (toSimpleDrawSelection in FOptions.SelectionOptions) and ((hiOnItemLabel in HitInfo.HitPositions) or (hiOnNormalIcon in HitInfo.HitPositions)); - IsCellHit := not AltPressed and not IsLabelHit and Assigned(HitInfo.HitNode) and + IsCellHit := not IsLabelHit and Assigned(HitInfo.HitNode) and ([hiOnItemButton, hiOnItemCheckBox, hiNoWhere] * HitInfo.HitPositions = []) and ((toFullRowSelect in FOptions.SelectionOptions) or ((toGridExtensions in FOptions.MiscOptions) and (HitInfo.HitColumn > NoColumn))); From 0ace75b399080ad9dfb7bf236c0558817bb89c65 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Mon, 7 Feb 2022 18:10:00 +0100 Subject: [PATCH 09/70] Minor clarification --- CHANGES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 28830aaa4..8d2e5fc10 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,4 @@ -V7.1 and later: +V7.x: https://github.com/JAM-Software/Virtual-TreeView/milestones?state=closed V7.0: (22 Jul 2018) From d964b31d5de48910e43657061a72e9248deff1d4 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Mon, 7 Feb 2022 20:55:45 +0100 Subject: [PATCH 10/70] Fixed #1083: Drop target font color is wrong Since drop highlight color is chosen independent of the focus state, we need to choose Font color also independent of it. --- Source/VirtualTrees.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 9c4b74373..e4bf09fd2 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -33781,7 +33781,7 @@ procedure TCustomVirtualStringTree.InitializeTextProperties(var PaintInfo: TVTPa if Node = FDropTargetNode then begin if ((FLastDropMode = dmOnNode) or (vsSelected in Node.States)) then - Canvas.Font.Color := FColors.GetSelectedNodeFontColor(Focused or (toPopupMode in FOptions.PaintOptions)); + Canvas.Font.Color := FColors.GetSelectedNodeFontColor(True); // See #1083, since drop highlight color is chosen independent of the focus state, we need to choose Font color also independent of it. end else if vsSelected in Node.States then From 77ee06bec3602c57ebcc94cb329a5b994a4c1a7e Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Mon, 7 Feb 2022 21:00:40 +0100 Subject: [PATCH 11/70] Added folder like #1083 to ignore list, which typically contain projects for reproducing reported issues. --- .gitignore | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitignore b/.gitignore index 6bf745683..c55357bb4 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,10 @@ VirtualTreeView.zip *.#00 *.pch *.skincfg +*.a +Packages/RAD Studio XE3/VirtualTreesR.lib +*.lib + +# Folder with repro projects # +############################## +/#* \ No newline at end of file From 46c653fdeb9edf75e4d45b3c5e8d5d028a92a1b9 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Mon, 7 Feb 2022 21:47:27 +0100 Subject: [PATCH 12/70] Fixed #1085: Moved early exit for empty tree after focus handling. --- Source/VirtualTrees.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index e4bf09fd2..4145f078f 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -22628,8 +22628,6 @@ procedure TBaseVirtualTree.HandleMouseDown(var Message: TWMMouse; var HitInfo: T //--------------- end local functions --------------------------------------- begin - if IsEmpty then - Exit; // Nothing to do if [tsWheelPanning, tsWheelScrolling] * FStates <> [] then begin StopWheelPanning; @@ -22658,6 +22656,9 @@ procedure TBaseVirtualTree.HandleMouseDown(var Message: TWMMouse; var HitInfo: T GetHitTestInfoAt(Message.XPos, Message.YPos, True, HitInfo); end; + if IsEmpty then + exit; + // Keep clicked column in case the application needs it. FHeader.Columns.FClickIndex := HitInfo.HitColumn; From 5ac76b993f11bc43954f38d3fb6a28d64102c9b8 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Wed, 9 Feb 2022 21:47:23 +0100 Subject: [PATCH 13/70] Fixed #1084: Selection not properly updated after changing font style --- Source/VirtualTrees.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 4145f078f..e769ccc81 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -33851,8 +33851,9 @@ procedure TCustomVirtualStringTree.PaintNormalText(var PaintInfo: TVTPaintInfo; // If the font has been changed then the ellipsis width must be recalculated. TripleWidth := 0; // Recalculate also the width of the normal text. - GetTextExtentPoint32W(Canvas.Handle, PWideChar(Text), Length(Text), Size); NodeWidth := Size.cx + 2 * FTextMargin; + NodeWidth := DoTextMeasuring(Canvas, Node, Column, Text).cx + 2 * FTextMargin; + InvalidateNode(Node); // repaint node and selection end; DrawFormat := DT_NOPREFIX or DT_VCENTER or DT_SINGLELINE; From 47564b8c0d4e56b29537c261edbba674b432d90d Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Wed, 9 Feb 2022 21:50:06 +0100 Subject: [PATCH 14/70] Followup commit for #1084: Removed unused variable --- Source/VirtualTrees.pas | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index e769ccc81..22bc5377a 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -33808,7 +33808,6 @@ procedure TCustomVirtualStringTree.PaintNormalText(var PaintInfo: TVTPaintInfo; TripleWidth: Integer; R: TRect; DrawFormat: Cardinal; - Size: TSize; Height: Integer; begin @@ -33851,9 +33850,8 @@ procedure TCustomVirtualStringTree.PaintNormalText(var PaintInfo: TVTPaintInfo; // If the font has been changed then the ellipsis width must be recalculated. TripleWidth := 0; // Recalculate also the width of the normal text. - NodeWidth := Size.cx + 2 * FTextMargin; NodeWidth := DoTextMeasuring(Canvas, Node, Column, Text).cx + 2 * FTextMargin; - InvalidateNode(Node); // repaint node and selection + InvalidateNode(Node); // repaint node and selection as the font chnaged, see #1084 end; DrawFormat := DT_NOPREFIX or DT_VCENTER or DT_SINGLELINE; From 7319d4dbdb95ad71c353d0efe8a443338c9c4a8d Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Thu, 17 Feb 2022 20:21:42 +0100 Subject: [PATCH 15/70] =?UTF-8?q?Fix=20f=C3=BCr=20issue=20#1087?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/VirtualTrees.pas | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 22bc5377a..40788bd86 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -33809,7 +33809,7 @@ procedure TCustomVirtualStringTree.PaintNormalText(var PaintInfo: TVTPaintInfo; R: TRect; DrawFormat: Cardinal; Height: Integer; - + lNewNodeWidth: Integer; begin InitializeTextProperties(PaintInfo); with PaintInfo do @@ -33850,9 +33850,13 @@ procedure TCustomVirtualStringTree.PaintNormalText(var PaintInfo: TVTPaintInfo; // If the font has been changed then the ellipsis width must be recalculated. TripleWidth := 0; // Recalculate also the width of the normal text. - NodeWidth := DoTextMeasuring(Canvas, Node, Column, Text).cx + 2 * FTextMargin; - InvalidateNode(Node); // repaint node and selection as the font chnaged, see #1084 - end; + lNewNodeWidth := DoTextMeasuring(Canvas, Node, Column, Text).cx + 2 * FTextMargin; + if lNewNodeWidth <> NodeWidth then + begin + NodeWidth := lNewNodeWidth; + InvalidateNode(Node); // repaint node and selection as the font chnaged, see #1084 + end;//if + end;// if FFontChanged DrawFormat := DT_NOPREFIX or DT_VCENTER or DT_SINGLELINE; if BidiMode <> bdLeftToRight then From e2651d2cf8fd15444c1543ed51ee19ddfc245d8c Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sun, 13 Mar 2022 16:11:31 +0100 Subject: [PATCH 16/70] Update VirtualTrees.pas Minor improvement for TVTLineMode.lmBands, see #1091 --- Source/VirtualTrees.pas | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 40788bd86..8e5e0f4f6 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -30834,13 +30834,11 @@ procedure TBaseVirtualTree.PaintTree(TargetCanvas: TCanvas; Window: TRect; Targe begin if BidiMode = bdLeftToRight then begin - DrawDottedHLine(PaintInfo, CellRect.Left + IfThen(toFixedIndent in FOptions.PaintOptions, 1, IndentSize) * Integer(FIndent), CellRect.Right - 1, - CellRect.Bottom - 1); + DrawDottedHLine(PaintInfo, CellRect.Left + PaintInfo.Offsets[ofsCheckBox] - fImagesMargin, CellRect.Right - 1, CellRect.Bottom - 1); end else begin - DrawDottedHLine(PaintInfo, CellRect.Left, CellRect.Right - IfThen(toFixedIndent in FOptions.PaintOptions, 1, IndentSize) * Integer(FIndent) - 1, - CellRect.Bottom - 1); + DrawDottedHLine(PaintInfo, CellRect.Left, CellRect.Right - IfThen(toFixedIndent in FOptions.PaintOptions, 1, IndentSize) * Integer(FIndent) - 1, CellRect.Bottom - 1); end; end else From c7467c1ea50df6da9db004c4be491ce0593d0632 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Mon, 14 Mar 2022 09:15:24 +0100 Subject: [PATCH 17/70] V7.5 => V7.6 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b4d981bfe..d05cef65f 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Virtual Treeview is a Delphi treeview control built from ground up. Many years o I don't use C++ Builder and my experience with it is very limited. This makes it difficult to take care about bugs that are reported in C++ Builder and to maintain the C++ Builder packages. I would be great if someone would volunteer to do this. ### Downloads -**V7.5** official release for **RAD Studio XE3 to 10.4.2 Rio**: [JAM Software](https://www.jam-software.com/virtual-treeview/VirtualTreeView.zip) ([Changes](https://github.com/JAM-Software/Virtual-TreeView/issues?q=is%3Aissue+milestone%3AV7.5+is%3Aclosed)) +**V7.6.x** official release for **RAD Studio XE3 to 10.4.2 Rio**: [JAM Software](https://www.jam-software.com/virtual-treeview/VirtualTreeView.zip) An experimental **FireMonkey** port can be found here: [livius2/Virtual-TreeView](https://github.com/livius2/Virtual-TreeView) From 94e72c35c7a75783376c2f7d156e09db9f8ffe5a Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Thu, 24 Mar 2022 15:05:28 +0100 Subject: [PATCH 18/70] Added support for nmake in VS 2022 --- MAKEFILE | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MAKEFILE b/MAKEFILE index e10d02941..2a13e4e86 100644 --- a/MAKEFILE +++ b/MAKEFILE @@ -3,6 +3,9 @@ EMBARCADERO = $(PROGRAMFILES)\Embarcadero\RAD Studio STUDIO = $(PROGRAMFILES)\Embarcadero\Studio BDSCOMMONDIRMAIN = %PUBLIC%\Documents\Embarcadero\Studio # Default MS Build version +!IF EXIST("$(PROGRAMFILESX64)\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\msbuild.exe") +BUILDEXE = "$(PROGRAMFILESX64)\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\msbuild.exe" +!ELSE !IF EXIST("$(PROGRAMFILES)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe") BUILDEXE = "$(PROGRAMFILES)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuild.exe" !ELSE From a692300ddc2bc6006fd984987f1f869b0337aa2b Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Tue, 5 Apr 2022 14:53:37 +0200 Subject: [PATCH 19/70] Remvoed assertion done for #487 that may fire if the selection is chnaged within the OnAddToSelect event hanlder. Solves #948 --- Source/VirtualTrees.pas | 2 -- 1 file changed, 2 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 8e5e0f4f6..fc6710c01 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -23328,8 +23328,6 @@ function TBaseVirtualTree.InternalAddToSelection(const NewItems: TNodeArray; New if SyncCheckstateWithSelection[PTmpNode] then checkstate[PTmpNode] := csCheckedNormal; end; - - Assert(FSelectionCount = (lPreviousSelectedCount + NewLength), 'Fixing issue #487 seems to ahve caused a problem here.') end; end; From c86cbf148a42c9670074674030d92bb83f1ce3dd Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Tue, 12 Apr 2022 16:57:07 +0200 Subject: [PATCH 20/70] Fixed issue #1094: EmptyListMessage: Increase padding and make padding dpi-aware --- Source/VirtualTrees.pas | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index fc6710c01..a4ce47b55 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -98,6 +98,7 @@ interface FadeAnimationStepCount = 255; // Number of animation steps for hint fading (0..255). ShadowSize = 5; // Size in pixels of the hint shadow. This value has no influence on Win2K and XP systems // as those OSes have native shadow support. + cDefaultTextMargin = 4; // The default margin of text // Special identifiers for columns. NoColumn = -1; @@ -30569,6 +30570,7 @@ procedure TBaseVirtualTree.PaintTree(TargetCanvas: TCanvas; Window: TRect; Targe PaintWidth: Integer; CurrentNodeHeight: Integer; lUseSelectedBkColor: Boolean; // determines if the dotted grid lines need to be painted in selection color of background color + lEmptyListTextMargin: Integer; CellIsTouchingClientRight: Boolean; CellIsInLastColumn: Boolean; @@ -31136,12 +31138,14 @@ procedure TBaseVirtualTree.PaintTree(TargetCanvas: TCanvas; Window: TRect; Targe begin // output a message if no items are to display Canvas.Font := Self.Font; + Canvas.Font.Size := Round(Canvas.Font.Size * 1.25); SetBkMode(TargetCanvas.Handle, TRANSPARENT); - R.Left := OffSetX + 2; - R.Top := 2; - R.Right := R.Left + Width - 2; - R.Bottom := Height -2; - TargetCanvas.Font.Color := clGrayText; + lEmptyListTextMargin := ScaledPixels(Max(cDefaultTextMargin, Self.TextMargin) * 2); + R.Left := OffSetX + lEmptyListTextMargin; + R.Top := lEmptyListTextMargin; + R.Right := R.Left + Width - lEmptyListTextMargin; + R.Bottom := Height - lEmptyListTextMargin; + TargetCanvas.Font.Color := StyleServices.GetStyleFontColor(TStyleFont.sfTreeItemTextDisabled);//clGrayText; TargetCanvas.TextRect(R, FEmptyListMessage, [tfNoClip, tfLeft, tfWordBreak, tfExpandTabs]); end; From a7e9cf4bcc96d442aa4b9d590d1254c6c77b1a47 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Mon, 30 May 2022 09:06:35 +0200 Subject: [PATCH 21/70] Fixed issue #1098 --- Demos/Advanced/Editors.pas | 2 +- Demos/Advanced/GridDemo.dfm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Demos/Advanced/Editors.pas b/Demos/Advanced/Editors.pas index d89ff33f5..3be91e04a 100644 --- a/Demos/Advanced/Editors.pas +++ b/Demos/Advanced/Editors.pas @@ -174,7 +174,7 @@ TGridData = class end; // Our own edit link to implement several different node editors. - TGridEditLink = class(TPropertyEditLink, IVTEditLink) + TGridEditLink = class(TBasePropertyEditLink, IVTEditLink) public function EndEdit: Boolean; stdcall; function PrepareEdit(Tree: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex): Boolean; stdcall; diff --git a/Demos/Advanced/GridDemo.dfm b/Demos/Advanced/GridDemo.dfm index ae3e577da..41c6937eb 100644 --- a/Demos/Advanced/GridDemo.dfm +++ b/Demos/Advanced/GridDemo.dfm @@ -99,7 +99,7 @@ object GridForm: TGridForm TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking, toAutoChangeScale] TreeOptions.MiscOptions = [toAcceptOLEDrop, toEditable, toGridExtensions, toInitOnSave, toToggleOnDblClick, toWheelPanning] TreeOptions.PaintOptions = [toHotTrack, toShowButtons, toShowDropmark, toShowHorzGridLines, toShowVertGridLines, toUseBlendedImages] - TreeOptions.SelectionOptions = [toDisableDrawSelection, toExtendedFocus, toMiddleClickSelect, toMultiSelect, toRightClickSelect, toCenterScrollIntoView] + TreeOptions.SelectionOptions = [toDisableDrawSelection, toExtendedFocus, toMiddleClickSelect, toMultiSelect, toRightClickSelect, toCenterScrollIntoView, toExtendedFocus] WantTabs = True OnAfterCellPaint = VST5AfterCellPaint OnBeforeCellPaint = VST5BeforeCellPaint From dcd3a2a74a09a8cdcec8192823d622902346f0f8 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Fri, 3 Jun 2022 09:54:19 +0200 Subject: [PATCH 22/70] Fixed issue #1103 Possible duplicate counted selection when selecting items in the OnAddToSelection event handler --- Source/VirtualTrees.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index a4ce47b55..7c1ee661e 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -23318,11 +23318,13 @@ function TBaseVirtualTree.InternalAddToSelection(const NewItems: TNodeArray; New Inc(FSelectionCount, AddedNodesSize); // post process added nodes + // First set vsSelected flag for all newly selected nodes, then fire event + for I := 0 to AddedNodesSize - 1 do + Include(NewItems[I].States, vsSelected); + for I := 0 to AddedNodesSize - 1 do begin PTmpNode := NewItems[I]; - //sync path note: on click, multi-select ctrl-click and draw selection - Include(PTmpNode.States, vsSelected); // call on add event callbackevent if Assigned(FOnAddToSelection) then FOnAddToSelection(Self, PTmpNode); From 1139f657aa9ee268056500bc7fed07c530d0d3e4 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Mon, 15 Aug 2022 07:59:14 +0200 Subject: [PATCH 23/70] Fix for #1112 : Fix EIntOverflow --- Source/VirtualTrees.pas | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 7c1ee661e..1771e1c6b 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -18611,8 +18611,7 @@ procedure TBaseVirtualTree.ScaleNodeHeights(M, D: Integer); Run.NodeHeight := MulDiv(Run.NodeHeight, M, D); // The next three lines fix issue #1000 lNewNodeTotalHeight := MulDiv(Run.TotalHeight, M, D); - FRoot.TotalHeight := FRoot.TotalHeight + lNewNodeTotalHeight - Run.TotalHeight; // 1 EIntOverflow exception seen here in debug build in 01/2021 - Run.TotalHeight := lNewNodeTotalHeight; + FRoot.TotalHeight := Cardinal(Int64(FRoot.TotalHeight) + Int64(lNewNodeTotalHeight) - Int64(Run.TotalHeight)); // Avoiding EIntOverflow exception. end; Run := GetNextNoInit(Run); end; // while From 100dd972b61b26334dc1f6cad8912d372eb6d072 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sat, 20 Aug 2022 22:37:14 +0200 Subject: [PATCH 24/70] Fixed #1117: Wrong comment --- Source/VirtualTrees.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 1771e1c6b..2e2caf991 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -16432,8 +16432,8 @@ procedure TBaseVirtualTree.TVMGetItem(var Message: TMessage); if vsExpanded in Node.States then Item.state := Item.state or TVIS_EXPANDED; - // Construct state image and overlay image indices. They are one based, btw. - // and zero means there is no image. + // Construct state image and overlay image indices. They are zero based, btw. + // and -1 means there is no image. ImageIndex := -1; DoGetImageIndex(Node, ikState, -1, Ghosted, ImageIndex); Item.state := Item.state or Byte(IndexToStateImageMask(ImageIndex + 1)); From 33c6d7f6b78febd203a46e3cc4329f2d80b9d7fe Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Wed, 28 Sep 2022 09:34:56 +0200 Subject: [PATCH 25/70] Fixed compiler error --- Demos/Advanced/Editors.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Demos/Advanced/Editors.pas b/Demos/Advanced/Editors.pas index 3be91e04a..d89ff33f5 100644 --- a/Demos/Advanced/Editors.pas +++ b/Demos/Advanced/Editors.pas @@ -174,7 +174,7 @@ TGridData = class end; // Our own edit link to implement several different node editors. - TGridEditLink = class(TBasePropertyEditLink, IVTEditLink) + TGridEditLink = class(TPropertyEditLink, IVTEditLink) public function EndEdit: Boolean; stdcall; function PrepareEdit(Tree: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex): Boolean; stdcall; From dfd2c4ef334434bd11cbbfc30829c0941d5a3aec Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Mon, 3 Oct 2022 21:19:36 +0200 Subject: [PATCH 26/70] Added dummy unit to make migeration between V7 and V8 easier. #1125 --- Source/VirtualTrees.BaseTree.pas | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Source/VirtualTrees.BaseTree.pas diff --git a/Source/VirtualTrees.BaseTree.pas b/Source/VirtualTrees.BaseTree.pas new file mode 100644 index 000000000..e96872d61 --- /dev/null +++ b/Source/VirtualTrees.BaseTree.pas @@ -0,0 +1,8 @@ +unit VirtualTrees.BaseTree; +// Dummy unit to make migeration between V7 and V8 easier. + +interface + +implementation + +end. \ No newline at end of file From 44168669652184d2139f9c8116eaea0de093b871 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Mon, 21 Nov 2022 07:53:19 +0100 Subject: [PATCH 27/70] Fixed issue #1145 --- Source/VirtualTrees.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 2e2caf991..67733fac5 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -31712,7 +31712,7 @@ procedure TBaseVirtualTree.ReinitNode(Node: PVirtualNode; Recursive: Boolean); InitNode(Node); end; - if Recursive then + if Recursive and (Node.ChildCount > 0) then // Prevent previoulsy uninitilaized children from being initialized. Issue #1145 ReinitChildren(Node, True); end; From 16520087b1ec0e2caeb7da52ef0e12c875f9aaaa Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sun, 4 Dec 2022 11:09:53 +0100 Subject: [PATCH 28/70] Fixed issue #1154 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Columname text with € sign display wrongly in Delphi collection editor --- Source/VirtualTrees.pas | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 67733fac5..7037607da 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -7484,27 +7484,8 @@ procedure TVirtualTreeColumn.GetAbsoluteBounds(var Left, Right: Integer); //---------------------------------------------------------------------------------------------------------------------- function TVirtualTreeColumn.GetDisplayName: string; - -// Returns the column text if it only contains ANSI characters, otherwise the column id is returned because the IDE -// still cannot handle Unicode strings. - -var - I: Integer; - begin - // Check if the text of the column contains characters > 255 - I := 1; - while I <= Length(FText) do - begin - if Ord(FText[I]) > 255 then - Break; - Inc(I); - end; - - if I > Length(FText) then - Result := FText // implicit conversion - else - Result := Format('Column %d', [Index]); + Result := FText // Use column header caption as display name end; //---------------------------------------------------------------------------------------------------------------------- From 9b0a6240a98caca818d4c408ceb4b0da7f5387eb Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sun, 4 Dec 2022 11:38:08 +0100 Subject: [PATCH 29/70] Don't use toDisableAutoscrollOnFocus in demo project --- Demos/Advanced/GeneralAbilitiesDemo.dfm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Demos/Advanced/GeneralAbilitiesDemo.dfm b/Demos/Advanced/GeneralAbilitiesDemo.dfm index ba8211dca..f2efde679 100644 --- a/Demos/Advanced/GeneralAbilitiesDemo.dfm +++ b/Demos/Advanced/GeneralAbilitiesDemo.dfm @@ -58,7 +58,7 @@ object GeneralForm: TGeneralForm ScrollBarOptions.VerticalIncrement = 19 TabOrder = 0 TreeOptions.AnimationOptions = [toAnimatedToggle] - TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScroll, toAutoSpanColumns, toAutoTristateTracking, toAutoHideButtons, toDisableAutoscrollOnFocus, toAutoChangeScale] + TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScroll, toAutoSpanColumns, toAutoTristateTracking, toAutoHideButtons, toAutoChangeScale] TreeOptions.MiscOptions = [toAcceptOLEDrop, toCheckSupport, toEditable, toInitOnSave, toToggleOnDblClick, toWheelPanning, toEditOnClick] TreeOptions.PaintOptions = [toHideSelection, toHotTrack, toShowButtons, toShowDropmark, toShowRoot, toShowTreeLines, toShowVertGridLines, toThemeAware, toUseBlendedImages, toFullVertGridLines, toUseBlendedSelection] TreeOptions.SelectionOptions = [toExtendedFocus, toMiddleClickSelect, toMultiSelect, toRightClickSelect] From d0de8d9d5aeb86ae75e4aba435ff3669abcab3cd Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sun, 4 Dec 2022 11:47:04 +0100 Subject: [PATCH 30/70] Fixed issue #1155 Vertical scrollbar position not updated during scrolling when a theme is used --- Source/VirtualTrees.StyleHooks.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/VirtualTrees.StyleHooks.pas b/Source/VirtualTrees.StyleHooks.pas index e62b1d3ce..a1801c66d 100644 --- a/Source/VirtualTrees.StyleHooks.pas +++ b/Source/VirtualTrees.StyleHooks.pas @@ -514,7 +514,7 @@ procedure TVclStyleScrollBarsHook.CMUpdateVclStyleScrollbars(var Msg: TMessage); procedure TVclStyleScrollBarsHook.WMKeyDown(var Msg: TMessage); begin CallDefaultProc(TMessage(Msg)); - UpdateScroll; + PaintScroll; Handled := True; end; From 882fd1903190c33f51eca09751841f9f09a0a015 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sun, 4 Dec 2022 21:54:43 +0100 Subject: [PATCH 31/70] Fixed #1155: Scrollbar not updated when scrolling via arrows. --- Source/VirtualTrees.StyleHooks.pas | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Source/VirtualTrees.StyleHooks.pas b/Source/VirtualTrees.StyleHooks.pas index a1801c66d..b27dae376 100644 --- a/Source/VirtualTrees.StyleHooks.pas +++ b/Source/VirtualTrees.StyleHooks.pas @@ -498,10 +498,7 @@ procedure TVclStyleScrollBarsHook.WMEraseBkgnd(var Msg: TWMEraseBkgnd); procedure TVclStyleScrollBarsHook.WMHScroll(var Msg: TWMHScroll); begin CallDefaultProc(TMessage(Msg)); - if not (Msg.ScrollCode in [SB_THUMBTRACK, SB_THUMBPOSITION]) then - UpdateScroll - else - PaintScroll; + PaintScroll; Handled := True; end; @@ -930,10 +927,7 @@ procedure TVclStyleScrollBarsHook.WMPosChanged(var Msg: TMessage); procedure TVclStyleScrollBarsHook.WMVScroll(var Msg: TWMVScroll); begin CallDefaultProc(TMessage(Msg)); - if not (Msg.ScrollCode in [SB_THUMBTRACK, SB_THUMBPOSITION]) then - UpdateScroll - else - PaintScroll; + PaintScroll; Handled := True; end; From 18c36c164fbb83df33d46f20538f5eaacb58f6a1 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Thu, 29 Dec 2022 10:14:57 +0100 Subject: [PATCH 32/70] Fixed missing !ENDIF --- MAKEFILE | 1 + 1 file changed, 1 insertion(+) diff --git a/MAKEFILE b/MAKEFILE index 2a13e4e86..a88c24af6 100644 --- a/MAKEFILE +++ b/MAKEFILE @@ -15,6 +15,7 @@ BUILDEXE = "$(PROGRAMFILES)\Microsoft Visual Studio\2019\Professional\MSBuild\Cu BUILDEXE = "$(PROGRAMFILES)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\msbuild.exe" !ENDIF !ENDIF +!ENDIF BUILD = $(BUILDEXE) /t:Rebuild clean: From c62c89035c970a0cd564075e4b8c7f77abab21b2 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Thu, 29 Dec 2022 10:19:11 +0100 Subject: [PATCH 33/70] Removed meanwhile obsolete instruction --- MAKEFILE | 1 - 1 file changed, 1 deletion(-) diff --git a/MAKEFILE b/MAKEFILE index a88c24af6..aba6f01c9 100644 --- a/MAKEFILE +++ b/MAKEFILE @@ -54,7 +54,6 @@ _release: #Download e.g. from: ftp://ftp.info-zip.org/pub/infozip/win32/ ZIP -9 -r .\VirtualTreeView.zip INSTALL.txt Changes.txt Source Design Packages Demos Contributions Help\VirtualTreeview.chm -i *.pas -i *.dpk -i *.groupproj -i *.dproj -i *.cbproj -i *.hlp -i *.rc -i *.res -i *.cfg -i *.dpr -i *.dof -i *.bpr -i *.dfm -i *.cpp -i *.inc -i *.dcr -i *.chm -i *.png -i *.js -i *.txt -i *.bmp -i *.uni ECHO Source code zip archive "VirtualTreeView.zip" created. - ECHO !!! Please ensure that the const TVTVersion is correct or remove const!!! ECHO !!! Please add version number to ZIP file name!!! ECHO !!! Please create release at: https://github.com/Virtual-TreeView/Virtual-TreeView/releases ECHO !!! Let JAM web-team upload the file to our server at https://www.jam-software.com/virtual-treeview From 04f1bda57c237dfebcb54f9ca6f62dbbeaa9dd04 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sun, 22 Jan 2023 10:09:44 +0100 Subject: [PATCH 34/70] Fix for #1166 toRestoreSelection won't work for items selected with Shift+click --- Source/VirtualTrees.pas | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 7037607da..9fc771f1d 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -3520,6 +3520,7 @@ TCustomVirtualStringTree = class(TBaseVirtualTree) function Path(Node: PVirtualNode; Column: TColumnIndex; Delimiter: Char): string; procedure ReinitNode(Node: PVirtualNode; Recursive: Boolean); override; procedure AddToSelection(Node: PVirtualNode; NotifySynced: Boolean); override; + procedure AddToSelection(const NewItems: TNodeArray; NewLength: Integer; ForceInsert: Boolean); override; procedure RemoveFromSelection(Node: PVirtualNode); override; function SaveToCSVFile(const FileNameWithPath : TFileName; const IncludeHeading : Boolean) : Boolean; /// Alternate text for images used in Accessibility. @@ -34723,6 +34724,21 @@ procedure TCustomVirtualStringTree.AddToSelection(Node: PVirtualNode; NotifySync //---------------------------------------------------------------------------------------------------------------------- +procedure TCustomVirtualStringTree.AddToSelection(const NewItems: TNodeArray; NewLength: Integer; ForceInsert: Boolean); +var + i: Integer; + lSelectedNodeCaption: string; +begin + inherited; + for i := 0 to NewLength - 1 do + begin + Self.OnGetText(Self, NewItems[i], Header.RestoreSelectionColumnIndex, ttNormal, lSelectedNodeCaption); + FPreviouslySelected.Add(lSelectedNodeCaption); + end; +end; + +//---------------------------------------------------------------------------------------------------------------------- + procedure TCustomVirtualStringTree.RemoveFromSelection(Node: PVirtualNode); var lSelectedNodeCaption: string; From 04a89813cc856064965fae0067981d32eac269bf Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Tue, 24 Jan 2023 20:10:24 +0100 Subject: [PATCH 35/70] Fox for #1166 toRestoreSelection won't work for items selected with Shift+click --- Source/VirtualTrees.pas | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 9fc771f1d..442ca07b7 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -34729,12 +34729,22 @@ procedure TCustomVirtualStringTree.AddToSelection(const NewItems: TNodeArray; Ne i: Integer; lSelectedNodeCaption: string; begin - inherited; - for i := 0 to NewLength - 1 do + if (toRestoreSelection in TreeOptions.SelectionOptions) and Assigned(Self.OnGetText) and not (tsPreviouslySelectedLocked in FStates) then begin - Self.OnGetText(Self, NewItems[i], Header.RestoreSelectionColumnIndex, ttNormal, lSelectedNodeCaption); - FPreviouslySelected.Add(lSelectedNodeCaption); - end; + if not Assigned(FPreviouslySelected) then + begin + FPreviouslySelected := TStringList.Create(); + FPreviouslySelected.Duplicates := dupIgnore; + FPreviouslySelected.Sorted := True; //Improves performance, required to use Find() + FPreviouslySelected.CaseSensitive := False; + end; + for i := 0 to NewLength - 1 do + begin + Self.OnGetText(Self, NewItems[i], Header.RestoreSelectionColumnIndex, ttNormal, lSelectedNodeCaption); + FPreviouslySelected.Add(lSelectedNodeCaption); + end; + end; // if toRestoreSelection + inherited; end; //---------------------------------------------------------------------------------------------------------------------- From dffc7137fcd9b9b574d7fb1d1d3c38b427792154 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sat, 4 Feb 2023 15:26:21 +0100 Subject: [PATCH 36/70] Update VirtualTrees.pas --- Source/VirtualTrees.pas | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 442ca07b7..371e513e6 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -1351,6 +1351,7 @@ TVTHeader = class(TPersistent) procedure SetSortDirection(const Value: TSortDirection); procedure SetStyle(Value: TVTHeaderStyle); function GetRestoreSelectionColumnIndex: Integer; + function AreColumnsStored: Boolean; protected FStates: THeaderStates; // Used to keep track of internal states the header can enter. FDragStart: TPoint; // initial mouse drag position @@ -1419,7 +1420,7 @@ TVTHeader = class(TPersistent) published property AutoSizeIndex: TColumnIndex read FAutoSizeIndex write SetAutoSizeIndex; property Background: TColor read FBackgroundColor write SetBackground default clBtnFace; - property Columns: TVirtualTreeColumns read FColumns write SetColumns stored False; // Stored by the owner tree to support VFI. + property Columns: TVirtualTreeColumns read FColumns write SetColumns stored AreColumnsStored; property DefaultHeight: Integer read FDefaultHeight write SetDefaultHeight default 19; property Font: TFont read FFont write SetFont stored IsFontStored; property FixedAreaConstraints: TVTFixedAreaConstraints read FFixedAreaConstraints write FFixedAreaConstraints; @@ -11262,6 +11263,13 @@ function TVTHeader.AllowFocus(ColumnIndex: TColumnIndex): Boolean; //---------------------------------------------------------------------------------------------------------------------- +function TVTHeader.AreColumnsStored: Boolean; +begin + // The columns are stored by the owner tree to support Visual Form Inheritance + // GnutGetText skips non-stored properties, so retur Stored True at runtime + Result := not (csDesigning in Self.Treeview.ComponentState); +end; + procedure TVTHeader.Assign(Source: TPersistent); begin From ab598f0b0f1affad377660019dd393c982a55b43 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sun, 19 Feb 2023 17:49:21 +0100 Subject: [PATCH 37/70] Fixed issue #1171 TBaseVirtualTree.WMNCDestroy() may (re)create window handle --- Demos/Advanced/Advanced.dproj | 2 +- Source/VirtualTrees.pas | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Demos/Advanced/Advanced.dproj b/Demos/Advanced/Advanced.dproj index 53943e182..2eb9107cf 100644 --- a/Demos/Advanced/Advanced.dproj +++ b/Demos/Advanced/Advanced.dproj @@ -7,7 +7,7 @@ Advanced.dpr Win32 {E5FD8257-AE07-4A8D-AB79-44170493F9A2} - 19.2 + 19.5 1 diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 371e513e6..c354783be 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -17653,7 +17653,7 @@ procedure TBaseVirtualTree.WMNCDestroy(var Message: TWMNCDestroy); StopTimer(ChangeTimer); StopTimer(StructureChangeTimer); - if not (csDesigning in ComponentState) and (toAcceptOLEDrop in FOptions.MiscOptions) then + if not (csDesigning in ComponentState) and (toAcceptOLEDrop in FOptions.MiscOptions) and HandleAllocated then RevokeDragDrop(Handle); // Clean up other stuff. From 70eb789e1d17dad74b74af7126cf09cce58c4384 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Thu, 2 Mar 2023 14:42:59 +0100 Subject: [PATCH 38/70] Fixed issue #1174: Mass check-state manipulations take very long if Accessiblity is used. If BeginUpdate() was called, we make only one call to NotifyWinEvent() in EndUpdate(). --- Source/VirtualTrees.pas | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index c354783be..14ce3d78d 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -19684,7 +19684,7 @@ procedure TBaseVirtualTree.DoChecked(Node: PVirtualNode); begin if Assigned(FOnChecked) then FOnChecked(Self, Node); - if Assigned(FAccessibleItem) then + if Assigned(FAccessibleItem) and (Self.UpdateCount = 0) then // See issue #1174 NotifyWinEvent(EVENT_OBJECT_STATECHANGE, Handle, OBJID_CLIENT, CHILDID_SELF); end; @@ -19715,7 +19715,7 @@ procedure TBaseVirtualTree.DoCollapsed(Node: PVirtualNode); if Assigned(FOnCollapsed) then FOnCollapsed(Self, Node); - if Assigned(FAccessibleItem) then + if Assigned(FAccessibleItem) and (Self.UpdateCount = 0) then // See issue #1174 NotifyWinEvent(EVENT_OBJECT_STATECHANGE, Handle, OBJID_CLIENT, CHILDID_SELF); if (toAlwaysSelectNode in TreeOptions.SelectionOptions) then @@ -20105,7 +20105,7 @@ procedure TBaseVirtualTree.DoExpanded(Node: PVirtualNode); if Assigned(FOnExpanded) then FOnExpanded(Self, Node); - if Assigned(FAccessibleItem) then + if Assigned(FAccessibleItem) and (Self.UpdateCount = 0) then // See issue #1174 NotifyWinEvent(EVENT_OBJECT_STATECHANGE, Handle, OBJID_CLIENT, CHILDID_SELF); end; @@ -26950,6 +26950,8 @@ procedure TBaseVirtualTree.EndUpdate; Invalidate; UpdateDesigner; end; + if Assigned(FAccessibleItem) then // See issue #1174 + NotifyWinEvent(EVENT_OBJECT_STATECHANGE, Handle, OBJID_CLIENT, CHILDID_SELF); end; if FUpdateCount = 0 then begin From 63944d90fb1f54f070a66887a0525aa7c0634f98 Mon Sep 17 00:00:00 2001 From: Buddyworks <49592429+buddyworks@users.noreply.github.com> Date: Sat, 4 Mar 2023 20:04:45 +0100 Subject: [PATCH 39/70] Implementation of procedure "ToggleSortDirection" Toggles the current sort direction. This refers to issue #1175 and is a work-around to be able to change the direction in C++ Builder 64bit where the SortDirection property is not accessible properly due to unknown reason. --- Source/VirtualTrees.pas | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index c354783be..250075dd2 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -1410,6 +1410,7 @@ TVTHeader = class(TPersistent) procedure RestoreColumns; procedure SaveToStream(const Stream: TStream); virtual; procedure StyleChanged(); virtual; + procedure ToggleSortDirection; property DragImage: TVTDragImage read FDragImage; property RestoreSelectionColumnIndex: Integer read GetRestoreSelectionColumnIndex write fRestoreSelectionColumnIndex default NoColumn; @@ -11773,6 +11774,19 @@ procedure TVTHeader.RestoreColumns; //---------------------------------------------------------------------------------------------------------------------- +procedure TVTHeader.ToggleSortDirection; + +// Toggles the current sorting direction + +begin + if SortDirection = sdDescending then + SortDirection := sdAscending + else + SortDirection := sdDescending; +end; + +//---------------------------------------------------------------------------------------------------------------------- + procedure TVTHeader.SaveToStream(const Stream: TStream); // Saves the complete state of the header into the provided stream. From 0d2f48bc90cbee6255702308942d4200248aa3c0 Mon Sep 17 00:00:00 2001 From: Clayton Arends Date: Mon, 6 Mar 2023 20:23:21 -0800 Subject: [PATCH 40/70] Add C++Builder 10.4 project files --- .../CBuilder 10.4/VirtualTreeView.groupproj | 48 +++ Packages/CBuilder 10.4/VirtualTreesCD.cbproj | 245 ++++++++++++++ Packages/CBuilder 10.4/VirtualTreesCD.cpp | 17 + Packages/CBuilder 10.4/VirtualTreesCR.cbproj | 310 ++++++++++++++++++ Packages/CBuilder 10.4/VirtualTreesCR.cpp | 17 + 5 files changed, 637 insertions(+) create mode 100644 Packages/CBuilder 10.4/VirtualTreeView.groupproj create mode 100644 Packages/CBuilder 10.4/VirtualTreesCD.cbproj create mode 100644 Packages/CBuilder 10.4/VirtualTreesCD.cpp create mode 100644 Packages/CBuilder 10.4/VirtualTreesCR.cbproj create mode 100644 Packages/CBuilder 10.4/VirtualTreesCR.cpp diff --git a/Packages/CBuilder 10.4/VirtualTreeView.groupproj b/Packages/CBuilder 10.4/VirtualTreeView.groupproj new file mode 100644 index 000000000..1250e4780 --- /dev/null +++ b/Packages/CBuilder 10.4/VirtualTreeView.groupproj @@ -0,0 +1,48 @@ + + + {85AC5363-0DD3-4B39-8709-5987A7DA817E} + + + + + + + + + + + Default.Personality.12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Packages/CBuilder 10.4/VirtualTreesCD.cbproj b/Packages/CBuilder 10.4/VirtualTreesCD.cbproj new file mode 100644 index 000000000..123b87956 --- /dev/null +++ b/Packages/CBuilder 10.4/VirtualTreesCD.cbproj @@ -0,0 +1,245 @@ + + + {DE1FB54C-6852-4F59-B4A5-7718E6069FE8} + VirtualTreesCD.cpp + 19.2 + Release + None + True + Win32 + 1 + Package + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + 270 + VirtualTree CBuilder designtime package + $(BDSCOMMONDIR)\hpp\$(Platform)\ + VirtualTreesCD + true + ..\..\Source;$(DCC_UnitSearchPath) + 4108 + System;Xml;Data;Datasnap;Web;Soap;Vcl;$(DCC_Namespace) + true + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + 6 + -LUDesignIDE + true + bpl + CppPackage + true + true + true + All + true + ..\..\Source\;..\..\Design\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) + ..\..\Design\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;..\..\Source;$(ILINK_LibraryPath) + false + true + true + 128 + None + .\$(Platform)\$(Config) + true + .\$(Platform)\$(Config) + + + true + $(BDS)\bin\default_app.manifest + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + + + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + + + false + true + false + true + false + None + DEBUG + true + true + true + true + Full + true + + + _DEBUG;$(Defines) + 1033 + + + None + + + 1033 + NDEBUG;$(Defines) + + + + 3 + + + 10 + + + 5 + + + 1 + + + 4 + + + 0 + + + 9 + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + + + + + CPlusPlusBuilder.Personality.12 + CppPackage + + + + VirtualTreesCD.cpp + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 4108 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + + + + + + + False + + False + + True + False + + + + False + True + True + False + + + + True + False + + + 12 + + + diff --git a/Packages/CBuilder 10.4/VirtualTreesCD.cpp b/Packages/CBuilder 10.4/VirtualTreesCD.cpp new file mode 100644 index 000000000..9b654ce81 --- /dev/null +++ b/Packages/CBuilder 10.4/VirtualTreesCD.cpp @@ -0,0 +1,17 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +#pragma package(smart_init) +//--------------------------------------------------------------------------- + +// Package source. +//--------------------------------------------------------------------------- + + +#pragma argsused +int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- diff --git a/Packages/CBuilder 10.4/VirtualTreesCR.cbproj b/Packages/CBuilder 10.4/VirtualTreesCR.cbproj new file mode 100644 index 000000000..4b287c356 --- /dev/null +++ b/Packages/CBuilder 10.4/VirtualTreesCR.cbproj @@ -0,0 +1,310 @@ + + + {FE6B0D67-74B6-4E30-8AED-CB2B3E77A51F} + VirtualTreesCR.cpp + 19.2 + Release + VCL + True + Win32 + 3 + Package + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + true + Cfg_2 + true + true + + + 270 + true + VirtualTree CBuilder runtime package + $(BDSCOMMONDIR)\hpp\$(Platform) + VirtualTreesCR + Shell32.dll;uxtheme.dll;$(ILINK_DelayLoadDll) + $(BDS)\lib;$(BDS)\lib\$(Platform);$(BDS)\lib\$(Platform)\$(Config);$(DCC_UnitSearchPath) + true + 4108 + System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) + true + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + 6 + bpl + CppPackage + true + true + true + All + true + ..\..\Source\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) + ..\..\Source\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;$(ILINK_LibraryPath) + false + true + true + 128 + None + .\$(Platform)\$(Config) + true + .\$(Platform)\$(Config) + + + $(BDS)\Bin\BDS.EXE + true + $(BDSINCLUDE)\windows\vcl;$(IncludePath) + $(BDS)\bin\default_app.manifest + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + vclwinx;$(PackageImports) + + + $(BDSINCLUDE)\windows\vcl;$(IncludePath) + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + vclwinx;$(PackageImports) + + + false + true + false + true + false + None + DEBUG + true + true + true + $(BDS)\lib\debug;$(ILINK_LibraryPath) + true + Full + true + + + _DEBUG;$(Defines) + 1033 + + + 1033 + + + $(BDS)\lib\release;$(ILINK_LibraryPath) + None + + + 1033 + NDEBUG;$(Defines) + + + 1033 + + + + 3 + + + 9 + true + + + 9 + true + + + 18 + true + + + 18 + true + + + 4 + + + 0 + + + 14 + + + 15 + + + 16 + + + 16 + + + 16 + + + 17 + + + 16 + + + 17 + + + 17 + + + 13 + + + 17 + + + 17 + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + + + + + CPlusPlusBuilder.Personality.12 + CppPackage + + + + VirtualTreesCR.cpp + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 4108 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + + + + + + + False + + False + + True + False + + + + False + True + True + False + + + + True + True + + + 12 + + + diff --git a/Packages/CBuilder 10.4/VirtualTreesCR.cpp b/Packages/CBuilder 10.4/VirtualTreesCR.cpp new file mode 100644 index 000000000..9b654ce81 --- /dev/null +++ b/Packages/CBuilder 10.4/VirtualTreesCR.cpp @@ -0,0 +1,17 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +#pragma package(smart_init) +//--------------------------------------------------------------------------- + +// Package source. +//--------------------------------------------------------------------------- + + +#pragma argsused +int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- From fb3c82176ba23b52200d46edb3af21cd87637b65 Mon Sep 17 00:00:00 2001 From: Clayton Arends Date: Mon, 6 Mar 2023 20:28:14 -0800 Subject: [PATCH 41/70] Add C++Builder 11 project files --- .../CBuilder 11/VirtualTreeView.groupproj | 48 +++ Packages/CBuilder 11/VirtualTreesCD.cbproj | 245 ++++++++++++++ Packages/CBuilder 11/VirtualTreesCD.cpp | 17 + Packages/CBuilder 11/VirtualTreesCR.cbproj | 310 ++++++++++++++++++ Packages/CBuilder 11/VirtualTreesCR.cpp | 17 + 5 files changed, 637 insertions(+) create mode 100644 Packages/CBuilder 11/VirtualTreeView.groupproj create mode 100644 Packages/CBuilder 11/VirtualTreesCD.cbproj create mode 100644 Packages/CBuilder 11/VirtualTreesCD.cpp create mode 100644 Packages/CBuilder 11/VirtualTreesCR.cbproj create mode 100644 Packages/CBuilder 11/VirtualTreesCR.cpp diff --git a/Packages/CBuilder 11/VirtualTreeView.groupproj b/Packages/CBuilder 11/VirtualTreeView.groupproj new file mode 100644 index 000000000..1250e4780 --- /dev/null +++ b/Packages/CBuilder 11/VirtualTreeView.groupproj @@ -0,0 +1,48 @@ + + + {85AC5363-0DD3-4B39-8709-5987A7DA817E} + + + + + + + + + + + Default.Personality.12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Packages/CBuilder 11/VirtualTreesCD.cbproj b/Packages/CBuilder 11/VirtualTreesCD.cbproj new file mode 100644 index 000000000..89f82e674 --- /dev/null +++ b/Packages/CBuilder 11/VirtualTreesCD.cbproj @@ -0,0 +1,245 @@ + + + {DE1FB54C-6852-4F59-B4A5-7718E6069FE8} + VirtualTreesCD.cpp + 19.5 + Release + None + True + Win32 + 1 + Package + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + 280 + VirtualTree CBuilder designtime package + $(BDSCOMMONDIR)\hpp\$(Platform)\ + VirtualTreesCD + true + ..\..\Source;$(DCC_UnitSearchPath) + 4108 + System;Xml;Data;Datasnap;Web;Soap;Vcl;$(DCC_Namespace) + true + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + 6 + -LUDesignIDE + true + bpl + CppPackage + true + true + true + All + true + ..\..\Source\;..\..\Design\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) + ..\..\Design\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;..\..\Source;$(ILINK_LibraryPath) + false + true + true + 128 + None + .\$(Platform)\$(Config) + true + .\$(Platform)\$(Config) + + + true + $(BDS)\bin\default_app.manifest + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + + + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + + + false + true + false + true + false + None + DEBUG + true + true + true + true + Full + true + + + _DEBUG;$(Defines) + 1033 + + + None + + + 1033 + NDEBUG;$(Defines) + + + + 3 + + + 10 + + + 5 + + + 1 + + + 4 + + + 0 + + + 9 + + + Base + + + Cfg_1 + Base + + + Cfg_2 + Base + + + + + CPlusPlusBuilder.Personality.12 + CppPackage + + + + VirtualTreesCD.cpp + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 4108 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + + + + + + + False + + False + + True + False + + + + False + True + True + False + + + + True + False + + + 12 + + + diff --git a/Packages/CBuilder 11/VirtualTreesCD.cpp b/Packages/CBuilder 11/VirtualTreesCD.cpp new file mode 100644 index 000000000..9b654ce81 --- /dev/null +++ b/Packages/CBuilder 11/VirtualTreesCD.cpp @@ -0,0 +1,17 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +#pragma package(smart_init) +//--------------------------------------------------------------------------- + +// Package source. +//--------------------------------------------------------------------------- + + +#pragma argsused +int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- diff --git a/Packages/CBuilder 11/VirtualTreesCR.cbproj b/Packages/CBuilder 11/VirtualTreesCR.cbproj new file mode 100644 index 000000000..a568860a4 --- /dev/null +++ b/Packages/CBuilder 11/VirtualTreesCR.cbproj @@ -0,0 +1,310 @@ + + + {FE6B0D67-74B6-4E30-8AED-CB2B3E77A51F} + VirtualTreesCR.cpp + 19.5 + Release + VCL + True + Win32 + 3 + Package + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + true + Cfg_2 + true + true + + + 280 + true + VirtualTree CBuilder runtime package + $(BDSCOMMONDIR)\hpp\$(Platform) + VirtualTreesCR + Shell32.dll;uxtheme.dll;$(ILINK_DelayLoadDll) + $(BDS)\lib;$(BDS)\lib\$(Platform);$(BDS)\lib\$(Platform)\$(Config);$(DCC_UnitSearchPath) + true + 4108 + System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) + true + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + 6 + bpl + CppPackage + true + true + true + All + true + ..\..\Source\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) + ..\..\Source\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;$(ILINK_LibraryPath) + false + true + true + 128 + None + .\$(Platform)\$(Config) + true + .\$(Platform)\$(Config) + + + $(BDS)\Bin\BDS.EXE + true + $(BDSINCLUDE)\windows\vcl;$(IncludePath) + $(BDS)\bin\default_app.manifest + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + vclwinx;$(PackageImports) + + + $(BDSINCLUDE)\windows\vcl;$(IncludePath) + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + vclwinx;$(PackageImports) + + + false + true + false + true + false + None + DEBUG + true + true + true + $(BDS)\lib\debug;$(ILINK_LibraryPath) + true + Full + true + + + _DEBUG;$(Defines) + 1033 + + + 1033 + + + $(BDS)\lib\release;$(ILINK_LibraryPath) + None + + + 1033 + NDEBUG;$(Defines) + + + 1033 + + + + 3 + + + 9 + true + + + 9 + true + + + 18 + true + + + 18 + true + + + 4 + + + 0 + + + 14 + + + 15 + + + 16 + + + 16 + + + 16 + + + 17 + + + 16 + + + 17 + + + 17 + + + 13 + + + 17 + + + 17 + + + Base + + + Cfg_1 + Base + + + Cfg_2 + Base + + + + + CPlusPlusBuilder.Personality.12 + CppPackage + + + + VirtualTreesCR.cpp + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 4108 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + + + + + + + False + + False + + True + False + + + + False + True + True + False + + + + True + True + + + 12 + + + diff --git a/Packages/CBuilder 11/VirtualTreesCR.cpp b/Packages/CBuilder 11/VirtualTreesCR.cpp new file mode 100644 index 000000000..9b654ce81 --- /dev/null +++ b/Packages/CBuilder 11/VirtualTreesCR.cpp @@ -0,0 +1,17 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +#pragma package(smart_init) +//--------------------------------------------------------------------------- + +// Package source. +//--------------------------------------------------------------------------- + + +#pragma argsused +int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- From 8077108b2b62616da3507533b6f3f95c9d2bee30 Mon Sep 17 00:00:00 2001 From: Clayton Arends Date: Tue, 7 Mar 2023 07:41:04 -0800 Subject: [PATCH 42/70] Update .gitignore with *.d and *.o 64-bit object files --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index c55357bb4..3b7621d64 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ *.rsm *.stat *.map +*.d +*.o # Generated source # ################### From 09ac54dfbb5ce0f1deb3ac658b020777dac67983 Mon Sep 17 00:00:00 2001 From: Clayton Arends Date: Fri, 10 Mar 2023 07:45:03 -0800 Subject: [PATCH 43/70] Remove and --- Packages/CBuilder 10.X/VirtualTreesCD.cbproj | 7 +- Packages/CBuilder 10.X/VirtualTreesCR.cbproj | 514 +------------------ Packages/CBuilder 10/VirtualTreesCD.cbproj | 7 +- Packages/CBuilder 10/VirtualTreesCR.cbproj | 427 +-------------- Packages/CBuilder XE5/VirtualTreesCD.cbproj | 350 +------------ Packages/CBuilder XE5/VirtualTreesCR.cbproj | 326 +----------- Packages/CBuilder XE7/VirtualTreesCD.cbproj | 380 +------------- Packages/CBuilder XE7/VirtualTreesCR.cbproj | 388 +------------- Packages/CBuilder XE8/VirtualTreesCD.cbproj | 418 +-------------- Packages/CBuilder XE8/VirtualTreesCR.cbproj | 428 +-------------- 10 files changed, 10 insertions(+), 3235 deletions(-) diff --git a/Packages/CBuilder 10.X/VirtualTreesCD.cbproj b/Packages/CBuilder 10.X/VirtualTreesCD.cbproj index 02f94c868..564d085dc 100644 --- a/Packages/CBuilder 10.X/VirtualTreesCD.cbproj +++ b/Packages/CBuilder 10.X/VirtualTreesCD.cbproj @@ -228,12 +228,7 @@ True False - - Embarcadero C++Builder Office 2000 Servers Package - Embarcadero C++Builder Office XP Servers Package - Microsoft Office 2000 Sample Automation Server Wrapper Components - Microsoft Office XP Sample Automation Server Wrapper Components - + False True diff --git a/Packages/CBuilder 10.X/VirtualTreesCR.cbproj b/Packages/CBuilder 10.X/VirtualTreesCR.cbproj index 88d5a9ce2..57a764f31 100644 --- a/Packages/CBuilder 10.X/VirtualTreesCR.cbproj +++ b/Packages/CBuilder 10.X/VirtualTreesCR.cbproj @@ -283,12 +283,7 @@ True False - - Embarcadero C++Builder Office 2000 Servers Package - Embarcadero C++Builder Office XP Servers Package - Microsoft Office 2000 Sample Automation Server Wrapper Components - Microsoft Office XP Sample Automation Server Wrapper Components - + False True @@ -300,515 +295,8 @@ True True - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - VirtualTreesCR.bpl - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - 1 - - - Contents\MacOS - 0 - - - - - classes - 1 - - - - - library\lib\armeabi-v7a - 1 - - - - - library\lib\armeabi - 1 - - - - - library\lib\mips - 1 - - - - - - library\lib\armeabi-v7a - 1 - - - - - res\drawable - 1 - - - - - res\values - 1 - - - - - res\drawable - 1 - - - - - res\drawable-xxhdpi - 1 - - - - - res\drawable-ldpi - 1 - - - - - res\drawable-mdpi - 1 - - - - - res\drawable-hdpi - 1 - - - - - res\drawable-xhdpi - 1 - - - - - res\drawable-small - 1 - - - - - res\drawable-normal - 1 - - - - - res\drawable-large - 1 - - - - - res\drawable-xlarge - 1 - - - - - 1 - - - 1 - - - 0 - - - - - 1 - .framework - - - 0 - - - - - 1 - .dylib - - - 0 - .dll;.bpl - - - - - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - 0 - .bpl - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - - - - - - 1 - - - 1 - - - 1 - - - - - - - Contents\Resources - 1 - - - - - library\lib\armeabi-v7a - 1 - - - 1 - - - 1 - - - 1 - - - 1 - - - 1 - - - 0 - - - - - 1 - - - 1 - - - - - Assets - 1 - - - Assets - 1 - - - - - Assets - 1 - - - Assets - 1 - - - - - - - - - - - 12 - diff --git a/Packages/CBuilder 10/VirtualTreesCD.cbproj b/Packages/CBuilder 10/VirtualTreesCD.cbproj index d05aaceff..e6d494ab1 100644 --- a/Packages/CBuilder 10/VirtualTreesCD.cbproj +++ b/Packages/CBuilder 10/VirtualTreesCD.cbproj @@ -305,12 +305,7 @@ True False - - Embarcadero C++Builder-Package für Office 2000-Server - Embarcadero C++Builder-Package für Office XP-Server - Microsoft Office 2000 Beispiele für gekapselte Komponenten für Automatisierungsserver - Microsoft Office XP Beispiele für gekapselte Komponenten für Automation Server - + False True diff --git a/Packages/CBuilder 10/VirtualTreesCR.cbproj b/Packages/CBuilder 10/VirtualTreesCR.cbproj index 44d09d510..44e930f9a 100644 --- a/Packages/CBuilder 10/VirtualTreesCR.cbproj +++ b/Packages/CBuilder 10/VirtualTreesCR.cbproj @@ -342,12 +342,7 @@ True False - - Embarcadero C++Builder-Package für Office 2000-Server - Embarcadero C++Builder-Package für Office XP-Server - Microsoft Office 2000 Beispiele für gekapselte Komponenten für Automatisierungsserver - Microsoft Office XP Beispiele für gekapselte Komponenten für Automation Server - + False True @@ -363,428 +358,8 @@ True True - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - VirtualTreesCR.bpl - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - - Contents\Resources - 1 - - - - - classes - 1 - - - - - res\drawable-xxhdpi - 1 - - - - - Contents\MacOS - 0 - - - 1 - - - - - library\lib\mips - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 0 - - - 1 - - - 1 - - - 1 - - - library\lib\armeabi-v7a - 1 - - - 1 - - - - - 0 - - - 1 - .framework - - - - - 1 - - - 1 - - - 1 - - - - - library\lib\x86 - 1 - - - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - - library\lib\armeabi - 1 - - - - - 0 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable-normal - 1 - - - - - res\drawable-xhdpi - 1 - - - - - res\drawable-large - 1 - - - - - 1 - - - 1 - - - 1 - - - - - - library\lib\armeabi-v7a - 1 - - - - - res\drawable-hdpi - 1 - - - - - - - 1 - - - 1 - - - 1 - - - - - res\values - 1 - - - - - res\drawable-small - 1 - - - - - res\drawable - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - - - res\drawable - 1 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - library\lib\armeabi-v7a - 1 - - - - - 0 - .bpl - - - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - - - res\drawable-mdpi - 1 - - - - - res\drawable-xlarge - 1 - - - - - res\drawable-ldpi - 1 - - - - - 0 - .dll;.bpl - - - 1 - .dylib - - - - - - - - - - 12 - diff --git a/Packages/CBuilder XE5/VirtualTreesCD.cbproj b/Packages/CBuilder XE5/VirtualTreesCD.cbproj index 5968e74ba..2cde4d5ad 100644 --- a/Packages/CBuilder XE5/VirtualTreesCD.cbproj +++ b/Packages/CBuilder XE5/VirtualTreesCD.cbproj @@ -249,12 +249,7 @@ True False - - Embarcadero C++Builder-Package für Office 2000-Server - Embarcadero C++Builder-Package für Office XP-Server - Microsoft Office 2000 Beispiele für gekapselte Komponenten für Automatisierungsserver - Microsoft Office XP Beispiele für gekapselte Komponenten für Automation Server - + False True @@ -269,351 +264,8 @@ True False - - - - true - - - - - true - - - true - - - - - true - - - - - VirtualTreesCD.bpl - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - 1 - .dylib - - - 0 - .bpl - - - 1 - .dylib - - - 1 - .dylib - - - - - 1 - .dylib - - - 0 - .dll;.bpl - - - - - 1 - - - 1 - - - - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - - - res\drawable-normal - 1 - - - - - library\lib\x86 - 1 - - - - - 1 - - - 1 - - - - - - library\lib\armeabi-v7a - 1 - - - - - 1 - - - 1 - - - - - res\drawable-xlarge - 1 - - - - - res\drawable-xhdpi - 1 - - - - - 1 - - - 1 - - - - - res\drawable-xxhdpi - 1 - - - - - library\lib\mips - 1 - - - - - res\drawable - 1 - - - - - 1 - - - 1 - - - 0 - - - - - 1 - .framework - - - 0 - - - - - res\drawable-small - 1 - - - - - - 1 - - - Contents\MacOS - 0 - - - - - classes - 1 - - - - - - 1 - - - 1 - - - - - res\drawable - 1 - - - - - Contents\Resources - 1 - - - - - - 1 - - - 1 - - - - - 1 - - - library\lib\armeabi-v7a - 1 - - - 0 - - - 1 - - - 1 - - - - - library\lib\armeabi - 1 - - - - - res\drawable-large - 1 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 1 - - - 1 - - - - - res\drawable-ldpi - 1 - - - - - res\values - 1 - - - - - 1 - - - 1 - - - - - res\drawable-mdpi - 1 - - - - - res\drawable-hdpi - 1 - - - - - 1 - - - - - - - - - 12 - diff --git a/Packages/CBuilder XE5/VirtualTreesCR.cbproj b/Packages/CBuilder XE5/VirtualTreesCR.cbproj index 40983eb57..20eadc2af 100644 --- a/Packages/CBuilder XE5/VirtualTreesCR.cbproj +++ b/Packages/CBuilder XE5/VirtualTreesCR.cbproj @@ -271,13 +271,7 @@ True False - - Embarcadero C++Builder-Package für Office 2000-Server - Embarcadero C++Builder-Package für Office XP-Server - Microsoft Office 2000 Beispiele für gekapselte Komponenten für Automatisierungsserver - Microsoft Office XP Beispiele für gekapselte Komponenten für Automation Server - Datei C:\Program Files (x86)\Raize\CS5\Bin\CodeSiteExpressPkg_Design210.bpl nicht gefunden - + False True @@ -291,326 +285,8 @@ True True - - - - - - - - - - - - - - - - - - - - - - - - - VirtualTreesCR.bpl - - - - - - - - 1 - .dylib - - - 0 - .bpl - - - 1 - .dylib - - - 1 - .dylib - - - - - 1 - .dylib - - - 0 - .dll;.bpl - - - - - 1 - - - 1 - - - - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - - - res\drawable-normal - 1 - - - - - library\lib\x86 - 1 - - - - - 1 - - - 1 - - - - - - library\lib\armeabi-v7a - 1 - - - - - 1 - - - 1 - - - - - res\drawable-xlarge - 1 - - - - - res\drawable-xhdpi - 1 - - - - - 1 - - - 1 - - - - - res\drawable-xxhdpi - 1 - - - - - library\lib\mips - 1 - - - - - res\drawable - 1 - - - - - 1 - - - 1 - - - 0 - - - - - 1 - .framework - - - 0 - - - - - res\drawable-small - 1 - - - - - - 1 - - - Contents\MacOS - 0 - - - - - classes - 1 - - - - - - 1 - - - 1 - - - - - res\drawable - 1 - - - - - Contents\Resources - 1 - - - - - - 1 - - - 1 - - - - - 1 - - - library\lib\armeabi-v7a - 1 - - - 0 - - - 1 - - - 1 - - - - - library\lib\armeabi - 1 - - - - - res\drawable-large - 1 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 1 - - - 1 - - - - - res\drawable-ldpi - 1 - - - - - res\values - 1 - - - - - 1 - - - 1 - - - - - res\drawable-mdpi - 1 - - - - - res\drawable-hdpi - 1 - - - - - 1 - - - - - - - - - 12 - diff --git a/Packages/CBuilder XE7/VirtualTreesCD.cbproj b/Packages/CBuilder XE7/VirtualTreesCD.cbproj index a022c44ff..51cb5cceb 100644 --- a/Packages/CBuilder XE7/VirtualTreesCD.cbproj +++ b/Packages/CBuilder XE7/VirtualTreesCD.cbproj @@ -272,12 +272,7 @@ True False - - Microsoft Office 2000 Sample Automation Server Wrapper Components - Microsoft Office XP Sample Automation Server Wrapper Components - Embarcadero C++Builder Office 2000 Servers Package - Embarcadero C++Builder Office XP Servers Package - + False True @@ -289,381 +284,8 @@ True False - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - VirtualTreesCD.tds - true - - - - - true - - - - - VirtualTreesCD.bpl - true - - - - - true - - - - - 1 - .dylib - - - 0 - .bpl - - - 1 - .dylib - - - 1 - .dylib - - - - - 1 - .dylib - - - 0 - .dll;.bpl - - - - - 1 - - - 1 - - - - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - - - res\drawable-normal - 1 - - - - - library\lib\x86 - 1 - - - - - 1 - - - 1 - - - - - - library\lib\armeabi-v7a - 1 - - - - - 1 - - - 1 - - - - - res\drawable-xlarge - 1 - - - - - res\drawable-xhdpi - 1 - - - - - 1 - - - 1 - - - - - res\drawable-xxhdpi - 1 - - - - - library\lib\mips - 1 - - - - - res\drawable - 1 - - - - - 1 - - - 1 - - - 0 - - - - - 1 - .framework - - - 0 - - - - - res\drawable-small - 1 - - - - - - 1 - - - Contents\MacOS - 0 - - - - - classes - 1 - - - - - - 1 - - - 1 - - - - - res\drawable - 1 - - - - - Contents\Resources - 1 - - - - - - 1 - - - 1 - - - - - 1 - - - library\lib\armeabi-v7a - 1 - - - 0 - - - 1 - - - 1 - - - - - library\lib\armeabi - 1 - - - - - res\drawable-large - 1 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 1 - - - 1 - - - - - res\drawable-ldpi - 1 - - - - - res\values - 1 - - - - - 1 - - - 1 - - - - - res\drawable-mdpi - 1 - - - - - res\drawable-hdpi - 1 - - - - - 1 - - - - - - - - - - - 12 - diff --git a/Packages/CBuilder XE7/VirtualTreesCR.cbproj b/Packages/CBuilder XE7/VirtualTreesCR.cbproj index 10a0ae752..3ab5771fe 100644 --- a/Packages/CBuilder XE7/VirtualTreesCR.cbproj +++ b/Packages/CBuilder XE7/VirtualTreesCR.cbproj @@ -296,10 +296,7 @@ True False - - (untitled) - (untitled) - + False True @@ -311,391 +308,8 @@ True True - - - - true - - - - - true - - - - - true - - - - - true - - - - - VirtualTreesCR.bpl - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - res\drawable-normal - 1 - - - - - - 1 - - - 1 - - - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - - - 1 - .dylib - - - 0 - .bpl - - - 1 - .dylib - - - 1 - .dylib - - - - - library\lib\mips - 1 - - - - - library\lib\x86 - 1 - - - - - library\lib\armeabi-v7a - 1 - - - - - - 1 - - - 1 - - - - - 1 - - - 1 - - - - - res\drawable-xlarge - 1 - - - - - res\drawable-xhdpi - 1 - - - - - res\drawable-xxhdpi - 1 - - - - - 1 - - - 1 - - - - - 1 - .dylib - - - 0 - .dll;.bpl - - - - - res\drawable - 1 - - - - - 1 - .framework - - - 0 - - - - - 1 - - - 1 - - - 0 - - - - - res\drawable-small - 1 - - - - - - 1 - - - Contents\MacOS - 0 - - - - - classes - 1 - - - - - - 1 - - - 1 - - - - - library\lib\armeabi-v7a - 1 - - - - - res\drawable - 1 - - - - - - Contents\Resources - 1 - - - - - 1 - - - 1 - - - - - 1 - - - library\lib\armeabi-v7a - 1 - - - 0 - - - 1 - - - 1 - - - - - library\lib\armeabi - 1 - - - - - res\drawable-large - 1 - - - - - 1 - - - 1 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - res\values - 1 - - - - - res\drawable-ldpi - 1 - - - - - 1 - - - 1 - - - - - res\drawable-hdpi - 1 - - - - - res\drawable-mdpi - 1 - - - - - 1 - - - - - - - - - - - 12 - diff --git a/Packages/CBuilder XE8/VirtualTreesCD.cbproj b/Packages/CBuilder XE8/VirtualTreesCD.cbproj index d6a132138..51cb5cceb 100644 --- a/Packages/CBuilder XE8/VirtualTreesCD.cbproj +++ b/Packages/CBuilder XE8/VirtualTreesCD.cbproj @@ -272,12 +272,7 @@ True False - - Microsoft Office 2000 Sample Automation Server Wrapper Components - Microsoft Office XP Sample Automation Server Wrapper Components - Embarcadero C++Builder Office 2000 Servers Package - Embarcadero C++Builder Office XP Servers Package - + False True @@ -289,419 +284,8 @@ True False - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - VirtualTreesCD.tds - true - - - - - true - - - - - VirtualTreesCD.bpl - true - - - - - true - - - - - 1 - .dylib - - - 0 - .bpl - - - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - - - 1 - .dylib - - - 0 - .dll;.bpl - - - - - 1 - - - 1 - - - 1 - - - - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - - - res\drawable-normal - 1 - - - - - library\lib\x86 - 1 - - - - - 1 - - - 1 - - - 1 - - - - - - library\lib\armeabi-v7a - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable-xlarge - 1 - - - - - res\drawable-xhdpi - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable-xxhdpi - 1 - - - - - library\lib\mips - 1 - - - - - res\drawable - 1 - - - - - 1 - - - 1 - - - 0 - - - - - 1 - .framework - - - 0 - - - - - res\drawable-small - 1 - - - - - - 1 - - - Contents\MacOS - 0 - - - - - classes - 1 - - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable - 1 - - - - - Contents\Resources - 1 - - - - - - 1 - - - 1 - - - 1 - - - - - library\lib\armeabi-v7a - 1 - - - 1 - - - 0 - - - 1 - - - 1 - - - 1 - - - - - library\lib\armeabi - 1 - - - - - res\drawable-large - 1 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable-ldpi - 1 - - - - - res\values - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable-mdpi - 1 - - - - - res\drawable-hdpi - 1 - - - - - 1 - - - - - - - - - - - 12 - diff --git a/Packages/CBuilder XE8/VirtualTreesCR.cbproj b/Packages/CBuilder XE8/VirtualTreesCR.cbproj index ff8f87f71..d6ac5d08f 100644 --- a/Packages/CBuilder XE8/VirtualTreesCR.cbproj +++ b/Packages/CBuilder XE8/VirtualTreesCR.cbproj @@ -297,12 +297,7 @@ True False - - Microsoft Office 2000 Sample Automation Server Wrapper Components - Microsoft Office XP Sample Automation Server Wrapper Components - Embarcadero C++Builder Office 2000 Servers Package - Embarcadero C++Builder Office XP Servers Package - + False True @@ -314,429 +309,8 @@ True True - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - VirtualTreesCR.bpl - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - true - - - - - res\drawable-normal - 1 - - - - - - 1 - - - 1 - - - 1 - - - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF - 1 - - - - - 1 - .dylib - - - 0 - .bpl - - - 1 - .dylib - - - 1 - .dylib - - - 1 - .dylib - - - - - library\lib\mips - 1 - - - - - library\lib\x86 - 1 - - - - - library\lib\armeabi-v7a - 1 - - - - - - 1 - - - 1 - - - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable-xlarge - 1 - - - - - res\drawable-xhdpi - 1 - - - - - res\drawable-xxhdpi - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 1 - .dylib - - - 0 - .dll;.bpl - - - - - res\drawable - 1 - - - - - 1 - .framework - - - 0 - - - - - 1 - - - 1 - - - 0 - - - - - res\drawable-small - 1 - - - - - - 1 - - - Contents\MacOS - 0 - - - - - classes - 1 - - - - - - 1 - - - 1 - - - 1 - - - - - library\lib\armeabi-v7a - 1 - - - - - res\drawable - 1 - - - - - - Contents\Resources - 1 - - - - - 1 - - - 1 - - - 1 - - - - - library\lib\armeabi-v7a - 1 - - - 1 - - - 0 - - - 1 - - - 1 - - - 1 - - - - - library\lib\armeabi - 1 - - - - - res\drawable-large - 1 - - - - - 1 - - - 1 - - - 1 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - res\values - 1 - - - - - res\drawable-ldpi - 1 - - - - - 1 - - - 1 - - - 1 - - - - - res\drawable-hdpi - 1 - - - - - res\drawable-mdpi - 1 - - - - - 1 - - - - - - - - - - - 12 - From 7c0f7ab6a373ffd6faa8f757b3549375e589e8d1 Mon Sep 17 00:00:00 2001 From: Clayton Arends Date: Fri, 10 Mar 2023 07:46:56 -0800 Subject: [PATCH 44/70] Include of basepch.h should come before pragma hdrstop --- Packages/CBuilder 10/VirtualTreesCD.cpp | 2 +- Packages/CBuilder 10/VirtualTreesCR.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Packages/CBuilder 10/VirtualTreesCD.cpp b/Packages/CBuilder 10/VirtualTreesCD.cpp index d4fbb1610..37aacb559 100644 --- a/Packages/CBuilder 10/VirtualTreesCD.cpp +++ b/Packages/CBuilder 10/VirtualTreesCD.cpp @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------- -#pragma hdrstop #include +#pragma hdrstop #pragma package(smart_init) //--------------------------------------------------------------------------- diff --git a/Packages/CBuilder 10/VirtualTreesCR.cpp b/Packages/CBuilder 10/VirtualTreesCR.cpp index d4fbb1610..37aacb559 100644 --- a/Packages/CBuilder 10/VirtualTreesCR.cpp +++ b/Packages/CBuilder 10/VirtualTreesCR.cpp @@ -1,7 +1,7 @@ //--------------------------------------------------------------------------- -#pragma hdrstop #include +#pragma hdrstop #pragma package(smart_init) //--------------------------------------------------------------------------- From bd033b10988652dde56b5efcea6e5e5f07edb476 Mon Sep 17 00:00:00 2001 From: Clayton Arends Date: Fri, 10 Mar 2023 08:23:05 -0800 Subject: [PATCH 45/70] Update included units for renames and splits performed years ago --- Packages/CBuilder 10.X/VirtualTreesCR.cbproj | 6 +++--- Packages/CBuilder 10/VirtualTreesCR.cbproj | 21 +++++++++++--------- Packages/CBuilder XE5/VirtualTreesCR.cbproj | 21 +++++++++++--------- Packages/CBuilder XE7/VirtualTreesCR.cbproj | 21 +++++++++++--------- Packages/CBuilder XE8/VirtualTreesCR.cbproj | 21 +++++++++++--------- 5 files changed, 51 insertions(+), 39 deletions(-) diff --git a/Packages/CBuilder 10.X/VirtualTreesCR.cbproj b/Packages/CBuilder 10.X/VirtualTreesCR.cbproj index 57a764f31..c548a566d 100644 --- a/Packages/CBuilder 10.X/VirtualTreesCR.cbproj +++ b/Packages/CBuilder 10.X/VirtualTreesCR.cbproj @@ -148,9 +148,6 @@ 0 - - 13 - 14 @@ -178,6 +175,9 @@ 17 + + 13 + 17 diff --git a/Packages/CBuilder 10/VirtualTreesCR.cbproj b/Packages/CBuilder 10/VirtualTreesCR.cbproj index 44e930f9a..a27ce26b4 100644 --- a/Packages/CBuilder 10/VirtualTreesCR.cbproj +++ b/Packages/CBuilder 10/VirtualTreesCR.cbproj @@ -218,6 +218,12 @@ 6 + + 14 + + + 15 + 16 @@ -230,27 +236,24 @@ 17 + + 16 + 17 17 + + 13 + 17 17 - - 17 - - - 17 - - - 17 - Cfg_2 Base diff --git a/Packages/CBuilder XE5/VirtualTreesCR.cbproj b/Packages/CBuilder XE5/VirtualTreesCR.cbproj index 20eadc2af..f42e7dc3c 100644 --- a/Packages/CBuilder XE5/VirtualTreesCR.cbproj +++ b/Packages/CBuilder XE5/VirtualTreesCR.cbproj @@ -147,6 +147,12 @@ 6 + + 8 + + + 9 + 15 @@ -159,27 +165,24 @@ 16 + + 17 + 9 12 + + 13 + 13 14 - - 8 - - - 9 - - - 17 - Cfg_2 Base diff --git a/Packages/CBuilder XE7/VirtualTreesCR.cbproj b/Packages/CBuilder XE7/VirtualTreesCR.cbproj index 3ab5771fe..8c3cb9cce 100644 --- a/Packages/CBuilder XE7/VirtualTreesCR.cbproj +++ b/Packages/CBuilder XE7/VirtualTreesCR.cbproj @@ -172,6 +172,12 @@ 6 + + 14 + + + 15 + 16 @@ -184,27 +190,24 @@ 17 + + 16 + 17 17 + + 13 + 17 17 - - 17 - - - 17 - - - 17 - Cfg_2 Base diff --git a/Packages/CBuilder XE8/VirtualTreesCR.cbproj b/Packages/CBuilder XE8/VirtualTreesCR.cbproj index d6ac5d08f..f6140e45d 100644 --- a/Packages/CBuilder XE8/VirtualTreesCR.cbproj +++ b/Packages/CBuilder XE8/VirtualTreesCR.cbproj @@ -173,6 +173,12 @@ 6 + + 14 + + + 15 + 16 @@ -185,27 +191,24 @@ 17 + + 16 + 17 17 + + 13 + 17 17 - - 17 - - - 17 - - - 17 - Cfg_2 Base From 3428ebf11d6eaca1fe5fad8160c24b7a9b9ad5fe Mon Sep 17 00:00:00 2001 From: Clayton Arends Date: Fri, 10 Mar 2023 08:24:26 -0800 Subject: [PATCH 46/70] Import VirtualTreesCR and remove units that are a part of VirtualTreesCR --- Packages/CBuilder XE7/VirtualTreesCD.cbproj | 36 ++------------------- Packages/CBuilder XE8/VirtualTreesCD.cbproj | 36 ++------------------- 2 files changed, 6 insertions(+), 66 deletions(-) diff --git a/Packages/CBuilder XE7/VirtualTreesCD.cbproj b/Packages/CBuilder XE7/VirtualTreesCD.cbproj index 51cb5cceb..37b140fc0 100644 --- a/Packages/CBuilder XE7/VirtualTreesCD.cbproj +++ b/Packages/CBuilder XE7/VirtualTreesCD.cbproj @@ -148,39 +148,9 @@ 0 - - 5 - - - 6 - - - 7 - - - 8 - - - 10 - - - 11 - - - 12 - - - 13 - - - 14 - - - 15 - - - 16 - + + 9 + Cfg_2 Base diff --git a/Packages/CBuilder XE8/VirtualTreesCD.cbproj b/Packages/CBuilder XE8/VirtualTreesCD.cbproj index 51cb5cceb..37b140fc0 100644 --- a/Packages/CBuilder XE8/VirtualTreesCD.cbproj +++ b/Packages/CBuilder XE8/VirtualTreesCD.cbproj @@ -148,39 +148,9 @@ 0 - - 5 - - - 6 - - - 7 - - - 8 - - - 10 - - - 11 - - - 12 - - - 13 - - - 14 - - - 15 - - - 16 - + + 9 + Cfg_2 Base From b268d9854d9c0b452f360278fb7163afe973530e Mon Sep 17 00:00:00 2001 From: Clayton Arends Date: Fri, 10 Mar 2023 08:33:30 -0800 Subject: [PATCH 47/70] Remove currently unsupported platforms --- Packages/CBuilder 10/VirtualTreesCD.cbproj | 73 --------------------- Packages/CBuilder 10/VirtualTreesCR.cbproj | 73 --------------------- Packages/CBuilder XE5/VirtualTreesCD.cbproj | 13 ---- Packages/CBuilder XE5/VirtualTreesCR.cbproj | 2 - 4 files changed, 161 deletions(-) diff --git a/Packages/CBuilder 10/VirtualTreesCD.cbproj b/Packages/CBuilder 10/VirtualTreesCD.cbproj index e6d494ab1..7e788b969 100644 --- a/Packages/CBuilder 10/VirtualTreesCD.cbproj +++ b/Packages/CBuilder 10/VirtualTreesCD.cbproj @@ -13,21 +13,6 @@ true - - true - Base - true - - - true - Base - true - - - true - Base - true - true Base @@ -43,18 +28,6 @@ Base true - - true - Cfg_1 - true - true - - - true - Cfg_1 - true - true - true Cfg_1 @@ -66,18 +39,6 @@ Base true - - true - Cfg_2 - true - true - - - true - Cfg_2 - true - true - true Cfg_2 @@ -111,24 +72,6 @@ true true - - android-support-v4.dex.jar;apk-expansion.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services.dex.jar - Debug - package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=preferExternal;largeHeap=False;theme=TitleBar;hardwareAccelerated=true - false - - - $(MSBuildProjectName) - iPhoneAndiPad - CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user - Debug - - - $(MSBuildProjectName) - iPhoneAndiPad - CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user - Debug - true true @@ -158,12 +101,6 @@ Full true - - true - - - true - _DEBUG;$(Defines) @@ -173,12 +110,6 @@ $(BDS)\lib\release;$(ILINK_LibraryPath) None - - true - - - true - 1033 NDEBUG;$(Defines) @@ -314,10 +245,6 @@ - False - False - False - False True False diff --git a/Packages/CBuilder 10/VirtualTreesCR.cbproj b/Packages/CBuilder 10/VirtualTreesCR.cbproj index a27ce26b4..6f3dd45dd 100644 --- a/Packages/CBuilder 10/VirtualTreesCR.cbproj +++ b/Packages/CBuilder 10/VirtualTreesCR.cbproj @@ -13,21 +13,6 @@ true - - true - Base - true - - - true - Base - true - - - true - Base - true - true Base @@ -43,18 +28,6 @@ Base true - - true - Cfg_1 - true - true - - - true - Cfg_1 - true - true - true Cfg_1 @@ -66,18 +39,6 @@ Base true - - true - Cfg_2 - true - true - - - true - Cfg_2 - true - true - true Cfg_2 @@ -117,24 +78,6 @@ true true - - android-support-v4.dex.jar;apk-expansion.dex.jar;cloud-messaging.dex.jar;fmx.dex.jar;google-analytics-v2.dex.jar;google-play-billing.dex.jar;google-play-licensing.dex.jar;google-play-services.dex.jar - Debug - package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=preferExternal;largeHeap=False;theme=TitleBar;hardwareAccelerated=true - false - - - $(MSBuildProjectName) - iPhoneAndiPad - CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user - Debug - - - $(MSBuildProjectName) - iPhoneAndiPad - CFBundleName=$(MSBuildProjectName);CFBundleDevelopmentRegion=en;CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleInfoDictionaryVersion=7.1;CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;LSRequiresIPhoneOS=true;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName);UIDeviceFamily=iPhone & iPad;CFBundleResourceSpecification=ResourceRules.plist;NSLocationAlwaysUsageDescription=The reason for accessing the location information of the user;NSLocationWhenInUseUsageDescription=The reason for accessing the location information of the user - Debug - true $(BDSINCLUDE)\windows\vcl;$(IncludePath) @@ -167,12 +110,6 @@ Full true - - true - - - true - _DEBUG;$(Defines) @@ -182,12 +119,6 @@ $(BDS)\lib\release;$(ILINK_LibraryPath) None - - true - - - true - 1033 NDEBUG;$(Defines) @@ -354,10 +285,6 @@ - False - False - False - False True True diff --git a/Packages/CBuilder XE5/VirtualTreesCD.cbproj b/Packages/CBuilder XE5/VirtualTreesCD.cbproj index 2cde4d5ad..3b1040194 100644 --- a/Packages/CBuilder XE5/VirtualTreesCD.cbproj +++ b/Packages/CBuilder XE5/VirtualTreesCD.cbproj @@ -13,11 +13,6 @@ true - - true - Base - true - true Base @@ -76,11 +71,6 @@ true true - - Debug - package=com.embarcadero.$(MSBuildProjectName);label=$(MSBuildProjectName);versionCode=1;versionName=1.0.0;persistent=False;restoreAnyVersion=False;installLocation=preferExternal;largeHeap=False;theme=TitleBar;hardwareAccelerated=true - false - $(BDSINCLUDE)\windows\vcl;$(IncludePath) true @@ -258,9 +248,6 @@ - False - False - False True False diff --git a/Packages/CBuilder XE5/VirtualTreesCR.cbproj b/Packages/CBuilder XE5/VirtualTreesCR.cbproj index f42e7dc3c..db9cb96cf 100644 --- a/Packages/CBuilder XE5/VirtualTreesCR.cbproj +++ b/Packages/CBuilder XE5/VirtualTreesCR.cbproj @@ -283,8 +283,6 @@ - False - False True True From 078a2fa92ce3819f19325dd951b7445590f44769 Mon Sep 17 00:00:00 2001 From: Clayton Arends Date: Fri, 10 Mar 2023 08:41:16 -0800 Subject: [PATCH 48/70] Remove unused package imports --- Packages/CBuilder 10.4/VirtualTreesCR.cbproj | 2 -- Packages/CBuilder 10.X/VirtualTreesCR.cbproj | 2 -- Packages/CBuilder 10/VirtualTreesCD.cbproj | 9 --------- Packages/CBuilder 10/VirtualTreesCR.cbproj | 9 --------- Packages/CBuilder 11/VirtualTreesCR.cbproj | 2 -- Packages/CBuilder XE5/VirtualTreesCD.cbproj | 12 ------------ Packages/CBuilder XE5/VirtualTreesCR.cbproj | 9 --------- Packages/CBuilder XE7/VirtualTreesCR.cbproj | 9 --------- Packages/CBuilder XE8/VirtualTreesCR.cbproj | 9 --------- 9 files changed, 63 deletions(-) diff --git a/Packages/CBuilder 10.4/VirtualTreesCR.cbproj b/Packages/CBuilder 10.4/VirtualTreesCR.cbproj index 4b287c356..30167474e 100644 --- a/Packages/CBuilder 10.4/VirtualTreesCR.cbproj +++ b/Packages/CBuilder 10.4/VirtualTreesCR.cbproj @@ -96,13 +96,11 @@ $(BDS)\bin\default_app.manifest 1033 Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - vclwinx;$(PackageImports) $(BDSINCLUDE)\windows\vcl;$(IncludePath) 1033 Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) - vclwinx;$(PackageImports) false diff --git a/Packages/CBuilder 10.X/VirtualTreesCR.cbproj b/Packages/CBuilder 10.X/VirtualTreesCR.cbproj index c548a566d..6fcfdbb9d 100644 --- a/Packages/CBuilder 10.X/VirtualTreesCR.cbproj +++ b/Packages/CBuilder 10.X/VirtualTreesCR.cbproj @@ -88,13 +88,11 @@ $(BDS)\bin\default_app.manifest 1033 Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - vclwinx;$(PackageImports) $(BDSINCLUDE)\windows\vcl;$(IncludePath) 1033 Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) - vclwinx;$(PackageImports) Debug\;$(IncludePath) diff --git a/Packages/CBuilder 10/VirtualTreesCD.cbproj b/Packages/CBuilder 10/VirtualTreesCD.cbproj index 7e788b969..9d3fe4bd1 100644 --- a/Packages/CBuilder 10/VirtualTreesCD.cbproj +++ b/Packages/CBuilder 10/VirtualTreesCD.cbproj @@ -130,21 +130,12 @@ 4 - - 7 - - - 8 - 0 9 - - 6 - Cfg_2 Base diff --git a/Packages/CBuilder 10/VirtualTreesCR.cbproj b/Packages/CBuilder 10/VirtualTreesCR.cbproj index 6f3dd45dd..b57614b4c 100644 --- a/Packages/CBuilder 10/VirtualTreesCR.cbproj +++ b/Packages/CBuilder 10/VirtualTreesCR.cbproj @@ -137,18 +137,9 @@ 4 - - 7 - - - 8 - 0 - - 6 - 14 diff --git a/Packages/CBuilder 11/VirtualTreesCR.cbproj b/Packages/CBuilder 11/VirtualTreesCR.cbproj index a568860a4..624947b1c 100644 --- a/Packages/CBuilder 11/VirtualTreesCR.cbproj +++ b/Packages/CBuilder 11/VirtualTreesCR.cbproj @@ -96,13 +96,11 @@ $(BDS)\bin\default_app.manifest 1033 Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - vclwinx;$(PackageImports) $(BDSINCLUDE)\windows\vcl;$(IncludePath) 1033 Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) - vclwinx;$(PackageImports) false diff --git a/Packages/CBuilder XE5/VirtualTreesCD.cbproj b/Packages/CBuilder XE5/VirtualTreesCD.cbproj index 3b1040194..94946c943 100644 --- a/Packages/CBuilder XE5/VirtualTreesCD.cbproj +++ b/Packages/CBuilder XE5/VirtualTreesCD.cbproj @@ -130,24 +130,12 @@ 4 - - 7 - - - 10 - - - 8 - 0 9 - - 6 - Cfg_2 Base diff --git a/Packages/CBuilder XE5/VirtualTreesCR.cbproj b/Packages/CBuilder XE5/VirtualTreesCR.cbproj index db9cb96cf..9ad5ba4fc 100644 --- a/Packages/CBuilder XE5/VirtualTreesCR.cbproj +++ b/Packages/CBuilder XE5/VirtualTreesCR.cbproj @@ -135,18 +135,9 @@ 4 - - 7 - - - 8 - 0 - - 6 - 8 diff --git a/Packages/CBuilder XE7/VirtualTreesCR.cbproj b/Packages/CBuilder XE7/VirtualTreesCR.cbproj index 8c3cb9cce..1ee5042b0 100644 --- a/Packages/CBuilder XE7/VirtualTreesCR.cbproj +++ b/Packages/CBuilder XE7/VirtualTreesCR.cbproj @@ -160,18 +160,9 @@ 4 - - 7 - - - 8 - 0 - - 6 - 14 diff --git a/Packages/CBuilder XE8/VirtualTreesCR.cbproj b/Packages/CBuilder XE8/VirtualTreesCR.cbproj index f6140e45d..e8e0effe7 100644 --- a/Packages/CBuilder XE8/VirtualTreesCR.cbproj +++ b/Packages/CBuilder XE8/VirtualTreesCR.cbproj @@ -161,18 +161,9 @@ 4 - - 7 - - - 8 - 0 - - 6 - 14 From 6a080e841c53fa0d6456b403b9b47959b14d7516 Mon Sep 17 00:00:00 2001 From: Clayton Arends Date: Fri, 10 Mar 2023 08:43:05 -0800 Subject: [PATCH 49/70] FrameworkType should be VCL --- Packages/CBuilder 10.4/VirtualTreesCD.cbproj | 2 +- Packages/CBuilder 10.X/VirtualTreesCD.cbproj | 2 +- Packages/CBuilder 10/VirtualTreesCD.cbproj | 2 +- Packages/CBuilder 11/VirtualTreesCD.cbproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Packages/CBuilder 10.4/VirtualTreesCD.cbproj b/Packages/CBuilder 10.4/VirtualTreesCD.cbproj index 123b87956..49f917699 100644 --- a/Packages/CBuilder 10.4/VirtualTreesCD.cbproj +++ b/Packages/CBuilder 10.4/VirtualTreesCD.cbproj @@ -4,7 +4,7 @@ VirtualTreesCD.cpp 19.2 Release - None + VCL True Win32 1 diff --git a/Packages/CBuilder 10.X/VirtualTreesCD.cbproj b/Packages/CBuilder 10.X/VirtualTreesCD.cbproj index 564d085dc..208035f91 100644 --- a/Packages/CBuilder 10.X/VirtualTreesCD.cbproj +++ b/Packages/CBuilder 10.X/VirtualTreesCD.cbproj @@ -4,7 +4,7 @@ VirtualTreesCD.cpp 18.4 Release - None + VCL True Win32 1 diff --git a/Packages/CBuilder 10/VirtualTreesCD.cbproj b/Packages/CBuilder 10/VirtualTreesCD.cbproj index 9d3fe4bd1..4697fe7ad 100644 --- a/Packages/CBuilder 10/VirtualTreesCD.cbproj +++ b/Packages/CBuilder 10/VirtualTreesCD.cbproj @@ -4,7 +4,7 @@ VirtualTreesCD.cpp 18.0 Release - None + VCL True Win32 1 diff --git a/Packages/CBuilder 11/VirtualTreesCD.cbproj b/Packages/CBuilder 11/VirtualTreesCD.cbproj index 89f82e674..5977ac6c0 100644 --- a/Packages/CBuilder 11/VirtualTreesCD.cbproj +++ b/Packages/CBuilder 11/VirtualTreesCD.cbproj @@ -4,7 +4,7 @@ VirtualTreesCD.cpp 19.5 Release - None + VCL True Win32 1 From c400afce83a38922188fd87b6c26aebae915165d Mon Sep 17 00:00:00 2001 From: Clayton Arends Date: Fri, 10 Mar 2023 09:10:10 -0800 Subject: [PATCH 50/70] Update include and library paths --- Packages/CBuilder 10.4/VirtualTreesCR.cbproj | 2 -- Packages/CBuilder 10.X/VirtualTreesCD.cbproj | 10 ++-------- Packages/CBuilder 10.X/VirtualTreesCR.cbproj | 11 +++-------- Packages/CBuilder 10/VirtualTreesCD.cbproj | 12 +++--------- Packages/CBuilder 10/VirtualTreesCR.cbproj | 11 +++-------- Packages/CBuilder 11/VirtualTreesCR.cbproj | 2 -- Packages/CBuilder XE5/VirtualTreesCD.cbproj | 16 ++++------------ Packages/CBuilder XE5/VirtualTreesCR.cbproj | 17 ++++++----------- Packages/CBuilder XE7/VirtualTreesCD.cbproj | 17 ++++------------- Packages/CBuilder XE7/VirtualTreesCR.cbproj | 18 +++++------------- Packages/CBuilder XE8/VirtualTreesCD.cbproj | 17 ++++------------- Packages/CBuilder XE8/VirtualTreesCR.cbproj | 19 +++++-------------- 12 files changed, 39 insertions(+), 113 deletions(-) diff --git a/Packages/CBuilder 10.4/VirtualTreesCR.cbproj b/Packages/CBuilder 10.4/VirtualTreesCR.cbproj index 30167474e..831025114 100644 --- a/Packages/CBuilder 10.4/VirtualTreesCR.cbproj +++ b/Packages/CBuilder 10.4/VirtualTreesCR.cbproj @@ -113,7 +113,6 @@ true true true - $(BDS)\lib\debug;$(ILINK_LibraryPath) true Full true @@ -126,7 +125,6 @@ 1033 - $(BDS)\lib\release;$(ILINK_LibraryPath) None diff --git a/Packages/CBuilder 10.X/VirtualTreesCD.cbproj b/Packages/CBuilder 10.X/VirtualTreesCD.cbproj index 208035f91..7a9a8af02 100644 --- a/Packages/CBuilder 10.X/VirtualTreesCD.cbproj +++ b/Packages/CBuilder 10.X/VirtualTreesCD.cbproj @@ -51,7 +51,7 @@ $(BDSCOMMONDIR)\hpp\$(Platform)\ VirtualTreesCD true - ..\..\source;$(DCC_UnitSearchPath) + ..\..\Source;$(DCC_UnitSearchPath) 4108 System;Xml;Data;Datasnap;Web;Soap;Vcl;$(DCC_Namespace) true @@ -67,7 +67,7 @@ All true ..\..\Source\;..\..\Design\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) - ..\..\Design\;$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\..\source;$(ILINK_LibraryPath) + ..\..\Design\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;..\..\Source;$(ILINK_LibraryPath) false true true @@ -85,19 +85,16 @@ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) - Debug\;$(IncludePath) false true false true false - Debug None DEBUG true true true - $(BDS)\lib\debug;$(ILINK_LibraryPath) true Full true @@ -106,9 +103,6 @@ _DEBUG;$(Defines) - Release\;$(IncludePath) - Release - $(BDS)\lib\release;$(ILINK_LibraryPath) None diff --git a/Packages/CBuilder 10.X/VirtualTreesCR.cbproj b/Packages/CBuilder 10.X/VirtualTreesCR.cbproj index 6fcfdbb9d..6fb981d57 100644 --- a/Packages/CBuilder 10.X/VirtualTreesCR.cbproj +++ b/Packages/CBuilder 10.X/VirtualTreesCR.cbproj @@ -73,17 +73,18 @@ All true ..\..\Source\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) - ..\..\Source\;$(BDS)\lib;$(BDS)\lib\$(platform);$(BDS)\lib\$(Platform)\$(Config);$(ILINK_LibraryPath) + ..\..\Source\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;$(ILINK_LibraryPath) false true true 128 + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) $(BDS)\Bin\BDS.EXE true $(BDSINCLUDE)\windows\vcl;$(IncludePath) - C:\Program Files (x86)\Embarcadero\DelphiXE5\lib\win32\release\psdk\;$(ILINK_LibraryPath) true $(BDS)\bin\default_app.manifest 1033 @@ -95,19 +96,16 @@ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) - Debug\;$(IncludePath) false true false true false - Debug None DEBUG true true true - $(BDS)\lib\debug;$(ILINK_LibraryPath) true Full true @@ -116,9 +114,6 @@ _DEBUG;$(Defines) - Release\;$(IncludePath) - Release - $(BDS)\lib\release;$(ILINK_LibraryPath) None diff --git a/Packages/CBuilder 10/VirtualTreesCD.cbproj b/Packages/CBuilder 10/VirtualTreesCD.cbproj index 4697fe7ad..c4a8b5eb7 100644 --- a/Packages/CBuilder 10/VirtualTreesCD.cbproj +++ b/Packages/CBuilder 10/VirtualTreesCD.cbproj @@ -48,10 +48,10 @@ 230 VirtualTree CBuilder designtime package - ..\..\source\hpp\$(Platform)\$(Config) + $(BDSCOMMONDIR)\hpp\$(Platform)\ VirtualTreesCD true - ..\..\source;$(DCC_UnitSearchPath) + ..\..\Source;$(DCC_UnitSearchPath) 4108 System;Xml;Data;Datasnap;Web;Soap;Vcl;$(DCC_Namespace) true @@ -67,7 +67,7 @@ All true ..\..\Source\;..\..\Design\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) - ..\RAD Studio XE5\;..\..\Design\;$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\..\source;$(ILINK_LibraryPath) + ..\..\Design\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;..\..\Source;$(ILINK_LibraryPath) false true true @@ -84,19 +84,16 @@ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) - Debug\;$(IncludePath) false true false true false - Debug None DEBUG true true true - $(BDS)\lib\debug;$(ILINK_LibraryPath) true Full true @@ -105,9 +102,6 @@ _DEBUG;$(Defines) - Release\;$(IncludePath) - Release - $(BDS)\lib\release;$(ILINK_LibraryPath) None diff --git a/Packages/CBuilder 10/VirtualTreesCR.cbproj b/Packages/CBuilder 10/VirtualTreesCR.cbproj index b57614b4c..e63865818 100644 --- a/Packages/CBuilder 10/VirtualTreesCR.cbproj +++ b/Packages/CBuilder 10/VirtualTreesCR.cbproj @@ -73,15 +73,16 @@ All true ..\..\Source\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) - ..\..\Source\;$(BDS)\lib;$(BDS)\lib\$(platform);$(BDS)\lib\$(Platform)\$(Config);$(ILINK_LibraryPath) + ..\..\Source\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;$(ILINK_LibraryPath) false true true + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) true $(BDSINCLUDE)\windows\vcl;$(IncludePath) - C:\Program Files (x86)\Embarcadero\DelphiXE5\lib\win32\release\psdk\;$(ILINK_LibraryPath) true $(BDS)\bin\default_app.manifest 1033 @@ -93,19 +94,16 @@ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) - Debug\;$(IncludePath) false true false true false - Debug None DEBUG true true true - $(BDS)\lib\debug;$(ILINK_LibraryPath) true Full true @@ -114,9 +112,6 @@ _DEBUG;$(Defines) - Release\;$(IncludePath) - Release - $(BDS)\lib\release;$(ILINK_LibraryPath) None diff --git a/Packages/CBuilder 11/VirtualTreesCR.cbproj b/Packages/CBuilder 11/VirtualTreesCR.cbproj index 624947b1c..9e0bea586 100644 --- a/Packages/CBuilder 11/VirtualTreesCR.cbproj +++ b/Packages/CBuilder 11/VirtualTreesCR.cbproj @@ -113,7 +113,6 @@ true true true - $(BDS)\lib\debug;$(ILINK_LibraryPath) true Full true @@ -126,7 +125,6 @@ 1033 - $(BDS)\lib\release;$(ILINK_LibraryPath) None diff --git a/Packages/CBuilder XE5/VirtualTreesCD.cbproj b/Packages/CBuilder XE5/VirtualTreesCD.cbproj index 94946c943..76c2fbb41 100644 --- a/Packages/CBuilder XE5/VirtualTreesCD.cbproj +++ b/Packages/CBuilder XE5/VirtualTreesCD.cbproj @@ -47,10 +47,10 @@ VirtualTree CBuilder designtime package - ..\..\source + $(BDSCOMMONDIR)\hpp\$(Platform)\ VirtualTreesCD true - ..\..\source;$(DCC_UnitSearchPath) + ..\..\Source;$(DCC_UnitSearchPath) 4108 System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) true @@ -65,38 +65,33 @@ true All true - ..\..\..\..\EMBT\VirtualTree\Design\;..\..\..\..\SourceForge\VirtualTree\Packages\CBuilder XE7\;..\..\Source\;..\RAD Studio XE5\;..\..\Design\;..\..\Common\;$(CG_BOOST_ROOT)\boost\tr1\tr1;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(CG_BOOST_ROOT);$(IncludePath) - ..\..\..\..\EMBT\VirtualTree\Design\;..\..\..\..\SourceForge\VirtualTree\Packages\CBuilder XE7\;..\RAD Studio XE5\;..\..\Design\;$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\..\source;$(ILINK_LibraryPath) + ..\..\Source\;..\..\Design\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) + ..\..\Design\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;..\..\Source;$(ILINK_LibraryPath) false true true - $(BDSINCLUDE)\windows\vcl;$(IncludePath) true $(BDS)\bin\default_app.manifest 1033 Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - $(BDSINCLUDE)\windows\vcl;$(IncludePath) 1033 Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) - Debug\;$(IncludePath) false true false true false - Debug None DEBUG true true true - $(BDS)\lib\debug;$(ILINK_LibraryPath) true Full true @@ -105,9 +100,6 @@ _DEBUG;$(Defines) - Release\;$(IncludePath) - Release - $(BDS)\lib\release;$(ILINK_LibraryPath) None diff --git a/Packages/CBuilder XE5/VirtualTreesCR.cbproj b/Packages/CBuilder XE5/VirtualTreesCR.cbproj index 9ad5ba4fc..9d3af23e6 100644 --- a/Packages/CBuilder XE5/VirtualTreesCR.cbproj +++ b/Packages/CBuilder XE5/VirtualTreesCR.cbproj @@ -54,7 +54,7 @@ true VirtualTree CBuilder runtime package - ..\..\source + $(BDSCOMMONDIR)\hpp\$(Platform) VirtualTreesCR Shell32.dll;$(ILINK_DelayLoadDll) $(BDS)\lib;$(BDS)\lib\$(Platform);$(BDS)\lib\$(Platform)\$(Config);$(DCC_UnitSearchPath) @@ -71,15 +71,16 @@ true All true - $(CG_BOOST_ROOT);$(CG_BOOST_ROOT)\boost\tr1\tr1;..\..\Source\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) - ..\..\Source\;$(BDS)\lib;$(BDS)\lib\$(platform);$(BDS)\lib\$(Platform)\$(Config);$(ILINK_LibraryPath) + ..\..\Source\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) + ..\..\Source\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;$(ILINK_LibraryPath) false true true + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) $(BDSINCLUDE)\windows\vcl;$(IncludePath) - C:\Program Files (x86)\Embarcadero\DelphiXE5\lib\win32\release\psdk\;$(ILINK_LibraryPath) true $(BDS)\bin\default_app.manifest 1033 @@ -91,19 +92,16 @@ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) - Debug\;$(IncludePath) false true false true false - Debug None DEBUG true true true - $(BDS)\lib\debug;$(ILINK_LibraryPath) true Full true @@ -112,9 +110,6 @@ _DEBUG;$(Defines) - Release\;$(IncludePath) - Release - $(BDS)\lib\release;$(ILINK_LibraryPath) None @@ -125,7 +120,7 @@ 1033 - + 17 true diff --git a/Packages/CBuilder XE7/VirtualTreesCD.cbproj b/Packages/CBuilder XE7/VirtualTreesCD.cbproj index 37b140fc0..268e2a576 100644 --- a/Packages/CBuilder XE7/VirtualTreesCD.cbproj +++ b/Packages/CBuilder XE7/VirtualTreesCD.cbproj @@ -47,10 +47,10 @@ VirtualTree CBuilder designtime package - ..\..\Source + $(BDSCOMMONDIR)\hpp\$(Platform)\ VirtualTreesCD true - ..\..\source;$(DCC_UnitSearchPath) + ..\..\Source;$(DCC_UnitSearchPath) 4108 System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) true @@ -66,14 +66,12 @@ All true ..\..\Source\;..\..\Design\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) - ..\..\Source\;..\RAD Studio XE5\;..\..\Design\;$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\..\source;$(ILINK_LibraryPath) + ..\..\Design\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;..\..\Source;$(ILINK_LibraryPath) false true true - C:\Program Files (x86)\Embarcadero\Studio\16.0\lib\win32\release\psdk\;$(ILINK_LibraryPath) - $(BDSINCLUDE)\windows\vcl;$(IncludePath) true true $(BDS)\bin\default_app.manifest @@ -81,7 +79,6 @@ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - $(BDSINCLUDE)\windows\vcl;$(IncludePath) 1033 Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) @@ -91,19 +88,16 @@ true true off - Debug\;$(IncludePath) false true false true false - Debug None DEBUG true true true - $(BDS)\lib\debug;$(ILINK_LibraryPath) true Full true @@ -119,9 +113,6 @@ _DEBUG;$(Defines) - Release\;$(IncludePath) - Release - $(BDS)\lib\release;$(ILINK_LibraryPath) None @@ -129,7 +120,7 @@ NDEBUG;$(Defines) - + 16 true diff --git a/Packages/CBuilder XE7/VirtualTreesCR.cbproj b/Packages/CBuilder XE7/VirtualTreesCR.cbproj index 1ee5042b0..931a6c244 100644 --- a/Packages/CBuilder XE7/VirtualTreesCR.cbproj +++ b/Packages/CBuilder XE7/VirtualTreesCR.cbproj @@ -60,7 +60,7 @@ true VirtualTree CBuilder runtime package - ..\..\Source + $(BDSCOMMONDIR)\hpp\$(Platform) VirtualTreesCR Shell32.dll;$(ILINK_DelayLoadDll) $(BDS)\lib;$(BDS)\lib\$(Platform);$(BDS)\lib\$(Platform)\$(Config);$(DCC_UnitSearchPath) @@ -78,23 +78,23 @@ All true ..\..\Source\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) - ..\..\Source\;$(BDS)\lib;$(BDS)\lib\$(platform);$(BDS)\lib\$(Platform)\$(Config);$(ILINK_LibraryPath) + ..\..\Source\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;$(ILINK_LibraryPath) false true true + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) $(BDS)\Bin\BDS.EXE true $(BDSINCLUDE)\windows\vcl;$(IncludePath) - C:\Program Files (x86)\Embarcadero\DelphiXE5\lib\win32\release\psdk\;$(ILINK_LibraryPath) true $(BDS)\bin\default_app.manifest 1033 Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - ..\..\Source $(BDSINCLUDE)\windows\vcl;$(IncludePath) 1033 Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) @@ -105,19 +105,16 @@ true true off - Debug\;$(IncludePath) false true false true false - Debug None DEBUG true true true - $(BDS)\lib\debug;$(ILINK_LibraryPath) true Full true @@ -126,7 +123,6 @@ true true true - ..\..\Source off 1033 true @@ -136,10 +132,6 @@ 1033 - ..\..\Source - Release\;$(IncludePath) - Release - $(BDS)\lib\release;$(ILINK_LibraryPath) None @@ -150,7 +142,7 @@ 1033 - + 9 true diff --git a/Packages/CBuilder XE8/VirtualTreesCD.cbproj b/Packages/CBuilder XE8/VirtualTreesCD.cbproj index 37b140fc0..268e2a576 100644 --- a/Packages/CBuilder XE8/VirtualTreesCD.cbproj +++ b/Packages/CBuilder XE8/VirtualTreesCD.cbproj @@ -47,10 +47,10 @@ VirtualTree CBuilder designtime package - ..\..\Source + $(BDSCOMMONDIR)\hpp\$(Platform)\ VirtualTreesCD true - ..\..\source;$(DCC_UnitSearchPath) + ..\..\Source;$(DCC_UnitSearchPath) 4108 System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) true @@ -66,14 +66,12 @@ All true ..\..\Source\;..\..\Design\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) - ..\..\Source\;..\RAD Studio XE5\;..\..\Design\;$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\..\source;$(ILINK_LibraryPath) + ..\..\Design\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;..\..\Source;$(ILINK_LibraryPath) false true true - C:\Program Files (x86)\Embarcadero\Studio\16.0\lib\win32\release\psdk\;$(ILINK_LibraryPath) - $(BDSINCLUDE)\windows\vcl;$(IncludePath) true true $(BDS)\bin\default_app.manifest @@ -81,7 +79,6 @@ Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - $(BDSINCLUDE)\windows\vcl;$(IncludePath) 1033 Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) @@ -91,19 +88,16 @@ true true off - Debug\;$(IncludePath) false true false true false - Debug None DEBUG true true true - $(BDS)\lib\debug;$(ILINK_LibraryPath) true Full true @@ -119,9 +113,6 @@ _DEBUG;$(Defines) - Release\;$(IncludePath) - Release - $(BDS)\lib\release;$(ILINK_LibraryPath) None @@ -129,7 +120,7 @@ NDEBUG;$(Defines) - + 16 true diff --git a/Packages/CBuilder XE8/VirtualTreesCR.cbproj b/Packages/CBuilder XE8/VirtualTreesCR.cbproj index e8e0effe7..931a6c244 100644 --- a/Packages/CBuilder XE8/VirtualTreesCR.cbproj +++ b/Packages/CBuilder XE8/VirtualTreesCR.cbproj @@ -60,7 +60,7 @@ true VirtualTree CBuilder runtime package - ..\..\Source + $(BDSCOMMONDIR)\hpp\$(Platform) VirtualTreesCR Shell32.dll;$(ILINK_DelayLoadDll) $(BDS)\lib;$(BDS)\lib\$(Platform);$(BDS)\lib\$(Platform)\$(Config);$(DCC_UnitSearchPath) @@ -78,24 +78,23 @@ All true ..\..\Source\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) - ..\..\Source\;$(BDS)\lib;$(BDS)\lib\$(platform);$(BDS)\lib\$(Platform)\$(Config);$(ILINK_LibraryPath) + ..\..\Source\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;$(ILINK_LibraryPath) false true true + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) $(BDS)\Bin\BDS.EXE true $(BDSINCLUDE)\windows\vcl;$(IncludePath) - C:\Program Files (x86)\Embarcadero\DelphiXE5\lib\win32\release\psdk\;$(ILINK_LibraryPath) true $(BDS)\bin\default_app.manifest 1033 Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) - $(BDSCOMMONDIR)\DCP\$(Platform) - $(BdsCommponDir)\Dcp\$(Platform) $(BDSINCLUDE)\windows\vcl;$(IncludePath) 1033 Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) @@ -106,19 +105,16 @@ true true off - Debug\;$(IncludePath) false true false true false - Debug None DEBUG true true true - $(BDS)\lib\debug;$(ILINK_LibraryPath) true Full true @@ -127,7 +123,6 @@ true true true - ..\..\Source off 1033 true @@ -137,10 +132,6 @@ 1033 - ..\..\Source - Release\;$(IncludePath) - Release - $(BDS)\lib\release;$(ILINK_LibraryPath) None @@ -151,7 +142,7 @@ 1033 - + 9 true From f89f717a4a0dbe95bc3af6f717f20b1194610594 Mon Sep 17 00:00:00 2001 From: Clayton Arends Date: Fri, 10 Mar 2023 09:19:05 -0800 Subject: [PATCH 51/70] Add missing --- Packages/CBuilder XE5/VirtualTreesCD.cbproj | 1 + Packages/CBuilder XE5/VirtualTreesCR.cbproj | 1 + Packages/CBuilder XE7/VirtualTreesCD.cbproj | 1 + Packages/CBuilder XE7/VirtualTreesCR.cbproj | 1 + Packages/CBuilder XE8/VirtualTreesCD.cbproj | 1 + Packages/CBuilder XE8/VirtualTreesCR.cbproj | 1 + 6 files changed, 6 insertions(+) diff --git a/Packages/CBuilder XE5/VirtualTreesCD.cbproj b/Packages/CBuilder XE5/VirtualTreesCD.cbproj index 76c2fbb41..abe0aaf46 100644 --- a/Packages/CBuilder XE5/VirtualTreesCD.cbproj +++ b/Packages/CBuilder XE5/VirtualTreesCD.cbproj @@ -46,6 +46,7 @@ true + 190 VirtualTree CBuilder designtime package $(BDSCOMMONDIR)\hpp\$(Platform)\ VirtualTreesCD diff --git a/Packages/CBuilder XE5/VirtualTreesCR.cbproj b/Packages/CBuilder XE5/VirtualTreesCR.cbproj index 9d3af23e6..617c28d6c 100644 --- a/Packages/CBuilder XE5/VirtualTreesCR.cbproj +++ b/Packages/CBuilder XE5/VirtualTreesCR.cbproj @@ -52,6 +52,7 @@ true + 190 true VirtualTree CBuilder runtime package $(BDSCOMMONDIR)\hpp\$(Platform) diff --git a/Packages/CBuilder XE7/VirtualTreesCD.cbproj b/Packages/CBuilder XE7/VirtualTreesCD.cbproj index 268e2a576..2499563f1 100644 --- a/Packages/CBuilder XE7/VirtualTreesCD.cbproj +++ b/Packages/CBuilder XE7/VirtualTreesCD.cbproj @@ -46,6 +46,7 @@ true + 210 VirtualTree CBuilder designtime package $(BDSCOMMONDIR)\hpp\$(Platform)\ VirtualTreesCD diff --git a/Packages/CBuilder XE7/VirtualTreesCR.cbproj b/Packages/CBuilder XE7/VirtualTreesCR.cbproj index 931a6c244..e5dae0462 100644 --- a/Packages/CBuilder XE7/VirtualTreesCR.cbproj +++ b/Packages/CBuilder XE7/VirtualTreesCR.cbproj @@ -58,6 +58,7 @@ true + 210 true VirtualTree CBuilder runtime package $(BDSCOMMONDIR)\hpp\$(Platform) diff --git a/Packages/CBuilder XE8/VirtualTreesCD.cbproj b/Packages/CBuilder XE8/VirtualTreesCD.cbproj index 268e2a576..b79a3427d 100644 --- a/Packages/CBuilder XE8/VirtualTreesCD.cbproj +++ b/Packages/CBuilder XE8/VirtualTreesCD.cbproj @@ -46,6 +46,7 @@ true + 220 VirtualTree CBuilder designtime package $(BDSCOMMONDIR)\hpp\$(Platform)\ VirtualTreesCD diff --git a/Packages/CBuilder XE8/VirtualTreesCR.cbproj b/Packages/CBuilder XE8/VirtualTreesCR.cbproj index 931a6c244..c3d04a999 100644 --- a/Packages/CBuilder XE8/VirtualTreesCR.cbproj +++ b/Packages/CBuilder XE8/VirtualTreesCR.cbproj @@ -58,6 +58,7 @@ true + 220 true VirtualTree CBuilder runtime package $(BDSCOMMONDIR)\hpp\$(Platform) From be1b214e674c2e8ca14b2f54a324c4357deb4ed6 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sat, 11 Mar 2023 10:02:07 +0100 Subject: [PATCH 52/70] Fix for #1179 --- Source/VirtualTrees.pas | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 9390c25f2..254c52375 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -8092,6 +8092,17 @@ procedure TVirtualTreeColumns.FixPositions; I: Integer; begin + // Fox positions that too large, see #1179 + for I := 0 to Count - 1 do + begin + if Integer(Items[I].Position) >= Count then + begin + UpdatePositions(True); + break; + end; + end; // for + + // Update position array for I := 0 to Count - 1 do FPositionToIndex[Items[I].Position] := I; From af03b772bf89a8036de25dbf386b74503bab1da9 Mon Sep 17 00:00:00 2001 From: Clayton Arends Date: Sat, 11 Mar 2023 08:06:25 -0800 Subject: [PATCH 53/70] Add C++Builder XE6, 10.2, and 10.3 project files --- .../CBuilder 10.2/VirtualTreeView.groupproj | 48 +++ Packages/CBuilder 10.2/VirtualTreesCD.cbproj | 245 ++++++++++++++ Packages/CBuilder 10.2/VirtualTreesCD.cpp | 17 + Packages/CBuilder 10.2/VirtualTreesCR.cbproj | 306 ++++++++++++++++++ Packages/CBuilder 10.2/VirtualTreesCR.cpp | 17 + .../CBuilder 10.3/VirtualTreeView.groupproj | 48 +++ Packages/CBuilder 10.3/VirtualTreesCD.cbproj | 245 ++++++++++++++ Packages/CBuilder 10.3/VirtualTreesCD.cpp | 17 + Packages/CBuilder 10.3/VirtualTreesCR.cbproj | 306 ++++++++++++++++++ Packages/CBuilder 10.3/VirtualTreesCR.cpp | 17 + .../CBuilder XE6/VirtualTreeView.groupproj | 48 +++ Packages/CBuilder XE6/VirtualTreesCD.cbproj | 239 ++++++++++++++ Packages/CBuilder XE6/VirtualTreesCD.cpp | 17 + Packages/CBuilder XE6/VirtualTreesCR.cbproj | 280 ++++++++++++++++ Packages/CBuilder XE6/VirtualTreesCR.cpp | 17 + 15 files changed, 1867 insertions(+) create mode 100644 Packages/CBuilder 10.2/VirtualTreeView.groupproj create mode 100644 Packages/CBuilder 10.2/VirtualTreesCD.cbproj create mode 100644 Packages/CBuilder 10.2/VirtualTreesCD.cpp create mode 100644 Packages/CBuilder 10.2/VirtualTreesCR.cbproj create mode 100644 Packages/CBuilder 10.2/VirtualTreesCR.cpp create mode 100644 Packages/CBuilder 10.3/VirtualTreeView.groupproj create mode 100644 Packages/CBuilder 10.3/VirtualTreesCD.cbproj create mode 100644 Packages/CBuilder 10.3/VirtualTreesCD.cpp create mode 100644 Packages/CBuilder 10.3/VirtualTreesCR.cbproj create mode 100644 Packages/CBuilder 10.3/VirtualTreesCR.cpp create mode 100644 Packages/CBuilder XE6/VirtualTreeView.groupproj create mode 100644 Packages/CBuilder XE6/VirtualTreesCD.cbproj create mode 100644 Packages/CBuilder XE6/VirtualTreesCD.cpp create mode 100644 Packages/CBuilder XE6/VirtualTreesCR.cbproj create mode 100644 Packages/CBuilder XE6/VirtualTreesCR.cpp diff --git a/Packages/CBuilder 10.2/VirtualTreeView.groupproj b/Packages/CBuilder 10.2/VirtualTreeView.groupproj new file mode 100644 index 000000000..1250e4780 --- /dev/null +++ b/Packages/CBuilder 10.2/VirtualTreeView.groupproj @@ -0,0 +1,48 @@ + + + {85AC5363-0DD3-4B39-8709-5987A7DA817E} + + + + + + + + + + + Default.Personality.12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Packages/CBuilder 10.2/VirtualTreesCD.cbproj b/Packages/CBuilder 10.2/VirtualTreesCD.cbproj new file mode 100644 index 000000000..dbdaf74e5 --- /dev/null +++ b/Packages/CBuilder 10.2/VirtualTreesCD.cbproj @@ -0,0 +1,245 @@ + + + {DE1FB54C-6852-4F59-B4A5-7718E6069FE8} + VirtualTreesCD.cpp + 18.4 + Release + VCL + True + Win32 + 1 + Package + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + 250 + VirtualTree CBuilder designtime package + $(BDSCOMMONDIR)\hpp\$(Platform)\ + VirtualTreesCD + true + ..\..\Source;$(DCC_UnitSearchPath) + 4108 + System;Xml;Data;Datasnap;Web;Soap;Vcl;$(DCC_Namespace) + true + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + 6 + -LUDesignIDE + true + bpl + CppPackage + true + true + true + All + true + ..\..\Source\;..\..\Design\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) + ..\..\Design\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;..\..\Source;$(ILINK_LibraryPath) + false + true + true + 128 + None + .\$(Platform)\$(Config) + true + .\$(Platform)\$(Config) + + + true + $(BDS)\bin\default_app.manifest + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + + + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + + + false + true + false + true + false + None + DEBUG + true + true + true + true + Full + true + + + _DEBUG;$(Defines) + 1033 + + + None + + + 1033 + NDEBUG;$(Defines) + + + + 3 + + + 10 + + + 5 + + + 1 + + + 4 + + + 0 + + + 9 + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + + + + + CPlusPlusBuilder.Personality.12 + CppPackage + + + + VirtualTreesCD.cpp + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 4108 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + + + + + + + False + + False + + True + False + + + + False + True + True + False + + + + True + False + + + 12 + + + diff --git a/Packages/CBuilder 10.2/VirtualTreesCD.cpp b/Packages/CBuilder 10.2/VirtualTreesCD.cpp new file mode 100644 index 000000000..9b654ce81 --- /dev/null +++ b/Packages/CBuilder 10.2/VirtualTreesCD.cpp @@ -0,0 +1,17 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +#pragma package(smart_init) +//--------------------------------------------------------------------------- + +// Package source. +//--------------------------------------------------------------------------- + + +#pragma argsused +int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- diff --git a/Packages/CBuilder 10.2/VirtualTreesCR.cbproj b/Packages/CBuilder 10.2/VirtualTreesCR.cbproj new file mode 100644 index 000000000..7f1e3c5cc --- /dev/null +++ b/Packages/CBuilder 10.2/VirtualTreesCR.cbproj @@ -0,0 +1,306 @@ + + + {FE6B0D67-74B6-4E30-8AED-CB2B3E77A51F} + VirtualTreesCR.cpp + 18.4 + Release + VCL + True + Win32 + 3 + Package + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + true + Cfg_2 + true + true + + + 250 + true + VirtualTree CBuilder runtime package + $(BDSCOMMONDIR)\hpp\$(Platform) + VirtualTreesCR + Shell32.dll;uxtheme.dll;$(ILINK_DelayLoadDll) + $(BDS)\lib;$(BDS)\lib\$(Platform);$(BDS)\lib\$(Platform)\$(Config);$(DCC_UnitSearchPath) + true + 4108 + System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) + true + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + 6 + bpl + CppPackage + true + true + true + All + true + ..\..\Source\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) + ..\..\Source\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;$(ILINK_LibraryPath) + false + true + true + 128 + None + .\$(Platform)\$(Config) + true + .\$(Platform)\$(Config) + + + $(BDS)\Bin\BDS.EXE + true + $(BDSINCLUDE)\windows\vcl;$(IncludePath) + $(BDS)\bin\default_app.manifest + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + + + $(BDSINCLUDE)\windows\vcl;$(IncludePath) + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + + + false + true + false + true + false + None + DEBUG + true + true + true + true + Full + true + + + _DEBUG;$(Defines) + 1033 + + + 1033 + + + None + + + 1033 + NDEBUG;$(Defines) + + + 1033 + + + + 3 + + + 9 + true + + + 9 + true + + + 18 + true + + + 18 + true + + + 4 + + + 0 + + + 14 + + + 15 + + + 16 + + + 16 + + + 16 + + + 17 + + + 16 + + + 17 + + + 17 + + + 13 + + + 17 + + + 17 + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + + + + + CPlusPlusBuilder.Personality.12 + CppPackage + + + + VirtualTreesCR.cpp + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 4108 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + + + + + + + False + + False + + True + False + + + + False + True + True + False + + + + True + True + + + 12 + + + diff --git a/Packages/CBuilder 10.2/VirtualTreesCR.cpp b/Packages/CBuilder 10.2/VirtualTreesCR.cpp new file mode 100644 index 000000000..9b654ce81 --- /dev/null +++ b/Packages/CBuilder 10.2/VirtualTreesCR.cpp @@ -0,0 +1,17 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +#pragma package(smart_init) +//--------------------------------------------------------------------------- + +// Package source. +//--------------------------------------------------------------------------- + + +#pragma argsused +int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- diff --git a/Packages/CBuilder 10.3/VirtualTreeView.groupproj b/Packages/CBuilder 10.3/VirtualTreeView.groupproj new file mode 100644 index 000000000..1250e4780 --- /dev/null +++ b/Packages/CBuilder 10.3/VirtualTreeView.groupproj @@ -0,0 +1,48 @@ + + + {85AC5363-0DD3-4B39-8709-5987A7DA817E} + + + + + + + + + + + Default.Personality.12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Packages/CBuilder 10.3/VirtualTreesCD.cbproj b/Packages/CBuilder 10.3/VirtualTreesCD.cbproj new file mode 100644 index 000000000..bb04917c5 --- /dev/null +++ b/Packages/CBuilder 10.3/VirtualTreesCD.cbproj @@ -0,0 +1,245 @@ + + + {DE1FB54C-6852-4F59-B4A5-7718E6069FE8} + VirtualTreesCD.cpp + 18.5 + Release + VCL + True + Win32 + 1 + Package + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + 260 + VirtualTree CBuilder designtime package + $(BDSCOMMONDIR)\hpp\$(Platform)\ + VirtualTreesCD + true + ..\..\Source;$(DCC_UnitSearchPath) + 4108 + System;Xml;Data;Datasnap;Web;Soap;Vcl;$(DCC_Namespace) + true + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + 6 + -LUDesignIDE + true + bpl + CppPackage + true + true + true + All + true + ..\..\Source\;..\..\Design\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) + ..\..\Design\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;..\..\Source;$(ILINK_LibraryPath) + false + true + true + 128 + None + .\$(Platform)\$(Config) + true + .\$(Platform)\$(Config) + + + true + $(BDS)\bin\default_app.manifest + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + + + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + + + false + true + false + true + false + None + DEBUG + true + true + true + true + Full + true + + + _DEBUG;$(Defines) + 1033 + + + None + + + 1033 + NDEBUG;$(Defines) + + + + 3 + + + 10 + + + 5 + + + 1 + + + 4 + + + 0 + + + 9 + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + + + + + CPlusPlusBuilder.Personality.12 + CppPackage + + + + VirtualTreesCD.cpp + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 4108 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + + + + + + + False + + False + + True + False + + + + False + True + True + False + + + + True + False + + + 12 + + + diff --git a/Packages/CBuilder 10.3/VirtualTreesCD.cpp b/Packages/CBuilder 10.3/VirtualTreesCD.cpp new file mode 100644 index 000000000..9b654ce81 --- /dev/null +++ b/Packages/CBuilder 10.3/VirtualTreesCD.cpp @@ -0,0 +1,17 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +#pragma package(smart_init) +//--------------------------------------------------------------------------- + +// Package source. +//--------------------------------------------------------------------------- + + +#pragma argsused +int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- diff --git a/Packages/CBuilder 10.3/VirtualTreesCR.cbproj b/Packages/CBuilder 10.3/VirtualTreesCR.cbproj new file mode 100644 index 000000000..41ca80796 --- /dev/null +++ b/Packages/CBuilder 10.3/VirtualTreesCR.cbproj @@ -0,0 +1,306 @@ + + + {FE6B0D67-74B6-4E30-8AED-CB2B3E77A51F} + VirtualTreesCR.cpp + 18.5 + Release + VCL + True + Win32 + 3 + Package + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + true + Cfg_2 + true + true + + + 260 + true + VirtualTree CBuilder runtime package + $(BDSCOMMONDIR)\hpp\$(Platform) + VirtualTreesCR + Shell32.dll;uxtheme.dll;$(ILINK_DelayLoadDll) + $(BDS)\lib;$(BDS)\lib\$(Platform);$(BDS)\lib\$(Platform)\$(Config);$(DCC_UnitSearchPath) + true + 4108 + System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) + true + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + 6 + bpl + CppPackage + true + true + true + All + true + ..\..\Source\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) + ..\..\Source\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;$(ILINK_LibraryPath) + false + true + true + 128 + None + .\$(Platform)\$(Config) + true + .\$(Platform)\$(Config) + + + $(BDS)\Bin\BDS.EXE + true + $(BDSINCLUDE)\windows\vcl;$(IncludePath) + $(BDS)\bin\default_app.manifest + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + + + $(BDSINCLUDE)\windows\vcl;$(IncludePath) + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + + + false + true + false + true + false + None + DEBUG + true + true + true + true + Full + true + + + _DEBUG;$(Defines) + 1033 + + + 1033 + + + None + + + 1033 + NDEBUG;$(Defines) + + + 1033 + + + + 3 + + + 9 + true + + + 9 + true + + + 18 + true + + + 18 + true + + + 4 + + + 0 + + + 14 + + + 15 + + + 16 + + + 16 + + + 16 + + + 17 + + + 16 + + + 17 + + + 17 + + + 13 + + + 17 + + + 17 + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + + + + + CPlusPlusBuilder.Personality.12 + CppPackage + + + + VirtualTreesCR.cpp + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 4108 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + + + + + + + False + + False + + True + False + + + + False + True + True + False + + + + True + True + + + 12 + + + diff --git a/Packages/CBuilder 10.3/VirtualTreesCR.cpp b/Packages/CBuilder 10.3/VirtualTreesCR.cpp new file mode 100644 index 000000000..9b654ce81 --- /dev/null +++ b/Packages/CBuilder 10.3/VirtualTreesCR.cpp @@ -0,0 +1,17 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +#pragma package(smart_init) +//--------------------------------------------------------------------------- + +// Package source. +//--------------------------------------------------------------------------- + + +#pragma argsused +int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- diff --git a/Packages/CBuilder XE6/VirtualTreeView.groupproj b/Packages/CBuilder XE6/VirtualTreeView.groupproj new file mode 100644 index 000000000..b7a78ae36 --- /dev/null +++ b/Packages/CBuilder XE6/VirtualTreeView.groupproj @@ -0,0 +1,48 @@ + + + {90943296-FDFA-4C80-A99D-237F570C4F54} + + + + + + + VirtualTreesCR.cbproj + + + + Default.Personality.12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Packages/CBuilder XE6/VirtualTreesCD.cbproj b/Packages/CBuilder XE6/VirtualTreesCD.cbproj new file mode 100644 index 000000000..5d0c47450 --- /dev/null +++ b/Packages/CBuilder XE6/VirtualTreesCD.cbproj @@ -0,0 +1,239 @@ + + + {DE1FB54C-6852-4F59-B4A5-7718E6069FE8} + VirtualTreesCD.cpp + 15.4 + Release + VCL + True + Win32 + 1 + Package + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + 200 + VirtualTree CBuilder designtime package + $(BDSCOMMONDIR)\hpp\$(Platform)\ + VirtualTreesCD + true + ..\..\Source;$(DCC_UnitSearchPath) + 4108 + System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) + true + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + 6 + -LUDesignIDE + true + bpl + CppPackage + true + true + true + All + true + ..\..\Source\;..\..\Design\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) + ..\..\Design\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;..\..\Source;$(ILINK_LibraryPath) + false + true + true + + + true + $(BDS)\bin\default_app.manifest + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + + + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + + + false + true + false + true + false + None + DEBUG + true + true + true + true + Full + true + + + _DEBUG;$(Defines) + + + None + + + 1033 + NDEBUG;$(Defines) + + + + 9 + + + 10 + + + 5 + + + 1 + + + 4 + + + 0 + + + 9 + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + + + + + CPlusPlusBuilder.Personality.12 + CppPackage + + + + VirtualTreesCD.cpp + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 4108 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + + + + + + + False + + False + + True + False + + + + False + True + True + False + + + + True + False + + + 12 + + + diff --git a/Packages/CBuilder XE6/VirtualTreesCD.cpp b/Packages/CBuilder XE6/VirtualTreesCD.cpp new file mode 100644 index 000000000..9b654ce81 --- /dev/null +++ b/Packages/CBuilder XE6/VirtualTreesCD.cpp @@ -0,0 +1,17 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +#pragma package(smart_init) +//--------------------------------------------------------------------------- + +// Package source. +//--------------------------------------------------------------------------- + + +#pragma argsused +int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- diff --git a/Packages/CBuilder XE6/VirtualTreesCR.cbproj b/Packages/CBuilder XE6/VirtualTreesCR.cbproj new file mode 100644 index 000000000..4927f88c3 --- /dev/null +++ b/Packages/CBuilder XE6/VirtualTreesCR.cbproj @@ -0,0 +1,280 @@ + + + {FE6B0D67-74B6-4E30-8AED-CB2B3E77A51F} + VirtualTreesCR.cpp + 15.4 + Release + VCL + True + Win32 + 3 + Package + + + true + + + true + Base + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + true + Cfg_2 + true + true + + + true + Cfg_2 + true + true + + + 200 + true + VirtualTree CBuilder runtime package + $(BDSCOMMONDIR)\hpp\$(Platform) + VirtualTreesCR + Shell32.dll;$(ILINK_DelayLoadDll) + $(BDS)\lib;$(BDS)\lib\$(Platform);$(BDS)\lib\$(Platform)\$(Config);$(DCC_UnitSearchPath) + true + 4108 + System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) + true + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + 6 + bpl + CppPackage + true + true + true + All + true + ..\..\Source\;$(BDS)\include;$(BDS)\include\windows;$(BDS)\include\windows\rtl;$(BDS)\include\windows\vcl;$(BDS)\include\windows\crtl;$(BDS)\include\windows\sdk;$(IncludePath) + ..\..\Source\;$(BDS)\lib;$(BDS)\lib\$(Platform)\$(Config);$(BDS)\lib\$(Platform)\release\psdk;$(ILINK_LibraryPath) + false + true + true + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + + + $(BDSINCLUDE)\windows\vcl;$(IncludePath) + true + $(BDS)\bin\default_app.manifest + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + + + $(BDSINCLUDE)\windows\vcl;$(IncludePath) + 1033 + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) + + + false + true + false + true + false + None + DEBUG + true + true + true + true + Full + true + + + _DEBUG;$(Defines) + + + None + + + 1033 + NDEBUG;$(Defines) + + + 1033 + + + + 17 + true + + + 1 + + + 4 + + + 0 + + + 8 + + + 9 + + + 15 + + + 10 + + + 11 + + + 16 + + + 17 + + + 9 + + + 12 + + + 13 + + + 13 + + + 14 + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + + + + + CPlusPlusBuilder.Personality.12 + CppPackage + + + + VirtualTreesCR.cpp + + + False + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 4108 + 1252 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + False + + + + + + + False + + False + + True + False + + + + False + True + True + False + + + + True + True + + + 12 + + + diff --git a/Packages/CBuilder XE6/VirtualTreesCR.cpp b/Packages/CBuilder XE6/VirtualTreesCR.cpp new file mode 100644 index 000000000..9b654ce81 --- /dev/null +++ b/Packages/CBuilder XE6/VirtualTreesCR.cpp @@ -0,0 +1,17 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +#pragma package(smart_init) +//--------------------------------------------------------------------------- + +// Package source. +//--------------------------------------------------------------------------- + + +#pragma argsused +int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*) +{ + return 1; +} +//--------------------------------------------------------------------------- From 73237effdac8935ce3ae0ccd99d3fb3fe090a345 Mon Sep 17 00:00:00 2001 From: Clayton Arends Date: Sat, 11 Mar 2023 08:07:14 -0800 Subject: [PATCH 54/70] Rename "CBuilder 10.X/" to "CBuilder 10.1/" --- .../{CBuilder 10.X => CBuilder 10.1}/VirtualTreeView.groupproj | 0 Packages/{CBuilder 10.X => CBuilder 10.1}/VirtualTreesCD.cbproj | 0 Packages/{CBuilder 10.X => CBuilder 10.1}/VirtualTreesCD.cpp | 0 Packages/{CBuilder 10.X => CBuilder 10.1}/VirtualTreesCR.cbproj | 0 Packages/{CBuilder 10.X => CBuilder 10.1}/VirtualTreesCR.cpp | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename Packages/{CBuilder 10.X => CBuilder 10.1}/VirtualTreeView.groupproj (100%) rename Packages/{CBuilder 10.X => CBuilder 10.1}/VirtualTreesCD.cbproj (100%) rename Packages/{CBuilder 10.X => CBuilder 10.1}/VirtualTreesCD.cpp (100%) rename Packages/{CBuilder 10.X => CBuilder 10.1}/VirtualTreesCR.cbproj (100%) rename Packages/{CBuilder 10.X => CBuilder 10.1}/VirtualTreesCR.cpp (100%) diff --git a/Packages/CBuilder 10.X/VirtualTreeView.groupproj b/Packages/CBuilder 10.1/VirtualTreeView.groupproj similarity index 100% rename from Packages/CBuilder 10.X/VirtualTreeView.groupproj rename to Packages/CBuilder 10.1/VirtualTreeView.groupproj diff --git a/Packages/CBuilder 10.X/VirtualTreesCD.cbproj b/Packages/CBuilder 10.1/VirtualTreesCD.cbproj similarity index 100% rename from Packages/CBuilder 10.X/VirtualTreesCD.cbproj rename to Packages/CBuilder 10.1/VirtualTreesCD.cbproj diff --git a/Packages/CBuilder 10.X/VirtualTreesCD.cpp b/Packages/CBuilder 10.1/VirtualTreesCD.cpp similarity index 100% rename from Packages/CBuilder 10.X/VirtualTreesCD.cpp rename to Packages/CBuilder 10.1/VirtualTreesCD.cpp diff --git a/Packages/CBuilder 10.X/VirtualTreesCR.cbproj b/Packages/CBuilder 10.1/VirtualTreesCR.cbproj similarity index 100% rename from Packages/CBuilder 10.X/VirtualTreesCR.cbproj rename to Packages/CBuilder 10.1/VirtualTreesCR.cbproj diff --git a/Packages/CBuilder 10.X/VirtualTreesCR.cpp b/Packages/CBuilder 10.1/VirtualTreesCR.cpp similarity index 100% rename from Packages/CBuilder 10.X/VirtualTreesCR.cpp rename to Packages/CBuilder 10.1/VirtualTreesCR.cpp From adcca7903cf8f92e551fbf33b2466793fa8c0b24 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sat, 18 Mar 2023 08:30:59 +0100 Subject: [PATCH 55/70] Fixe issues #1170 #1016 Removed copied code from TVclStyleScrollBarsHook for 10.4 and later Fixes AV while scrolling with scrollbuttons in themed app --- Source/VirtualTrees.StyleHooks.pas | 680 +++++++++++++++++------------ 1 file changed, 389 insertions(+), 291 deletions(-) diff --git a/Source/VirtualTrees.StyleHooks.pas b/Source/VirtualTrees.StyleHooks.pas index b27dae376..8213b7223 100644 --- a/Source/VirtualTrees.StyleHooks.pas +++ b/Source/VirtualTrees.StyleHooks.pas @@ -28,6 +28,9 @@ interface {$WARN UNSAFE_TYPE OFF} {$WARN UNSAFE_CAST OFF} {$WARN UNSAFE_CODE OFF} +{$if CompilerVersion < 34} + {$DEFINE NOT_USE_VCL_STYLEHOOK} // Do not use inherited style hook but own code in this class. Needed for older Delphi versions 10.3 and below +{$ifend} uses Winapi.Windows, @@ -46,6 +49,7 @@ interface type // XE2+ VCL Style TVclStyleScrollBarsHook = class(TScrollingStyleHook) + {$ifdef NOT_USE_VCL_STYLEHOOK} strict private type {$REGION 'TVclStyleScrollBarWindow'} TScrollWindow = class(TWinControl) @@ -63,43 +67,50 @@ TScrollWindow = class(TWinControl) {$ENDREGION} private FHorzScrollWnd: TScrollWindow; - FLeftMouseButtonDown: Boolean; + FLeftButtonDown: Boolean; FVertScrollWnd: TScrollWindow; - function NCMousePosToClient(const P: TPoint): TPoint; - - procedure CMUpdateVclStyleScrollbars(var Msg: TMessage); message CM_UPDATE_VCLSTYLE_SCROLLBARS; procedure WMEraseBkgnd(var Msg: TWMEraseBkgnd); message WM_ERASEBKGND; procedure WMKeyDown(var Msg: TMessage); message WM_KEYDOWN; procedure WMKeyUp(var Msg: TMessage); message WM_KEYUP; procedure WMLButtonDown(var Msg: TWMMouse); message WM_LBUTTONDOWN; procedure WMLButtonUp(var Msg: TWMMouse); message WM_LBUTTONUP; procedure WMNCLButtonDown(var Msg: TWMMouse); message WM_NCLBUTTONDOWN; - procedure WMNCMouseMove(var Msg: TWMMouse); message WM_NCMOUSEMOVE; + procedure WMNCLButtonDblClk(var Msg: TWMMouse); message WM_NCLBUTTONDBLCLK; procedure WMNCLButtonUp(var Msg: TWMMouse); message WM_NCLBUTTONUP; procedure WMNCPaint(var Msg: TMessage); message WM_NCPAINT; - procedure WMMouseMove(var Msg: TWMMouse); message WM_MOUSEMOVE; - procedure WMMouseWheel(var Msg: TMessage); message WM_MOUSEWHEEL; procedure WMVScroll(var Msg: TWMVScroll); message WM_VSCROLL; procedure WMHScroll(var Msg: TWMHScroll); message WM_HSCROLL; - procedure WMCaptureChanged(var Msg: TMessage); message WM_CAPTURECHANGED; - procedure WMNCLButtonDblClk(var Msg: TWMMouse); message WM_NCLBUTTONDBLCLK; procedure WMSize(var Msg: TMessage); message WM_SIZE; procedure WMMove(var Msg: TMessage); message WM_MOVE; procedure WMPosChanged(var Msg: TMessage); message WM_WINDOWPOSCHANGED; - + procedure WMMouseWheel(var Msg: TMessage); message WM_MOUSEWHEEL; + procedure WMCaptureChanged(var Msg: TMessage); message WM_CAPTURECHANGED; procedure InitScrollBars; + procedure WMNCMouseMove(var Msg: TWMMouse); message WM_NCMOUSEMOVE; + procedure WMMouseMove(var Msg: TWMMouse); message WM_MOUSEMOVE; + function NCMousePosToClient(const P: TPoint): TPoint; + function PointInTreeHeader(const P: TPoint): Boolean; + {$endif} + private + procedure CMUpdateVclStyleScrollbars(var Msg: TMessage); message CM_UPDATE_VCLSTYLE_SCROLLBARS; protected procedure CalcScrollBarsRect; virtual; + procedure UpdateScroll;{$if CompilerVersion >= 34}override;{$ifend} + {$ifdef NOT_USE_VCL_STYLEHOOK} + procedure MouseLeave; override; procedure DrawHorzScrollBar(DC: HDC); virtual; procedure DrawVertScrollBar(DC: HDC); virtual; - procedure MouseLeave; override; procedure PaintScroll; override; - function PointInTreeHeader(const P: TPoint): Boolean; - procedure UpdateScroll;{$if CompilerVersion >= 34}override;{$ifend} + property HorzScrollWnd: TScrollWindow read FHorzScrollWnd; + property VertScrollWnd: TScrollWindow read FVertScrollWnd; + property LeftButtonDown: Boolean read FLeftButtonDown; + {$ifend} public constructor Create(AControl: TWinControl); override; + {$ifdef NOT_USE_VCL_STYLEHOOK} destructor Destroy; override; + {$ifend} /// Draws an expand arrow like used in the RAD Studio IDE. /// The code is not yet dpi-aware. class procedure DrawExpandArrow(pBitmap: TBitmap; pExpanded: Boolean; pColor: TColor = clNone); @@ -118,6 +129,11 @@ TScrollWindow = class(TWinControl) VTStyleServicesFunc: TVTStyleServicesFunc = nil; +/// Wrapper function for styles services that handles differences between RAD Studio 10.4 and older versions, +/// as well as the case if these controls are used inside the IDE. +function VTStyleServices(AControl: TControl = nil): TCustomStyleServices; + + implementation uses @@ -126,6 +142,17 @@ implementation System.Types, VirtualTrees; +function VTStyleServices(AControl: TControl = nil): TCustomStyleServices; +begin + if Assigned(VTStyleServicesFunc) then + Result := VTStyleServicesFunc(AControl) + else + Result := Vcl.Themes.StyleServices{$if CompilerVersion >= 34}(AControl){$ifend}; +end; + +//---------------------------------------------------------------------------------------------------------------------- + + type TBaseVirtualTreeCracker = class(TBaseVirtualTree) end; @@ -143,8 +170,8 @@ procedure TVclStyleScrollBarsHook.CalcScrollBarsRect(); begin BarInfo.cbSize := SizeOf(BarInfo); Ret := GetScrollBarInfo(Handle, Integer(OBJID_VSCROLL), BarInfo); - FVertScrollWnd.Visible := (seBorder in Control.StyleElements) and Ret and (not (STATE_SYSTEM_INVISIBLE and BarInfo.rgstate[0] <> 0)); - FVertScrollWnd.Enabled := FVertScrollWnd.Visible and (not (STATE_SYSTEM_UNAVAILABLE and BarInfo.rgstate[0] <> 0)); + VertScrollWnd.Visible := (seBorder in Control.StyleElements) and Ret and (not (STATE_SYSTEM_INVISIBLE and BarInfo.rgstate[0] <> 0)); + VertScrollWnd.Enabled := VertScrollWnd.Visible and (not (STATE_SYSTEM_UNAVAILABLE and BarInfo.rgstate[0] <> 0)); end; procedure CalcHorizontalRects; @@ -154,57 +181,33 @@ procedure TVclStyleScrollBarsHook.CalcScrollBarsRect(); begin BarInfo.cbSize := SizeOf(BarInfo); Ret := GetScrollBarInfo(Handle, Integer(OBJID_HSCROLL), BarInfo); - FHorzScrollWnd.Visible := (seBorder in Control.StyleElements) and Ret and (not (STATE_SYSTEM_INVISIBLE and BarInfo.rgstate[0] <> 0)); - FHorzScrollWnd.Enabled := FHorzScrollWnd.Visible and (not (STATE_SYSTEM_UNAVAILABLE and BarInfo.rgstate[0] <> 0)); + HorzScrollWnd.Visible := (seBorder in Control.StyleElements) and Ret and (not (STATE_SYSTEM_INVISIBLE and BarInfo.rgstate[0] <> 0)); + HorzScrollWnd.Enabled := HorzScrollWnd.Visible and (not (STATE_SYSTEM_UNAVAILABLE and BarInfo.rgstate[0] <> 0)); end; begin - if ((FVertScrollWnd <> nil) and not FVertScrollWnd.HandleAllocated) or - ((FHorzScrollWnd <> nil) and not FHorzScrollWnd.HandleAllocated) then - begin // Fixes issue #390 - if FVertScrollWnd <> nil then - FreeAndNil(FVertScrollWnd); - if FHorzScrollWnd <> nil then - FreeAndNil(FHorzScrollWnd); - - InitScrollBars; - end; - CalcVerticalRects; CalcHorizontalRects; end; +//---------------------------------------------------------------------------------------------------------------------- + constructor TVclStyleScrollBarsHook.Create(AControl: TWinControl); begin inherited; InitScrollBars; + {$ifdef NOT_USE_VCL_STYLEHOOK} VertSliderState := tsThumbBtnVertNormal; VertUpState := tsArrowBtnUpNormal; VertDownState := tsArrowBtnDownNormal; HorzSliderState := tsThumbBtnHorzNormal; HorzUpState := tsArrowBtnLeftNormal; HorzDownState := tsArrowBtnRightNormal; + {$ifend} end; -procedure TVclStyleScrollBarsHook.InitScrollBars; -begin - FVertScrollWnd := TScrollWindow.CreateParented(GetParent(Control.Handle)); - FVertScrollWnd.StyleHook := Self; - FVertScrollWnd.Vertical := True; - - FHorzScrollWnd := TScrollWindow.CreateParented(GetParent(Control.Handle)); - FHorzScrollWnd.StyleHook := Self; -end; - -destructor TVclStyleScrollBarsHook.Destroy; -begin - FVertScrollWnd.StyleHook := nil; - FreeAndNil(FVertScrollWnd); - FHorzScrollWnd.StyleHook := nil; - FreeAndNil(FHorzScrollWnd); - inherited; -end; +//---------------------------------------------------------------------------------------------------------------------- class procedure TVclStyleScrollBarsHook.DrawExpandArrow(pBitmap: TBitmap; pExpanded: Boolean; pColor: TColor); const @@ -232,6 +235,117 @@ class procedure TVclStyleScrollBarsHook.DrawExpandArrow(pBitmap: TBitmap; pExpan canvas.Polyline(ArrowPoints[pExpanded]); end; +//---------------------------------------------------------------------------------------------------------------------- + +procedure TVclStyleScrollBarsHook.UpdateScroll; +var + R: TRect; + HeaderHeight: Integer; + PaddingSize: Integer; + BorderSize: Integer; +begin + HeaderHeight := 0; + if (hoVisible in TBaseVirtualTree(Control).Header.Options) then + Inc(HeaderHeight, TBaseVirtualTree(Control).Header.Height); + + PaddingSize := TBaseVirtualTreeCracker(Control).BorderWidth; + if TBaseVirtualTreeCracker(Control).BevelKind <> bkNone then + begin + if TBaseVirtualTreeCracker(Control).BevelInner <> bvNone then + Inc(PaddingSize, TBaseVirtualTreeCracker(Control).BevelWidth); + if TBaseVirtualTreeCracker(Control).BevelOuter <> bvNone then + Inc(PaddingSize, TBaseVirtualTreeCracker(Control).BevelWidth); + end; + + BorderSize := 0; + if HasBorder then + Inc(BorderSize, GetSystemMetrics(SM_CYEDGE)); + + if ((VertScrollWnd <> nil) and not VertScrollWnd.HandleAllocated) or + ((HorzScrollWnd <> nil) and not HorzScrollWnd.HandleAllocated) then + begin // Fixes issue #390 + if VertScrollWnd <> nil then + FreeAndNil({$ifdef NOT_USE_VCL_STYLEHOOK}FVertScrollWnd{$else}VertScrollWnd{$ifend}); + if HorzScrollWnd <> nil then + FreeAndNil({$ifdef NOT_USE_VCL_STYLEHOOK}FHorzScrollWnd{$else}HorzScrollWnd{$ifend}); + + InitScrollBars; + end; + + // VertScrollBarWindow + if Control.HandleAllocated then + begin + if VertScrollWnd.Visible then + begin + R := VertScrollRect; + if Control.UseRightToLeftScrollBar then + OffsetRect(R, -R.Left + BorderSize, 0); + + ShowWindow(VertScrollWnd.Handle, SW_SHOW); + SetWindowPos(VertScrollWnd.Handle, HWND_TOP, + Control.Left + R.Left + PaddingSize, + Control.Top + R.Top + HeaderHeight + PaddingSize, + R.Width, + Control.Height - HeaderHeight - ((PaddingSize + BorderSize) * 2), // <> R.Height + SWP_SHOWWINDOW); + end else + ShowWindow(VertScrollWnd.Handle, SW_HIDE); + end;// if FVertScrollWnd + + // HorzScrollBarWindow + if Control.HandleAllocated then + begin + if HorzScrollWnd.Visible then + begin + R := HorzScrollRect; + if Control.UseRightToLeftScrollBar then + OffsetRect(R, VertScrollRect.Width, 0); + + ShowWindow(HorzScrollWnd.Handle, SW_SHOW); + SetWindowPos(HorzScrollWnd.Handle, HWND_TOP, + Control.Left + R.Left + PaddingSize, + Control.Top + R.Top + HeaderHeight + PaddingSize, + R.Width, R.Height, SWP_SHOWWINDOW); + end else + ShowWindow(HorzScrollWnd.Handle, SW_HIDE); + end;// if FHorzScrollWnd + // ScrollBarWindow Visible/Enabled Control + CalcScrollBarsRect; + +end; + +procedure TVclStyleScrollBarsHook.CMUpdateVclStyleScrollbars(var Msg: TMessage); +begin + CalcScrollBarsRect; + PaintScroll; +end; + +//---------------------------------------------------------------------------------------------------------------------- + +{$ifdef NOT_USE_VCL_STYLEHOOK} + +function TVclStyleScrollBarsHook.NCMousePosToClient(const P: TPoint): TPoint; +begin + Result := P; + ScreenToClient(Handle, Result); + if HasBorder then + begin + if HasClientEdge then + Result.Offset(2, 2) + else + Result.Offset(1, 1); + end; +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function TVclStyleScrollBarsHook.PointInTreeHeader(const P: TPoint): Boolean; +begin + Result := TBaseVirtualTree(Control).Header.InHeader(P); +end; + +//---------------------------------------------------------------------------------------------------------------------- + procedure TVclStyleScrollBarsHook.DrawHorzScrollBar(DC: HDC); var B: TBitmap; @@ -241,7 +355,7 @@ procedure TVclStyleScrollBarsHook.DrawHorzScrollBar(DC: HDC); if ((Handle = 0) or (DC = 0)) then Exit; - if FHorzScrollWnd.Visible and StyleServices.Available and (seBorder in Control.StyleElements) then + if HorzScrollWnd.Visible and StyleServices.Available and (seBorder in Control.StyleElements) then begin B := TBitmap.Create; try @@ -253,23 +367,23 @@ procedure TVclStyleScrollBarsHook.DrawHorzScrollBar(DC: HDC); R.Left := HorzUpButtonRect.Right; R.Right := HorzDownButtonRect.Left; Details := StyleServices.GetElementDetails(tsUpperTrackHorzNormal); - StyleServices.DrawElement(B.Canvas.Handle, Details, R{$IF CompilerVersion >= 34}, nil, FVertScrollWnd.CurrentPPI{$IFEND}); + StyleServices.DrawElement(B.Canvas.Handle, Details, R{$IF CompilerVersion >= 34}, nil, VertScrollWnd.CurrentPPI{$IFEND}); - if FHorzScrollWnd.Enabled then + if HorzScrollWnd.Enabled then Details := StyleServices.GetElementDetails(HorzSliderState); - StyleServices.DrawElement(B.Canvas.Handle, Details, HorzSliderRect{$IF CompilerVersion >= 34}, nil, FVertScrollWnd.CurrentPPI{$IFEND}); + StyleServices.DrawElement(B.Canvas.Handle, Details, HorzSliderRect{$IF CompilerVersion >= 34}, nil, VertScrollWnd.CurrentPPI{$IFEND}); - if FHorzScrollWnd.Enabled then + if HorzScrollWnd.Enabled then Details := StyleServices.GetElementDetails(HorzUpState) else Details := StyleServices.GetElementDetails(tsArrowBtnLeftDisabled); - StyleServices.DrawElement(B.Canvas.Handle, Details, HorzUpButtonRect{$IF CompilerVersion >= 34}, nil, FVertScrollWnd.CurrentPPI{$IFEND}); + StyleServices.DrawElement(B.Canvas.Handle, Details, HorzUpButtonRect{$IF CompilerVersion >= 34}, nil, VertScrollWnd.CurrentPPI{$IFEND}); - if FHorzScrollWnd.Enabled then + if HorzScrollWnd.Enabled then Details := StyleServices.GetElementDetails(HorzDownState) else Details := StyleServices.GetElementDetails(tsArrowBtnRightDisabled); - StyleServices.DrawElement(B.Canvas.Handle, Details, HorzDownButtonRect{$IF CompilerVersion >= 34}, nil, FVertScrollWnd.CurrentPPI{$IFEND}); + StyleServices.DrawElement(B.Canvas.Handle, Details, HorzDownButtonRect{$IF CompilerVersion >= 34}, nil, VertScrollWnd.CurrentPPI{$IFEND}); R := HorzScrollRect; MoveWindowOrg(B.Canvas.Handle, R.Left, R.Top); @@ -280,6 +394,8 @@ procedure TVclStyleScrollBarsHook.DrawHorzScrollBar(DC: HDC); end; end; +//---------------------------------------------------------------------------------------------------------------------- + procedure TVclStyleScrollBarsHook.DrawVertScrollBar(DC: HDC); var B: TBitmap; @@ -289,39 +405,39 @@ procedure TVclStyleScrollBarsHook.DrawVertScrollBar(DC: HDC); if ((Handle = 0) or (DC = 0)) then Exit; - if FVertScrollWnd.Visible and StyleServices.Available and (seBorder in Control.StyleElements) then + if VertScrollWnd.Visible and StyleServices.Available and (seBorder in Control.StyleElements) then begin B := TBitmap.Create; try R := VertScrollRect; B.Width := R.Width; - B.Height := FVertScrollWnd.Height; // <> R.Height + B.Height := VertScrollWnd.Height; // <> R.Height MoveWindowOrg(B.Canvas.Handle, -R.Left, -R.Top); R.Bottom := B.Height + R.Top; Details := StyleServices.GetElementDetails(tsUpperTrackVertNormal); - StyleServices.DrawElement(B.Canvas.Handle, Details, R {$IF CompilerVersion >= 34}, nil, FVertScrollWnd.CurrentPPI{$IFEND}); + StyleServices.DrawElement(B.Canvas.Handle, Details, R {$IF CompilerVersion >= 34}, nil, VertScrollWnd.CurrentPPI{$IFEND}); R.Top := VertUpButtonRect.Bottom; R.Bottom := VertDownButtonRect.Top; Details := StyleServices.GetElementDetails(tsUpperTrackVertNormal); - StyleServices.DrawElement(B.Canvas.Handle, Details, R{$IF CompilerVersion >= 34}, nil, FVertScrollWnd.CurrentPPI{$IFEND}); + StyleServices.DrawElement(B.Canvas.Handle, Details, R{$IF CompilerVersion >= 34}, nil, VertScrollWnd.CurrentPPI{$IFEND}); - if FVertScrollWnd.Enabled then + if VertScrollWnd.Enabled then Details := StyleServices.GetElementDetails(VertSliderState); - StyleServices.DrawElement(B.Canvas.Handle, Details, VertSliderRect{$IF CompilerVersion >= 34}, nil, FVertScrollWnd.CurrentPPI{$IFEND}); + StyleServices.DrawElement(B.Canvas.Handle, Details, VertSliderRect{$IF CompilerVersion >= 34}, nil, VertScrollWnd.CurrentPPI{$IFEND}); - if FVertScrollWnd.Enabled then + if VertScrollWnd.Enabled then Details := StyleServices.GetElementDetails(VertUpState) else Details := StyleServices.GetElementDetails(tsArrowBtnUpDisabled); - StyleServices.DrawElement(B.Canvas.Handle, Details, VertUpButtonRect{$IF CompilerVersion >= 34}, nil, FVertScrollWnd.CurrentPPI{$IFEND}); + StyleServices.DrawElement(B.Canvas.Handle, Details, VertUpButtonRect{$IF CompilerVersion >= 34}, nil, VertScrollWnd.CurrentPPI{$IFEND}); - if FVertScrollWnd.Enabled then + if VertScrollWnd.Enabled then Details := StyleServices.GetElementDetails(VertDownState) else Details := StyleServices.GetElementDetails(tsArrowBtnDownDisabled); - StyleServices.DrawElement(B.Canvas.Handle, Details, VertDownButtonRect{$IF CompilerVersion >= 34}, nil, FVertScrollWnd.CurrentPPI{$IFEND}); + StyleServices.DrawElement(B.Canvas.Handle, Details, VertDownButtonRect{$IF CompilerVersion >= 34}, nil, VertScrollWnd.CurrentPPI{$IFEND}); R := VertScrollRect; MoveWindowOrg(B.Canvas.Handle, R.Left, R.Top); @@ -332,6 +448,8 @@ procedure TVclStyleScrollBarsHook.DrawVertScrollBar(DC: HDC); end; end; +//---------------------------------------------------------------------------------------------------------------------- + procedure TVclStyleScrollBarsHook.MouseLeave; begin inherited; @@ -356,107 +474,11 @@ procedure TVclStyleScrollBarsHook.MouseLeave; PaintScroll; end; -function TVclStyleScrollBarsHook.NCMousePosToClient(const P: TPoint): TPoint; -begin - Result := P; - ScreenToClient(Handle, Result); - if HasBorder then - begin - if HasClientEdge then - Result.Offset(2, 2) - else - Result.Offset(1, 1); - end; -end; - -procedure TVclStyleScrollBarsHook.PaintScroll; -begin - if FVertScrollWnd.HandleAllocated then - begin - FVertScrollWnd.Repaint; - RedrawWindow(FVertScrollWnd.Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE); // Fixes issue #698 - end; - if FHorzScrollWnd.HandleAllocated then - begin - FHorzScrollWnd.Repaint; - RedrawWindow(FHorzScrollWnd.Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE); // Fixes issue #698 - end; -end; - -function TVclStyleScrollBarsHook.PointInTreeHeader(const P: TPoint): Boolean; -begin - Result := TBaseVirtualTree(Control).Header.InHeader(P); -end; - -procedure TVclStyleScrollBarsHook.UpdateScroll; -var - R: TRect; - HeaderHeight: Integer; - PaddingSize: Integer; - BorderSize: Integer; -begin - // ScrollBarWindow Visible/Enabled Control - CalcScrollBarsRect; - - HeaderHeight := 0; - if (hoVisible in TBaseVirtualTree(Control).Header.Options) then - Inc(HeaderHeight, TBaseVirtualTree(Control).Header.Height); - - PaddingSize := TBaseVirtualTreeCracker(Control).BorderWidth; - if TBaseVirtualTreeCracker(Control).BevelKind <> bkNone then - begin - if TBaseVirtualTreeCracker(Control).BevelInner <> bvNone then - Inc(PaddingSize, TBaseVirtualTreeCracker(Control).BevelWidth); - if TBaseVirtualTreeCracker(Control).BevelOuter <> bvNone then - Inc(PaddingSize, TBaseVirtualTreeCracker(Control).BevelWidth); - end; - - BorderSize := 0; - if HasBorder then - Inc(BorderSize, GetSystemMetrics(SM_CYEDGE)); - - // VertScrollBarWindow - if Control.HandleAllocated then - begin - if FVertScrollWnd.Visible then - begin - R := VertScrollRect; - if Control.UseRightToLeftScrollBar then - OffsetRect(R, -R.Left + BorderSize, 0); - - ShowWindow(FVertScrollWnd.Handle, SW_SHOW); - SetWindowPos(FVertScrollWnd.Handle, HWND_TOP, - Control.Left + R.Left + PaddingSize, - Control.Top + R.Top + HeaderHeight + PaddingSize, - R.Width, - Control.Height - HeaderHeight - ((PaddingSize + BorderSize) * 2), // <> R.Height - SWP_SHOWWINDOW); - end else - ShowWindow(FVertScrollWnd.Handle, SW_HIDE); - end;// if FVertScrollWnd - - // HorzScrollBarWindow - if Control.HandleAllocated then - begin - if FHorzScrollWnd.Visible then - begin - R := HorzScrollRect; - if Control.UseRightToLeftScrollBar then - OffsetRect(R, VertScrollRect.Width, 0); - - ShowWindow(FHorzScrollWnd.Handle, SW_SHOW); - SetWindowPos(FHorzScrollWnd.Handle, HWND_TOP, - Control.Left + R.Left + PaddingSize, - Control.Top + R.Top + HeaderHeight + PaddingSize, - R.Width, R.Height, SWP_SHOWWINDOW); - end else - ShowWindow(FHorzScrollWnd.Handle, SW_HIDE); - end;// if FHorzScrollWnd -end; +//---------------------------------------------------------------------------------------------------------------------- procedure TVclStyleScrollBarsHook.WMCaptureChanged(var Msg: TMessage); begin - if FVertScrollWnd.Visible and FVertScrollWnd.Enabled then + if VertScrollWnd.Visible and VertScrollWnd.Enabled then begin if VertUpState = tsArrowBtnUpPressed then begin @@ -471,7 +493,7 @@ procedure TVclStyleScrollBarsHook.WMCaptureChanged(var Msg: TMessage); end; end; - if FHorzScrollWnd.Visible and FHorzScrollWnd.Enabled then + if HorzScrollWnd.Visible and HorzScrollWnd.Enabled then begin if HorzUpState = tsArrowBtnLeftPressed then begin @@ -490,24 +512,42 @@ procedure TVclStyleScrollBarsHook.WMCaptureChanged(var Msg: TMessage); Handled := True; end; -procedure TVclStyleScrollBarsHook.WMEraseBkgnd(var Msg: TWMEraseBkgnd); +//---------------------------------------------------------------------------------------------------------------------- + +destructor TVclStyleScrollBarsHook.Destroy; begin - Handled := True; + FVertScrollWnd.StyleHook := nil; + FreeAndNil(FVertScrollWnd); + FHorzScrollWnd.StyleHook := nil; + FreeAndNil(FHorzScrollWnd); + inherited; end; -procedure TVclStyleScrollBarsHook.WMHScroll(var Msg: TWMHScroll); +//---------------------------------------------------------------------------------------------------------------------- + +procedure TVclStyleScrollBarsHook.WMEraseBkgnd(var Msg: TWMEraseBkgnd); begin - CallDefaultProc(TMessage(Msg)); - PaintScroll; Handled := True; end; -procedure TVclStyleScrollBarsHook.CMUpdateVclStyleScrollbars(var Msg: TMessage); +//---------------------------------------------------------------------------------------------------------------------- + +procedure TVclStyleScrollBarsHook.PaintScroll; begin - CalcScrollBarsRect; - PaintScroll; + if FVertScrollWnd.HandleAllocated then + begin + FVertScrollWnd.Repaint; + RedrawWindow(FVertScrollWnd.Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE); // Fixes issue #698 + end; + if FHorzScrollWnd.HandleAllocated then + begin + FHorzScrollWnd.Repaint; + RedrawWindow(FHorzScrollWnd.Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE); // Fixes issue #698 + end; end; +//---------------------------------------------------------------------------------------------------------------------- + procedure TVclStyleScrollBarsHook.WMKeyDown(var Msg: TMessage); begin CallDefaultProc(TMessage(Msg)); @@ -515,6 +555,8 @@ procedure TVclStyleScrollBarsHook.WMKeyDown(var Msg: TMessage); Handled := True; end; +//---------------------------------------------------------------------------------------------------------------------- + procedure TVclStyleScrollBarsHook.WMKeyUp(var Msg: TMessage); begin CallDefaultProc(TMessage(Msg)); @@ -522,6 +564,8 @@ procedure TVclStyleScrollBarsHook.WMKeyUp(var Msg: TMessage); Handled := True; end; +//---------------------------------------------------------------------------------------------------------------------- + procedure TVclStyleScrollBarsHook.WMLButtonDown(var Msg: TWMMouse); begin CallDefaultProc(TMessage(Msg)); @@ -529,6 +573,20 @@ procedure TVclStyleScrollBarsHook.WMLButtonDown(var Msg: TWMMouse); Handled := True; end; +//---------------------------------------------------------------------------------------------------------------------- + +procedure TVclStyleScrollBarsHook.InitScrollBars; +begin + FVertScrollWnd := TScrollWindow.CreateParented(GetParent(Control.Handle)); + FVertScrollWnd.StyleHook := Self; + FVertScrollWnd.Vertical := True; + + FHorzScrollWnd := TScrollWindow.CreateParented(GetParent(Control.Handle)); + FHorzScrollWnd.StyleHook := Self; +end; + +//---------------------------------------------------------------------------------------------------------------------- + procedure TVclStyleScrollBarsHook.WMLButtonUp(var Msg: TWMMouse); var P: TPoint; @@ -537,12 +595,12 @@ procedure TVclStyleScrollBarsHook.WMLButtonUp(var Msg: TWMMouse); ScreenToClient(Handle, P); if not PointInTreeHeader(P) then begin - if FVertScrollWnd.Visible then + if VertScrollWnd.Visible then begin if VertSliderState = tsThumbBtnVertPressed then begin PostMessage(Handle, WM_VSCROLL, WPARAM(UInt32(SmallPoint(SB_ENDSCROLL, 0))), 0); - FLeftMouseButtonDown := False; + FLeftButtonDown := False; VertSliderState := tsThumbBtnVertNormal; PaintScroll; Handled := True; @@ -560,7 +618,7 @@ procedure TVclStyleScrollBarsHook.WMLButtonUp(var Msg: TWMMouse); if HorzSliderState = tsThumbBtnHorzPressed then begin PostMessage(Handle, WM_HSCROLL, WPARAM(UInt32(SmallPoint(SB_ENDSCROLL, 0))), 0); - FLeftMouseButtonDown := False; + FLeftButtonDown := False; HorzSliderState := tsThumbBtnHorzNormal; PaintScroll; Handled := True; @@ -574,109 +632,10 @@ procedure TVclStyleScrollBarsHook.WMLButtonUp(var Msg: TWMMouse); end; PaintScroll; end; - FLeftMouseButtonDown := False; -end; - -procedure TVclStyleScrollBarsHook.WMMouseMove(var Msg: TWMMouse); -var - SF: TScrollInfo; - OverrideMax: Integer; -begin - if VertSliderState = tsThumbBtnVertPressed then - begin - SF.fMask := SIF_ALL; - SF.cbSize := SizeOf(SF); - GetScrollInfo(Handle, SB_VERT, SF); - - OverrideMax := SF.nMax; - if 0 < SF.nPage then - OverrideMax := SF.nMax - Integer(SF.nPage) + 1; - ScrollPos := System.Math.EnsureRange(ListPos + (OverrideMax - SF.nMin) * ((Mouse.CursorPos.Y - PrevScrollPos) / (VertTrackRect.Height - VertSliderRect.Height)), - SF.nMin, OverrideMax); - SF.fMask := SIF_POS; - SF.nPos := Round(ScrollPos); - SetScrollInfo(Handle, SB_VERT, SF, False); - PostMessage(Handle, WM_VSCROLL, WPARAM(UInt32(SmallPoint(SB_THUMBPOSITION, Min(SF.nPos, High(SmallInt))))), 0); - - PaintScroll; - Handled := True; - Exit; - end else - if VertSliderState = tsThumbBtnVertHot then - begin - VertSliderState := tsThumbBtnVertNormal; - PaintScroll; - end; - - if HorzSliderState = tsThumbBtnHorzPressed then - begin - SF.fMask := SIF_ALL; - SF.cbSize := SizeOf(SF); - GetScrollInfo(Handle, SB_HORZ, SF); - - OverrideMax := SF.nMax; - if 0 < SF.nPage then - OverrideMax := SF.nMax - Integer(SF.nPage) + 1; - ScrollPos := System.Math.EnsureRange(ListPos + (OverrideMax - SF.nMin) * ((Mouse.CursorPos.X - PrevScrollPos) / (HorzTrackRect.Width - HorzSliderRect.Width)), - SF.nMin, OverrideMax); - SF.fMask := SIF_POS; - SF.nPos := Round(ScrollPos); - SetScrollInfo(Handle, SB_HORZ, SF, False); - PostMessage(Handle, WM_HSCROLL, WPARAM(UInt32(SmallPoint(SB_THUMBPOSITION, Min(SF.nPos, High(SmallInt))))), 0); - - PaintScroll; - Handled := True; - Exit; - end else - if HorzSliderState = tsThumbBtnHorzHot then - begin - HorzSliderState := tsThumbBtnHorzNormal; - PaintScroll; - end; - - if (HorzUpState <> tsArrowBtnLeftPressed) and (HorzUpState = tsArrowBtnLeftHot) then - begin - HorzUpState := tsArrowBtnLeftNormal; - PaintScroll; - end; - - if (HorzDownState <> tsArrowBtnRightPressed) and (HorzDownState = tsArrowBtnRightHot) then - begin - HorzDownState := tsArrowBtnRightNormal; - PaintScroll; - end; - - if (VertUpState <> tsArrowBtnUpPressed) and (VertUpState = tsArrowBtnUpHot) then - begin - VertUpState := tsArrowBtnUpNormal; - PaintScroll; - end; - - if (VertDownState <> tsArrowBtnDownPressed) and (VertDownState = tsArrowBtnDownHot) then - begin - VertDownState := tsArrowBtnDownNormal; - PaintScroll; - end; - - CallDefaultProc(TMessage(Msg)); - if FLeftMouseButtonDown then - PaintScroll; - Handled := True; -end; - -procedure TVclStyleScrollBarsHook.WMMouseWheel(var Msg: TMessage); -begin - CallDefaultProc(TMessage(Msg)); - CalcScrollBarsRect; - PaintScroll; - Handled := True; -end; - -procedure TVclStyleScrollBarsHook.WMNCLButtonDblClk(var Msg: TWMMouse); -begin - WMNCLButtonDown(Msg); + FLeftButtonDown := False; end; +//---------------------------------------------------------------------------------------------------------------------- procedure TVclStyleScrollBarsHook.WMNCLButtonDown(var Msg: TWMMouse); var P: TPoint; @@ -685,11 +644,11 @@ procedure TVclStyleScrollBarsHook.WMNCLButtonDown(var Msg: TWMMouse); P := NCMousePosToClient(Point(Msg.XPos, Msg.YPos)); if not PointInTreeHeader(P) then begin - if FVertScrollWnd.Visible and FVertScrollWnd.Enabled then + if VertScrollWnd.Visible and VertScrollWnd.Enabled then begin if PtInRect(VertSliderRect, P) then begin - FLeftMouseButtonDown := True; + FLeftButtonDown := True; SF.fMask := SIF_ALL; SF.cbSize := SizeOf(SF); GetScrollInfo(Handle, SB_VERT, SF); @@ -712,7 +671,7 @@ procedure TVclStyleScrollBarsHook.WMNCLButtonDown(var Msg: TWMMouse); begin if PtInRect(HorzSliderRect, P) then begin - FLeftMouseButtonDown := True; + FLeftButtonDown := True; SF.fMask := SIF_ALL; SF.cbSize := SizeOf(SF); GetScrollInfo(Handle, SB_HORZ, SF); @@ -730,11 +689,15 @@ procedure TVclStyleScrollBarsHook.WMNCLButtonDown(var Msg: TWMMouse); else if PtInRect(HorzUpButtonRect, P) then HorzUpState := tsArrowBtnLeftPressed; end; - FLeftMouseButtonDown := True; + FLeftButtonDown := True; PaintScroll; end; end; +//---------------------------------------------------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------------------------------------- + + procedure TVclStyleScrollBarsHook.WMNCLButtonUp(var Msg: TWMMouse); var P: TPoint; @@ -742,11 +705,11 @@ procedure TVclStyleScrollBarsHook.WMNCLButtonUp(var Msg: TWMMouse); P := NCMousePosToClient(Point(Msg.XPos, Msg.YPos)); if not PointInTreeHeader(P) then begin - if FVertScrollWnd.Visible and FVertScrollWnd.Enabled then + if VertScrollWnd.Visible and VertScrollWnd.Enabled then begin if VertSliderState = tsThumbBtnVertPressed then begin - FLeftMouseButtonDown := False; + FLeftButtonDown := False; VertSliderState := tsThumbBtnVertNormal; PaintScroll; Handled := True; @@ -768,7 +731,7 @@ procedure TVclStyleScrollBarsHook.WMNCLButtonUp(var Msg: TWMMouse); begin if HorzSliderState = tsThumbBtnHorzPressed then begin - FLeftMouseButtonDown := False; + FLeftButtonDown := False; HorzSliderState := tsThumbBtnHorzNormal; PaintScroll; Handled := True; @@ -794,6 +757,132 @@ procedure TVclStyleScrollBarsHook.WMNCLButtonUp(var Msg: TWMMouse); Handled := True; end; +//---------------------------------------------------------------------------------------------------------------------- + +procedure TVclStyleScrollBarsHook.WMNCLButtonDblClk(var Msg: TWMMouse); +begin + WMNCLButtonDown(Msg); +end; + +//---------------------------------------------------------------------------------------------------------------------- + +procedure TVclStyleScrollBarsHook.WMNCPaint(var Msg: TMessage); +begin + //if (tsWindowCreating in TBaseVirtualTree(Control).TreeStates) then + // UpdateScrollBarWindow; + //inherited; +end; + +//---------------------------------------------------------------------------------------------------------------------- + +procedure TVclStyleScrollBarsHook.WMHScroll(var Msg: TWMHScroll); +begin + CallDefaultProc(TMessage(Msg)); + PaintScroll; + Handled := True; +end; + +//---------------------------------------------------------------------------------------------------------------------- + +procedure TVclStyleScrollBarsHook.WMMouseWheel(var Msg: TMessage); +begin + CallDefaultProc(TMessage(Msg)); + CalcScrollBarsRect; + PaintScroll; + Handled := True; +end; + +//---------------------------------------------------------------------------------------------------------------------- + +procedure TVclStyleScrollBarsHook.WMMouseMove(var Msg: TWMMouse); +var + SF: TScrollInfo; + OverrideMax: Integer; +begin + if VertSliderState = tsThumbBtnVertPressed then + begin + SF.fMask := SIF_ALL; + SF.cbSize := SizeOf(SF); + GetScrollInfo(Handle, SB_VERT, SF); + + OverrideMax := SF.nMax; + if 0 < SF.nPage then + OverrideMax := SF.nMax - Integer(SF.nPage) + 1; + ScrollPos := System.Math.EnsureRange(ListPos + (OverrideMax - SF.nMin) * ((Mouse.CursorPos.Y - PrevScrollPos) / (VertTrackRect.Height - VertSliderRect.Height)), + SF.nMin, OverrideMax); + SF.fMask := SIF_POS; + SF.nPos := Round(ScrollPos); + SetScrollInfo(Handle, SB_VERT, SF, False); + PostMessage(Handle, WM_VSCROLL, WPARAM(UInt32(SmallPoint(SB_THUMBPOSITION, Min(SF.nPos, High(SmallInt))))), 0); + + PaintScroll; + Handled := True; + Exit; + end else + if VertSliderState = tsThumbBtnVertHot then + begin + VertSliderState := tsThumbBtnVertNormal; + PaintScroll; + end; + + if HorzSliderState = tsThumbBtnHorzPressed then + begin + SF.fMask := SIF_ALL; + SF.cbSize := SizeOf(SF); + GetScrollInfo(Handle, SB_HORZ, SF); + + OverrideMax := SF.nMax; + if 0 < SF.nPage then + OverrideMax := SF.nMax - Integer(SF.nPage) + 1; + ScrollPos := System.Math.EnsureRange(ListPos + (OverrideMax - SF.nMin) * ((Mouse.CursorPos.X - PrevScrollPos) / (HorzTrackRect.Width - HorzSliderRect.Width)), + SF.nMin, OverrideMax); + SF.fMask := SIF_POS; + SF.nPos := Round(ScrollPos); + SetScrollInfo(Handle, SB_HORZ, SF, False); + PostMessage(Handle, WM_HSCROLL, WPARAM(UInt32(SmallPoint(SB_THUMBPOSITION, Min(SF.nPos, High(SmallInt))))), 0); + + PaintScroll; + Handled := True; + Exit; + end else + if HorzSliderState = tsThumbBtnHorzHot then + begin + HorzSliderState := tsThumbBtnHorzNormal; + PaintScroll; + end; + + if (HorzUpState <> tsArrowBtnLeftPressed) and (HorzUpState = tsArrowBtnLeftHot) then + begin + HorzUpState := tsArrowBtnLeftNormal; + PaintScroll; + end; + + if (HorzDownState <> tsArrowBtnRightPressed) and (HorzDownState = tsArrowBtnRightHot) then + begin + HorzDownState := tsArrowBtnRightNormal; + PaintScroll; + end; + + if (VertUpState <> tsArrowBtnUpPressed) and (VertUpState = tsArrowBtnUpHot) then + begin + VertUpState := tsArrowBtnUpNormal; + PaintScroll; + end; + + if (VertDownState <> tsArrowBtnDownPressed) and (VertDownState = tsArrowBtnDownHot) then + begin + VertDownState := tsArrowBtnDownNormal; + PaintScroll; + end; + + CallDefaultProc(TMessage(Msg)); + if LeftButtonDown then + PaintScroll; + Handled := True; +end; + +//---------------------------------------------------------------------------------------------------------------------- + procedure TVclStyleScrollBarsHook.WMNCMouseMove(var Msg: TWMMouse); var P: TPoint; @@ -811,7 +900,7 @@ procedure TVclStyleScrollBarsHook.WMNCMouseMove(var Msg: TWMMouse); end; MustUpdateScroll := False; - if FVertScrollWnd.Visible and FVertScrollWnd.Enabled then + if VertScrollWnd.Visible and VertScrollWnd.Enabled then begin B := PtInRect(VertSliderRect, P); if B and (VertSliderState = tsThumbBtnVertNormal) then @@ -850,7 +939,7 @@ procedure TVclStyleScrollBarsHook.WMNCMouseMove(var Msg: TWMMouse); end; end; - if FHorzScrollWnd.Visible and FHorzScrollWnd.Enabled then + if HorzScrollWnd.Visible and HorzScrollWnd.Enabled then begin B := PtInRect(HorzSliderRect, P); if B and (HorzSliderState = tsThumbBtnHorzNormal) then @@ -893,12 +982,7 @@ procedure TVclStyleScrollBarsHook.WMNCMouseMove(var Msg: TWMMouse); PaintScroll; end; -procedure TVclStyleScrollBarsHook.WMNCPaint(var Msg: TMessage); -begin - //if (tsWindowCreating in TBaseVirtualTree(Control).TreeStates) then - // UpdateScrollBarWindow; - //inherited; -end; +//---------------------------------------------------------------------------------------------------------------------- procedure TVclStyleScrollBarsHook.WMSize(var Msg: TMessage); begin @@ -908,6 +992,8 @@ procedure TVclStyleScrollBarsHook.WMSize(var Msg: TMessage); Handled := True; end; +//---------------------------------------------------------------------------------------------------------------------- + procedure TVclStyleScrollBarsHook.WMMove(var Msg: TMessage); begin CallDefaultProc(TMessage(Msg)); @@ -919,11 +1005,15 @@ procedure TVclStyleScrollBarsHook.WMMove(var Msg: TMessage); Handled := True; end; +//---------------------------------------------------------------------------------------------------------------------- + procedure TVclStyleScrollBarsHook.WMPosChanged(var Msg: TMessage); begin WMMove(Msg); end; +//---------------------------------------------------------------------------------------------------------------------- + procedure TVclStyleScrollBarsHook.WMVScroll(var Msg: TWMVScroll); begin CallDefaultProc(TMessage(Msg)); @@ -931,6 +1021,8 @@ procedure TVclStyleScrollBarsHook.WMVScroll(var Msg: TWMVScroll); Handled := True; end; +//---------------------------------------------------------------------------------------------------------------------- + { TVclStyleScrollBarsHook.TVclStyleScrollBarWindow } constructor TVclStyleScrollBarsHook.TScrollWindow.Create(AOwner: TComponent); @@ -941,16 +1033,22 @@ constructor TVclStyleScrollBarsHook.TScrollWindow.Create(AOwner: TComponent); FVertical := False; end; +//---------------------------------------------------------------------------------------------------------------------- + procedure TVclStyleScrollBarsHook.TScrollWindow.WMEraseBkgnd(var Msg: TMessage); begin Msg.Result := 1; end; +//---------------------------------------------------------------------------------------------------------------------- + procedure TVclStyleScrollBarsHook.TScrollWindow.WMNCHitTest(var Msg: TWMNCHitTest); begin Msg.Result := HTTRANSPARENT; end; +//---------------------------------------------------------------------------------------------------------------------- + procedure TVclStyleScrollBarsHook.TScrollWindow.WMPaint(var Msg: TWMPaint); var PS: TPaintStruct; @@ -982,6 +1080,7 @@ procedure TVclStyleScrollBarsHook.TScrollWindow.WMPaint(var Msg: TWMPaint); EndPaint(Handle, PS); end; end; +{$ifend} initialization TCustomStyleEngine.RegisterStyleHook(TVirtualStringTree, TVclStyleScrollBarsHook); @@ -992,4 +1091,3 @@ finalization TCustomStyleEngine.UnRegisterStyleHook(TVirtualDrawTree, TVclStyleScrollBarsHook); end. - From 29b02de27d1940723159ff6a39216f3e57757556 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Tue, 21 Mar 2023 21:13:12 +0100 Subject: [PATCH 56/70] Added unit VirtualTrees.Types to fix compiler warning. --- Packages/RAD Studio 10.4+/VirtualTreesR.dpk | 3 ++- Packages/RAD Studio 10.4+/VirtualTreesR.dproj | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Packages/RAD Studio 10.4+/VirtualTreesR.dpk b/Packages/RAD Studio 10.4+/VirtualTreesR.dpk index 803b984d9..5a4ddd6a1 100644 --- a/Packages/RAD Studio 10.4+/VirtualTreesR.dpk +++ b/Packages/RAD Studio 10.4+/VirtualTreesR.dpk @@ -44,6 +44,7 @@ contains VirtualTrees.ClipBoard in '..\..\Source\VirtualTrees.ClipBoard.pas', VirtualTrees.Actions in '..\..\Source\VirtualTrees.Actions.pas', VirtualTrees.Export in '..\..\Source\VirtualTrees.Export.pas', - VirtualTrees.Utils in '..\..\Source\VirtualTrees.Utils.pas'; + VirtualTrees.Utils in '..\..\Source\VirtualTrees.Utils.pas', + VirtualTrees.Types in '..\..\Source\VirtualTrees.Types.pas'; end. diff --git a/Packages/RAD Studio 10.4+/VirtualTreesR.dproj b/Packages/RAD Studio 10.4+/VirtualTreesR.dproj index 8ab954a0e..cca88a0ee 100644 --- a/Packages/RAD Studio 10.4+/VirtualTreesR.dproj +++ b/Packages/RAD Studio 10.4+/VirtualTreesR.dproj @@ -76,6 +76,7 @@ + Base From 41911460fe0b1011dcd5d28a7e73eaae539236e4 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Mon, 27 Mar 2023 07:55:52 +0200 Subject: [PATCH 57/70] Fixed #1185 --- Source/VirtualTrees.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 254c52375..c540a8a20 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -11988,7 +11988,7 @@ function TVTColors.GetColor(const Index: TVTColorEnum): TColor; begin // Only try to fetch the color via StyleServices if theses are enabled // Return default/user defined color otherwise - if FOwner.VclStyleEnabled then + if not (csDesigning in FOwner.ComponentState) { see issue #1185 } and FOwner.VclStyleEnabled then begin // If the ElementDetails are not defined, fall back to the SystemColor case Index of From d3c0e713897bfb6467dc0488402c403b0db339a2 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Mon, 27 Mar 2023 22:05:26 +0200 Subject: [PATCH 58/70] Fixed issue #1186: Prevent repaint loop --- Source/VirtualTrees.pas | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index c540a8a20..6163db7b6 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -12079,9 +12079,10 @@ procedure TVTColors.SetColor(const Index: TVTColorEnum; const Value: TColor); cBorderColor: RedrawWindow(FOwner.Handle, nil, 0, RDW_FRAME or RDW_INVALIDATE or RDW_NOERASE or RDW_NOCHILDREN) else - FOwner.Invalidate; - end; - end; + if not (tsPainting in FOwner.TreeStates) then + FOwner.Invalidate; + end;//case + end;// if end; end; From ccfb61ca9c4878bf1c8cfbed21d9ed5d1a9da4d5 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Thu, 13 Apr 2023 15:24:16 +0200 Subject: [PATCH 59/70] Fixed issue #1187 --- Source/VirtualTrees.StyleHooks.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/VirtualTrees.StyleHooks.pas b/Source/VirtualTrees.StyleHooks.pas index 8213b7223..0e06a6803 100644 --- a/Source/VirtualTrees.StyleHooks.pas +++ b/Source/VirtualTrees.StyleHooks.pas @@ -195,8 +195,6 @@ procedure TVclStyleScrollBarsHook.CalcScrollBarsRect(); constructor TVclStyleScrollBarsHook.Create(AControl: TWinControl); begin inherited; - InitScrollBars; - {$ifdef NOT_USE_VCL_STYLEHOOK} VertSliderState := tsThumbBtnVertNormal; VertUpState := tsArrowBtnUpNormal; @@ -244,6 +242,9 @@ procedure TVclStyleScrollBarsHook.UpdateScroll; PaddingSize: Integer; BorderSize: Integer; begin + if VertScrollWnd = nil then + InitScrollBars(); + HeaderHeight := 0; if (hoVisible in TBaseVirtualTree(Control).Header.Options) then Inc(HeaderHeight, TBaseVirtualTree(Control).Header.Height); From c749c8e8acc8f2c475c4db8fb8f2310e7e638f1c Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sun, 23 Jul 2023 17:58:29 +0200 Subject: [PATCH 60/70] Don't check for sfHeight when scaling, issue #1198 --- Source/VirtualTrees.pas | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 6163db7b6..2a4952085 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -18583,22 +18583,20 @@ procedure TBaseVirtualTree.ChangeScale(M, D: Integer{$if CompilerVersion >= 31}; Flags := ScalingFlags else Flags := DefaultScalingFlags; // Important for #677 - if (sfHeight in Flags) then begin - FHeader.ChangeScale(M, D, {$if CompilerVersion >= 31}isDpiChange{$ELSE} M <> D{$ifend}); - SetDefaultNodeHeight(MulDiv(FDefaultNodeHeight, M, D)); - Indent := MulDiv(Indent, M, D); - FTextMargin := MulDiv(FTextMargin, M, D); - FMargin := MulDiv(FMargin, M, D); - FImagesMargin := MulDiv(FImagesMargin, M, D); - // Scale utility images, #796 - if FCheckImageKind = ckSystemDefault then begin - FreeAndNil(FCheckImages); - if HandleAllocated then - FCheckImages := CreateSystemImageSet(Self); - end; - UpdateHeaderRect(); - ScaleNodeHeights(M, D); - end;//if sfHeight + FHeader.ChangeScale(M, D, {$if CompilerVersion >= 31}isDpiChange{$ELSE} M <> D{$ifend}); + SetDefaultNodeHeight(MulDiv(FDefaultNodeHeight, M, D)); + Indent := MulDiv(Indent, M, D); + FTextMargin := MulDiv(FTextMargin, M, D); + FMargin := MulDiv(FMargin, M, D); + FImagesMargin := MulDiv(FImagesMargin, M, D); + // Scale utility images, #796 + if FCheckImageKind = ckSystemDefault then begin + FreeAndNil(FCheckImages); + if HandleAllocated then + FCheckImages := CreateSystemImageSet(Self); + end; + UpdateHeaderRect(); + ScaleNodeHeights(M, D); end;// if M<>D end;//if toAutoChangeScale inherited ChangeScale(M, D{$if CompilerVersion >= 31}, isDpiChange{$ifend}); From 258975c3bfd076537f4bd4d0ddafdb5a4e5c5d31 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Tue, 1 Aug 2023 14:22:26 +0200 Subject: [PATCH 61/70] @joachimmarder Issue #1198: a) Removed meanwhile obsolete setting of ScalingFlags --- Source/VirtualTrees.pas | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 2a4952085..1a0451ac4 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -18567,22 +18567,11 @@ procedure TBaseVirtualTree.Change(Node: PVirtualNode); //---------------------------------------------------------------------------------------------------------------------- procedure TBaseVirtualTree.ChangeScale(M, D: Integer{$if CompilerVersion >= 31}; isDpiChange: Boolean{$ifend}); -{$if CompilerVersion < 27} -const - DefaultScalingFlags = [sfLeft, sfTop, sfWidth, sfHeight, sfFont]; // Was introduced with XE6: http://docwiki.embarcadero.com/Libraries/XE6/en/Vcl.Controls.TControl.DefaultScalingFlags -{$ifend} -var - Flags: TScalingFlags; begin if (toAutoChangeScale in FOptions.AutoOptions) then begin if (M <> D) then begin - // It is important to evaluate the TScalingFlags before calling inherited, becuase they are differetn afterwards! - if csLoading in ComponentState then - Flags := ScalingFlags - else - Flags := DefaultScalingFlags; // Important for #677 FHeader.ChangeScale(M, D, {$if CompilerVersion >= 31}isDpiChange{$ELSE} M <> D{$ifend}); SetDefaultNodeHeight(MulDiv(FDefaultNodeHeight, M, D)); Indent := MulDiv(Indent, M, D); From e5c73e96b60cc021ea782330afedbd8378064e50 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Fri, 11 Aug 2023 15:10:05 +0200 Subject: [PATCH 62/70] Added assign check on the scrollbars, as this seems not to be guaranteed by calling InitializeScrollBars() --- Source/VirtualTrees.StyleHooks.pas | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/VirtualTrees.StyleHooks.pas b/Source/VirtualTrees.StyleHooks.pas index 0e06a6803..760eb4aff 100644 --- a/Source/VirtualTrees.StyleHooks.pas +++ b/Source/VirtualTrees.StyleHooks.pas @@ -168,6 +168,9 @@ procedure TVclStyleScrollBarsHook.CalcScrollBarsRect(); BarInfo: TScrollBarInfo; Ret: BOOL; begin + if not Assigned(VertScrollWnd) then // Might happen, when FInitingScrollBars is set, so InitScrollBars did not yet initialize the members + Exit; + BarInfo.cbSize := SizeOf(BarInfo); Ret := GetScrollBarInfo(Handle, Integer(OBJID_VSCROLL), BarInfo); VertScrollWnd.Visible := (seBorder in Control.StyleElements) and Ret and (not (STATE_SYSTEM_INVISIBLE and BarInfo.rgstate[0] <> 0)); @@ -179,6 +182,9 @@ procedure TVclStyleScrollBarsHook.CalcScrollBarsRect(); BarInfo: TScrollBarInfo; Ret: BOOL; begin + if not Assigned(HorzScrollWnd) then // Might happen, when FInitingScrollBars is set, so InitScrollBars did not yet initialize the members + Exit; + BarInfo.cbSize := SizeOf(BarInfo); Ret := GetScrollBarInfo(Handle, Integer(OBJID_HSCROLL), BarInfo); HorzScrollWnd.Visible := (seBorder in Control.StyleElements) and Ret and (not (STATE_SYSTEM_INVISIBLE and BarInfo.rgstate[0] <> 0)); From 684fd09e9fdf61336ea26ee769a786d25885f7cb Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sat, 12 Aug 2023 18:27:39 +0200 Subject: [PATCH 63/70] Fix for #1211 --- Demos/Advanced/DrawTreeDemo.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Demos/Advanced/DrawTreeDemo.pas b/Demos/Advanced/DrawTreeDemo.pas index 90e37972c..dbb4e282b 100644 --- a/Demos/Advanced/DrawTreeDemo.pas +++ b/Demos/Advanced/DrawTreeDemo.pas @@ -26,7 +26,7 @@ interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, VirtualTrees, StdCtrls, {$ifdef GraphicEx} GraphicEx, {$else} JPEG, {$endif} - ImgList, ComCtrls, UITypes; + ImgList, ComCtrls, UITypes, System.ImageList; type TDrawTreeForm = class(TForm) @@ -543,10 +543,10 @@ procedure TDrawTreeForm.VDT1InitChildren(Sender: TBaseVirtualTree; Node: PVirtua GetOpenAndClosedIcons(ChildData.FullPath, ChildData.OpenIndex, ChildData.CloseIndex); Sender.ValidateNode(Node, False); + Inc(ChildCount); end; end; until FindNext(SR) <> 0; - ChildCount := Sender.ChildCount[Node]; // finally sort node if ChildCount > 0 then From 599d64de904a7d8e2ec1556141baa71dda6488f6 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sat, 12 Aug 2023 18:36:38 +0200 Subject: [PATCH 64/70] Issue #1212: Fixed mem leaks --- Demos/Advanced/DrawTreeDemo.dfm | 23 ++++---- Demos/Advanced/DrawTreeDemo.pas | 100 +++++++++++++++++--------------- 2 files changed, 66 insertions(+), 57 deletions(-) diff --git a/Demos/Advanced/DrawTreeDemo.dfm b/Demos/Advanced/DrawTreeDemo.dfm index a19e169e7..7b909b4a4 100644 --- a/Demos/Advanced/DrawTreeDemo.dfm +++ b/Demos/Advanced/DrawTreeDemo.dfm @@ -1,25 +1,24 @@ object DrawTreeForm: TDrawTreeForm Left = 544 Top = 320 - Width = 726 - Height = 513 + ClientHeight = 475 + ClientWidth = 714 Color = clBtnFace Font.Charset = ANSI_CHARSET Font.Color = clWindowText Font.Height = -13 Font.Name = 'Trebuchet MS' Font.Style = [] - OldCreateOrder = False OnCreate = FormCreate + OnDestroy = FormDestroy DesignSize = ( - 710 + 714 475) - PixelsPerInch = 96 TextHeight = 18 object Label7: TLabel Left = 0 Top = 0 - Width = 710 + Width = 714 Height = 61 Align = alTop AutoSize = False @@ -32,7 +31,7 @@ object DrawTreeForm: TDrawTreeForm end object Label1: TLabel Left = 4 - Top = 381 + Top = 390 Width = 247 Height = 18 Anchors = [akLeft, akBottom] @@ -40,7 +39,7 @@ object DrawTreeForm: TDrawTreeForm end object Label3: TLabel Left = 424 - Top = 381 + Top = 390 Width = 22 Height = 18 Anchors = [akLeft, akBottom] @@ -49,8 +48,8 @@ object DrawTreeForm: TDrawTreeForm object VDT1: TVirtualDrawTree Left = 10 Top = 84 - Width = 684 - Height = 278 + Width = 690 + Height = 287 Anchors = [akLeft, akTop, akRight, akBottom] AutoExpandDelay = 200 AutoScrollDelay = 200 @@ -92,6 +91,8 @@ object DrawTreeForm: TDrawTreeForm OnInitChildren = VDT1InitChildren OnInitNode = VDT1InitNode OnStateChange = VDT1StateChange + Touch.InteractiveGestures = [igPan, igPressAndTap] + Touch.InteractiveGestureOptions = [igoPanSingleFingerHorizontal, igoPanSingleFingerVertical, igoPanInertia, igoPanGutter, igoParentPassthrough] Columns = < item BiDiMode = bdLeftToRight @@ -113,7 +114,7 @@ object DrawTreeForm: TDrawTreeForm end object TrackBar1: TTrackBar Left = 264 - Top = 379 + Top = 388 Width = 157 Height = 21 Anchors = [akLeft, akBottom] diff --git a/Demos/Advanced/DrawTreeDemo.pas b/Demos/Advanced/DrawTreeDemo.pas index dbb4e282b..7bd1006dc 100644 --- a/Demos/Advanced/DrawTreeDemo.pas +++ b/Demos/Advanced/DrawTreeDemo.pas @@ -53,6 +53,7 @@ TDrawTreeForm = class(TForm) var InitialStates: TVirtualNodeInitStates); procedure TrackBar1Change(Sender: TObject); procedure VDT1StateChange(Sender: TBaseVirtualTree; Enter, Leave: TVirtualTreeStates); + procedure FormDestroy(Sender: TObject); private FThumbSize: Integer; FExtensionsInitialized: Boolean; @@ -189,6 +190,11 @@ procedure TDrawTreeForm.FormCreate(Sender: TObject); FThumbSize := 200; end; +procedure TDrawTreeForm.FormDestroy(Sender: TObject); +begin + FreeAndNil(FExtensionList); +end; + //---------------------------------------------------------------------------------------------------------------------- function TDrawTreeForm.CanDisplay(const Name: string): Boolean; @@ -334,58 +340,60 @@ procedure TDrawTreeForm.VDT1InitNode(Sender: TBaseVirtualTree; ParentNode, Node: end else begin - Picture := TPicture.Create; Data.Display := ExtractFileName(ExcludeTrailingBackslash(Data.FullPath)); if (Data.Attributes and SFGAO_FOLDER) = 0 then - try + begin + Picture := TPicture.Create; try - Data.Image := TBitmap.Create; - Picture.LoadFromFile(Data.FullPath); - if not (Picture.Graphic is TBitmap) then - begin - // Some extra steps needed to keep non TBitmap descentants alive when - // scaling. This is needed because when accessing Picture.Bitmap all - // non-TBitmap content will simply be erased (definitly the wrong - // action, but we can't do anything to prevent this). Hence we - // must explicitly draw the graphic to a bitmap. - with Data.Image do + try + Data.Image := TBitmap.Create; + Picture.LoadFromFile(Data.FullPath); + if not (Picture.Graphic is TBitmap) then begin - Width := Picture.Width; - Height := Picture.Height; - Canvas.Draw(0, 0, Picture.Graphic); + // Some extra steps needed to keep non TBitmap descentants alive when + // scaling. This is needed because when accessing Picture.Bitmap all + // non-TBitmap content will simply be erased (definitly the wrong + // action, but we can't do anything to prevent this). Hence we + // must explicitly draw the graphic to a bitmap. + with Data.Image do + begin + Width := Picture.Width; + Height := Picture.Height; + Canvas.Draw(0, 0, Picture.Graphic); + end; + Picture.Bitmap.Assign(Data.Image); end; - Picture.Bitmap.Assign(Data.Image); - end; - RescaleImage(Picture.Bitmap, Data.Image); - - // Collect some additional image properties. - Data.Properties := Data.Properties + Format('%d x %d pixels', [Picture.Width, Picture.Height]); - case Picture.Bitmap.PixelFormat of - pf1bit: - Data.Properties := Data.Properties + ', 2 colors'; - pf4bit: - Data.Properties := Data.Properties + ', 16 colors'; - pf8bit: - Data.Properties := Data.Properties + ', 256 colors'; - pf15bit: - Data.Properties := Data.Properties + ', 32K colors'; - pf16bit: - Data.Properties := Data.Properties + ', 64K colors'; - pf24bit: - Data.Properties := Data.Properties + ', 16M colors'; - pf32bit: - Data.Properties := Data.Properties + ', 16M+ colors'; + RescaleImage(Picture.Bitmap, Data.Image); + + // Collect some additional image properties. + Data.Properties := Data.Properties + Format('%d x %d pixels', [Picture.Width, Picture.Height]); + case Picture.Bitmap.PixelFormat of + pf1bit: + Data.Properties := Data.Properties + ', 2 colors'; + pf4bit: + Data.Properties := Data.Properties + ', 16 colors'; + pf8bit: + Data.Properties := Data.Properties + ', 256 colors'; + pf15bit: + Data.Properties := Data.Properties + ', 32K colors'; + pf16bit: + Data.Properties := Data.Properties + ', 64K colors'; + pf24bit: + Data.Properties := Data.Properties + ', 16M colors'; + pf32bit: + Data.Properties := Data.Properties + ', 16M+ colors'; + end; + if Cardinal(Data.Image.Height) + 4 > TVirtualDrawTree(Sender).DefaultNodeHeight then + Sender.NodeHeight[Node] := Data.Image.Height + 4; + except + Data.Image.Free; + Data.Image := nil; end; - if Cardinal(Data.Image.Height) + 4 > TVirtualDrawTree(Sender).DefaultNodeHeight then - Sender.NodeHeight[Node] := Data.Image.Height + 4; - except - Data.Image.Free; - Data.Image := nil; - end; - finally - Picture.Free; - end; - end; + finally + Picture.Free; + end;// try..finally + end;// if + end;// else Data.Attributes := ReadAttributes(Data.FullPath); if ((Data.Attributes and SFGAO_HASSUBFOLDER) <> 0) or (((Data.Attributes and SFGAO_FOLDER) <> 0) and HasChildren(Data.FullPath)) then From 9ab81e9e572c0e4c5d51fb8ec998adffc7b61af0 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sat, 14 Oct 2023 10:12:27 +0200 Subject: [PATCH 65/70] Updated dependencies --- VirtualTreesDevelopment.groupproj | 60 +++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 VirtualTreesDevelopment.groupproj diff --git a/VirtualTreesDevelopment.groupproj b/VirtualTreesDevelopment.groupproj new file mode 100644 index 000000000..34bab6c34 --- /dev/null +++ b/VirtualTreesDevelopment.groupproj @@ -0,0 +1,60 @@ + + + {C5F52E84-EC68-4F73-B3AD-3A9611000DFB} + + + + + + + + + + Packages\RAD Studio 10.4+\VirtualTreesR.dproj + + + + Default.Personality.12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From e8f3263b75acee31d2ac3e8a0fca95ebd893fc18 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Sat, 20 Jan 2024 15:31:39 +0100 Subject: [PATCH 66/70] Fix for issue #1234: Access violation while changing the theme --- Demos/Advanced/Advanced.dsv | 10 +++++++ Demos/Interfaces/charityevents.dsv | 30 +++++++++++++++++++++ Demos/Minimal/Minimal.dsv | 20 ++++++++++++++ Demos/OLE/OLE.dsv | 10 +++++++ Demos/Objects/MVCDemo.dsv | 10 +++++++ Packages/RAD Studio 10.4+/VirtualTreesR.dsv | 20 ++++++++++++++ Source/VirtualTrees.StyleHooks.pas | 14 +++++++--- 7 files changed, 110 insertions(+), 4 deletions(-) create mode 100644 Demos/Advanced/Advanced.dsv create mode 100644 Demos/Interfaces/charityevents.dsv create mode 100644 Demos/Minimal/Minimal.dsv create mode 100644 Demos/OLE/OLE.dsv create mode 100644 Demos/Objects/MVCDemo.dsv create mode 100644 Packages/RAD Studio 10.4+/VirtualTreesR.dsv diff --git a/Demos/Advanced/Advanced.dsv b/Demos/Advanced/Advanced.dsv new file mode 100644 index 000000000..5751759b5 --- /dev/null +++ b/Demos/Advanced/Advanced.dsv @@ -0,0 +1,10 @@ +[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xTb3VyY2VcVmlydHVhbFRyZWVzLnBhcw==] +Module=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas +CursorX=42 +CursorY=667 +TopLine=611 +LeftCol=1 +Elisions= +Bookmarks= +EditViewName=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas + diff --git a/Demos/Interfaces/charityevents.dsv b/Demos/Interfaces/charityevents.dsv new file mode 100644 index 000000000..1dc475e91 --- /dev/null +++ b/Demos/Interfaces/charityevents.dsv @@ -0,0 +1,30 @@ +[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xTb3VyY2VcVmlydHVhbFRyZWVzLnBhcw==] +Module=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas +CursorX=47 +CursorY=246 +TopLine=223 +LeftCol=1 +Elisions= +Bookmarks= +EditViewName=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas +[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xEZW1vc1xJbnRlcmZhY2VzXG15ZXZlbnRzLnBh +cw==] +Module=D:\Projects\Virtual-TreeView\Demos\Interfaces\myevents.pas +CursorX=6 +CursorY=26 +TopLine=13 +LeftCol=1 +Elisions= +Bookmarks= +EditViewName=D:\Projects\Virtual-TreeView\Demos\Interfaces\myevents.pas + +[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xEZW1vc1xPYmplY3RzXE1WQ1BhbmVsLnBhcw==] +Module=D:\Projects\Virtual-TreeView\Demos\Objects\MVCPanel.pas +CursorX=21 +CursorY=74 +TopLine=52 +LeftCol=1 +Elisions= +Bookmarks= +EditViewName=D:\Projects\Virtual-TreeView\Demos\Objects\MVCPanel.pas + diff --git a/Demos/Minimal/Minimal.dsv b/Demos/Minimal/Minimal.dsv new file mode 100644 index 000000000..6a4237da6 --- /dev/null +++ b/Demos/Minimal/Minimal.dsv @@ -0,0 +1,20 @@ +[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xTb3VyY2VcVmlydHVhbFRyZWVzLnBhcw==] +Module=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas +CursorX=42 +CursorY=667 +TopLine=626 +LeftCol=1 +Elisions= +Bookmarks= +EditViewName=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas + +[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xEZW1vc1xNaW5pbWFsXE1haW4ucGFz] +Module=D:\Projects\Virtual-TreeView\Demos\Minimal\Main.pas +CursorX=1 +CursorY=1 +TopLine=1 +LeftCol=1 +Elisions= +Bookmarks= +EditViewName= + diff --git a/Demos/OLE/OLE.dsv b/Demos/OLE/OLE.dsv new file mode 100644 index 000000000..68f02fe96 --- /dev/null +++ b/Demos/OLE/OLE.dsv @@ -0,0 +1,10 @@ +[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xEZW1vc1xPTEVcTWFpbi5wYXM=] +Module=D:\Projects\Virtual-TreeView\Demos\OLE\Main.pas +CursorX=1 +CursorY=1 +TopLine=1 +LeftCol=1 +Elisions= +Bookmarks= +EditViewName= + diff --git a/Demos/Objects/MVCDemo.dsv b/Demos/Objects/MVCDemo.dsv new file mode 100644 index 000000000..e1eb2caf7 --- /dev/null +++ b/Demos/Objects/MVCDemo.dsv @@ -0,0 +1,10 @@ +[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xTb3VyY2VcVmlydHVhbFRyZWVzLnBhcw==] +Module=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas +CursorX=42 +CursorY=667 +TopLine=626 +LeftCol=1 +Elisions= +Bookmarks= +EditViewName=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas + diff --git a/Packages/RAD Studio 10.4+/VirtualTreesR.dsv b/Packages/RAD Studio 10.4+/VirtualTreesR.dsv new file mode 100644 index 000000000..521437eae --- /dev/null +++ b/Packages/RAD Studio 10.4+/VirtualTreesR.dsv @@ -0,0 +1,20 @@ +[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xTb3VyY2VcVmlydHVhbFRyZWVzLnBhcw==] +Module=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas +CursorX=42 +CursorY=667 +TopLine=626 +LeftCol=1 +Elisions= +Bookmarks= +EditViewName=D:\Projects\Virtual-TreeView\Source\VirtualTrees.pas + +[ClosedView_RDpcUHJvamVjdHNcVmlydHVhbC1UcmVlVmlld1xEZW1vc1xPYmplY3RzXE1WQ1R5cGVzLnBhcw==] +Module=D:\Projects\Virtual-TreeView\Demos\Objects\MVCTypes.pas +CursorX=36 +CursorY=194 +TopLine=172 +LeftCol=1 +Elisions= +Bookmarks= +EditViewName=D:\Projects\Virtual-TreeView\Demos\Objects\MVCTypes.pas + diff --git a/Source/VirtualTrees.StyleHooks.pas b/Source/VirtualTrees.StyleHooks.pas index 760eb4aff..a6ad04995 100644 --- a/Source/VirtualTrees.StyleHooks.pas +++ b/Source/VirtualTrees.StyleHooks.pas @@ -523,10 +523,16 @@ procedure TVclStyleScrollBarsHook.WMCaptureChanged(var Msg: TMessage); destructor TVclStyleScrollBarsHook.Destroy; begin - FVertScrollWnd.StyleHook := nil; - FreeAndNil(FVertScrollWnd); - FHorzScrollWnd.StyleHook := nil; - FreeAndNil(FHorzScrollWnd); + if Assigned(FVertScrollWnd) then + begin + FVertScrollWnd.StyleHook := nil; + FreeAndNil(FVertScrollWnd); + end; + if Assigned(FHorzScrollWnd) then + begin + FHorzScrollWnd.StyleHook := nil; + FreeAndNil(FHorzScrollWnd); + end; inherited; end; From 49c936483a8b28dd0db95d0f34e407c4015a4df1 Mon Sep 17 00:00:00 2001 From: Joachim Marder Date: Mon, 8 Apr 2024 23:10:53 +0200 Subject: [PATCH 67/70] Fixed issue #1248, Fixed compiler warning. --- Source/VirtualTrees.pas | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 1a0451ac4..d6c802b44 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -2538,7 +2538,6 @@ TBaseVirtualTree = class(TCustomControl) procedure WMThemeChanged(var Message: TMessage); message WM_THEMECHANGED; procedure WMVScroll(var Message: TWMVScroll); message WM_VSCROLL; function GetRangeX: Cardinal; - function GetDoubleBuffered: Boolean; procedure SetDoubleBuffered(const Value: Boolean); function GetVclStyleEnabled: Boolean; inline; procedure SetOnPrepareButtonImages(const Value: TVTPrepareButtonImagesEvent); @@ -2721,6 +2720,7 @@ TBaseVirtualTree = class(TCustomControl) ImgCheckState: TCheckState = csUncheckedNormal; ImgEnabled: Boolean = True): Integer; virtual; function GetColumnClass: TVirtualTreeColumnClass; virtual; function GetDefaultHintKind: TVTHintKind; virtual; + function GetDoubleBuffered: Boolean; {$if CompilerVersion >= 36} override; {$ifend} function GetHeaderClass: TVTHeaderClass; virtual; function GetHintWindowClass: THintWindowClass; virtual; procedure GetImageIndex(var Info: TVTPaintInfo; Kind: TVTImageKind; InfoIndex: TVTImageInfoIndex); virtual; @@ -17823,6 +17823,12 @@ procedure TBaseVirtualTree.WMPrintClient(var Message: TWMPrintClient); Canvas: TCanvas; begin + if RTLVersion >= 36 then // see issue #1248, for newer Delphi versions use inherited version of WMPrintClient() + begin + inherited; + exit; + end; + // Draw only if the window is visible or visibility is not required. if ((Message.Flags and PRF_CHECKVISIBLE) = 0) or IsWindowVisible(Handle) then begin From e2d5373c320db64afb8eb2c2f85861e843412a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Hoffmann?= Date: Thu, 31 Oct 2024 16:30:52 +0100 Subject: [PATCH 68/70] refix methods 'GetLastVisibleNoInit' (and 'GetLastVisible') to return correct results even if some ancestor of the last visible node is effectively not visible itself Changes from commit 8df8d6 for issue #725 performance reintroduced a regression, that prevents method 'TBaseVirtualTree.GetLastVisibleNoInit' from returning a visible node if some of its ancestors are hidden. That is because methods 'TBaseVirtualTree.GetLastVisibleChildNoInit' and 'GetPreviousVisibleSiblingNoInit' both only consider direct children of given 'Node' but ignore other descendant nodes' visibility. - completely revised method 'TBaseVirtualTree.GetLastVisibleNoInit' - kept the top-down-traversal algorithm of commit 8df8d6 in particular for optimal performance - iteratively checked expansion state (but not visibility) of every ancestor of given 'Node' in the first place to prevent a false-positive result in an effectively collapsed subtree - added conditional recursion for expanded nodes having some visible children (i.e. using fast 'vsAllChildrenHidden' state) as a local function 'IterateChildren' - apply 'ChildrenAbove' option on the conditions' precedence: - for top-down trees prefer visible children over their visible parent - for bottom-up trees prefer a visible node over its visible children - therefore extracted main condition as a local function 'GetNodeIsVisible' and recursion condition as a local function 'GetNodeHasVisibleChildren' ! thus a visible subnode under some effectively invisible but expanded ancestor will be found again --- Source/VirtualTrees.pas | 78 +++++++++++++++++++++++++++++++++-------- 1 file changed, 63 insertions(+), 15 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index d6c802b44..5e0bfd327 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -28067,25 +28067,73 @@ function TBaseVirtualTree.GetLastVisibleNoInit(Node: PVirtualNode = nil; ConsiderChildrenAbove: Boolean = True; IncludeFiltered: Boolean = False): PVirtualNode; // Returns the very last visible node in the tree while optionally considering toChildrenAbove. +// Note that the visibility of all ancestor nodes of the resulting node must not be considered. // No initialization is performed. -var - Next: PVirtualNode; -begin - Result := GetLastVisibleChildNoInit(Node, IncludeFiltered); - if not ConsiderChildrenAbove or not (toChildrenAbove in FOptions.PaintOptions) then - while Assigned(Result) and (vsExpanded in Result.States) do + //--------------- local functions ------------------------------------------- + + function GetNodeIsVisible(ChildNode: PVirtualNode): Boolean; + begin + Result := (vsVisible in ChildNode.States) and + (IncludeFiltered or not IsEffectivelyFiltered[ChildNode]); + end; + + function GetNodeHasVisibleChildren(ChildNode: PVirtualNode): Boolean; + begin + Result := (vsHasChildren in ChildNode.States) and + (vsExpanded in ChildNode.States) and + not (vsAllChildrenHidden in ChildNode.States); + end; + + function IterateChildren(ParentNode: PVirtualNode): PVirtualNode; + var + Run: PVirtualNode; + begin + Result := nil; + + Run := GetLastChildNoInit(ParentNode); // Do not use 'GetLastVisibleChildNoInit' here (see above). + while Assigned(Run) do begin - // Test if there is a next last child. If not keep the node from the last run. - // Otherwise use the next last child. - Next := GetLastChildNoInit(Result); - if Assigned(Next) and (not (vsVisible in Next.States) or - (not IncludeFiltered and IsEffectivelyFiltered[Next])) then - Next := GetPreviousVisibleSiblingNoInit(Next, IncludeFiltered); - if Next = nil then - Break; - Result := Next; + if ConsiderChildrenAbove and (toChildrenAbove in FOptions.PaintOptions) then + begin + if GetNodeIsVisible(Run) then + Result := Run + else if GetNodeHasVisibleChildren(Run) then + Result := IterateChildren(Run); + end else + begin + if GetNodeHasVisibleChildren(Run) then + Result := IterateChildren(Run) + else if GetNodeIsVisible(Run) then + Result := Run; + end; + + if Assigned(Result) then + break; + + Run := GetPreviousSiblingNoInit(Run); end; + end; + + //--------------- end local functions --------------------------------------- + +var + Run: PVirtualNode; + +begin + Result := nil; + + // First, check wether the given node and all its parents are expanded. + // If not, there can not be any visible child node. + Run := Node; + while Assigned(Run) and (Run <> RootNode) do + begin + if not (vsExpanded in Run.States) then + exit; + Run := Run.Parent; + end; + + Result := IterateChildren(Node); end; //---------------------------------------------------------------------------------------------------------------------- From 347afae6ed0fe1be89ae70a856f1bfbe5c10b74f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Hoffmann?= Date: Fri, 29 Nov 2024 12:28:59 +0100 Subject: [PATCH 69/70] add a method to determine the top node of an thereby invisible subtree - added method 'TBaseVirtualTree.GetTopInvisibleParent' to retrieve the topmost node of an effectively invisible subtree - the resulting node can be invisible by lacking the 'vsVisible'-flag on its own or having its parent lacking the 'vsExpanded' flag - all of its sub-nodes can be considered effectively invisible - all of its ancestor-nodes can be considered to be effectively visible - 'nil' is returned if all nodes from 'Node' up to 'FRoot' are effectively visible --- Source/VirtualTrees.pas | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index 5e0bfd327..fad5b934a 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -3138,6 +3138,7 @@ TBaseVirtualTree = class(TCustomControl) var Text: string); virtual; function GetTreeRect: TRect; function GetVisibleParent(Node: PVirtualNode; IncludeFiltered: Boolean = False): PVirtualNode; + function GetTopInvisibleParent(Node: PVirtualNode): PVirtualNode; function HasAsParent(Node, PotentialParent: PVirtualNode): Boolean; function InsertNode(Node: PVirtualNode; Mode: TVTNodeAttachMode; UserData: Pointer = nil): PVirtualNode; procedure InvalidateChildren(Node: PVirtualNode; Recursive: Boolean); @@ -29908,6 +29909,31 @@ function TBaseVirtualTree.GetVisibleParent(Node: PVirtualNode; IncludeFiltered: //---------------------------------------------------------------------------------------------------------------------- +function TBaseVirtualTree.GetTopInvisibleParent(Node: PVirtualNode): PVirtualNode; + +// Returns the last (furthest) parent node of Node which is invisible. + +var + Run: PVirtualNode; + +begin + Assert(Assigned(Node), 'Node must not be nil.'); + Assert(Node <> FRoot, 'Node must not be the hidden root node.'); + + Result := nil; + + Run := Node.Parent; + while (Run <> FRoot) do + begin + if not ( (vsVisible in Run.States) and (vsExpanded in Run.Parent.States) ) then + Result := Run; + Run := Run.Parent; + end; + +end; + +//---------------------------------------------------------------------------------------------------------------------- + function TBaseVirtualTree.HasAsParent(Node, PotentialParent: PVirtualNode): Boolean; // Determines whether Node has got PotentialParent as one of its parents. From ad2226de3752f71681bf473da80b9cbcb72dcdf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Hoffmann?= Date: Fri, 29 Nov 2024 13:03:10 +0100 Subject: [PATCH 70/70] revised methods 'GetNextVisible[NoInit]' and 'GetPreviousVisible[NoInit]' completely to ensure a node cannot be returned as its own next or previous node - updated methods 'TBaseVirtualTree.GetNextVisible' and 'TBaseVirtualTree.GetNextVisibleNoInit' as well as 'TBaseVirtualTree.GetPreviousVisible' and 'TBaseVirtualTree.GetPreviousVisibleNoInit' to harmonize the determination of a next or previous visible node - used method 'TBaseVirtualTree.GetTopInvisibleParent' to optimize the search by skipping effectively non-visible subtrees as a whole independent from 'ChildrenAbove' mode - applied the condition to force searching for another node from 'TBaseVirtualTree.GetNextVisible' and 'TBaseVirtualTree.GetNextVisibleNoInit' to 'TBaseVirtualTree.GetPreviousVisible' and 'TBaseVirtualTree.GetPreviousVisibleNoInit' - extended that condition to force searching for another node when the current node is known to be in an effectively non-visible subtree - thus, the input node cannot be returned as its own next/previous visible node, which is ensured with an assertion at the end of each method - note that the usage of other methods obscuring the traversal algorithm, such as 'GetVisibleParent', 'GetFirstVisible', 'GetLastVisible', 'GetPreviousSibling', etc. is avoided --- Source/VirtualTrees.pas | 675 +++++++++++++++++++++------------------- 1 file changed, 352 insertions(+), 323 deletions(-) diff --git a/Source/VirtualTrees.pas b/Source/VirtualTrees.pas index fad5b934a..fec7a69d2 100644 --- a/Source/VirtualTrees.pas +++ b/Source/VirtualTrees.pas @@ -28567,113 +28567,122 @@ function TBaseVirtualTree.GetNextVisible(Node: PVirtualNode; ConsiderChildrenAbo // toChildrenAbove is optionally considered which is the default here. var + TopInvisibleParent: PVirtualNode; ForceSearch: Boolean; begin Result := Node; - if Assigned(Result) then - begin - Assert(Result <> FRoot, 'Node must not be the hidden root node.'); + if not Assigned(Result) then Exit; - repeat - // If the given node is not visible then look for a parent node which is visible, otherwise we will - // likely go unnecessarily through a whole bunch of invisible nodes. - if not FullyVisible[Result] then - Result := GetVisibleParent(Result, True); + Assert(Result <> FRoot, 'Node must not be the hidden root node.'); - if ConsiderChildrenAbove and (toChildrenAbove in FOptions.PaintOptions) then - begin - repeat - // If there a no siblings anymore, go up one level. - if not Assigned(Result.NextSibling) then + repeat + // If any ancestor is invisible, then find the last (furthest) parent node + // which is invisible to skip invisible subtrees. Otherwise we will + // likely go unnecessarily through a whole bunch of invisible nodes. + TopInvisibleParent := GetTopInvisibleParent(Result); + if Assigned(TopInvisibleParent) then + Result := TopInvisibleParent; + + if ConsiderChildrenAbove and (toChildrenAbove in FOptions.PaintOptions) then + begin + repeat + // If there a no siblings anymore, go up one level. + if not Assigned(Result.NextSibling) then + begin + Result := Result.Parent; + if Result = FRoot then begin - Result := Result.Parent; - if Result = FRoot then - begin - Result := nil; - Break; - end; + Result := nil; + Break; + end; - if not (vsInitialized in Result.States) then - InitNode(Result); - if vsVisible in Result.States then - Break; - end - else + if not (vsInitialized in Result.States) then + InitNode(Result); + end + else + begin + // There is at least one sibling so take it. + Result := Result.NextSibling; + if not (vsInitialized in Result.States) then + InitNode(Result); + if not (vsVisible in Result.States) then + Continue; + + // Now take a look at the children. As the children are initialized + // while toggling, we don't need to call 'InitChildren' beforehand here. + while (vsExpanded in Result.States) and Assigned(Result.FirstChild) do begin - // There is at least one sibling so take it. - Result := Result.NextSibling; + Result := Result.FirstChild; if not (vsInitialized in Result.States) then InitNode(Result); if not (vsVisible in Result.States) then - Continue; - - // Now take a look at the children. - // As the children are initialized while toggling, we don't need to do this here. - while (vsExpanded in Result.States) and Assigned(Result.FirstChild) do - begin - Result := Result.FirstChild; - if not (vsInitialized in Result.States) then - InitNode(Result); - if not (vsVisible in Result.States) then - Break; - end; - - // If we found a visible node we don't need to search any longer. - if vsVisible in Result.States then Break; end; - until False; - end - else - begin - // Has this node got children? - if [vsHasChildren, vsExpanded] * Result.States = [vsHasChildren, vsExpanded] then - begin - // Yes, there are child nodes. Initialize them if necessary. - if Result.ChildCount = 0 then - InitChildren(Result); end; - // Child nodes are the first choice if possible. - if (vsExpanded in Result.States) and Assigned(Result.FirstChild) then - begin - Result := GetFirstChild(Result); - ForceSearch := False; - end - else - ForceSearch := True; + // If we found a visible node we don't need to search any longer. + // As it has already been initialized above, we don't need to call 'InitNode' here. + if vsVisible in Result.States then + Break; + until False; + end + else + begin + ForceSearch := True; + // If we found an invisible ancestor, we must not check its children. + // Remember, that TopInvisibleParent can be effectively invisible merely due to + // its own parent's expansion state despite being visible itself. + if Result <> TopInvisibleParent then + begin + if not (vsInitialized in Result.States) then + InitNode(Result); - // If there are no children or the first child is not visible then search the sibling nodes or traverse parents. - if Assigned(Result) and (ForceSearch or not (vsVisible in Result.States)) then + // Child nodes are the first choice if the current node is known to be visible. + if (vsVisible in Result.States) and (vsExpanded in Result.States) then begin - repeat - // Is there a next sibling? - if Assigned(Result.NextSibling) then - begin - Result := Result.NextSibling; - if not (vsInitialized in Result.States) then - InitNode(Result); - if vsVisible in Result.States then - Break; - end - else - begin - // No sibling anymore, so use the parent's next sibling. - if Result.Parent <> FRoot then - Result := Result.Parent - else - begin - // There are no further nodes to examine, hence there is no further visible node. - Result := nil; - Break; - end; - end; - until False; + // Initialize the node's children if necessary. + if (vsHasChildren in Result.States) and (Result.ChildCount = 0) then + InitChildren(Result); + + if Assigned(Result.FirstChild) then + begin + Result := Result.FirstChild; + if not (vsInitialized in Result.States) then + InitNode(Result); + ForceSearch := False; + end; end; end; - until not Assigned(Result) or IsEffectivelyVisible[Result]; - end; + + // If there are no children or the first child is not visible then search the sibling nodes or traverse parents. + if ForceSearch or not (vsVisible in Result.States) then + begin + repeat + // Is there a next sibling? + if Assigned(Result.NextSibling) then + begin + Result := Result.NextSibling; + if not (vsInitialized in Result.States) then + InitNode(Result); + if vsVisible in Result.States then + Break; + end + // No sibling anymore, so use the parent's next sibling. + else if Result.Parent <> FRoot then + Result := Result.Parent + else + begin + // There are no further nodes to examine, hence there is no further visible node. + Result := nil; + Break; + end; + until False; + end; + end; + until not Assigned(Result) or IsEffectivelyVisible[Result]; + + Assert(Result <> Node, 'Node cannot be its own visible successor.'); end; //---------------------------------------------------------------------------------------------------------------------- @@ -28681,98 +28690,100 @@ function TBaseVirtualTree.GetNextVisible(Node: PVirtualNode; ConsiderChildrenAbo function TBaseVirtualTree.GetNextVisibleNoInit(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = True): PVirtualNode; // Returns the next node in tree, with regard to Node, which is visible. -// toChildrenAbove is optionally considered (which is the default). No initialization is done. +// No initialization is done. +// toChildrenAbove is optionally considered which is the default here. var + TopInvisibleParent: PVirtualNode; ForceSearch: Boolean; begin Result := Node; - if Assigned(Result) then - begin - Assert(Result <> FRoot, 'Node must not be the hidden root node.'); + if not Assigned(Result) then Exit; - repeat - if ConsiderChildrenAbove and (toChildrenAbove in FOptions.PaintOptions) then + Assert(Result <> FRoot, 'Node must not be the hidden root node.'); + + repeat + // If any ancestor is invisible, then find the last (furthest) parent node + // which is invisible to skip invisible subtrees. Otherwise we will + // likely go unnecessarily through a whole bunch of invisible nodes. + TopInvisibleParent := GetTopInvisibleParent(Result); + if Assigned(TopInvisibleParent) then + Result := TopInvisibleParent; + + if ConsiderChildrenAbove and (toChildrenAbove in FOptions.PaintOptions) then + begin + repeat + // If there are no siblings anymore, go up one level. + if not Assigned(Result.NextSibling) then + begin + Result := Result.Parent; + if Result = FRoot then + begin + Result := nil; + Break; + end; + end + else + begin + // There is at least one sibling so take it. + Result := Result.NextSibling; + if not (vsVisible in Result.States) then + Continue; + + // Now take a look at the children. + while (vsExpanded in Result.States) and Assigned(Result.FirstChild) do + begin + Result := Result.FirstChild; + if not (vsVisible in Result.States) then + Break; + end; + end; + + // If we found a visible node we don't need to search any longer. + if vsVisible in Result.States then + Break; + until False; + end + else + begin + // Child nodes are the first choice if the current node is known to be visible. + // Remember, that TopInvisibleParent can be effectively invisible merely due to + // its own parent's expansion state despite being visible itself. + if (vsVisible in Result.States) and (vsExpanded in Result.States) and + (Result <> TopInvisibleParent) and Assigned(Result.FirstChild) then + begin + Result := Result.FirstChild; + ForceSearch := False; + end else + ForceSearch := True; + + // If there are no children or the first child is not visible then search the sibling nodes or traverse parents. + if ForceSearch or not (vsVisible in Result.States) then begin repeat - // If there a no siblings anymore, go up one level. - if not Assigned(Result.NextSibling) then + // Is there a next sibling? + if Assigned(Result.NextSibling) then begin - Result := Result.Parent; - if Result = FRoot then - begin - Result := nil; - Break; - end; + Result := Result.NextSibling; if vsVisible in Result.States then Break; end + // No sibling anymore, so use the parent's next sibling. + else if Result.Parent <> FRoot then + Result := Result.Parent else begin - // There is at least one sibling so take it. - Result := Result.NextSibling; - if not (vsVisible in Result.States) then - Continue; - - // Now take a look at the children. - while (vsExpanded in Result.States) and Assigned(Result.FirstChild) do - begin - Result := Result.FirstChild; - if not (vsVisible in Result.States) then - Break; - end; - - // If we found a visible node we don't need to search any longer. - if vsVisible in Result.States then - Break; + // There are no further nodes to examine, hence there is no further visible node. + Result := nil; + Break; end; until False; - end - else - begin - // If the given node is not visible then look for a parent node which is visible, otherwise we will - // likely go unnecessarily through a whole bunch of invisible nodes. - if not FullyVisible[Result] then - Result := GetVisibleParent(Result, True); - - // Child nodes are the first choice if possible. - if (vsExpanded in Result.States) and Assigned(Result.FirstChild) then - begin - Result := Result.FirstChild; - ForceSearch := False; - end - else - ForceSearch := True; - - // If there are no children or the first child is not visible then search the sibling nodes or traverse parents. - if ForceSearch or not (vsVisible in Result.States) then - begin - repeat - // Is there a next sibling? - if Assigned(Result.NextSibling) then - begin - Result := Result.NextSibling; - if vsVisible in Result.States then - Break; - end - else - begin - // No sibling anymore, so use the parent's next sibling. - if Result.Parent <> FRoot then - Result := Result.Parent - else - begin - // There are no further nodes to examine, hence there is no further visible node. - Result := nil; - Break; - end; - end; - until False; - end; end; - until not Assigned(Result) or IsEffectivelyVisible[Result]; - end; + end; + until not Assigned(Result) or IsEffectivelyVisible[Result]; + + Assert(Result <> Node, 'Node cannot be its own visible successor.'); end; //---------------------------------------------------------------------------------------------------------------------- @@ -29317,104 +29328,120 @@ function TBaseVirtualTree.GetPreviousVisible(Node: PVirtualNode; ConsiderChildre // toChildrenAbove is optionally considered which is the default here. var - Marker: PVirtualNode; + TopInvisibleParent: PVirtualNode; + ForceSearch: Boolean; begin Result := Node; - if Assigned(Result) then - begin - Assert(Result <> FRoot, 'Node must not be the hidden root node.'); + if not Assigned(Result) then Exit; - repeat - // If the given node is not visible then look for a parent node which is visible and use its last visible - // child or the parent node (if there is no visible child) as result. - if not FullyVisible[Result] then - begin - Result := GetVisibleParent(Result, True); - if Result = FRoot then - Result := nil; - Marker := GetLastVisible(Result, True); - if Assigned(Marker) then - Result := Marker; - end - else + Assert(Result <> FRoot, 'Node must not be the hidden root node.'); + + repeat + // If any ancestor is invisible, then find the last (furthest) parent node + // which is invisible to skip invisible subtrees. Otherwise we will + // likely go unnecessarily through a whole bunch of invisible nodes. + TopInvisibleParent := GetTopInvisibleParent(Result); + if Assigned(TopInvisibleParent) then + Result := TopInvisibleParent; + + if ConsiderChildrenAbove and (toChildrenAbove in FOptions.PaintOptions) then + begin + ForceSearch := True; + // If we found an invisible ancestor, we must not check its children. + // Remember, that TopInvisibleParent can be effectively invisible merely due to + // its own parent's expansion state despite being visible itself. + if Result <> TopInvisibleParent then begin - if ConsiderChildrenAbove and (toChildrenAbove in FOptions.PaintOptions) then - begin - repeat - if Assigned(Result.LastChild) and (vsExpanded in Result.States) then - begin - Result := Result.LastChild; - if not (vsInitialized in Result.States) then - InitNode(Result); + if not (vsInitialized in Result.States) then + InitNode(Result); - if vsVisible in Result.States then - Break; - end - else - if Assigned(Result.PrevSibling) then - begin - if not (vsInitialized in Result.PrevSibling.States) then - InitNode(Result.PrevSibling); + if (vsVisible in Result.States) and (vsExpanded in Result.States) then + begin + // Initialiue the node's children if necessary. + if (vsHasChildren in Result.States) and (Result.ChildCount = 0) then + InitChildren(Result); - if vsVisible in Result.PrevSibling.States then - begin - Result := Result.PrevSibling; - Break; - end; - end - else - begin - Marker := nil; - repeat - Result := Result.Parent; - if Result <> FRoot then - Marker := GetPreviousVisibleSibling(Result, True) - else - Result := nil; - until Assigned(Marker) or (Result = nil); - if Assigned(Marker) then - Result := Marker; + // Child nodes are the first choice if the current node is known to be visible. + if Assigned(Result.LastChild) then + begin + Result := Result.LastChild; + if not (vsInitialized in Result.States) then + InitNode(Result); + ForceSearch := False; + end; + end; + end; - Break; - end; - until False; - end - else + if ForceSearch or not (vsVisible in Result.States) then + begin + repeat + // Is there a previous sibling? + if Assigned(Result.PrevSibling) then + begin + Result := Result.PrevSibling; + if not (vsInitialized in Result.States) then + InitNode(Result); + if vsVisible in Result.States then + Break; + end + // No sibling anymore, so use the parent's previous sibling. + else if Result.Parent <> FRoot then + Result := Result.Parent + // There are no further nodes to examine, hence there is no further visible node. + else + begin + Result := nil; + Break; + end; + until False; + end; + end + else + begin + repeat + // If there are no sibling anymore, go up one level. + if not Assigned(Result.PrevSibling) then begin - repeat - // Is there a previous sibling node? - if Assigned(Result.PrevSibling) then - begin - Result := Result.PrevSibling; - // Initialize the new node and check its visibility. - if not (vsInitialized in Result.States) then - InitNode(Result); - if vsVisible in Result.States then - begin - // If there are visible child nodes then use the last one. - Marker := GetLastVisible(Result, True, True); - if Assigned(Marker) then - Result := Marker; - Break; - end; - end - else - begin - // No previous sibling there so the parent node is the nearest previous node. - Result := Result.Parent; - if Result = FRoot then - Result := nil; + Result := Result.Parent; + if Result = FRoot then + begin + Result := nil; + Break; + end; + if not (vsInitialized in Result.States) then + InitNode(Result); + end else + begin + Result := Result.PrevSibling; + if not (vsInitialized in Result.States) then + InitNode(Result); + if not (vsVisible in Result.States) then + Continue; + + // Now take a look at the children. As the children are initialized + // while toggling, we don't need to call 'InitChildren' beforehand here. + while (vsExpanded in Result.States) and Assigned(Result.LastChild) do + begin + Result := Result.LastChild; + if not (vsInitialized in Result.States) then + InitNode(Result); + if not (vsVisible in Result.States) then Break; - end; - until False; + end; end; - if Assigned(Result) and not (vsInitialized in Result.States) then - InitNode(Result); - end; - until not Assigned(Result) or IsEffectivelyVisible[Result]; - end; + // If we found a visible node we don't need to search any longer. + if vsVisible in Result.States then + Break; + until False; + end; + + if Assigned(Result) and not (vsInitialized in Result.States) then + InitNode(Result); + until not Assigned(Result) or IsEffectivelyVisible[Result]; + + Assert(Result <> Node, 'Node cannot be its own visible predecessor.'); end; //---------------------------------------------------------------------------------------------------------------------- @@ -29423,97 +29450,99 @@ function TBaseVirtualTree.GetPreviousVisibleNoInit(Node: PVirtualNode; ConsiderChildrenAbove: Boolean = True): PVirtualNode; // Returns the previous node in tree, with regard to Node, which is visible. +// No initialization is done. // toChildrenAbove is optionally considered which is the default here. var - Marker: PVirtualNode; + TopInvisibleParent: PVirtualNode; + ForceSearch: Boolean; begin Result := Node; - if Assigned(Result) then - begin - Assert(Result <> FRoot, 'Node must not be the hidden root node.'); + if not Assigned(Result) then Exit; - repeat - // If the given node is not visible then look for a parent node which is visible and use its last visible - // child or the parent node (if there is no visible child) as result. - if not FullyVisible[Result] then + Assert(Result <> FRoot, 'Node must not be the hidden root node.'); + + repeat + // If any ancestor is invisible, then find the last (furthest) parent node + // which is invisible to skip invisible subtrees. Otherwise we will + // likely go unnecessarily through a whole bunch of invisible nodes. + TopInvisibleParent := GetTopInvisibleParent(Result); + if Assigned(TopInvisibleParent) then + Result := TopInvisibleParent; + + if ConsiderChildrenAbove and (toChildrenAbove in FOptions.PaintOptions) then + begin + // Child nodes are the first choice if the current node is known to be visible. + // Remember, that TopInvisibleParent can be effectively invisible merely due to + // its own parent's expansion state despite being visible itself. + if (vsVisible in Result.States) and (vsExpanded in Result.States) and + (Result <> TopInvisibleParent) and Assigned(Result.LastChild) then begin - Result := GetVisibleParent(Result, True); - if Result = FRoot then - Result := nil; - Marker := GetLastVisibleNoInit(Result, True); - if Assigned(Marker) then - Result := Marker; - end - else + Result := Result.LastChild; + ForceSearch := False; + end else + ForceSearch := True; + + if ForceSearch or not (vsVisible in Result.States) then begin - if ConsiderChildrenAbove and (toChildrenAbove in FOptions.PaintOptions) then + repeat + // Is there a previous sibling? + if Assigned(Result.PrevSibling) then + begin + Result := Result.PrevSibling; + if vsVisible in Result.States then + Break; + end + // No sibling anymore, so use the parent's previous sibling. + else if Result.Parent <> FRoot then + Result := Result.Parent + // There are no further nodes to examine, hence there is no further visible node. + else + begin + Result := nil; + Break; + end; + until False; + end; + end + else + begin + repeat + // If there are no siblings anymore, go up one level. + if not Assigned(Result.PrevSibling) then begin - repeat - // Is the current node expanded and has children? - if (vsExpanded in Result.States) and Assigned(Result.LastChild) then - begin - Result := Result.LastChild; - if vsVisible in Result.States then - Break; - end - else - if Assigned(Result.PrevSibling) then - begin - // No children anymore, so take the previous sibling. - Result := Result.PrevSibling; - if vsVisible in Result.States then - Break; - end - else - begin - // No children and no previous siblings, so walk up the tree and look wether - // a parent has a previous visible sibling. If that is the case take it, - // otherwise there is no previous visible node. - Marker := nil; - repeat - Result := Result.Parent; - if Result <> FRoot then - Marker := GetPreviousVisibleSiblingNoInit(Result, True) - else - Result := nil; - until Assigned(Marker) or (Result = nil); - if Assigned(Marker) then - Result := Marker; - Break; - end; - until False; + Result := Result.Parent; + if Result = FRoot then + begin + Result := nil; + Break; + end; end else begin - repeat - // Is there a previous sibling node? - if Assigned(Result.PrevSibling) then - begin - Result := Result.PrevSibling; - if vsVisible in Result.States then - begin - // If there are visible child nodes then use the last one. - Marker := GetLastVisibleNoInit(Result, True, True); - if Assigned(Marker) then - Result := Marker; - Break; - end; - end - else - begin - // No previous sibling there so the parent node is the nearest previous node. - Result := Result.Parent; - if Result = FRoot then - Result := nil; + // There is at least one sibling so take it. + Result := Result.PrevSibling; + if not (vsVisible in Result.States) then + Continue; + + // Now take a look at the children. + while (vsExpanded in Result.States) and Assigned(Result.LastChild) do + begin + Result := Result.LastChild; + if not (vsVisible in Result.States) then Break; - end; - until False; + end; end; - end; - until not Assigned(Result) or IsEffectivelyVisible[Result]; - end; + + // If we found a visible node we don't need to search any longer. + if vsVisible in Result.States then + Break; + until False; + end; + until not Assigned(Result) or IsEffectivelyVisible[Result]; + + Assert(Result <> Node, 'Node cannot be its own visible predecessor.'); end; //----------------------------------------------------------------------------------------------------------------------