Input Widget Controls#

The Input Widget is the widget on the left of the screen that is created when an input box such as a slider is added. Multiple tabs can be added using squap.add_input_table().

squap.add_tab(name=None)[source]#

Adds a new table as a tab with name name.

Returns:

The created table.

Return type:

InputTable

squap.set_active_tab(
*args,
index=None,
tab=None,
name=None,
)[source]#

Set active tab using one of the possible arguments. Use exactly one.

Parameters:
  • *args (int or InputTable or str, optional) – One of the possible arguments, automatically determined which it is by given type.

  • index (int, optional) – Index of the tab to select. Defaults to None.

  • tab (InputTable, optional) – The tab to select. Defaults to None.

  • name (str, optional) – Name of the tab to select. Defaults to None.

Returns:

The InputTable belonging to the selected tab.

Return type:

InputTable

squap.get_active_tab()[source]#

Get active tab.

Returns:

The InputTable belonging to the selected tab.

Return type:

InputTable

squap.on_tab_change(func)[source]#

Adds function func to the functions that are called whenever the current tab is changed.

squap.set_input_partition(
fraction=0.3333333333333333,
)[source]#

Set the position of the partition between the 2 columns of all input tables, and any newly created ones. Use table.set_partition to set different partitions for different tables when you have multiple tabs.

Parameters:

fraction (float) – value between 0 and 1, specifying the portion of the input table taken up by the text. Starts off at 1/3.

squap.set_input_width(
fraction=0.3333333333333333,
)[source]#

Set the fraction of the window taken up by the input widget.

Parameters:

fraction (float, optional) – value between 0 and 1, specifying the fraction of the window taken up by the input widget. Starts off at 1/3.

squap.get_all_boxes()[source]#
Returns:

A list containing all boxes that exist at this time.

Return type:

list of Box