|
24 | 24 | // (C) 1999-2001 digital publishing AG. All Rights Reserved.
|
25 | 25 | //----------------------------------------------------------------------------------------------------------------------
|
26 | 26 | //
|
| 27 | +// January 2010 |
| 28 | +// - Bug fix: TBaseVirtualTree.AdjustTotalHeight now longer calculates wrong total heights if nodes have been |
| 29 | +// made invisible |
| 30 | +// - Bug fix: TCustomVirtualStringTree.OnMeasureTextWidth now works as intended |
| 31 | +// - Bug fix: Added missing $IFDEFs concerning theming support |
| 32 | +// - Bug fix: Removed default from properties TVirtualTreeColumn.Color and TVirtualTreeColumn.BiDiMode |
27 | 33 | // July 2009
|
28 | 34 | // - Bug fix: TWorkerThread will no longer reference the tree after it has been destroyed (Mantis issue #384)
|
29 | 35 | // - Bug fix: TBaseVirtualTree.InternalConnectNode checked the expanded state of the wrong node if Mode was
|
|
275 | 281 | // For full document history see help file.
|
276 | 282 | //
|
277 | 283 | // Credits for their valuable assistance and code donations go to:
|
278 |
| -// Freddy Ertl, Marian Aldenhövel, Thomas Bogenrieder, Jim Kuenemann, Werner Lehmann, Jens Treichler, |
279 |
| -// Paul Gallagher (IBO tree), Ondrej Kelle, Ronaldo Melo Ferraz, Heri Bender, Roland Bedürftig (BCB) |
| 284 | +// Freddy Ertl, Marian Aldenh�vel, Thomas Bogenrieder, Jim Kuenemann, Werner Lehmann, Jens Treichler, |
| 285 | +// Paul Gallagher (IBO tree), Ondrej Kelle, Ronaldo Melo Ferraz, Heri Bender, Roland Bed�rftig (BCB) |
280 | 286 | // Anthony Mills, Alexander Egorushkin (BCB), Mathias Torell (BCB), Frank van den Bergh, Vadim Sedulin, Peter Evans,
|
281 | 287 | // Milan Vandrovec (BCB), Steve Moss, Joe White, David Clark, Anders Thomsen, Igor Afanasyev, Eugene Programmer,
|
282 | 288 | // Corbin Dunn, Richard Pringle, Uli Gerhardt, Azza, Igor Savkic, Daniel Bauten, Timo Tegtmeier, Dmitry Zegebart,
|
283 | 289 | // Andreas Hausladen
|
284 | 290 | // Beta testers:
|
285 |
| -// Freddy Ertl, Hans-Jürgen Schnorrenberg, Werner Lehmann, Jim Kueneman, Vadim Sedulin, Moritz Franckenstein, |
| 291 | +// Freddy Ertl, Hans-J�rgen Schnorrenberg, Werner Lehmann, Jim Kueneman, Vadim Sedulin, Moritz Franckenstein, |
286 | 292 | // Wim van der Vegt, Franc v/d Westelaken
|
287 | 293 | // Indirect contribution (via publicly accessible work of those persons):
|
288 | 294 | // Alex Denissov, Hiroyuki Hori (MMXAsm expert)
|
@@ -1283,14 +1289,14 @@ TVirtualTreeColumn = class(TCollectionItem)
|
1283 | 1289 | property Owner: TVirtualTreeColumns read GetOwner;
|
1284 | 1290 | published
|
1285 | 1291 | property Alignment: TAlignment read FAlignment write SetAlignment default taLeftJustify;
|
1286 |
| - property BiDiMode: TBiDiMode read FBiDiMode write SetBiDiMode stored IsBiDiModeStored default bdLeftToRight; |
| 1292 | + property BiDiMode: TBiDiMode read FBiDiMode write SetBiDiMode stored IsBiDiModeStored; |
1287 | 1293 | property CaptionAlignment: TAlignment read GetCaptionAlignment write SetCaptionAlignment
|
1288 | 1294 | stored IsCaptionAlignmentStored default taLeftJustify;
|
1289 | 1295 | property CaptionText: UnicodeString read FCaptionText stored False;
|
1290 | 1296 | property CheckType: TCheckType read FCheckType write SetCheckType default ctCheckBox;
|
1291 | 1297 | property CheckState: TCheckState read FCheckState write SetCheckState default csUncheckedNormal;
|
1292 | 1298 | property CheckBox: Boolean read FCheckBox write SetCheckBox default False;
|
1293 |
| - property Color: TColor read FColor write SetColor stored IsColorStored default clWindow; |
| 1299 | + property Color: TColor read FColor write SetColor stored IsColorStored; |
1294 | 1300 | property Hint: UnicodeString read FHint write FHint stored False;
|
1295 | 1301 | property ImageIndex: TImageIndex read FImageIndex write SetImageIndex default -1;
|
1296 | 1302 | property Layout: TVTHeaderColumnLayout read FLayout write SetLayout default blGlyphLeft;
|
@@ -3959,7 +3965,7 @@ implementation
|
3959 | 3965 |
|
3960 | 3966 | // Do not modify the copyright in any way! Usage of this unit is prohibited without the copyright notice
|
3961 | 3967 | // in the compiled binary file.
|
3962 |
| - Copyright: string = 'Virtual Treeview © 1999, 2009 Mike Lischke'; |
| 3968 | + Copyright: string = 'Virtual Treeview � 1999, 2010 Mike Lischke'; |
3963 | 3969 |
|
3964 | 3970 | var
|
3965 | 3971 | StandardOLEFormat: TFormatEtc = (
|
@@ -13789,8 +13795,7 @@ procedure TBaseVirtualTree.AdjustTotalHeight(Node: PVirtualNode; Value: Integer;
|
13789 | 13795 | begin
|
13790 | 13796 | Run := Node;
|
13791 | 13797 | repeat
|
13792 |
| - if vsVisible in Run.States then |
13793 |
| - Inc(Integer(Run.TotalHeight), Difference); |
| 13798 | + Inc(Integer(Run.TotalHeight), Difference); |
13794 | 13799 | // If the node is not visible or the parent node is not expanded or we are already at the top
|
13795 | 13800 | // then nothing more remains to do.
|
13796 | 13801 | if not (vsVisible in Run.States) or (Run = FRoot) or
|
@@ -25074,8 +25079,10 @@ procedure TBaseVirtualTree.PrepareCell(var PaintInfo: TVTPaintInfo; WindowOrgX,
|
25074 | 25079 | end;
|
25075 | 25080 | end;
|
25076 | 25081 |
|
25077 |
| - if Theme <> 0 then |
25078 |
| - CloseThemeData(Theme); |
| 25082 | + {$ifdef ThemeSupport} |
| 25083 | + if Theme <> 0 then |
| 25084 | + CloseThemeData(Theme); |
| 25085 | + {$endif ThemeSupport} |
25079 | 25086 | end;
|
25080 | 25087 |
|
25081 | 25088 | //----------------------------------------------------------------------------------------------------------------------
|
@@ -33894,9 +33901,9 @@ function TCustomVirtualStringTree.DoTextMeasuring(Canvas: TCanvas; Node: PVirtua
|
33894 | 33901 | DrawTextW(Canvas.Handle, PWideChar(Text), Length(Text), R, DrawFormat, False);
|
33895 | 33902 | Size.cx := R.Right - R.Left;
|
33896 | 33903 | end;
|
| 33904 | + Result := Size.cx; |
33897 | 33905 | if Assigned(FOnMeasureTextWidth) then
|
33898 | 33906 | FOnMeasureTextWidth(Self, Canvas, Node, Column, Text, Result);
|
33899 |
| - Result := Size.cx; |
33900 | 33907 | end;
|
33901 | 33908 |
|
33902 | 33909 | //----------------------------------------------------------------------------------------------------------------------
|
@@ -34265,7 +34272,7 @@ function TCustomVirtualStringTree.ContentToHTML(Source: TVSTTextSourceType; Capt
|
34265 | 34272 |
|
34266 | 34273 | // Renders the current tree content (depending on Source) as HTML text encoded in UTF-8.
|
34267 | 34274 | // If Caption is not empty then it is used to create and fill the header for the table built here.
|
34268 |
| -// Based on ideas and code from Frank van den Bergh and Andreas Hörstemeier. |
| 34275 | +// Based on ideas and code from Frank van den Bergh and Andreas H�rstemeier. |
34269 | 34276 |
|
34270 | 34277 | type
|
34271 | 34278 | UCS2 = Word;
|
@@ -34779,7 +34786,7 @@ function TCustomVirtualStringTree.CanExportNode(Node: PVirtualNode ): Boolean;
|
34779 | 34786 | function TCustomVirtualStringTree.ContentToRTF(Source: TVSTTextSourceType): AnsiString;
|
34780 | 34787 |
|
34781 | 34788 | // Renders the current tree content (depending on Source) as RTF (rich text).
|
34782 |
| -// Based on ideas and code from Frank van den Bergh and Andreas Hörstemeier. |
| 34789 | +// Based on ideas and code from Frank van den Bergh and Andreas H�rstemeier. |
34783 | 34790 |
|
34784 | 34791 | var
|
34785 | 34792 | Fonts: TStringList;
|
|
0 commit comments