Interactive Widgets (with DataModels)

This is a list of Widgets with DataModels. This means the widget is intended to interact with the user.

CheckBox

class CheckBox(Widget, ValueModelHelper):

A CheckBox is an option button that can be switched on (checked) or off (unchecked). Checkboxes are typically used to represent features in an application that can be enabled or disabled without affecting others.The checkbox is implemented using the model-view pattern. The model is the central component of this system. It is the application’s dynamic data structure independent of the widget. It directly manages the data, logic, and rules of the checkbox. If the model is not specified, the simple one is created automatically when the object is constructed.

DataModel:

SimpleBoolModel see: SimpleBoolModel

Additional Information:

More...

Keyword Arguments:

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.




ColorWidget

class ColorWidget(Widget, ItemModelHelper):

The ColorWidget widget is a button that displays the color from the item model and can open a picker window to change the color.

DataModel:

AbstractItemModel see: AbstractItemModel

Additional Information:

More...

Keyword Arguments:

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.




ComboBox

class ComboBox(Widget, ItemModelHelper):

The ComboBox widget is a combined button and a drop-down list.A combo box is a selection widget that displays the current item and can pop up a list of selectable items.The ComboBox is implemented using the model-view pattern. The model is the central component of this system. The root of the item model should contain the index of currently selected items, and the children of the root include all the items of the combo box.

DataModel:

AbstractItemModel see: AbstractItemModel

Additional Information:

More...

Keyword Arguments:

arrow_only : bool

Determines if it’s necessary to hide the text of the ComboBox.

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.




FloatDrag

class FloatDrag(FloatSlider, AbstractSlider, Widget, ValueModelHelper):

The drag widget that looks like a field but it’s possible to change the value with dragging.

DataModel:

SimpleFloatModel see: SimpleFloatModel

Additional Information:

More...

Keyword Arguments:

min : float

This property holds the slider’s minimum value.

max : float

This property holds the slider’s maximum value.

step : float

This property controls the steping speed on the drag.

format : str

This property overrides automatic formatting if needed.

precision : uint32_t

This property holds the slider value’s float precision.

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.




FloatField

class FloatField(AbstractField, Widget, ValueModelHelper):

The FloatField widget is a one-line text editor with a string model.

DataModel:

SimpleFloatModel see: SimpleFloatModel

Additional Information:

More...

Keyword Arguments:

precision : uint32_t

This property holds the field value’s float precision.

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.


Properies / Methods

def precision(self) -> int:

This property holds the field value’s float precision. type : int

def precision(self, arg1: int) -> None:

This property holds the field value’s float precision.




FloatSlider

class FloatSlider(AbstractSlider, Widget, ValueModelHelper):

The slider is the classic widget for controlling a bounded value. It lets the user move a slider handle along a horizontal groove and translates the handle’s position into a float value within the legal range.

DataModel:

SimpleFloatModel see: SimpleFloatModel

Additional Information:

More...

Keyword Arguments:

min : float

This property holds the slider’s minimum value.

max : float

This property holds the slider’s maximum value.

step : float

This property controls the steping speed on the drag.

format : str

This property overrides automatic formatting if needed.

precision : uint32_t

This property holds the slider value’s float precision.

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.


Properies / Methods

def format(self) -> str:

This property overrides automatic formatting if needed. type : str

def format(self, arg1: str) -> None:

This property overrides automatic formatting if needed.

def max(self) -> float:

This property holds the slider’s maximum value. type : float

def max(self, arg1: float) -> None:

This property holds the slider’s maximum value.

def min(self) -> float:

This property holds the slider’s minimum value. type : float

def min(self, arg1: float) -> None:

This property holds the slider’s minimum value.

def precision(self) -> int:

This property holds the slider value’s float precision. type : int

def precision(self, arg1: int) -> None:

This property holds the slider value’s float precision.

def step(self) -> float:

This property controls the steping speed on the drag. type : float

def step(self, arg1: float) -> None:

This property controls the steping speed on the drag.




IntDrag

class IntDrag(IntSlider, AbstractSlider, Widget, ValueModelHelper):

The drag widget that looks like a field but it’s possible to change the value with dragging.

DataModel:

SimpleIntModel see: SimpleIntModel

