Module DefaultDialogScript :: Class DefaultDialogScript
[hide private]
[frames] | no frames]

Class DefaultDialogScript

source code

                                  object --+            
                                           |            
AccessEngine.AEUserInterface.AEUserInterface --+        
                                               |        
                  AccessEngine.AEScript.AEScript --+    
                                                   |    
                   AccessEngine.AEScript.EventScript --+
                                                       |
                                                      DefaultDialogScript

Manages the basic SUE dialogs for configuring settings and loading Scripts.

Shows and hides default SUE chooser dialogs for configuring SUE settings, loading and unloading extensions at run time, and so on. Tasks for starting choosers are defined, but not mapped to any particular input device. Some other Script must define the input mappings.

Instance Methods [hide private]
 
init(self)
Registers named tasks for script chooser, settings chooser, and command chooser
source code
string
getName(self)
Provides the localized name of this AccessEngine.AEScript.
source code
boolean
onChooserStart(self, **kwargs)
Decides wich chooser shall be started.
source code
boolean
onChooserSignal(self, **kwargs)
Decides wich chooser shall get the signal.
source code
 
onScriptChooserStart(self, timestamp, **kwargs)
Shows the Script chooser which allows a user to pick Scripts to load and unload from the current application at runtime.
source code
 
onScriptChooserSignal(self, **kwargs)
Runs when the chooser sends a signal to this AccessEngine.AEScript indicating some change in the dialog that the AccessEngine.AEScript should be aware of.
source code
 
_doScriptLoad(self, loaded, unloaded, **kwargs)
Loads and unloads AccessEngine.AEScripts according to the current state of the chooser dialog.
source code
 
initSettingsChooser(self)
Initialize installed, associated, and chooser variables.
source code
 
onSettingsChooserStart(self, timestamp, **kwargs)
Shows the settings chooser which allows a user to configure SUE devices, Scripts, profiles, and general system settings.
source code
 
_getProfileInfo(self)
Populates the installed and associated profile metadata dictionary.
source code
dictionary
_readyStates(self, states)
Prepare settings objects by storing a copy of the current settings so that they may be restored at a later time.
source code
 
onSettingsChooserSignal(self, **kwargs)
Runs when the chooser sends a signal to this AccessEngine.AEScript indicating some change in the chooser that the AccessEngine.AEScript should be aware of.
source code
 
_doApply(self, chooser, system, scripts, devices, associated, installed=None, **kwargs)
Apply all system, AccessEngine.AEScript, and device settings.
source code
 
_doCancel(self, system, scripts, devices, **kwargs)
Cancel all system, AccessEngine.AEScript, and device setting changes.
source code
 
onCommandChooserStart(self, timestamp, **kwargs)
Starts the command chooser providing a list of all currently registered key commands sorted by their respective parent scripts.
source code
 
onCommandChooserSignal(self, **kwargs)
Runs when the chooser sends a signal to this AccessEngine.AEScript indicating some change in the chooser that the AccessEngine.AEScript should be aware of.
source code

Inherited from AccessEngine.AEScript.EventScript: chainNewEventTaskAround, executeAroundTask, onCaretChange, onCaretDeleted, onCaretInserted, onCaretMoved, onChildAdded, onChildRemoved, onChildrenChange, onChooserChange, onChooserEnd, onFocusChange, onFocusGained, onFocusLost, onMouseChange, onMouseMoved, onMousePressed, onMouseReleased, onPropertyChange, onScreenChange, onScreenReflowed, onScreenRefreshed, onScreenResized, onSelectorActive, onSelectorAdded, onSelectorChange, onSelectorRemoved, onSelectorText, onStateChange, onTableChange, onTableColumnDeleted, onTableColumnInserted, onTableColumnReordered, onTableRowDeleted, onTableRowInserted, onTableRowReordered, onViewChange, onViewFirstGained, onViewGained, onViewLost, onViewStartup, registerEventTask, unregisterEventTask, updateAroundTask, updateOnCaretChange, updateOnChildrenChange, updateOnFocusChange, updateOnMouseChange, updateOnPropertyChange, updateOnScreenChange, updateOnSelectorChange, updateOnStateChange, updateOnTableChange, updateOnViewChange

Inherited from AccessEngine.AEScript.AEScript: __init__, bindToEvent, chainTask, close, doCyclicInputTask, doTask, getAETier, getAnchorScriptClassName, getAnchorTaskId, getChainSegment, getChooserTask, getCommandTask, getEventTasks, getIdealOutput, getLastKey, getOutputDevices, getPointerPOR, getRegisteredTask, getScriptSetting, getScriptSettingVal, getState, getTaskKeys, getTempData, getVirtualPOR, mergeChain, postClose, preInit, registerChooserTask, registerCommand, registerCyclicInputTask, registerCyclicInputTasks, registerModifiers, registerTask, registerTimerTask, setIdealOutput, setPointerPOR, setScriptSettingVal, setTempData, setVirtualPOR, unbindFromEvent, unchainTask, unregisterChooserTask, unregisterCommand, unregisterCyclicInputTask, unregisterModifiers, unregisterTask, unregisterTaskFromCyclicInputTask, unregisterTimerTask

Inherited from AccessEngine.AEUserInterface.AEUserInterface: getClassName, getDescription, getPath

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

Class Variables [hide private]

Inherited from AccessEngine.AEScript.AEScript: STATE

Instance Variables [hide private]
dictionary of string : list of 3-tuple of string associated
All UIE class names, human readable names, and descriptions associated with this profile keyed by their type
dictionary of string : list of 3-tuple of string installed
All UIE class names, human readable names, and descriptions installed keyed by their type

