Package Task :: Module EventTask :: Class EventTask
[hide private]
[frames] | no frames]

Class EventTask

source code

          object --+                
                   |                
Tools.Base.TaskTools --+            
                       |            
     Tools.Output.Output --+        
                           |        
          object --+       |        
                   |       |        
Tools.Base.TaskTools --+   |        
                       |   |        
       Tools.Input.Input --+        
                           |        
          object --+       |        
                   |       |        
Tools.Base.TaskTools --+   |        
                       |   |        
         Tools.View.View --+        
                           |        
          object --+       |        
                   |       |        
Tools.Base.TaskTools --+   |        
                       |   |        
       Tools.Utils.Utils --+        
                           |        
          object --+       |        
                   |       |        
Tools.Base.TaskTools --+   |        
                       |   |        
     Tools.System.System --+        
                           |        
                   Tools.All --+    
                               |    
                  object --+   |    
                           |   |    
               UIElement.UIE --+    
                               |    
                       Base.Task --+
                                   |
                                  EventTask

Base class for all Tasks that execute in response to AEEvents.

The focus, tier, and background parameters specify on which layer the Task will handle events. If focus is True, the Task will be executed in response to an event from a focused control within this Tier. If tier is True, the Task will be executed in response to an event from an unfocused control within this Tier. If background is True, the Task will be executed in response to an event from any control within the tier when the Tier is not active.

The three layers are mutually exclusive. You may set any combination of focus, tier, and background to True to register the given Task on each selected layer in one call. If all three parameters are False, the registration defaults to the focus layer.

Instance Methods [hide private]
 
__init__(self, ident, focus=False, tier=False, background=False, all=False)
Stores layer information.
source code
AEEvent class
getEventType(self)
Returns: Type of event this Task wants to handle
source code
3-tuple of boolean
getEventLayers(self)
Returns: Event layer information
source code

Inherited from Base.Task: execute, getIdentity, getPath, getPerk, update

Inherited from Tools.Output.Output: getBrlEllipsisSizes, getBrlMissingCellCount, getClosestLang, getMagROI, getOutputDevice, getPerkIdealOutput, getStyle, getStyleSetting, getStyleVal, inhibitMayStop, mayStop, play, say, sayApp, sayChar, sayColor, sayConfirm, sayCount, sayDesc, sayError, sayFont, sayHotkey, sayIndex, sayInfo, sayItem, sayLabel, sayLevel, sayName, sayRole, saySection, sayState, sayStatus, sayTextAttrs, sayValue, sayValueExtents, sayWindow, sayWord, send, setBrlCaretPosition, setBrlTruncate, setMagGoto, setPerkIdealOutput, setStyleVal, stopAll, stopNow

Inherited from Tools.Input.Input: addInputModifiers, getInputDevice, registerCommand, removeInputModifiers, unregisterCommand