Additional Information:

More...

Keyword Arguments:

step :

This property controls the steping speed on the drag, its float to enable slower speed, but of course the value on the Control are still integer.

min :

This property holds the slider’s minimum value.

max :

This property holds the slider’s maximum value.

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.


Properies / Methods

def step(self) -> float:

This property controls the steping speed on the drag, its float to enable slower speed, but of course the value on the Control are still integer. type : float

def step(self, arg1: float) -> None:

This property controls the steping speed on the drag, its float to enable slower speed, but of course the value on the Control are still integer.




IntField

class IntField(AbstractField, Widget, ValueModelHelper):

The IntField widget is a one-line text editor with a string model.

DataModel:

SimpleIntModel see: SimpleIntModel

Additional Information:

More...

Keyword Arguments:

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.




IntSlider

class IntSlider(AbstractSlider, Widget, ValueModelHelper):

The slider is the classic widget for controlling a bounded value. It lets the user move a slider handle along a horizontal groove and translates the handle’s position into an integer value within the legal range.

DataModel:

SimpleIntModel see: SimpleIntModel

Additional Information:

More...

Keyword Arguments:

min :

This property holds the slider’s minimum value.

max :

This property holds the slider’s maximum value.

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.


Properies / Methods

def max(self) -> int:

This property holds the slider’s maximum value. type : int

def max(self, arg1: int) -> None:

This property holds the slider’s maximum value.

def min(self) -> int:

This property holds the slider’s minimum value. type : int

def min(self, arg1: int) -> None:

This property holds the slider’s minimum value.




MultiFloatDragField

class MultiFloatDragField(AbstractMultiField, Widget, ItemModelHelper):

MultiFloatDragField is the widget that has a sub widget (FloatDrag) per model item.It’s handy to use it for multi-component data, like for example, float3 or color.

DataModel:

AbstractItemModel see: AbstractItemModel

Additional Information:

More...

Keyword Arguments:

min :

This property holds the drag’s minimum value.

max :

This property holds the drag’s maximum value.

step :

This property controls the steping speed on the drag.

column_count :

The max number of fields in a line.

h_spacing :

Sets a non-stretchable horizontal space in pixels between child fields.

v_spacing :

Sets a non-stretchable vertical space in pixels between child fields.

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.


Properies / Methods

def max(self) -> float:

This property holds the drag’s maximum value. type : float

def max(self, arg1: float) -> None:

This property holds the drag’s maximum value.

def min(self) -> float:

This property holds the drag’s minimum value. type : float

def min(self, arg1: float) -> None:

This property holds the drag’s minimum value.

def step(self) -> float:

This property controls the steping speed on the drag. type : float

def step(self, arg1: float) -> None:

This property controls the steping speed on the drag.




MultiFloatField

class MultiFloatField(AbstractMultiField, Widget, ItemModelHelper):

MultiFloatField is the widget that has a sub widget (FloatField) per model item.It’s handy to use it for multi-component data, like for example, float3 or color.

DataModel:

AbstractItemModel see: AbstractItemModel

Additional Information:

More...

Keyword Arguments:

column_count :

The max number of fields in a line.

h_spacing :

Sets a non-stretchable horizontal space in pixels between child fields.

v_spacing :

Sets a non-stretchable vertical space in pixels between child fields.

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.




MultiIntDragField

class MultiIntDragField(AbstractMultiField, Widget, ItemModelHelper):

MultiIntDragField is the widget that has a sub widget (IntDrag) per model item.It’s handy to use it for multi-component data, like for example, int3.

DataModel:

AbstractItemModel see: AbstractItemModel

Additional Information:

More...

Keyword Arguments:

min :

This property holds the drag’s minimum value.

max :

This property holds the drag’s maximum value.

step :

This property controls the steping speed on the drag.

column_count :

The max number of fields in a line.

h_spacing :

Sets a non-stretchable horizontal space in pixels between child fields.

v_spacing :

Sets a non-stretchable vertical space in pixels between child fields.

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.


Properies / Methods

def max(self) -> int:

This property holds the drag’s maximum value. type : int

def max(self, arg1: int) -> None:

This property holds the drag’s maximum value.

def min(self) -> int:

