view.monkey2 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924
  1. Namespace mojo.app
  2. #rem monkeydoc The View class.
  3. #end
  4. Class View
  5. #rem monkeydoc Invoked when a view becomes visble and active.
  6. #end
  7. Field Activated:Void()
  8. #rem monkeydoc Invoked when a view becomes is not longer visble or active.
  9. #end
  10. Field Deactivated:Void()
  11. Method New()
  12. If Not _themeSeq
  13. _themeSeq=1
  14. App.ThemeChanged+=Lambda()
  15. _themeSeq+=1
  16. If _themeSeq<0 _themeSeq=1
  17. End
  18. Endif
  19. _style=New Style( App.Theme.DefaultStyle )
  20. InvalidateStyle()
  21. End
  22. #rem monkeydoc View visibility state.
  23. #end
  24. Property Visible:Bool()
  25. Return _visible
  26. Setter( visible:Bool )
  27. If visible=_visible Return
  28. _visible=visible
  29. RequestRender()
  30. UpdateActive()
  31. End
  32. #rem monkeydoc View enabled state.
  33. #end
  34. Property Enabled:Bool()
  35. Return _enabled And (Not _parent Or _parent.Enabled)
  36. Setter( enabled:Bool )
  37. If enabled=_enabled Return
  38. _enabled=enabled
  39. InvalidateStyle()
  40. UpdateActive()
  41. End
  42. #rem monkeydoc View active state.
  43. A view is active it is visible, enabled, attached to a window and all its parents are also active.
  44. Events are only sent to active windows.
  45. #end
  46. Property Active:Bool()
  47. Return _active
  48. End
  49. #rem monkeydoc Whether the view accepts key events.
  50. #end
  51. Property AcceptsKeyEvents:Bool()
  52. Return _acceptsKeyEvents
  53. Setter( acceptsKeyEvents:Bool )
  54. _acceptsKeyEvents=acceptsKeyEvents
  55. End
  56. #rem monkeydoc Whether the view accepts mouse events.
  57. #end
  58. Property AcceptsMouseEvents:Bool()
  59. Return _acceptsMouseEvents
  60. Setter( acceptsMouseEvents:Bool )
  61. _acceptsMouseEvents=acceptsMouseEvents
  62. End
  63. #rem monkeydoc View style.
  64. #end
  65. Property Style:Style()
  66. Return _style
  67. Setter( style:Style )
  68. If style=_style Return
  69. _style=style
  70. InvalidateStyle()
  71. End
  72. #rem monkeydoc View style state.
  73. #end
  74. Property StyleState:String()
  75. Return _styleState
  76. Setter( styleState:String )
  77. If styleState=_styleState Return
  78. _styleState=styleState
  79. InvalidateStyle()
  80. End
  81. #rem monkeydoc View render style.
  82. This is the style used to render the view, and is dependant on [[Style]] and [[StyleState]].
  83. #end
  84. Property RenderStyle:Style()
  85. ValidateStyle()
  86. Return _rstyle
  87. End
  88. #rem monkeydoc Layout mode.
  89. The following layout modes are supported
  90. | Layout mode | Description
  91. |:------------------|:-----------
  92. | "fill" | View is resized to fit its layout frame.
  93. | "float" | View floats within its layout frame according to the view [[Gravity]].
  94. | "fill-x" | View is resized on the x axis and floats on the y axis.
  95. | "fill-y" | View is resized on the y axis and floats on the x axs.
  96. | "stretch" | View is stretched to fit its layout frame.
  97. | "letterbox" | View is uniformly stretched on both axii and centered within its layout frame.
  98. | "letterbox-int" | View is uniformly stretched on both axii and centered within its layout frame. Scale factors are integrized.
  99. #end
  100. Property Layout:String()
  101. Return _layout
  102. Setter( layout:String )
  103. If layout=_layout Return
  104. _layout=layout
  105. End
  106. #rem monkeydoc View frame rect.
  107. The 'frame' the view is contained in.
  108. Note that the frame rect is in parent space coordinates, and is usually set by the parent view when layout occurs.
  109. #end
  110. Property Frame:Recti()
  111. Return _frame
  112. Setter( frame:Recti )
  113. _frame=frame
  114. End
  115. #rem monkeydoc Gravity for floating views.
  116. #end
  117. Property Gravity:Vec2f()
  118. Return _gravity
  119. Setter( gravity:Vec2f )
  120. If gravity=_gravity Return
  121. _gravity=gravity
  122. End
  123. #rem monkeydoc @hidden
  124. #end
  125. Property Offset:Vec2i()
  126. Return _offset
  127. Setter( offset:Vec2i )
  128. If offset=_offset Return
  129. _offset=offset
  130. End
  131. #rem monkeydoc Minimum view size.
  132. #end
  133. Property MinSize:Vec2i()
  134. Return _minSize
  135. Setter( minSize:Vec2i )
  136. _minSize=minSize
  137. End
  138. #rem monkeydoc Maximum view size.
  139. #end
  140. Property MaxSize:Vec2i()
  141. Return _maxSize
  142. Setter( maxSize:Vec2i )
  143. _maxSize=maxSize
  144. End
  145. #rem monkeydoc View content rect.
  146. The content rect represents the rendering area of the view.
  147. The content rect is in view local coordinates and its origin is always (0,0).
  148. #end
  149. Property Rect:Recti()
  150. Return _rect
  151. End
  152. #rem monkeydoc Width of the view content rect.
  153. #end
  154. Property Width:Int()
  155. Return _rect.Width
  156. End
  157. #rem monkeydoc Height of the view content rect.
  158. #end
  159. Property Height:Int()
  160. Return _rect.Height
  161. End
  162. #rem monkeydoc @hidden
  163. #end
  164. Property Bounds:Recti()
  165. Return _bounds
  166. End
  167. #rem monkeydoc Mouse location relative to the view.
  168. #end
  169. Property MouseLocation:Vec2i()
  170. Return TransformPointFromView( App.MouseLocation,Null )
  171. End
  172. #rem monkeydoc View clip rect.
  173. The clip rect represents the part of the content rect NOT obscured by an parent views.
  174. The clip rect is in view local coordinates.
  175. #end
  176. Property ClipRect:Recti()
  177. Return _clip
  178. End
  179. #rem monkeydoc @hidden
  180. #end
  181. Property RenderRect:Recti()
  182. Return _rclip
  183. End
  184. #rem monkeydoc @hidden
  185. #end
  186. Property RenderBounds:Recti()
  187. Return _rbounds
  188. End
  189. #rem monkeydoc @hidden
  190. #end
  191. Property LocalMatrix:AffineMat3f()
  192. Return _matrix
  193. End
  194. #rem monkeydoc @hidden
  195. #end
  196. Property RenderMatrix:AffineMat3f()
  197. Return _rmatrix
  198. End
  199. #rem monkeydoc The parent view of this view.
  200. #end
  201. Property Parent:View()
  202. Return _parent
  203. End
  204. #rem monkeydoc The Window this view is attached to, if any.
  205. #end
  206. Property Window:Window()
  207. Return _window
  208. End
  209. #rem monkeydoc Gets a style.
  210. This is a convenience method equivalent to App.Theme.GetStyle( name ).
  211. #end
  212. Method GetStyle:Style( name:String )
  213. Return App.Theme.GetStyle( name )
  214. End
  215. #rem monkeydoc Adds a child view to this view.
  216. AddChildView is normally used internally by 'layout' views. However you can also add a child view to any view
  217. directly by calling this method.
  218. If you use this method to add a child view to a view, it is your responsiblity to also manage the child view's frame using
  219. the [[Frame]] property.
  220. #end
  221. Method AddChildView( view:View )
  222. If Not view Return
  223. Assert( Not view._parent,"View already has a parent" )
  224. Assert( Not Cast<Window>( view ),"Windows cannot be child views" )
  225. view._parent=Self
  226. view.SetWindow( _window )
  227. _children.Add( view )
  228. RequestRender()
  229. view.UpdateActive()
  230. End
  231. #rem monkeydoc Removes a child view from this view.
  232. #end
  233. Method RemoveChildView( view:View )
  234. If Not view Return
  235. Assert( view._parent=Self,"View is not a child view" )
  236. view._parent=Null
  237. view.SetWindow( Null )
  238. _children.Remove( view )
  239. RequestRender()
  240. view.UpdateActive()
  241. End
  242. #rem monkeydoc @hidden
  243. #end
  244. Method FindViewAtWindowPoint:View( point:Vec2i )
  245. If Not _visible Return Null
  246. If Not _rbounds.Contains( point ) Return Null
  247. For Local i:=0 Until _children.Length
  248. Local child:=_children[_children.Length-i-1]
  249. Local view:=child.FindViewAtWindowPoint( point )
  250. If view Return view
  251. Next
  252. Return Self
  253. End
  254. #rem monkeydoc Transforms a point to another view.
  255. Transforms `point` in coordinates local to this view to coordinates local to `view`.
  256. @param point The point to transform.
  257. @param view View to transform point to.
  258. #end
  259. Method TransformPointToView:Vec2i( point:Vec2i,view:View )
  260. Local t:=_rmatrix * New Vec2f( point.x,point.y )
  261. If view t=-view._rmatrix * t
  262. Return New Vec2i( Round( t.x ),Round( t.y ) )
  263. End
  264. #rem monkeydoc Transforms a point from another view.
  265. Transforms `point` in coordinates local to 'view' to coordinates local to this view.
  266. @param point The point to transform.
  267. @param view View to transform point from.
  268. #end
  269. Method TransformPointFromView:Vec2i( point:Vec2i,view:View )
  270. Local t:=New Vec2f( point.x,point.y )
  271. If view t=view._matrix * t
  272. t=-_rmatrix * t
  273. Return New Vec2i( Round( t.x ),Round( t.y ) )
  274. End
  275. #rem monkeydoc Transforms a rect to another view.
  276. Transforms `rect` from coordinates local to this view to coordinates local to `view`.
  277. @param rect The rect to transform.
  278. @param view View to transform rect to.
  279. #end
  280. Method TransformRectToView:Recti( rect:Recti,view:View )
  281. Return New Recti( TransformPointToView( rect.min,view ),TransformPointToView( rect.max,view ) )
  282. End
  283. #rem monkeydoc Transforms a rect from another view.
  284. Transform `rect` from coordinates local to `view` to coordinates local to this view.
  285. @param rect The rect to transform.
  286. @param view The view to transform rect from.
  287. #end
  288. Method TransformRectFromView:Recti( rect:Recti,view:View )
  289. Return New Recti( TransformPointFromView( rect.min,view ),TransformPointFromView( rect.max,view ) )
  290. End
  291. #rem monkeydoc Transforms a point in window coordinates to view coordinates.
  292. Transforms `point` in window coordinates to coordinates local to this view.
  293. @param point The point to transform.
  294. @return The transformed point.
  295. #end
  296. Method TransformWindowPointToView:Vec2i( point:Vec2i )
  297. Local t:=-_rmatrix * New Vec2f( point.x,point.y )
  298. Return New Vec2i( Round( t.x ),Round( t.y ) )
  299. End
  300. #rem monkeydoc Makes this view the key view.
  301. The key view is the view that receives keyboard events.
  302. #end
  303. Method MakeKeyView()
  304. Local oldKeyView:=App.KeyView
  305. If oldKeyView=Self Return
  306. If Not Active Return
  307. App.KeyView=Self
  308. If oldKeyView oldKeyView.OnKeyViewChanged( oldKeyView,Self )
  309. OnKeyViewChanged( oldKeyView,Self )
  310. End
  311. #rem monkeydoc Sends a key event to the view.
  312. #end
  313. Method SendKeyEvent( event:KeyEvent )
  314. If _acceptsKeyEvents
  315. OnKeyEvent( event )
  316. If event.Eaten Return
  317. Endif
  318. If _parent _parent.SendKeyEvent( event )
  319. End
  320. #rem monkeydoc Sends a mouse event to the view.
  321. #end
  322. Method SendMouseEvent( event:MouseEvent )
  323. If _acceptsMouseEvents
  324. OnMouseEvent( event.TransformToView( Self ) )
  325. If event.Eaten Return
  326. Endif
  327. If _parent _parent.SendMouseEvent( event )
  328. End
  329. #rem monkeydoc Checks if the view is a child of another view.
  330. #end
  331. Method IsChildOf:Bool( view:View )
  332. If view=Self Return True
  333. If _parent Return _parent.IsChildOf( view )
  334. Return False
  335. End
  336. #rem monkeydoc @hidden
  337. #end
  338. Method RequestRender()
  339. App.RequestRender()
  340. End
  341. #rem monkeydoc @hidden
  342. #end
  343. Method InvalidateStyle()
  344. _styleSeq=-1
  345. App.RequestRender()
  346. End
  347. #rem monkeydoc @hidden
  348. #end
  349. Method ValidateStyle()
  350. If _styleSeq=_themeSeq Return
  351. If _styleSeq<>-1
  352. Local name:=_style.Name
  353. If name
  354. Local style:=App.Theme.GetStyle( name )
  355. If style _style=style
  356. Endif
  357. Endif
  358. _rstyle=_style
  359. If Enabled
  360. _rstyle=_style.GetState( _styleState )
  361. Else
  362. _rstyle=_style.GetState( "disabled" )
  363. Endif
  364. _styleBounds=_rstyle.Bounds
  365. _styleSeq=_themeSeq
  366. OnValidateStyle()
  367. End
  368. Method MeasureLayoutSize:Vec2i()
  369. Measure()
  370. Return _layoutSize
  371. End
  372. Protected
  373. #rem monkeydoc @hidden
  374. #end
  375. Method Measure()
  376. ' If Not _visible Return
  377. For Local view:=Eachin _children
  378. view.Measure()
  379. Next
  380. ValidateStyle()
  381. Local size:=OnMeasure()
  382. If _minSize.x size.x=Max( size.x,_minSize.x )
  383. If _minSize.y size.y=Max( size.y,_minSize.y )
  384. If _maxSize.x size.x=Min( size.x,_maxSize.x )
  385. If _maxSize.y size.y=Min( size.y,_maxSize.y )
  386. _measuredSize=size
  387. _layoutSize=size+_styleBounds.Size
  388. End
  389. #rem monkeydoc @hidden
  390. #end
  391. Method UpdateLayout()
  392. _rect=New Recti( 0,0,_measuredSize )
  393. _bounds=_rect+_styleBounds
  394. _matrix=New AffineMat3f
  395. If _parent _matrix=_matrix.Translate( _frame.min.x,_frame.min.y )
  396. _matrix=_matrix.Translate( _offset.x,_offset.y )
  397. Select _layout
  398. Case "fill","resize"
  399. _rect=New Recti( 0,0,_frame.Size-_styleBounds.Size )
  400. _bounds=_rect+_styleBounds
  401. Case "fill-x"
  402. _rect.max.x=_frame.Width-_styleBounds.Width
  403. _bounds.min.x=_rect.min.x+_styleBounds.min.x
  404. _bounds.max.x=_rect.max.x+_styleBounds.max.x
  405. _matrix=_matrix.Translate( 0,(_frame.Height-_bounds.Height)*_gravity.y )
  406. Case "fill-y"
  407. _rect.max.y=_frame.Height-_styleBounds.Height
  408. _bounds.min.y=_rect.min.y+_styleBounds.min.y
  409. _bounds.max.y=_rect.max.y+_styleBounds.max.y
  410. _matrix=_matrix.Translate( (_frame.Width-_bounds.Width)*_gravity.x,0 )
  411. Case "float"
  412. _matrix=_matrix.Translate( (_frame.Width-_bounds.Width)*_gravity.x,(_frame.Height-_bounds.Height)*_gravity.y )
  413. _matrix.t.x=Round( _matrix.t.x )
  414. _matrix.t.y=Round( _matrix.t.y )
  415. Case "stretch"
  416. Local sx:=Float(_frame.Width)/_bounds.Width
  417. Local sy:=Float(_frame.Height)/_bounds.Height
  418. _matrix=_matrix.Scale( sx,sy )
  419. Case "stretch-int"
  420. Local sx:=Float(_frame.Width)/_bounds.Width
  421. Local sy:=Float(_frame.Height)/_bounds.Height
  422. If sx>1 sx=Floor( sx )
  423. If sy>1 sy=Floor( sy )
  424. _matrix=_matrix.Scale( sx,sy )
  425. Case "scale","letterbox"
  426. Local sx:=Float(_frame.Width)/_bounds.Width
  427. Local sy:=Float(_frame.Height)/_bounds.Height
  428. If sx<sy
  429. _matrix=_matrix.Translate( 0,(_frame.Height-_bounds.Height*sx)*_gravity.y )
  430. _matrix=_matrix.Scale( sx,sx )
  431. Else
  432. _matrix=_matrix.Translate( (_frame.Width-_bounds.Width*sy)*_gravity.x,0 )
  433. _matrix=_matrix.Scale( sy,sy )
  434. Endif
  435. Case "scale-int","letterbox-int"
  436. Local sx:=Float(_frame.Width)/_bounds.Width
  437. Local sy:=Float(_frame.Height)/_bounds.Height
  438. If sx>1 sx=Floor( sx )
  439. If sy>1 sy=Floor( sy )
  440. Local sc:=Min( sx,sy )
  441. _matrix=_matrix.Translate( (_frame.Width-_bounds.Width*sc)*_gravity.x,(_frame.Height-_bounds.Height*sc)*_gravity.y )
  442. _matrix=_matrix.Scale( sc,sc )
  443. End
  444. _matrix=_matrix.Translate( -_bounds.min.x,-_bounds.min.y )
  445. If _parent _rmatrix=_parent._rmatrix * _matrix Else _rmatrix=_matrix
  446. ' _rmatrix.t.x=Round( _rmatrix.t.x )
  447. ' _rmatrix.t.y=Round( _rmatrix.t.y )
  448. _rclip=TransformRecti( _rect,_rmatrix )
  449. _rbounds=TransformRecti( _bounds,_rmatrix )
  450. If _parent
  451. _rclip&=_parent._rclip
  452. _rbounds&=_parent._rclip
  453. _clip=TransformRecti( _rclip,-_rmatrix )
  454. Else
  455. _clip=_rclip
  456. End
  457. OnLayout()
  458. For Local view:=Eachin _children
  459. view.UpdateLayout()
  460. Next
  461. End
  462. #rem monkeydoc @hidden
  463. #end
  464. Method Render( canvas:Canvas )
  465. If Not _visible Return
  466. canvas.BeginRender( _bounds,_matrix )
  467. _rstyle.Render( canvas,New Recti( 0,0,_bounds.Size ) )
  468. canvas.Viewport=_rect
  469. OnRender( canvas )
  470. For Local view:=Eachin _children
  471. view.Render( canvas )
  472. Next
  473. canvas.EndRender()
  474. End
  475. Protected
  476. #rem monkeydoc Called during layout if [[Style]] or [[StyleState]] have changed.
  477. Views can use this method to cache [[RenderStyle]] properties if necessary.
  478. #end
  479. Method OnValidateStyle() Virtual
  480. End
  481. #rem monkeydoc Called during layout to measure the view.
  482. Overriding methods should return their preferred content size.
  483. #end
  484. Method OnMeasure:Vec2i() Virtual
  485. Return New Vec2i( 0,0 )
  486. End
  487. #rem monkeydoc Called during layout when the view needs to update its child views.
  488. Overriding methods should set the [[Frame]] property of any child views they are resposible for.
  489. #end
  490. Method OnLayout() Virtual
  491. End
  492. #rem monkeydoc Called when the view needs to render itself.
  493. #end
  494. Method OnRender( canvas:Canvas ) Virtual
  495. End
  496. #rem monkeydoc Called when the key view changes.
  497. This method is invoked on both the old key view and new key view when the key view changes.
  498. #end
  499. Method OnKeyViewChanged( oldKeyView:View,newKeyView:View ) Virtual
  500. End
  501. #rem monkeydoc Keyboard event handler.
  502. Called when a keyboard event is sent to this view.
  503. #end
  504. Method OnKeyEvent( event:KeyEvent ) Virtual
  505. End
  506. #rem monkeydoc Mouse event handler.
  507. Called when a mouse event is sent to this view.
  508. #end
  509. Method OnMouseEvent( event:MouseEvent ) Virtual
  510. End
  511. #rem monkeydoc The last size returned by OnMeasure.
  512. #end
  513. Property MeasuredSize:Vec2i()
  514. Return _measuredSize
  515. End
  516. #rem monkeydoc MeasuredSize plus the current [[RenderStyle]] bounds size.
  517. Use this instead of MeasuredSize when calculating layout size for child views.
  518. #end
  519. Property LayoutSize:Vec2i()
  520. Return _layoutSize
  521. End
  522. #rem monkeydoc The current [[RenderStyle]] bounds rect.
  523. #end
  524. Property StyleBounds:Recti()
  525. Return _styleBounds
  526. End
  527. '***** INTERNAL *****
  528. #rem monkeydoc @hidden
  529. For height-dependant-on-width views - clean me up!
  530. #end
  531. Method OnMeasure2:Vec2i( size:Vec2i ) Virtual
  532. Return New Vec2i( 0,0 )
  533. End
  534. #rem monkeydoc @hidden
  535. For height-dependant-on-width views - clean me up!
  536. #end
  537. Method Measure2:Vec2i( size:Vec2i )
  538. size=OnMeasure2( size-_styleBounds.Size )
  539. If size.x And size.y _layoutSize=size+_styleBounds.Size
  540. Return _layoutSize
  541. End
  542. #rem monkeydoc @hidden
  543. #end
  544. Method SetWindow( window:Window )
  545. _window=window
  546. For Local view:=Eachin _children
  547. view.SetWindow( window )
  548. Next
  549. End
  550. #rem monkeydoc @hidden
  551. #end
  552. Method UpdateActive()
  553. 'Note: views are activated top-down, deactivated bottom-up.
  554. '
  555. Local active:=_visible And _enabled And _window And (Not _parent Or _parent._active )
  556. Local changed:=active<>_active
  557. If changed
  558. _active=active
  559. If Not _active Deactivated()
  560. Endif
  561. For Local child:=Eachin _children
  562. child.UpdateActive()
  563. Next
  564. If changed And _active Activated()
  565. End
  566. Private
  567. Global _themeSeq:Int
  568. Field _styleSeq:Int=-1
  569. Field _parent:View
  570. Field _window:Window
  571. Field _children:=New Stack<View>
  572. Field _visible:Bool=True
  573. Field _enabled:Bool=True
  574. Field _active:Bool=False
  575. Field _acceptsKeyEvents:Bool=True
  576. Field _acceptsMouseEvents:Bool=True
  577. Field _style:Style
  578. Field _styleState:String
  579. Field _layout:String="fill"
  580. Field _gravity:=New Vec2f( .5,.5 )
  581. Field _offset:=New Vec2i( 0,0 )
  582. Field _minSize:Vec2i
  583. Field _maxSize:Vec2i
  584. Field _frame:Recti
  585. 'After measuring...
  586. Field _rstyle:Style
  587. Field _styleBounds:Recti
  588. Field _measuredSize:Vec2i
  589. Field _layoutSize:Vec2i
  590. 'After layout..
  591. Field _rect:Recti
  592. Field _bounds:Recti
  593. Field _matrix:AffineMat3f
  594. Field _rmatrix:AffineMat3f
  595. Field _rbounds:Recti
  596. Field _rclip:Recti
  597. Field _clip:Recti
  598. End