Inherited from Tools.View.View: compareAncestorRoles, copyAccText, cutAccText, deleteAccText, deselectAccText, doAction, findAccByName, findAccByObjId, findAccByPredicate, findAccByRole, getAccActionDescs, getAccActionKeys, getAccActionNames, getAccAllTextAttrs, getAccAnchorCount, getAccAppLocale, getAccAtRowColumn, getAccAttrs, getAccCaret, getAccClickKey, getAccColumn, getAccColumnHeader, getAccCount, getAccDefTextAttrs, getAccDesc, getAccFloatValue, getAccFloatValueExtents, getAccFocus, getAccFromPath, getAccIndex, getAccLabel, getAccLevel, getAccName, getAccPosInSet, getAccPosition, getAccRelations, getAccRole, getAccRoleName, getAccRow, getAccRowHeader, getAccSetSize, getAccTableExtents, getAccText, getAccTextAttr, getAccTextBetween, getAccTextLength, getAccTextSelection, getAccTextSelectionCount, getAccURI, getAccVisualExtents, getAccVisualPoint, getAllSelected, getAppName, getCharText, getChildAcc, getCurrItem, getCurrRow, getCurrWord, getEndAcc, getEndOfHardLine, getFirstPeerAcc, getFirstSelected, getItemText, getLastAccUnder, getLastChar, getLastKey, getLastPeerAcc, getLastWord, getNextAcc, getNextChar, getNextItem, getNextPeerAcc, getNextRow, getNextWord, getParentAcc, getPointerPOR, getPrevAcc, getPrevChar, getPrevItem, getPrevPeerAcc, getPrevRow, getPrevWord, getRootAcc, getStartOfHardLine, getStateText, getViewRootAcc, getWindowTitle, getWordText, hasAccRole, hasAccState, hasOneAccRole, hasOneAccState, inhibitAutoPointer, insertAccText, iterAncestorAccs, iterNextAccs, iterNextItems, iterPrevAccs, iterPrevItems, leftClickPOR, mouseEventPOR, moveToEnd, moveToItemStart, moveToPOR, moveToPointer, moveToRoot, pasteAccText, selectAccText, setAccCaret, setAccDeselected, setAccFocus, setAccPOR, setAccSelected, setAccText, setAccTextAttrs, setAllDeselected, setAllSelected, setPointerPOR

Inherited from Tools.Utils.Utils: convertPOSIXToIANA, getColorString

Inherited from Tools.System.System: associateDevice, associateMonitor, associatePerk, blockNTasks, chainTask, disassociateDevice, disassociateMonitor, disassociatePerk, doTask, getAnchorPerkClassName, getAnchorTaskId, getChooserClassNames, getChooserDescriptions, getChooserMetadata, getChooserNames, getDeviceClassNames, getDeviceDescriptions, getDeviceMetadata, getDeviceNames, getDeviceState, getEventTasks, getHistory, getMonitorClassNames, getMonitorDescriptions, getMonitorMetadata, getMonitorNames, getNamedTask, getPerkByName, getPerkClassNames, getPerkDescriptions, getPerkHistory, getPerkMetadata, getPerkNames, getPerkSetting, getPerkSettingVal, getPerkState, getPerkTaskNames, getPerkVar, getProfileName, getTaskHistory, getTempVal, getTierEventTasks, getTierNamedTask, getTierTaskNames, insertPerk, loadAllMonitors, loadChooser, loadMonitor, popPerk, popThisPerk, pushPerk, refreshDevices, registerConstants, registerTask, reloadPerks, setPerkSettingVal, setPerkVar, setTempVal, unchainTask, unloadAllMonitors, unloadChooser, unloadMonitor, unregisterTask

Inherited from Tools.Base.TaskTools: close, init, postClose, postExecute, preExecute, preInit

Inherited from Tools.Base.TaskTools (private): _changeDefaultOutput

Inherited from UIElement.UIE: getClassName, getDescription, getName

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

Class Variables [hide private]

Inherited from Tools.Output.Output: may_stop

Inherited from Tools.View.View (private): _state_descriptions

Instance Variables [hide private]
3-tuple of boolean layers
Execute on focused events, unfocused events when the Tier is active, and/or events when the Tier is inactive?

Inherited from Base.Task: ident

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, ident, focus=False, tier=False, background=False, all=False)
(Constructor)

source code 

Stores layer information.

Parameters:
  • ident (string) - Programmatic identifier
  • focus (boolean) - Execute for events in focus?
  • tier (boolean) - Execute for unfocused events when the Tier is active?
  • background (boolean) - Execute for events when the Tier is inactive?
Overrides: Base.Task.__init__

getEventType(self)

source code 
Returns: AEEvent class
Type of event this Task wants to handle
Raises:
  • NotImplementedError - When a subclass does not define the type of AEEvent it wants to handle

getEventLayers(self)

source code 
Returns: 3-tuple of boolean
Event layer information