This property holds the drag’s minimum value. type : int

def min(self, arg1: int) -> None:

This property holds the drag’s minimum value.

def step(self) -> float:

This property controls the steping speed on the drag. type : float

def step(self, arg1: float) -> None:

This property controls the steping speed on the drag.




MultiIntField

class MultiIntField(AbstractMultiField, Widget, ItemModelHelper):

MultiIntField is the widget that has a sub widget (IntField) per model item.It’s handy to use it for multi-component data, like for example, int3.

DataModel:

AbstractItemModel see: AbstractItemModel

Additional Information:

More...

Keyword Arguments:

column_count :

The max number of fields in a line.

h_spacing :

Sets a non-stretchable horizontal space in pixels between child fields.

v_spacing :

Sets a non-stretchable vertical space in pixels between child fields.

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.




MultiStringField

class MultiStringField(AbstractMultiField, Widget, ItemModelHelper):

MultiStringField is the widget that has a sub widget (StringField) per model item.It’s handy to use it for string arrays.

DataModel:

AbstractItemModel see: AbstractItemModel

Additional Information:

More...

Keyword Arguments:

column_count :

The max number of fields in a line.

h_spacing :

Sets a non-stretchable horizontal space in pixels between child fields.

v_spacing :

Sets a non-stretchable vertical space in pixels between child fields.

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.




ProgressBar

class ProgressBar(Widget, ValueModelHelper):

A progressbar is a classic widget for showing the progress of an operation.

DataModel:

AbstractValueModel see: AbstractValueModel

Additional Information:

More...

Keyword Arguments:

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.




RadioCollection

class RadioCollection(ValueModelHelper):

Radio Collection is a class that groups RadioButtons and coordinates their state.It makes sure that the choice is mutually exclusive, it means when the user selects a radio button, any previously selected radio button in the same collection becomes deselected.

DataModel:

SimpleIntModel see: SimpleIntModel

Additional Information:

More...

Keyword Arguments:




StringField

class StringField(AbstractField, Widget, ValueModelHelper):

The StringField widget is a one-line text editor with a string model.

DataModel:

SimpleStringModel see: SimpleStringModel

Additional Information:

More...

Keyword Arguments:

password_mode :

This property holds the password mode. If the field is in the password mode when the entered text is obscured.

read_only :

This property holds if the field is read-only.

multiline :

Multiline allows to press enter and create a new line.

allow_tab_input :

This property holds if the field allows Tab input.

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.


Properies / Methods

def allow_tab_input(self) -> bool:

This property holds if the field allows Tab input. type : bool

def allow_tab_input(self, arg1: bool) -> None:

This property holds if the field allows Tab input.

def multiline(self) -> bool:

Multiline allows to press enter and create a new line. type : bool

def multiline(self, arg1: bool) -> None:

Multiline allows to press enter and create a new line.

def password_mode(self) -> bool:

This property holds the password mode. If the field is in the password mode when the entered text is obscured. type : bool

def password_mode(self, arg1: bool) -> None:

This property holds the password mode. If the field is in the password mode when the entered text is obscured.

def read_only(self) -> bool:

This property holds if the field is read-only. type : bool

def read_only(self, arg1: bool) -> None:

This property holds if the field is read-only.




ToolButton

class ToolButton(Button, InvisibleButton, Widget, ValueModelHelper):

ToolButton is functionally similar to Button, but provides a model that determines if the button is checked. This button toggles between checked (on) and unchecked (off) when the user clicks it.

DataModel:

SimpleBoolModel see: SimpleBoolModel

Additional Information:

More...

Keyword Arguments:

text : str

This property holds the button’s text.

image_url : str

This property holds the button’s optional image URL.

image_width : float

This property holds the width of the image widget. Do not use this function to find the width of the image.

image_height : float

This property holds the height of the image widget. Do not use this function to find the height of the image.

spacing : float

Sets a non-stretchable space in points between image and text.

clicked_fn : Callable[[], None]

Sets the function that will be called when when the button is activated (i.e., pressed down then released while the mouse cursor is inside the button).

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.




TreeView

class TreeView(Widget, ItemModelHelper):

