@@ -127,14 +127,16 @@ interface
127
127
{ $IFDEF VT_FMX}
128
128
TDimension = Single;
129
129
PDimension = ^Single;
130
+ TNodeHeight = Single;
130
131
TVTCursor = TCursor;
131
132
TVTDragDataObject = TDragObject;
132
133
TVTBackground = TBitmap;
133
134
TVTPaintContext = TCanvas;
134
135
TVTBrush = TBrush;
135
136
{ $ELSE}
136
- TDimension = Integer; // For Firemonkey support, see #841
137
+ TDimension = Integer; // Introduced for Firemonkey support, see #841
137
138
PDimension = ^Integer;
139
+ TNodeHeight = NativeInt;
138
140
TVTCursor = HCURSOR;
139
141
IDataObject= WinApi.ActiveX.IDataObject;
140
142
TVTDragDataObject = IDataObject;
@@ -889,16 +891,15 @@ TScrollBarOptions = class(TPersistent)
889
891
private
890
892
fIndex: Cardinal; // index of node with regard to its parent
891
893
fChildCount: Cardinal; // number of child nodes
892
- fNodeHeight: TDimension ; // height in pixels
894
+ fNodeHeight: TNodeHeight ; // height in pixels
893
895
public
894
896
States: TVirtualNodeStates; // states describing various properties of the node (expanded, initialized etc.)
895
897
Align: Byte; // line/button alignment
896
898
CheckState: TCheckState; // indicates the current check state (e.g. checked, pressed etc.)
897
899
CheckType: TCheckType; // indicates which check type shall be used for this node
898
900
Dummy: Byte; // dummy value to fill DWORD boundary
899
901
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.
902
903
_Filler: TDWordFiller; // Ensure 8 Byte alignment of following pointers for 64bit builds. Issue #1136
903
904
// Note: Some copy routines require that all pointers (as well as the data area) in a node are
904
905
// 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)
919
920
procedure SetLastChild (const pLastChild: PVirtualNode); inline; // internal method, do not call directly
920
921
procedure SetIndex (const pIndex: Cardinal); inline; // internal method, do not call directly.
921
922
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.
923
924
property Index: Cardinal read fIndex;
924
925
property ChildCount: Cardinal read fChildCount;
925
926
property Parent: PVirtualNode read fParent;
926
927
property PrevSibling: PVirtualNode read fPrevSibling;
927
928
property NextSibling: PVirtualNode read fNextSibling;
928
929
property LastChild: PVirtualNode read fLastChild;
929
- property NodeHeight: TDimension read fNodeHeight;
930
+ property NodeHeight: TNodeHeight read fNodeHeight;
930
931
private
931
932
Data: record end ; // this is a placeholder, each node gets extra data determined by NodeDataSize
932
933
public
@@ -1153,7 +1154,7 @@ function TVirtualNode.IsAssigned: Boolean;
1153
1154
Exit(@Self <> nil );
1154
1155
end ;
1155
1156
1156
- procedure TVirtualNode.SetNodeHeight (const pNodeHeight: TDimension );
1157
+ procedure TVirtualNode.SetNodeHeight (const pNodeHeight: TNodeHeight );
1157
1158
begin
1158
1159
fNodeHeight := pNodeHeight;
1159
1160
end ;
0 commit comments