mojo.app.View - nitrologic/monkey2 GitHub Wiki
Class View
The View class.
Fields | |
---|---|
Activated | Invoked when a view becomes visible and active. |
Deactivated | Invoked when a view is no longer visible or active. |
Constructors | |
---|---|
New |
Properties | |
---|---|
AcceptsKeyEvents | Whether the view accepts key events. |
AcceptsMouseEvents | Whether the view accepts mouse events. |
Active | View active state. (read only) |
ClipRect | View clip rect. (read only) |
Enabled | View enabled state. |
Frame | View frame rect. |
Gravity | Gravity for floating views. |
Height | Height of the view content rect. (read only) |
Layout | Layout mode. |
MaxSize | Maximum view size. |
MinSize | Minimum view size. |
MouseLocation | Mouse location relative to the view. (read only) |
Parent | The parent view of this view. (read only) |
Rect | View content rect. (read only) |
RenderStyle | View render style. (read only) |
Style | View style. |
StyleState | View style state. |
Visible | View visibility state. |
Width | Width of the view content rect. (read only) |
Window | The Window this view is attached to, if any. (read only) |
Methods | |
---|---|
AddChildView | Adds a child view to this view. |
GetStyle | Gets a style. |
IsChildOf | Checks if the view is a child of another view. |
MakeKeyView | Makes this view the key view. |
MeasureLayoutSize | |
RemoveChildView | Removes a child view from this view. |
SendKeyEvent | Sends a key event to the view. |
SendMouseEvent | Sends a mouse event to the view. |
TransformPointFromView | Transforms a point from another view. |
TransformPointToView | Transforms a point to another view. |
TransformRectFromView | Transforms a rect from another view. |
TransformRectToView | Transforms a rect to another view. |
TransformWindowPointToView | Transforms a point in window coordinates to view coordinates. |
Protected properties | |
---|---|
LayoutSize | MeasuredSize plus the current RenderStyle bounds size. (read only) |
MeasuredSize | The last size returned by OnMeasure. (read only) |
StyleBounds | The current RenderStyle bounds rect. (read only) |
Protected methods | |
---|---|
OnKeyEvent | Keyboard event handler. |
OnKeyViewChanged | Called when the key view changes. |
OnLayout | Called during layout when the view needs to update its child views. |
OnMeasure | Called during layout to measure the view. |
OnMouseEvent | Mouse event handler. |
OnRender | Called when the view needs to render itself. |
OnThemeChanged | Called during layout if theme has changed. |
OnValidateStyle | Called during layout if Style or StyleState have changed. |