TreeView is a widget that presents a hierarchical view of information. Each item can have a number of subitems. An indentation often visualizes this in a list. An item can be expanded to reveal subitems, if any exist, and collapsed to hide subitems.TreeView can be used in file manager applications, where it allows the user to navigate the file system directories. They are also used to present hierarchical data, such as the scene object hierarchy.TreeView uses a model/view pattern to manage the relationship between data and the way it is presented. The separation of functionality gives developers greater flexibility to customize the presentation of items and provides a standard interface to allow a wide range of data sources to be used with other widgets.TreeView is responsible for the presentation of model data to the user and processing user input. To allow some flexibility in the way the data is presented, the creation of the sub-widgets is performed by the delegate. It provides the ability to customize any sub-item of TreeView.

DataModel:

AbstractItemModel see: AbstractItemModel

Additional Information:

More...

Keyword Arguments:

delegate :

The Item delegate that generates a widget per item.

header_visible :

This property holds if the header is shown or not.

selection :

Set current selection.

expand_on_branch_click :

This flag allows to prevent expanding when the user clicks the plus icon. It’s used in the case the user wants to control how the items expanded or collapsed.

keep_alive :

When true, the tree nodes are never destroyed even if they are disappeared from the model. It’s useul for the temporary filtering if it’s necessary to display thousands of nodes.

keep_expanded :

Expand all the nodes and keep them expanded regardless their state.

drop_between_items :

When true, the tree nodes can be dropped between items.

column_widths :

Widths of the columns. If not set, the width is Fraction(1).

columns_resizable :

When true, the columns can be resized with the mouse.

selection_changed_fn :

Set the callback that is called when the selection is changed.

root_expanded :

The expanded state of the root item. Changing this flag doesn’t make the children repopulated.

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.


Properies / Methods

def call_selection_changed_fn(self, arg0: typing.List[AbstractItem]) -> None:

Set the callback that is called when the selection is changed.

def clear_selection(self) -> None:

Deselects all selected items.

def dirty_widgets(self) -> None:

When called, it will make the delegate to regenerate all visible widgets the next frame.

def extend_selection(self, item: AbstractItem) -> None:

Extends the current selection selecting all the items between currently selected nodes and the given item. It’s when user does shift+click.

def has_selection_changed_fn(self) -> bool:

Set the callback that is called when the selection is changed.

def is_expanded(self, item: AbstractItem) -> bool:

Returns true if the given item is expanded.

def set_expanded(self, item: AbstractItem, expanded: bool, recursive: bool) -> None:

Sets the given item expanded or collapsed. ### Arguments: item : The item to expand or collapse. expanded : True if it’s necessary to expand, false to collapse. recursive : True if it’s necessary to expand children.

def set_selection_changed_fn(self, fn: typing.Callable[[typing.List[AbstractItem]], None]) -> None:

Set the callback that is called when the selection is changed.

def toggle_selection(self, item: AbstractItem) -> None:

Switches the selection state of the given item.

def column_widths(self) -> typing.List[Length]:

Widths of the columns. If not set, the width is Fraction(1). type : typing.List[Length]

def column_widths(self, arg1: typing.List[Length]) -> None:

Widths of the columns. If not set, the width is Fraction(1).

def columns_resizable(self) -> bool:

When true, the columns can be resized with the mouse. type : bool

def columns_resizable(self, arg1: bool) -> None:

When true, the columns can be resized with the mouse.

def drop_between_items(self) -> bool:

When true, the tree nodes can be dropped between items. type : bool

def drop_between_items(self, arg1: bool) -> None:

When true, the tree nodes can be dropped between items.

def expand_on_branch_click(self) -> bool:

This flag allows to prevent expanding when the user clicks the plus icon. It’s used in the case the user wants to control how the items expanded or collapsed. type : bool

def expand_on_branch_click(self, arg1: bool) -> None:

This flag allows to prevent expanding when the user clicks the plus icon. It’s used in the case the user wants to control how the items expanded or collapsed.

def header_visible(self) -> bool:

This property holds if the header is shown or not. type : bool

def header_visible(self, arg1: bool) -> None:

This property holds if the header is shown or not.

def keep_alive(self) -> bool:

When true, the tree nodes are never destroyed even if they are disappeared from the model. It’s useul for the temporary filtering if it’s necessary to display thousands of nodes. type : bool

