Adds a CheckBox to the specified parent.
Returns the current callback of this CheckBox.
Sets the callback to be executed when this CheckBox is checked / unchecked.
The caption of this CheckBox.
Sets the caption of this CheckBox.
Whether or not this CheckBox is currently checked.
Sets whether or not this CheckBox is currently checked.
Draws this CheckBox.
The mouse button callback will return true when all three conditions are met:
The preferred size of this CheckBox.
Whether or not this CheckBox is currently pushed. See nanogui.CheckBox.mPushed.
Sets whether or not this CheckBox is currently pushed. See nanogui.CheckBox.mPushed.
The function to execute when nanogui.CheckBox.mChecked is changed.
The caption text of this CheckBox.
Whether or not this CheckBox is currently checked or unchecked.
Internal tracking variable to distinguish between mouse click and release. nanogui.CheckBox.mCallback is only called upon release. See nanogui.CheckBox.mouseButtonEvent for specific conditions.
Return the parent widget
Return the parent widget
Set the parent widget
Return the used nanogui.layout.Layout generator
Return the used nanogui.layout.Layout generator
Set the used nanogui.layout.Layout generator
Return the nanogui.theme.Theme used to draw this widget
Set the nanogui.theme.Theme used to draw this widget
Return the position relative to the parent widget
Set the position relative to the parent widget
Return the absolute position on screen
Return the size of the widget
set the size of the widget
Return the width of the widget
Set the width of the widget
Return the height of the widget
Set the height of the widget
Set the fixed size of this widget
Return the fixed size
Return the fixed width (see fixedSize)
Return the fixed height (see fixedSize)
Set the fixed width (see fixedSize)
Set the fixed height (see fixedSize)
Return whether or not the widget is currently visible (assuming all parents are visible)
Set whether or not the widget is currently visible (assuming all parents are visible)
Check if this widget is currently visible, taking parent widgets into account
Return the number of child widgets
Return the list of child widgets of the current widget
Add a child widget to the current widget at the specified index.
Convenience function which appends a widget at the end
Remove a child widget by index
Remove a child widget by value
Retrieves the child at the specific position
Retrieves the child at the specific position
Returns the index of a specific child or -1 if not found
Variadic shorthand notation to construct and add a child widget
Walk up the hierarchy and return the parent window
Walk up the hierarchy and return the parent screen
Associate this widget with an ID value (optional)
Return the ID value associated with this widget, if any
Return whether or not this widget is currently enabled
Set whether or not this widget is currently enabled
Return whether or not this widget is currently focused
Set whether or not this widget is currently focused
Request the focus to be moved to this widget
Return current font size. If not set the default of the current theme will be returned
Set the font size of this widget
Return whether the font size is explicitly specified for this widget
The amount of extra scaling applied to *icon* fonts. See nanogui.Widget.mIconExtraScale.
Sets the amount of extra scaling applied to *icon* fonts. See nanogui.Widget.mIconExtraScale.
Return a pointer to the cursor of the widget
Set the cursor of the widget
Check if the widget contains a certain position
Determine the widget located at the given position value (recursive)
Handle a mouse button event (default implementation: propagate to children)
Handle a mouse motion event (default implementation: propagate to children)
Handle a mouse drag event (default implementation: do nothing)
Handle a mouse enter/leave event (default implementation: record this fact, but do nothing)
Handle a mouse scroll event (default implementation: propagate to children)
Handle a focus change event (default implementation: record the focus status, but do nothing)
Handle a keyboard event (default implementation: do nothing)
Handle text input (UTF-32 format) (default implementation: do nothing)
Compute the preferred size of the widget
Compute the preferred size of the widget considering its child except skipped one (for example button panel of window)
Invoke the associated layout generator to properly place child widgets, if any
Draw the widget (and all child widgets)
Free all resources used by the widget and any children
Convenience definition for subclasses to get the full icon scale for this class of Widget. It simple returns the value mTheme.mIconScale * this.mIconExtraScale.
Whether or not this Widget is currently visible. When a Widget is not currently visible, no time is wasted executing its drawing method.
Whether or not this Widget is currently enabled. Various different kinds of derived types use this to determine whether or not user input will be accepted. For example, when `mEnabled == false`, the state of a CheckBox cannot be changed, or a TextBox will not allow new input.
The amount of extra icon scaling used in addition the the theme's default icon font scale. Default value is `1.0`, which implies that icon_scale simply returns the value of nanogui.Theme.mIconScale.
Two-state check box widget.
Remarks: This class overrides nanogui.Widget.mIconExtraScale to be 1.2f, which affects all subclasses of this Widget. Subclasses must explicitly set a different value if needed (e.g., in their constructor).