Creates a GLCanvas attached to the specified parent.
Returns the background color.
Sets the background color.
Draw the canvas.
Set whether to draw the widget border or not.
Return whether the widget border gets drawn or not.
Draw the GL scene. Override this method to draw the actual GL content.
Internal helper function for drawing the widget border
The background color (what is used with `glClearColor`).
Whether to draw the widget border or not.
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.
\class GLCanvas glcanvas.d
\brief Canvas widget for rendering OpenGL content. This widget was contributed by Jan Winkler.
Canvas widget that can be used to display arbitrary OpenGL content. This is useful to display and manipulate 3D objects as part of an interactive application. The implementation uses scissoring to ensure that rendered objects don't spill into neighboring widgets.
\rst **Usage** Override :func:nanogui.GLCanvas.drawGL in subclasses to provide custom drawing code.
\endrst