50. gui.toolbar — Toolbars for the pyFormex GUI.

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

50.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.


Add the script action buttons to the toolbar.


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.


Update the wire button to correct state.


Update the transparency button to correct state.


Update the light button to correct state.


Update the normals button to correct state.


Update the normals button to correct state.


Add or remove the timeout button,depending on cfg.


Programmatically toggle the timeout button