Input Table#

class squap.widgets.input_widget.InputTable(width, height, name, window)[source]#
rename(name)[source]#

Renames the table. The name is only visible when multiple tabs are present.

get_boxes()[source]#

Returns a list containing all boxes that exist at this point.

Returns:

list of all boxes added in order.

Return type:

list of Box

remove_row(
remove_row,
remove_box,
)[source]#

Remove box remove_box from row remove_row.

Parameters:
  • remove_row (int) – row from which to remove the box.

  • remove_box (Box) – Box to remove.

set_partition(
fraction=0.3333333333333333,
)[source]#

Sets the position of the partition between the 2 columns of the InputTable.

Parameters:

fraction (float) – float between 0 and 1, specifying the portion of the window taken up by the partition. Starts off as 1/3.

add_slider(
name,
init_value=1.0,
min_value=0.0,
max_value=10.0,
n_ticks=51,
tick_interval=None,
only_ints=False,
logscale=False,
custom_arr=None,
var_name=None,
print_value=False,
row=None,
)[source]#

Creates a slider with the given parameters, and adds it to this input table. See squap.add_slider() for initialisation information.

Returns:

The created slider widget.

Return type:

Slider

add_checkbox(
name,
init_value=False,
var_name=None,
print_value=False,
row=None,
)[source]#

Creates a checkbox with the given parameters, and adds it to this input table. See squap.add_checkbox() for initialisation information.

Returns:

The created checkbox widget.

Return type:

CheckBox

add_inputbox(
name,
init_value=1.0,
type_func=None,
var_name=None,
print_value=False,
row=None,
)[source]#

Creates an inputbox with the given parameters, and adds it to this input table. See squap.add_inputbox() for initialisation information.

Returns:

The created inputbox widget.

Return type:

InputBox

add_button(
name,
func=None,
row=None,
)[source]#

Creates a button with name name and bound function func, and adds it to this input table. See squap.add_button() for initialisation information.

Returns:

The created button widget.

Return type:

Button

add_dropdown(
name,
options,
init_index=0,
option_names=None,
var_name=None,
print_value=False,
row=None,
)[source]#

Creates a dropdown widget with the given parameters, and adds it to this input table. See squap.add_dropdown() for initialisation information.

Returns:

The created dropwdown widget.

Return type:

Dropdown

add_rate_slider(
name,
init_value=1.0,
change_rate=10.0,
absolute=False,
time_var=None,
custom_func=None,
var_name=None,
print_value=False,
row=None,
)[source]#

Creates a RateSlider with the given parameters, and adds it to this input table. See squap.add_rate_slider() for initialisation information.

Returns:

The created rate_slider widget.

Return type:

RateSlider

add_color_picker(
name,
init_value=(255, 255, 255),
var_name=None,
print_value=False,
row=None,
)[source]#

Creates a ColorPicker with the gives parameters, and adds it to this input table. See squap.add_color_picker() for initialisation information.

Returns:

The created color_picker widget.

Return type:

ColorPicker