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)[source]

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)[source]

Remove a button from a toolbar.

gui.toolbar.addActionButtons(toolbar)[source]

Add the script action buttons to the toolbar.

gui.toolbar.addCameraButtons(toolbar)[source]

Add the camera buttons to a toolbar.

gui.toolbar.toggleButton(attr, state=None)[source]

Update the corresponding viewport attribute.

This does not update the button state.

gui.toolbar.updateButton(button, attr)[source]

Update the button to correct state.

gui.toolbar.updateWireButton()[source]

Update the wire button to correct state.

gui.toolbar.updateTransparencyButton()[source]

Update the transparency button to correct state.

gui.toolbar.updateLightButton()[source]

Update the light button to correct state.

gui.toolbar.updateNormalsButton(state=True)[source]

Update the normals button to correct state.

gui.toolbar.updatePerspectiveButton()[source]

Update the normals button to correct state.

gui.toolbar.addTimeoutButton(toolbar)[source]

Add or remove the timeout button,depending on cfg.

gui.toolbar.timeout(onoff=None)[source]

Programmatically toggle the timeout button