Inherited from AccessEngine.AEScript.AEScript: after_chains, around_chains, around_tasks, before_chains, chooser_tasks, command_descriptions, commands, cyclic_input_tasks, def_out, event_tasks, out_caps, registered_modifiers, registered_tasks, state, tier

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

init(self)

source code 
Registers named tasks for script chooser, settings chooser, and command chooser
Overrides: AccessEngine.AEScript.AEScript.init

getName(self)

source code 
Provides the localized name of this AccessEngine.AEScript.
Returns: string
Human readable name of this object. Defaults to its class name.
Overrides: AccessEngine.AEUserInterface.AEUserInterface.getName

onChooserStart(self, **kwargs)

source code 
Decides wich chooser shall be started.
Returns: boolean
Should processing continue? Always returns True by default.
Overrides: AccessEngine.AEScript.EventScript.onChooserStart

onChooserSignal(self, **kwargs)

source code 
Decides wich chooser shall get the signal.
Returns: boolean
Should processing continue? Always returns True by default.
Overrides: AccessEngine.AEScript.EventScript.onChooserSignal

onScriptChooserStart(self, timestamp, **kwargs)

source code 
Shows the Script chooser which allows a user to pick Scripts to load and unload from the current application at runtime. Runs when an input gesture is given to start the chooser. Buids lists of currently loaded and available AccessEngine.AEScripts, shows the chooser, and provides it with the lists.
Parameters:
  • timestamp (float) - Time to provide to the chooser dialog so it can raise itself to the foreground properly

onScriptChooserSignal(self, **kwargs)

source code 
Runs when the chooser sends a signal to this AccessEngine.AEScript indicating some change in the dialog that the AccessEngine.AEScript should be aware of. Signals of interest defined by this particular chooser include:
  • OK: Complete the dialog accepting current load/unload configuration
  • APPLY: Accept current load/unload configuration without completing
  • RAISE: Move a AccessEngine.AEScript up in the load order
  • LOWER: Move a AccessEngine.AEScript down in the load order
  • TO_LOAD: Add a AccessEngine.AEScript to the list of AccessEngine.AEScripts to load
  • TO_UNLOAD: Remove a AccessEngine.AEScript from the list of AccessEngine.AEScripts to load
Parameters:
  • kwargs (dictionary) - Keyword arguments specific to each signal type
  • kwargs['chooser'] (AEChooser) - Reference to the chooser object that sent the signal
  • kwargs['kind'] (string) - Signal name

_doScriptLoad(self, loaded, unloaded, **kwargs)

source code 
Loads and unloads AccessEngine.AEScripts according to the current state of the chooser dialog.
Parameters:
  • loaded (list) - Names of AccessEngine.AEScripts to load on this AETier
  • unloaded (list) - Names of AccessEngine.AEScripts not to load on this AETier

onSettingsChooserStart(self, timestamp, **kwargs)

source code 
Shows the settings chooser which allows a user to configure SUE devices, Scripts, profiles, and general system settings. Load the SettingsChooser and give it the required settings model for the system, AccessEngine.AEScripts, devices, and profile.
Parameters:
  • timestamp (float) - Time to provide to the chooser dialog so it can raise itself to the foreground properly

_readyStates(self, states)

source code 
Prepare settings objects by storing a copy of the current settings so that they may be restored at a later time.
Parameters:
  • states (list of 2-tuple of string, AEState) - States paired with the names of the UIEs having those states
Returns: dictionary
Dictionary pairing UIE name with its state object

onSettingsChooserSignal(self, **kwargs)

source code 
Runs when the chooser sends a signal to this AccessEngine.AEScript indicating some change in the chooser that the AccessEngine.AEScript should be aware of. Signals of interest defined by this particular chooser include:
  • OK: Complete the dialog accepting current values
  • APPLY: Accept current values without completing
  • RAISE: Move a AEUserInterface up in the load order
  • LOWER: Move a AEUserInterface down in the load order
  • TO_LOAD: Add a AEUserInterface to the list to load
  • TO_UNLOAD: Remove a AEUserInterface from the list to load
Parameters:
  • kwargs (dictionary) - Keyword arguments specific to each signal type
  • kwargs['chooser'] (AEChooser) - Reference to the chooser object that sent the signal
  • kwargs['kind'] (string) - Signal name

_doApply(self, chooser, system, scripts, devices, associated, installed=None, **kwargs)

source code 
Apply all system, AccessEngine.AEScript, and device settings. Make any necessary changes to the current profile and install/uninstall any AEUserInterfaces.
Parameters:
  • chooser (AEChooser) - Reference to the chooser object that sent the signal
  • system (AEState) - System state
  • scripts (list of AEState) - AccessEngine.AEScript state to apply
  • devices (list of AEState) - Device state to apply
  • installed (dictionary of string : list of string) - All UIE class names selected for installation keyed by their type
  • associated (dictionary of string : list of string) - All UIE class names selected for association with this profile keyed by their type

_doCancel(self, system, scripts, devices, **kwargs)

source code 
Cancel all system, AccessEngine.AEScript, and device setting changes. Ignore changes to the current profile.
Parameters:
  • system (AEState) - System state
  • scripts (list of AEState) - AccessEngine.AEScript state to apply
  • devices (list of AEState) - Device state to apply

onCommandChooserSignal(self, **kwargs)

source code 
Runs when the chooser sends a signal to this AccessEngine.AEScript indicating some change in the chooser that the AccessEngine.AEScript should be aware of. There's only one signals of interest defined by this particular chooser that we want to react upon:
  • OK: Complete the dialog accepting current values
Parameters:
  • kwargs (dictionary) - Keyword arguments specific to each signal type
  • kwargs['chooser'] (AEChooser) - Reference to the chooser object that sent the signal
  • kwargs['kind'] (string) - Signal name