| Trees | Indices | Help |
|---|
|
|
object --+
|
Tier
Manages the Perks for a single instance of a running program (a process). Supports the addition and removal of Perks from its stack. Executes Tasks registered in each Perk in response to AEEvents. Provides methods to assist Perks and Tasks in finding registered Tasks throughout the Tier.
|
|||
|
|||
|
|||
|
|||
| POR |
|
||
|
|||
| POR |
|
||
| list of 2-tuple of string |
|
||
| 2-tuple of string |
|
||
| 3-tuple of integer, string, integer |
|
||
| object |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| string |
|
||
| opaque |
|
||
|
|||
|
|||
|
|||
|
|||
| list of Perk |
|
||
|
|||
|
|||
| Task |
|
||
| string |
|
||
| Task.Base.Task |
|
||
| list of Task.Base.Task |
|
||
| 3-tuple of list, string, list |
|
||
| boolean |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
| opaque |
aid ID uniquely identifying this Tier from all other Tiers |
||
| dictionary |
chain_refs References to Perks keyed by task names. |
||
| list |
chain_stack Stack of Task and Perk names currently executing in one or more chains before, after, or around one or more anchors |
||
| POR |
focus_por Point of regard for the application focus |
||
| 3-tuple of integer, string, integer |
last_key Stores the key code, key sym, and modifiers for the last key pressed |
||
| string |
name Name of this Tier |
||
| weakref.WeakValueDictionary |
perk_refs References to Perks keyed by task names, commands, identifiers, etc. |
||
| list |
perks List of Perks treated as a stack (last in, first executed) |
||
| POR |
pointer_por Pointer of regard for the user focus |
||
| boolean |
show Call show* methods on TierManager to log events? Set by the TierManager based on whether monitors are loaded or not. |
||
| list |
task_history Stack of Task and Perk names having already executed in response to an AEEvent, including all chained Tasks and all Tasks executed from within other Tasks |
||
| dictionary |
temp_data Arbitrary name/value pairs stored by Tasks executing in this Tier in response to a single event. |
||
| TierManager |
tier_manager TierManager that created this Tier |
||
| dictionary |
wanted_events Lookup table for what AEEvents are desired by any Task in any Perk in this Tier. |
||
|
|||
|
Inherited from |
|||
|
|||
Stores a reference to the TierManager that created this Tier. Creates an empty list of Perks. Initializes the stored focus POR to None and the pointer POR to the application. Creates the weak dictionary for Perk Tasks and stores other information about the Tier.
|
Sets whether show methods should be called on the TierManager when handling events or not based on the presence of AEMonitors in the manager.
|
Gets the user POR for this Tier.
|
Sets the user POR for this Tier.
|
Gets the application focus POR for this Tier.
|
Gets the entire linear history of Tasks that have executed and the Perks they are in. |
Gets the identity of the Task to which the current Task is chained and its corresponding Perk. If there is no anchor for the executing Task, this method returns None. |
Gets the last key code, key sym, and key modifiers. Useful for dealing with applications that do a poor job of synthesizing caret and text events.
|
Gets data from temp_data.
|
Stores data for the duration of the execution of an AEEvent.
|
Adds a weak reference to a Perk as one to check for Tasks which are part of a the chain for the target. Optimization for the manageChain method. |
Removes a weak reference to a Perk as one to no longer check for Tasks which are part of the chain for the target. Optimization for the manageChain method. |
Adds a key that can be used later to quickly look up a reference to a Perk in this Tier. Optimization for the getKeyedTask, getCommandTask, and getNamedTask methods. |
Removes a key used to quickly look up a reference to a Perk in this Tier. Keys are cleaned up automatically when Perks are destroyed. However, this method may be used to manually remove Perks at any time.
|
|
|
Adds one or more Perks to the top of the stack. If more than one Perk is specified, the last specified Perk will be at the top of the stack when this method completes. That is, the behavior of pushing more than one Perk at a time is the same as if each Perk were pushed individually.
|
Adds one Perk to the stack at the insertion index. Negative indices are valid per Python list convention.
|
Removes one or more Perks from the stack given their indices. Negative indices are valid per Python list convention. Calls Perk.Perk.close on each to ensure they have a chance to persist state.
|
Removes all Perks from the stack. Calls Perk.Perk.close on each to ensure they have a chance to persist state. |
Gets all Perks pushed onto this Tier in execution order. Note: This method does not return a copy of the stack. Modifications will affect this Tier! |
Updates the wanted_events dictionary to indicate that a Task in a Perk in this Tier has been registered for a particular kind of AEEvent. This information is used for optimization purposes such that no processing will occur on the event unless at least one Task is registered that will use it. |
Gets if this Tier wants a particular kind of AEEvent given that one of its Perks has a Task that wants to handle it.
|
Gets a Task registered under a particular key set to execute in response to events. None is returned if not found. |
Gets a Task registered to execute in response to the AEInput.Gesture. None is returned if not found.
|
Gets a Task with the given name by iterating through the registered Perks until one is found containing a Task registered under the given name. None is returned if not found.
|
Gets all Tasks registered to handle the given type of event on the given layer by iterating through the registered {Perk}s. The Tasks are returned in the order they will be executed both within and across Perks in this Tier.
|
Gets all Tasks linked to the target by iterating through Perk references established by addChainRef. The Tasks are returned in the order in which they were registered within a Perk. Ordering is undefined across Perks within a chain segment. |
Executes the given Task in response to the given AEEvent.
|
Executes all Tasks chained the the given Task, recursively if chain=True.
Note: This method is purposely long because much code that could be refactored into other methods is inlined for performance reasons. |
Manages an event by iterating through the Perk stack (top to bottom) and checking for registered Tasks of the given type. Executes the registered Tasks (last registered, first executed) in each Perk until one of the following conditions is met: In the latter two cases, no additional Tasks in the current Perk or additional Perks in this Tier are executed. Instead the Task.Base.Task.update methods are called to allow housekeeping operations (e.g updating state) to be performed. If a Task returns neither True or False (e.g. it returns None) a warning is logged and the return value is treated as if it were True. This likely means the Task forgot to specify a return value.
|
Manages an event by getting the AEInput.Gesture that triggered it and locating a Task registered to execute in response to it. If a Task could not be found for the given event, the Task registered for invalid gestures is executed instead.
|
Manages an event by locating a Task under a particular key (not keyboard key, but some immutable identifier) registered to execute in response to it.
|
Pulls private data from an event and stores it in appropriate instance variables. Does not forward the event to Perks and Tasks. Rather, the stored information is made public through Task.Tools methods.
|
|
|||
chain_refsReferences to Perks keyed by task names. Many to many mapping. See addChainRef and removeChainRef.
|
perk_refsReferences to Perks keyed by task names, commands, identifiers, etc. Many to one mapping. See addTaskRef and removeTaskRef.
|
showCall show* methods on TierManager to log events? Set by the TierManager based on whether monitors are loaded or not. Optimization.
|
temp_dataArbitrary name/value pairs stored by Tasks executing in this Tier in response to a single event. The data is persistent until the event has been handled by all Tasks at which time it is cleared.
|
wanted_eventsLookup table for what AEEvents are desired by any Task in any Perk in this Tier. Used to optimize event dispatch and processing. Unwanted events are ignored.
|
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Mon Jun 4 15:33:25 2007 | http://epydoc.sourceforge.net |