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

Class CompoundElement

source code

                             object --+            
                                      |            
          Disconnectable.Disconnectable --+        
                                          |        
                        SubjectSlot.Subject --+    
                                              |    
                             object --+       |    
                                      |       |    
          Disconnectable.Disconnectable --+   |    
                                          |   |    
              ControlElement.ControlElement --+    
                                              |    
NotifyingControlElement.NotifyingControlElement --+
                                                  |
                             object --+           |
                                      |           |
          Disconnectable.Disconnectable --+       |
                                          |       |
      Disconnectable.CompoundDisconnectable --+   |
                                              |   |
                        SubjectSlot.SlotManager --+
                                                  |
                                                 CompoundElement

Utility class that helps in writing Elements that act as a facade to nested elements, hiding the complexity oif making sure that resource ownership rules are preserved.

Nested Classes [hide private]

Inherited from SubjectSlot.Subject: __metaclass__

Inherited from ControlElement.ControlElement (private): _resource_type

Instance Methods [hide private]
 
__init__(self, *a, **k)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
on_nested_control_element_grabbed(self, control)
Notifies that the nested control can be used by the compound
source code
 
on_nested_control_element_released(self, control)
Notifies that we lost control over the control.
source code
 
on_nested_control_element_value(self, control, value)
Notifies that an owned control element has received a value.
source code
 
register_control_elements(self, *elements) source code
 
register_control_element(self, element) source code
 
unregister_control_elements(self, *elements) source code
 
unregister_control_element(self, element) source code
 
has_control_element(self, control) source code
 
owns_control_element(self, control) source code
 
reset(self) source code
 
add_value_listener(self, *a, **k) source code
 
remove_value_listener(self, *a, **k) source code
 
request_listen_nested_control_elements(self)
By default, the compound control element will listen to its nested control elements IFF he himself has listeners.
source code
 
unrequest_listen_nested_control_elements(self)
See request_listen_nested_control_elements()
source code
 
_connect_nested_control_elements(self) source code
 
_disconnect_nested_control_elements(self) source code
 
_on_nested_control_element_grabbed(self, control) source code
 
_on_nested_control_element_released(self, control) source code
 
_on_nested_control_element_value(self, value, sender) source code
 
set_control_element(self, control, grabbed) source code
 
_on_grab_resource(self, client, *a, **k) source code
 
_on_release_resource(self, client) source code

Inherited from ControlElement.ControlElement: clear_send_cache, disconnect, send_midi

Inherited from ControlElement.ControlElement (private): _resource, _tasks

Inherited from SubjectSlot.SlotManager: register_slot, register_slot_manager

Inherited from Disconnectable.CompoundDisconnectable: disconnect_disconnectable, find_disconnectable, has_disconnectable, register_disconnectable, unregister_disconnectable

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

Class Variables [hide private]

Inherited from NotifyingControlElement.NotifyingControlElement: __subject_events__

Inherited from ControlElement.ControlElement: canonical_parent, name, optimized_send_midi

Properties [hide private]

Inherited from ControlElement.ControlElement: resource

Inherited from object: __class__

Method Details [hide private]

__init__(self, *a, **k)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

reset(self)

source code 
Overrides: ControlElement.ControlElement.reset

request_listen_nested_control_elements(self)

source code 

By default, the compound control element will listen to its nested control elements IFF he himself has listeners. This is important, because for nested InputControlElements, the existence of listeners determine wether they will send the MIDI messages to Live or to the script.

You can force the compound to listen to its nested elements using this methods. The compound will then listen to them IFF the number of requests is greater than the number of unrequests OR it has listeners.

_on_nested_control_element_value(self, value, sender)

source code 
Decorators:
  • @subject_slot_group('value')

_on_grab_resource(self, client, *a, **k)

source code 
Overrides: ControlElement.ControlElement._on_grab_resource

_on_release_resource(self, client)

source code 
Overrides: ControlElement.ControlElement._on_release_resource