28. toolbar — Toolbars for the pyFormex GUI.

Toolbars for the pyFormex GUI.

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

toolbar.addActionButtons(toolbar)
Add the script action buttons to the toolbar.
toolbar.addButton(toolbar, tooltip, icon, func, repeat=False, toggle=False, checked=False, icon0=None)

Add a button to a toolbar.

  • toolbar: the toolbar where the button will be added
  • tooltip: the text to appears 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.
toolbar.removeButton(toolbar, button)
Remove a button from a toolbar.
toolbar.addCameraButtons(toolbar)
Add the camera buttons to a toolbar.
toolbar.toggleTransparency()
toolbar.addTransparencyButton(toolbar)
toolbar.setTransparency(mode=True)
Set the transparency mode on or off.
toolbar.toggleLight()
toolbar.addLightButton(toolbar)
toolbar.setLight(mode=True)
Set the lights mode on or off.
toolbar.toggleNormals()
toolbar.addNormalsButton(toolbar)
toolbar.setNormals(state=True)
Set the normals mode to averaged or not.
toolbar.togglePerspective()
toolbar.addPerspectiveButton(toolbar)
toolbar.setPerspective(mode=True)
Set the perspective mode on or off.
toolbar.setProjection()
toolbar.toggleShrink()
toolbar.addShrinkButton(toolbar)
toolbar.setShrink(mode)
toolbar.toggleTimeout(onoff=None)
toolbar.addTimeoutButton(toolbar)
Add or remove the timeout button,depending on cfg.
toolbar.timeout(onoff=None)
Programmatically toggle the timeout button

Documentation

Previous topic

27. scriptMenu — Menu with pyFormex scripts.

Next topic

29. curve — Definition of curves in pyFormex.

This Page