forked from JAM-Software/Virtual-TreeView
-
Notifications
You must be signed in to change notification settings - Fork 5
/
VirtualTrees.dtx
6470 lines (4554 loc) · 236 KB
/
VirtualTrees.dtx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
@@ckButtonDisabled
<COMBINE Check button image indices>
@@ckCheckMixedDisabled
<COMBINE Check button image indices>
simple button
@@ckEmpty
<COMBINE Check button image indices>
an empty image used as place holder radio buttons
@@ckRadioCheckedDisabled
<COMBINE Check button image indices>
check boxes
@@TBaseVirtualTree
TBaseVirtualTree is the main and base class for all other Virtual Treeview descendants. This class implements most of the
base features and abilities and can be used to derive new classes, which want to hide most of the details of the tree,
which other descendants like TVirtualStringTree publish. Do not use the base treeview as object. It is not meant to be
instantiated directly, instead via an descendant.
@@TBaseVirtualTree.AdjustCoordinatesByIndent@TVTPaintInfo@Integer
During painting of the main column some coordinates must be adjusted due to the tree lines.
The offset resulting from the tree lines and indentation level is given in Indent.
@@TBaseVirtualTree.AdjustImageBorder@TCustomImageList@TBidiMode@Integer@TRect@TVTImageInfo
Depending on the width of the image list as well as the given bidi mode R must be adjusted.
@@TBaseVirtualTree.AdjustTotalCount@PVirtualNode@Integer@Boolean
Sets a node's total count to the given value and recursively adjusts the parent's total count
(actually, the adjustment is done iteratively to avoid function call overheads).
@@TBaseVirtualTree.AdjustTotalHeight@PVirtualNode@Integer@Boolean
Sets a node's total height to the given value and recursively adjusts the parent's total height.
@@TBaseVirtualTree.CalculateCacheEntryCount
Calculates the size of the position cache.
@@TBaseVirtualTree.CalculateVerticalAlignments@Boolean@Boolean@PVirtualNode@Integer@Integer
Calculates the vertical alignment of the given node and its associated expand/collapse button during
a node paint cycle depending on the required node alignment style.
@@TBaseVirtualTree.ChangeCheckState@PVirtualNode@TCheckState
Sets the check state of the node according to the given value and the node's check type.
If the check state must be propagated to the parent nodes and one of them refuses to change then
nothing happens and False is returned, otherwise True.
@@TBaseVirtualTree.ClearNodeBackground@TVTPaintInfo@Boolean@Boolean@TRect
Erases a nodes background depending on what the application decides to do.
UseBackground determines whether or not to use the background picture, while Floating indicates
that R is given in coordinates of the small node bitmap or the superordinated target bitmap used in PaintTree.
@@TBaseVirtualTree.CMDenySubclassing@TMessage
If a Windows XP Theme Manager component is used in the application it will try to subclass all controls which do not
explicitly deny this. Virtual Treeview knows how to handle XP themes so it does not need subclassing.
@@TBaseVirtualTree.CMHintShow@TCMHintShow
Determines hint message (tooltip) and out-of-hint rect.
Note: A special handling is needed here because we cannot pass wide strings back to the caller.
I had to introduce the hint data record anyway so we can use this to pass the hint string.
We still need to set a dummy hint string in the message to make the VCL showing the hint window.
@@TBaseVirtualTree.CMHintShowPause@TCMHintShowPause
Tells the application that the tree (and only the tree) does not want a delayed tool tip.
Normal hints / header hints use the default delay (except the first time).
@@TBaseVirtualTree.CollectSelectedNodesLTR@Integer@Integer@Integer@TAlignment@TRect@TRect
Helper routine used when a draw selection takes place. This version handles left-to-right directionality.
In the process of adding or removing nodes the current selection is modified which requires to pack it after
the function returns. Another side effect of this method is that a temporary list of nodes will be created
(see also InternalCacheNode) which must be inserted into the current selection by the caller.
@@TBaseVirtualTree.CollectSelectedNodesRTL@Integer@Integer@Integer@TAlignment@TRect@TRect
Helper routine used when a draw selection takes place. This version handles right-to-left directionality.
See also comments in CollectSelectedNodesLTR.
@@TBaseVirtualTree.DrawLineImage@TVTPaintInfo@Integer@Integer@Integer@Integer@TVTLineType@Boolean
Draws (depending on Style) one of the 5 line types of the tree.
If Reverse is True then a right-to-left column is being drawn, hence horizontal lines must be mirrored.
X and Y describe the left upper corner of the line image rectangle, while H denotes its height (and width).
@@TBaseVirtualTree.FAlignment
@@TBaseVirtualTree.FAnimationDuration
@@TBaseVirtualTree.FAnimationType
@@TBaseVirtualTree.FAutoExpandDelay
amount of milliseconds to wait until a node is expanded if it is the
drop target
@@TBaseVirtualTree.FAutoScrollDelay
amount of milliseconds to wait until autoscrolling becomes active
@@TBaseVirtualTree.FAutoScrollInterval
determines speed of auto scrolling
@@TBaseVirtualTree.FBackground
A background image loadable at design and runtime.
@@TBaseVirtualTree.FButtonFillMode
for rectangular tree buttons only: how to fill them
@@TBaseVirtualTree.FButtonStyle
style of the tree buttons
@@TBaseVirtualTree.FChangeDelay
used to delay OnChange event
@@TBaseVirtualTree.FCheckImageKind
light or dark, cross marks or tick marks
@@TBaseVirtualTree.FCheckImages
Reference to global image list to be used for the check images.
@@TBaseVirtualTree.FCheckNode
node which "captures" an check event
@@TBaseVirtualTree.FClipboardFormats
a list of clipboard format descriptions enabled for this tree
@@TBaseVirtualTree.FColors
class comprising all customizable colors in the tree
@@TBaseVirtualTree.FDefaultPasteMode
Used to determine where to add pasted nodes to.
@@TBaseVirtualTree.FDottedBrush
used to paint dotted lines without special pens
@@TBaseVirtualTree.FDragImage
drag image management
@@TBaseVirtualTree.FDragImageKind
determines whether or not and what to show in the drag image
@@TBaseVirtualTree.FDragManager
drag'n drop, cut'n paste
@@TBaseVirtualTree.FDragOperations
determines which operations are allowed during drag'n drop
@@TBaseVirtualTree.FDragScrollStart
Contains the start time when a tree does auto scrolling as drop target.
@@TBaseVirtualTree.FDragSelection
temporary copy of FSelection used during drag'n drop
@@TBaseVirtualTree.FDragThreshold
used to determine when to actually start a drag'n drop operation
@@TBaseVirtualTree.FDragType
used to switch between OLE and VCL drag'n drop
@@TBaseVirtualTree.FDrawSelectionMode
determines the paint mode for draw selection
@@TBaseVirtualTree.FDrawSelShiftState
keeps the initial shift state when the user starts selection with
the mouse
@@TBaseVirtualTree.FDropTargetNode
node currently selected as drop target
@@TBaseVirtualTree.FEditDelay
determines time to elapse before a node goes into edit mode
@@TBaseVirtualTree.FEditLink
used to comunicate with an application defined editor
@@TBaseVirtualTree.FFontChanged
flag for keeping informed about font changes in the off screen buffer
@@TBaseVirtualTree.FHeaderRect
Space which the header currently uses in the control (window coords).
@@TBaseVirtualTree.FHintData
used while preparing the hint window
@@TBaseVirtualTree.FHintMode
determines the kind of the hint window
@@TBaseVirtualTree.FHotCursor
can be set to additionally indicate the current hot node
@@TBaseVirtualTree.FIncrementalSearch
Used to determine whether and how incremental search is to be used.
@@TBaseVirtualTree.FindInPositionCache@Cardinal@Cardinal
Looks through the position cache and returns the node whose top position is the largest one which is smaller or equal
to the given vertical position.
The returned node does not necessarily occupy the given position but is the nearest one to start
iterating from to approach the real node for a given position. CurrentPos receives the actual position of the found
node which is needed for further iteration.
@@TBaseVirtualTree.FindInPositionCache@PVirtualNode@Cardinal
Looks through the position cache and returns the node whose top position is the largest one which is smaller or equal
to the position of the given node.
@@TBaseVirtualTree.FLastClickPos
Used for retained drag start and wheel mouse scrolling.
@@TBaseVirtualTree.FLastDropMode
set while dragging and used to track changes
@@TBaseVirtualTree.FLastHintRect
Area which the must must leave to reshow a hint.
@@TBaseVirtualTree.FLastSearchNode
Reference to node which was last found as search fit.
@@TBaseVirtualTree.FLastSelectionLevel
keeps the last node level for constrained multiselection
@@TBaseVirtualTree.FLastStructureChangeReason
used for delayed structur change event
@@TBaseVirtualTree.FLastVCLDragTarget
A node cache for VCL drag'n drop (keywords: DragLeave on DragDrop).
@@TBaseVirtualTree.FLineMode
tree lines or bands etc.
@@TBaseVirtualTree.FLineStyle
style of the tree lines
@@TBaseVirtualTree.FMargin
horizontal border distance
@@TBaseVirtualTree.FNodeAlignment
determines how to interpret the align member of a node
@@TBaseVirtualTree.FNodeDataSize
number of bytes to allocate with each node (in addition to its base
structure and the internal data), if -1 then do callback
@@TBaseVirtualTree.FOldFontChange
helper method pointer for tracking font changes in the off screen buffer
@@TBaseVirtualTree.FOnAdvancedHeaderDraw
Used when owner draw is enabled for the header and a column
is set to owner draw mode. But only if OnHeaderDrawQueryElements
returns at least one element to be drawn by the application.
In this case OnHeaderDraw is not used.
@@TBaseVirtualTree.FOnAfterCellPaint
triggered after a column of an item has been painted
@@TBaseVirtualTree.FOnAfterItemErase
triggered after an item's background has been erased
@@TBaseVirtualTree.FOnAfterItemPaint
triggered after an item has been painted
@@TBaseVirtualTree.FOnBeforeCellPaint
triggered when a column of an item is about to be painted
@@TBaseVirtualTree.FOnBeforeItemErase
triggered when an item's background is about to be erased
@@TBaseVirtualTree.FOnBeforeItemPaint
triggered when an item is about to be painted
@@TBaseVirtualTree.FOnChange
selection change
@@TBaseVirtualTree.FOnChecking
called just before a node's check state is changed
@@TBaseVirtualTree.FOnCompareNodes
used during sort
@@TBaseVirtualTree.FOnCreateDataObject
called to allow for app./descentant defined data objects
@@TBaseVirtualTree.FOnCreateDragManager
called to allow for app./descendant defined drag managers
@@TBaseVirtualTree.FOnCreateEditor
called when a node goes into edit mode, this allows applications
to supply their own editor
@@TBaseVirtualTree.FOnDragAllowed
used to get permission for manual drag in mouse down
@@TBaseVirtualTree.FOnDragDrop
called on release of mouse button (if drop was allowed)
@@TBaseVirtualTree.FOnDragOver
called for every mouse move
@@TBaseVirtualTree.FOnEditCancelled
called when editing has been cancelled
@@TBaseVirtualTree.FOnEdited
called when editing has successfully been finished
@@TBaseVirtualTree.FOnEditing
called just before a node goes into edit mode
@@TBaseVirtualTree.FOnFocusChanged
called when the focus goes to a new node and/or column
@@TBaseVirtualTree.FOnFocusChanging
called when the focus is about to go to a new node and/or column
(can be cancelled)
@@TBaseVirtualTree.FOnFreeNode
called when a node is about to be destroyed, user data can and should
be freed in this event
@@TBaseVirtualTree.FOnGetCursor
called to allow the app. to set individual cursors
@@TBaseVirtualTree.FOnGetHeaderCursor
triggered to allow the app. to use customized cursors for the header
@@TBaseVirtualTree.FOnGetHelpContext
called when a node specific help theme should be called
@@TBaseVirtualTree.FOnGetImage
used to retrieve the image index of a given node
@@TBaseVirtualTree.FOnGetLineStyle
triggered when a custom line style is used and the pattern brush
needs to be build
@@TBaseVirtualTree.FOnGetNodeDataSize
called if NodeDataSize is -1
@@TBaseVirtualTree.FOnGetPopupMenu
called when the popup for a node needs to be shown
@@TBaseVirtualTree.FOnGetUserClipboardFormats
gives application/descentants the opportunity to
add own clipboard formats on the fly
@@TBaseVirtualTree.FOnHeaderDragged
header (column) drag'n drop
@@TBaseVirtualTree.FOnHeaderDraggedOut
header (column) drag'n drop, which did not result in a valid drop.
@@TBaseVirtualTree.FOnHeaderDragging
header (column) drag'n drop
@@TBaseVirtualTree.FOnHeaderDraw
Used when owner draw is enabled for the header and a column is set
to owner draw mode.
@@TBaseVirtualTree.FOnHeaderDrawQueryElements
Used for advanced header painting to query the
application for the elements, which are drawn by it and which should
be drawn by the tree.
@@TBaseVirtualTree.FOnHotChange
called when the current "hot" node (that is, the node under the mouse)
changes and hot tracking is enabled
@@TBaseVirtualTree.FOnIncrementalSearch
triggered on every key press (not key down)
@@TBaseVirtualTree.FOnInitChildren
called when a node's children are needed (expanding etc.)
@@TBaseVirtualTree.FOnInitNode
called when a node needs to be initialized (child count etc.)
@@TBaseVirtualTree.FOnKeyAction
used to selectively prevent key actions (full expand on Ctrl+'+' etc.)
@@TBaseVirtualTree.FOnMeasureItem
Triggered when a node is about to be drawn and its height was not yet
determined by the application.
@@TBaseVirtualTree.FOnNodeCopied
call after a node has been copied
@@TBaseVirtualTree.FOnNodeCopying
called when an node is copied to another parent node (probably in
another tree, but within the same application, can be cancelled)
@@TBaseVirtualTree.FOnNodeMoved
called after a node and its children have been moved to another
parent node (probably another tree, but within the same application)
@@TBaseVirtualTree.FOnNodeMoving
called just before a node is moved from one parent node to another
(this can be cancelled)
@@TBaseVirtualTree.FOnPaintBackground
triggered if a part of the tree's background must be erased which is
not covered by any node
@@TBaseVirtualTree.FOnRenderOLEData
application/descendant defined clipboard formats
@@TBaseVirtualTree.FOnResetNode
called when a node is set to be uninitialized
@@TBaseVirtualTree.FOnScroll
called when one or both paint offsets changed
@@TBaseVirtualTree.FOnStateChange
Called whenever a state in the tree changes.
@@TBaseVirtualTree.FOnStructureChange
structural change like adding nodes etc.
@@TBaseVirtualTree.FOnUpdating
called from BeginUpdate, EndUpdate, BeginSynch and EndSynch
@@TBaseVirtualTree.FPanningCursor
Current wheel panning cursor.
@@TBaseVirtualTree.FPanningImage
A little 32x32 bitmap to indicate the panning reference point.
@@TBaseVirtualTree.FPanningWindow
Helper window for wheel panning
@@TBaseVirtualTree.FPendingCheckState
the new state the check node will get if all wents fine
@@TBaseVirtualTree.FPositionCache
array which stores node references ordered by vertical positions
(see also DoValidateCache for more information)
@@TBaseVirtualTree.FRangeAnchor
anchor node for selection with the keyboard, determines start of a
selection range
@@TBaseVirtualTree.FScrollBarOptions
common properties of horizontal and vertical scrollbar
@@TBaseVirtualTree.FScrollDirections
directions to scroll client area into depending on mouse position
@@TBaseVirtualTree.FSearchBuffer
Collects a sequence of keypresses used to do incremental searching.
@@TBaseVirtualTree.FSearchDirection
Direction to incrementally search the tree.
@@TBaseVirtualTree.FSearchStart
Where to start iteration on each key press.
@@TBaseVirtualTree.FSearchTimeout
Number of milliseconds after which to stop incremental searching.
@@TBaseVirtualTree.FSelection
list of currently selected nodes
@@TBaseVirtualTree.FSelectionBlendFactor
Determines the factor by which the selection rectangle is to be
faded if enabled.
@@TBaseVirtualTree.FSelectionCount
number of currently selected nodes (size of FSelection might differ)
@@TBaseVirtualTree.FSelectionCurveRadius
radius for rounded selection rectangles
@@TBaseVirtualTree.FSingletonNodeArray
Contains only one element for quick addition of single nodes
to the selection.
@@TBaseVirtualTree.FStartIndex
index to start validating cache from
@@TBaseVirtualTree.FStates
various active/pending states the tree needs to consider
@@TBaseVirtualTree.FSynchUpdateCount
synchronizer, causes all events which are usually done via timers
to happen immediately, regardless of the normal update state
@@TBaseVirtualTree.FTempNodeCache
used at various places to hold temporarily a bunch of node refs.
@@TBaseVirtualTree.FTempNodeCount
number of nodes in FTempNodeCache
@@TBaseVirtualTree.FTextMargin
space between the node's text and its horizontal bounds
@@TBaseVirtualTree.FTotalInternalDataSize
Cache of the sum of the necessary internal data size for all tree
classes derived from this base class.
@@TBaseVirtualTree.FUpdateCount
update stopper, updates of the tree control are only done if = 0
@@TBaseVirtualTree.FVCLDragEffect
A cache for VCL drag'n drop to keep the current drop effect.
@@TBaseVirtualTree.FVisibleCount
number of currently visible nodes
@@TBaseVirtualTree.FWantTabs
If True then the tree also consumes the tab key.
@@TBaseVirtualTree.GetDragManager
Returns the internal drag manager interface. If this does not yet exist then it is created here.
@@TBaseVirtualTree.GetFullyVisible@PVirtualNode
Determines whether the given node has the visibility flag set as well as all its parents are expanded.
@@TBaseVirtualTree.GetVisible@PVirtualNode
Determines if the given node marked as being visible.
@@TBaseVirtualTree.GetVisiblePath@PVirtualNode
Determines if all parents of the given node are expanded and have the visibility flag set.
@@TBaseVirtualTree.HandleDrawSelection@Integer@Integer
Handles multi-selection with a focus rectangle.
Result is True if something changed in selection.
@@TBaseVirtualTree.HasVisibleNextSibling@PVirtualNode
Helper method to determine if the given node has a visible sibling. This is needed to
draw correct tree lines.
@@TBaseVirtualTree.InitializeFirstColumnValues@TVTPaintInfo
Determines initial index, position and cell size of the first visible column.
@@TBaseVirtualTree.InitRootNode@Cardinal
Reinitializes the root node.
@@TBaseVirtualTree.InterruptValidation
Waits until the worker thread has stopped validating the caches of this tree.
@@TBaseVirtualTree.IsFirstVisibleChild@PVirtualNode@PVirtualNode
Helper method to check if Node is the same as the first visible child of Parent.
@@TBaseVirtualTree.IsLastVisibleChild@PVirtualNode@PVirtualNode
Helper method to check if Node is the same as the last visible child of Parent.
@@TBaseVirtualTree.PrepareBitmaps@Boolean@Boolean
initializes the contents of the internal bitmaps
@@TBaseVirtualTree.PrepareCell@TVTPaintInfo@Integer@Integer
This method is called immediately before a cell's content is drawn und is responsible to paint selection colors etc.
@@TBaseVirtualTree.ReadOldOptions@TReader
Migration helper routine to silently convert forms containing the old tree options member into the new
sub-options structure.
@@TBaseVirtualTree.SetChildCount@PVirtualNode@Cardinal
Changes a node's child structure to accomodate the new child count. This is used to add or delete
child nodes to/from the end of the node's child list. To insert or delete a specific node a separate
routine is used.
@@TBaseVirtualTree.SetFullyVisible@PVirtualNode@Boolean
This method ensures that a node is visible and all its parent nodes are expanded and also visible
if Value is True. Otherwise the visibility flag of the node is reset but the expand state
of the parent nodes stays untouched.
@@TBaseVirtualTree.SetVisible@PVirtualNode@Boolean
Sets the visibility style of the given node according to Value.
@@TBaseVirtualTree.SetVisiblePath@PVirtualNode@Boolean
If Value is True then all parent nodes of Node are expanded.
@@TBaseVirtualTree.TileBackground@TBitmap@TCanvas@TPoint@TRect
Draws the given source graphic so that it tiles into the given rectangle which is relative to the target bitmap.
The graphic is aligned so that it always starts at the upper left corner of the target canvas.
Offset gives the position of the target window in an possible superordinated surface.
@@TBaseVirtualTree.WMContextMenu@TWMContextMenu
This method is called when a popup menu is about to be displayed.
We have to cancel some pending states here to avoid interferences.
@@TBaseVirtualTree.WMHScroll@TWMHScroll
local functions
@@TBaseVirtualTree.WMKeyDown@TWMKeyDown
Keyboard event handling for node focus, selection, node specific popup menus and help invokation.
For a detailed description of every action done here read the help.
@@TBlendMode.bmConstantAlpha
apply given constant alpha
@@TBlendMode.bmConstantAlphaAndColor
blend the destination color with the given constant color und the constant alpha value
@@TBlendMode.bmMasterAlpha
use alpha value of source pixel and multiply it with the constant alpha value
@@TBlendMode.bmPerPixelAlpha
use alpha value of the source pixel
@@TChangeReason.crAccumulated
used for delayed changes
@@TChangeReason.crChildAdded
one or more child nodes have been added
@@TChangeReason.crChildDeleted
one or more child nodes have been deleted
@@TChangeReason.crIgnore
used as placeholder
@@TChangeReason.crNodeAdded
a node has been added
@@TChangeReason.crNodeCopied
a node has been duplicated
@@TChangeReason.crNodeMoved
a node has been moved to a new place
@@TCheckImageKind
Summary
Determines which images should be used for checkboxes and radio buttons.
Description
Provided with the tree are nine different image sets for the check images used when toCheckSupport is enabled in
TreeOptions.
<TABLE noborder>
<IMAGE Check images overview>
</TABLE>
Eight of the nine lists are predefined while one is a custom check image list, which can be filled by the application.
Use ckCustom as CheckImageKind value and assign an image list to the CustomCheckImages property to enable custom images.
The order of the images in the image lists is always as listed below. Make sure you have the same amount of images in
your custom image list, if you want own check images.
* empty image (ckEmpty)
<B>Radio buttons:</B>
* uncheck normal (ckRadioUncheckedNormal)
* unchecked hot (ckRadioUncheckedHot)
* unchecked pressed (ckRadioUncheckedPressed)
* unchecked disabled (ckRadioUncheckedDisabled)
* checked normal (ckRadioCheckedNormal)
* checked hot (ckRadioCheckedHot)
* checked pressed (ckRadioCheckedPressed)
* checked disabled (ckRadioCheckedDisabled)
<B>Check boxes:</B>
* unchecked normal (ckCheckUncheckedNormal)
* unchecked hot (ckCheckUncheckedHot)
* unchecked pressed (ckCheckUncheckedPressed)
* unchecked disabled (ckCheckUncheckedDisabled)
* checked normal (ckCheckCheckedNormal)
* checked hot (ckCheckCheckedHot)
* checked pressed (ckCheckCheckedPressed)
* checked disabled (ckCheckCheckedDisabled)
* mixed normal (ckCheckMixedNormal)
* mixed hot (ckCheckMixedHot)
* mixed pressed (ckCheckMixedPressed)
* mixed disabled (ckCheckMixedDisabled)
<B>Node buttons:</B>
* button normal (ckButtonNormal)
* button hot (ckButtonHot)
* button pressed (ckButtonPressed)
* button disabled (ckButtonDisabled)
@@TCheckImageKind.ckCustom
application defined check images
@@TCheckImageKind.ckDarkCheck
black cross
@@TCheckImageKind.ckDarkTick
black tick mark
@@TCheckImageKind.ckFlat
flat images (no 3D border)
@@TCheckImageKind.ckLightCheck
gray cross
@@TCheckImageKind.ckLightTick
gray tick mark
@@TCheckImageKind.ckSystemFlat
Flat system defined check images.
@@TCheckImageKind.ckXP
Windows XP style
@@TCheckState.csCheckedNormal
checked and not pressed
@@TCheckState.csCheckedPressed
checked and pressed
@@TCheckState.csMixedNormal
3-state check box and not pressed
@@TCheckState.csMixedPressed
3-state check box and pressed
@@TCheckState.csUncheckedNormal
unchecked and not pressed
@@TCheckState.csUncheckedPressed
unchecked and pressed
@@TClipboardFormatList.Add@string@TVirtualTreeClass@Cardinal@TFormatEtc
Adds the given data to the internal list. The priority value is used to sort formats for importance. Larger priority
values mean less priority.
@@TClipboardFormatList.EnumerateFormats@TVirtualTreeClass@TFormatEtcArray@TClipboardFormats
Returns a list of format records for the given class. If assigned the AllowedFormats is used to limit the
enumerated formats to those described in the list.
@@TClipboardFormatList.EnumerateFormats@TVirtualTreeClass@TStrings
Returns a list of format descriptions for the given class.
@@TClipboardFormatList.Sort
local function
@@TClipboardFormatListEntry.Description
The string used to register the format with Windows.
@@TClipboardFormatListEntry.FormatEtc
The definition of the format in the IDataObject.
@@TClipboardFormatListEntry.Priority
Number which determines the order of formats used in IDataObject.
@@TClipboardFormatListEntry.TreeClass
The tree class which supports rendering this format.
@@TClipboardFormats
Summary
List of strings describing clipboard formats.
Description
This class is an extended string list which allows to enter description strings for clipboard formats which are checked
agains registered formats and only accepted if the particular format could be found. This way there is an unambiqious and
portable description of allowed clipboard formats possible.
@@TClipboardFormats.Add@string
Summary
Adds a new format to the internal list.
Description
Adds or inserts a new format to the internal list but restricts additions to the clipbard formats to only those which are
registered with the owner tree or one of its ancestors.
@@TClipboardFormats.Insert@Integer@string
<COMBINE TClipboardFormats.Add@string>
@@TCustomVirtualStringTree.FDefaultText
text to show if there's no OnGetText event handler (e.g. at design time)
@@TCustomVirtualStringTree.FEllipsisWidth
width of '...' for the current font
@@TCustomVirtualStringTree.FInternalDataOffset
offset to the internal data of the string tree
@@TCustomVirtualStringTree.FOnNewText
used to notify the application about an edited node caption
@@TCustomVirtualStringTree.FOnPaintText
triggered before either normal or fixed text is painted to allow
even finer customization (kind of sub cell painting)
@@TCustomVirtualStringTree.FOnShortenString
used to allow the application a customized string shortage
@@TCustomVirtualStringTree.FTextHeight
true size of the font
@@TEnumFormatEtc
@@THeaderState.hsAutoSizing
auto size chain is in progess, do not trigger again on WM_SIZE
@@THeaderState.hsDragging
header dragging is in progress (only if enabled)
@@THeaderState.hsDragPending
left button is down, user might want to start dragging a column
@@THeaderState.hsLoading
The header currently loads from stream, so updates are not necessary.
@@THintAnimationType.hatFade
fade in the hint/tooltip, like in Windows 2000
@@THintAnimationType.hatNone
no animation at all, just display hint/tooltip
@@THintAnimationType.hatSlide
slide in the hint/tooltip, like in Windows 98
@@THintAnimationType.hatSystemDefault
use what the system is using (slide for Win9x, slide/fade for Win2K+, depends on settings)
@@THitPosition.hiAbove
above the client area (if relative) or the absolute tree area
@@THitPosition.hiBelow
below the client area (if relative) or the absolute tree area
@@THitPosition.hiNowhere
no node is involved (possible only if the tree is not as tall as the client area)
@@THitPosition.hiOnItem
on the bitmaps/buttons or label associated with an item
@@THitPosition.hiOnItemButton
on the button associated with an item
@@THitPosition.hiOnItemCheckbox
on the checkbox if enabled
@@THitPosition.hiOnItemIndent
in the indentation area in front of a node
@@THitPosition.hiOnItemLabel
on the normal text area associated with an item
@@THitPosition.hiOnItemLeft
in the area to the left of a node's text area (e.g. when right aligned or centered)
@@THitPosition.hiOnItemRight
in the area to the right of a node's text area (e.g. if left aligned or centered)
@@THitPosition.hiOnNormalIcon
on the "normal" image
@@THitPosition.hiOnStateIcon
on the state image
@@THitPosition.hiToLeft
to the left of the client area (if relative) or the absolute tree area
@@THitPosition.hiToRight
to the right of the client area (if relative) or the absolute tree area
@@TItemEraseAction.eaColor
Use the provided color to erase the background instead the one of the tree.
@@TItemEraseAction.eaDefault
The tree should erase the item's background (bitmap or solid).
@@TItemEraseAction.eaNone
Do nothing. Let the application paint the background.
@@TScrollBarOptions
@@TScrollBarOptions.FScrollBars
used to hide or show vertical and/or horizontal scrollbar
@@TScrollBarOptions.FScrollBarStyle
kind of scrollbars to use
@@TStringEditLink
Summary
TStringEditLink is the standard node editor of a TVirtualStringTree.
Description
TStringEditLink implements the interface IVTEditLink. This is a simple node editor which wraps a TEdit and is not Unicode
aware. A virtual string tree will use this node editor if the event OnCreateEditor is not handled and a node must be
edited. After the node's text has been edited the event OnNewText will be fired and the application should replace the
\old text with the new and edited text.
The node editor instance will automatically be destroyed via reference counting when it is not needed anymore. Never
destroy it explicitly - except when you know what you are doing.
Remarks
If you want to modify some aspects of how the node editor works, i.e. suppress some characters or initialize it with a
different text but the node's text, you can inherit your own class from TStringEditLink and return an instance of it in
the OnCreateEditor event.
@@TStringEditLink.BeginEdit
Summary
This function will be called by the virtual string tree when the editing starts.
Description
Please see interface IVTEditLink for a detailed explanation of this interface function.
@@TStringEditLink.CancelEdit
Summary
This function will be called by the virtual string tree when the current editing is about to be cancelled.
Description
Please see interface IVTEditLink for a detailed explanation of this interface function.
@@TStringEditLink.EndEdit
Summary
This function will be called by the virtual string tree when the current editing is being finished.
Description
Please see interface IVTEditLink for a detailed explanation of this interface function.
@@TStringEditLink.FColumn
The column of the node.
@@TStringEditLink.FEdit
A normal custom edit control.
@@TStringEditLink.FNode
The node to be edited.
@@TStringEditLink.FStopping
Set to True when the edit link requests stopping the edit action.
@@TStringEditLink.FTextBounds
Smallest rectangle around the text.
@@TStringEditLink.FTree
A back reference to the tree calling.
@@TStringEditLink.GetBounds
Summary
The virtual string tree uses this function to get the current bounding rect of the node editor.
Description
Please see interface IVTEditLink for a detailed explanation of this interface function.
@@TStringEditLink.PrepareEdit@TBaseVirtualTree@PVirtualNode@TColumnIndex
Summary
This function is called by a virtual string tree to initialize the node editor.
Description
Please see interface IVTEditLink for a detailed explanation of this interface function.
@@TStringEditLink.ProcessMessage@TMessage
Summary
This function is used to forward messages being directed to the virtual string tree.
Description
Please see interface IVTEditLink for a detailed explanation of this interface function.