rayoptics.gui.actions module

Definitions for user interface actions

Action classes are those that contain a dict called actions. The actions dict contains functions that are executed for UI actions corresponding to the keyword.

Action keywords include:

‘press’ ‘drag’ ‘release’

The argument lists for the called functions include fig and event. Duck typing is relied on loosen the binding with a particular GUI implementation - or at least that’s the theory.

fig must support a function refresh_gui()

class Action(getf, setf)[source]

Bases: object

Action built on a set/get function pair

class AttrAction(obj, attr)[source]

Bases: object

Action built on an object/attribute pair

class SagAction(surf)[source]

Bases: object

Action to set the profile_cv via surface sag (related to x,y input)

class BendAction(e)[source]

Bases: object

Action to bend a lens element, using x component of user input

class ReplaceGlassAction(gap, update=True)[source]

Bases: object

Action for replacing an element’s glass from a drag/drop action.