Package _Framework :: Module ModesComponent :: Class ModeButtonBehaviour
[hide private]
[frames] | no frames]

Class ModeButtonBehaviour

source code

object --+
         |
        ModeButtonBehaviour


Strategy that determines how the mode button of a specific mode
behaves. The protocol is a follows:

1. When the button is pressed, the press_immediate is called.

2. If the button is released shortly, the release_immediate is
   called.

3. However, if MOMENTARY_DELAY is elapsed before release,
   press_delayed is called and release_immediate will never be
   called.

4. release_delayed will be called when the button is released and
   more than MOMENTARY_DELAY time has passed since press.

Instance Methods [hide private]
 
press_immediate(self, component, mode) source code
 
release_immediate(self, component, mode) source code
 
press_delayed(self, component, mode) source code
 
release_delayed(self, component, mode) source code
 
update_button(self, component, mode, selected_mode)
Updates the button light for 'mode'.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__