| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
Disconnectable.Disconnectable --+
|
Disconnectable.CompoundDisconnectable --+
|
SubjectSlot.SlotManager --+
|
object --+ |
| |
Disconnectable.Disconnectable --+ |
| |
SubjectSlot.Subject --+
|
ControlSurfaceComponent.ControlSurfaceComponent --+
|
CompoundComponent.CompoundComponent --+
|
ModesComponent
A ModesComponent handles the selection of different modes of the
component. It improves the ModeSelectorComponent in several ways:
- A mode is an object with two methods for entering and exiting
the mode. You do not need to know about all the modes
registered.
- Any object convertible by 'tomode' can be passed as mode.
- Modes are identified by strings.
- The component will dynamically generate methods of the form:
set_[mode-name]_button(button)
for setting the mode button. Thanks to this, you can pass the mode
buttons in a layer.
The modes component behaves like a stack. Several modes can be
active at the same time, but the component will make sure that
only the one at the top (aka 'selected_mode') will be entered at a
given time. This allows you to implement modes that can be
'cancelled' or 'mode latch' (i.e. go to the previous mode under
certain conditions).
|
|||
|
Inherited from |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
|||
|
|||
__subject_events__ = 'selected_mode',
|
|||
momentary_toggle = False
|
|||
default_behaviour = LatchingBehaviour()
|
|||
selected_mode = property(_get_selected_mode, _set_selected_mode)
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
x.__init__(...) initializes x; see help(type(x)) for signature
|
|
Mode that is currently the top of the mode stack. Setting the selected mode explictly will also cleanup the mode stack. |
|
|
Takes 'mode' away from the mode stack. If the mode was the currently selected one, the last pushed mode will be selected. |
|
|
Adds a mode of the given name into the component. The mode
object should be a Mode or ControlSurfaceComponent instance.
The 'toggle_value' is the light value the toggle_botton will
be set to when the component is on this mode.
If 'group' is not None, the mode will be put in the group
identified by the passed object. When several modes are grouped:
* All the buttons in the group will light up when any of the
modes withing the group is selected.
* Any of the group buttons will cancel the current mode when
the current mode belongs to the group.
|
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Wed Mar 6 18:53:32 2013 | http://epydoc.sourceforge.net |