def keep_alive(self, arg1: bool) -> None:

When true, the tree nodes are never destroyed even if they are disappeared from the model. It’s useul for the temporary filtering if it’s necessary to display thousands of nodes.

def keep_expanded(self) -> bool:

Expand all the nodes and keep them expanded regardless their state. type : bool

def keep_expanded(self, arg1: bool) -> None:

Expand all the nodes and keep them expanded regardless their state.

def root_expanded(self) -> bool:

The expanded state of the root item. Changing this flag doesn’t make the children repopulated. type : bool

def root_expanded(self, arg1: bool) -> None:

The expanded state of the root item. Changing this flag doesn’t make the children repopulated.

def root_visible(self) -> bool:

This property holds if the root is shown. It can be used to make a single level tree appear like a simple list. type : bool

def root_visible(self, arg1: bool) -> None:

This property holds if the root is shown. It can be used to make a single level tree appear like a simple list.

def selection(self) -> typing.List[AbstractItem]:

Set current selection. type : typing.List[AbstractItem]

def selection(self, arg1: typing.List[AbstractItem]) -> None:

Set current selection.




UIntDrag

class UIntDrag(UIntSlider, AbstractSlider, Widget, ValueModelHelper):

DataModel:

SimpleIntModel see: SimpleIntModel

Additional Information:

More...

Keyword Arguments:

step :

This property controls the steping speed on the drag, its float to enable slower speed, but of course the value on the Control are still integer.

min :

This property holds the slider’s minimum value.

max :

This property holds the slider’s maximum value.

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.


Properies / Methods

def step(self) -> float:

This property controls the steping speed on the drag, its float to enable slower speed, but of course the value on the Control are still integer. type : float

def step(self, arg1: float) -> None:

This property controls the steping speed on the drag, its float to enable slower speed, but of course the value on the Control are still integer.




UIntSlider

class UIntSlider(AbstractSlider, Widget, ValueModelHelper):

The slider is the classic widget for controlling a bounded value. It lets the user move a slider handle along a horizontal groove and translates the handle’s position into an integer value within the legal range.The difference with IntSlider is that UIntSlider has unsigned min/max.

DataModel:

SimpleIntModel see: SimpleIntModel

Additional Information:

More...

Keyword Arguments:

min :

This property holds the slider’s minimum value.

max :

This property holds the slider’s maximum value.

width : ui.Length

This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen.

height : ui.Length

This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen.

name : str

The name of the widget that user can set.

style_type_name_override : str

By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style.

identifier : str

An optional identifier of the widget we can use to refer to it in queries.

visible : bool

This property holds whether the widget is visible.

visibleMin : float

If the current zoom factor and DPI is less than this value, the widget is not visible.

visibleMax : float

If the current zoom factor and DPI is bigger than this value, the widget is not visible.

tooltip : str

Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style

tooltip_fn : Callable

Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly.

tooltip_offset_x : float

Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

tooltip_offset_y : float

Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown.

enabled : bool

This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled.

selected : bool

This property holds a flag that specifies the widget has to use eSelected state of the style.

checked : bool

This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked.

dragging : bool

This property holds if the widget is being dragged.

opaque_for_mouse_events : bool

If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either

skip_draw_when_clipped : bool

The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list.

mouse_moved_fn : Callable

Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier)

mouse_pressed_fn : Callable

Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key.

mouse_released_fn : Callable

Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_double_clicked_fn : Callable

Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier)

mouse_wheel_fn : Callable

Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier)

mouse_hovered_fn : Callable

Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered)

drag_fn : Callable

Specify that this Widget is draggable, and set the callback that is attached to the drag operation.

accept_drop_fn : Callable

Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted.

drop_fn : Callable

Specify that this Widget accepts drops and set the callback to the drop operation.

computed_content_size_changed_fn : Callable

Called when the size of the widget is changed.


Properies / Methods

def max(self) -> int:

This property holds the slider’s maximum value. type : int

def max(self, arg1: int) -> None:

This property holds the slider’s maximum value.

def min(self) -> int:

This property holds the slider’s minimum value. type : int

def min(self, arg1: int) -> None:

This property holds the slider’s minimum value.