33. gui.toolbar — Toolbars for the pyFormex GUI. — pyFormex 1.0.5 documentation

# 33. `gui.toolbar` — Toolbars for the pyFormex GUI.

This module defines the functions for creating the pyFormex window toolbars.

## 33.1. Functions defined in module gui.toolbar

`gui.toolbar.` `addButton`(toolbar, tooltip, icon, func, repeat=False, toggle=False, checked=False, icon0=None, enabled=True)

  Add a button to a toolbar.

  - toolbar: the toolbar where the button will be added
  - tooltip: the text to appear as tooltip
  - icon: name of the icon to be displayed on the button,
  - func: function to be called when the button is pressed,
  - repeat: if True, the func will repeatedly be called if button is held down.
  - toggle: if True, the button is a toggle and stays in depressed state until pressed again.
  - checked: initial state for a toggle buton.
  - icon1: for a toggle button, icon to display when button is not checked.

`gui.toolbar.` `removeButton`(toolbar, button)

  Remove a button from a toolbar.

`gui.toolbar.` `addActionButtons`(toolbar)

  Add the script action buttons to the toolbar.

`gui.toolbar.` `addCameraButtons`(toolbar)

  Add the camera buttons to a toolbar.

`gui.toolbar.` `toggleButton`(attr, state=None)

  Update the corresponding viewport attribute.

  This does not update the button state.

`gui.toolbar.` `updateButton`(button, attr)

  Update the button to correct state.

`gui.toolbar.` `updateWireButton`()

  Update the wire button to correct state.

`gui.toolbar.` `updateTransparencyButton`()

  Update the transparency button to correct state.

`gui.toolbar.` `updateLightButton`()

  Update the light button to correct state.

`gui.toolbar.` `updateNormalsButton`(state=True)

  Update the normals button to correct state.

`gui.toolbar.` `updatePerspectiveButton`()

  Update the normals button to correct state.

`gui.toolbar.` `addTimeoutButton`(toolbar)

  Add or remove the timeout button,depending on cfg.

`gui.toolbar.` `timeout`(onoff=None)

  Programmatically toggle the timeout button