@@ -127,14 +127,16 @@ interface
127127{ $IFDEF VT_FMX}
128128 TDimension = Single;
129129 PDimension = ^Single;
130+ TNodeHeight = Single;
130131 TVTCursor = TCursor;
131132 TVTDragDataObject = TDragObject;
132133 TVTBackground = TBitmap;
133134 TVTPaintContext = TCanvas;
134135 TVTBrush = TBrush;
135136{ $ELSE}
136- TDimension = Integer; // For Firemonkey support, see #841
137+ TDimension = Integer; // Introduced for Firemonkey support, see #841
137138 PDimension = ^Integer;
139+ TNodeHeight = NativeInt;
138140 TVTCursor = HCURSOR;
139141 IDataObject= WinApi.ActiveX.IDataObject;
140142 TVTDragDataObject = IDataObject;
@@ -889,16 +891,15 @@ TScrollBarOptions = class(TPersistent)
889891 private
890892 fIndex: Cardinal; // index of node with regard to its parent
891893 fChildCount: Cardinal; // number of child nodes
892- fNodeHeight: TDimension ; // height in pixels
894+ fNodeHeight: TNodeHeight ; // height in pixels
893895 public
894896 States: TVirtualNodeStates; // states describing various properties of the node (expanded, initialized etc.)
895897 Align: Byte; // line/button alignment
896898 CheckState: TCheckState; // indicates the current check state (e.g. checked, pressed etc.)
897899 CheckType: TCheckType; // indicates which check type shall be used for this node
898900 Dummy: Byte; // dummy value to fill DWORD boundary
899901 TotalCount: Cardinal; // sum of this node, all of its child nodes and their child nodes etc.
900- TotalHeight: TDimension; // height in pixels this node covers on screen including the height of all of its
901- // children
902+ TotalHeight: TNodeHeight;// height in pixels this node covers on screen including the height of all of its children.
902903 _Filler: TDWordFiller; // Ensure 8 Byte alignment of following pointers for 64bit builds. Issue #1136
903904 // Note: Some copy routines require that all pointers (as well as the data area) in a node are
904905 // located at the end of the node! Hence if you want to add new member fields (except pointers to internal
@@ -919,14 +920,14 @@ TScrollBarOptions = class(TPersistent)
919920 procedure SetLastChild (const pLastChild: PVirtualNode); inline; // internal method, do not call directly
920921 procedure SetIndex (const pIndex: Cardinal); inline; // internal method, do not call directly.
921922 procedure SetChildCount (const pCount: Cardinal); inline; // internal method, do not call directly.
922- procedure SetNodeHeight (const pNodeHeight: TDimension ); inline; // internal method, do not call directly.
923+ procedure SetNodeHeight (const pNodeHeight: TNodeHeight ); inline; // internal method, do not call directly.
923924 property Index: Cardinal read fIndex;
924925 property ChildCount: Cardinal read fChildCount;
925926 property Parent: PVirtualNode read fParent;
926927 property PrevSibling: PVirtualNode read fPrevSibling;
927928 property NextSibling: PVirtualNode read fNextSibling;
928929 property LastChild: PVirtualNode read fLastChild;
929- property NodeHeight: TDimension read fNodeHeight;
930+ property NodeHeight: TNodeHeight read fNodeHeight;
930931 private
931932 Data: record end ; // this is a placeholder, each node gets extra data determined by NodeDataSize
932933 public
@@ -1153,7 +1154,7 @@ function TVirtualNode.IsAssigned: Boolean;
11531154 Exit(@Self <> nil );
11541155end ;
11551156
1156- procedure TVirtualNode.SetNodeHeight (const pNodeHeight: TDimension );
1157+ procedure TVirtualNode.SetNodeHeight (const pNodeHeight: TNodeHeight );
11571158begin
11581159 fNodeHeight := pNodeHeight;
11591160end ;
0 commit comments