Package AccessEngine :: Package AEEvent :: Module ViewChange :: Class ViewChange
[hide private]
[frames] | no frames]

Class ViewChange

source code

  object --+    
           |    
Base.AEEvent --+
               |
              ViewChange

Event that fires when the AEViewManager is creating or updating its view.

This class registers its name and whether it should be monitored by default in an AEMonitor using the Base.registerEventType function when this module is first imported. An AEMonitor can use this information to build its menus.

Instance Methods [hide private]
 
__init__(self, por, gained, **kwargs)
Stores the type of view change and intializes the title attribute to an empty string.
source code
string
__str__(self)
Returns a human readable representation of this event including its name, its AEPor, its type, and the title of the new view.
source code
boolean
execute(self)
Stores the name of the root element of the new view in the title attribute.
source code
dictionary
getDataForTask(self)
Fetches data out of this ViewChange for use by a AEScript.EventScript.onViewChange-Task.
source code

Inherited from Base.AEEvent: getAppID, getLayer, getPOR, getPriority, getTimestamp, setLayer, setPriority

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

Instance Variables [hide private]
boolean gained
Type of view change
string title
Name of the root element of the new view (e.g.

Inherited from Base.AEEvent: layer, por, priority

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, por, gained, **kwargs)
(Constructor)

source code 
Stores the type of view change and intializes the title attribute to an empty string.
Parameters:
  • por (AEPor) - Point-of-regard to the accessible at the root of the new view
  • gained (integer) - Type of view change
Overrides: Base.AEEvent.__init__

__str__(self)
(Informal representation operator)

source code 
Returns a human readable representation of this event including its name, its AEPor, its type, and the title of the new view.
Returns: string
Information about this event
Overrides: Base.AEEvent.__str__

execute(self)

source code 
Stores the name of the root element of the new view in the title attribute. Calls AETierManager._AETierManager.switchAETier to switch to the appropriate AETier for this view. Calls AETierManager._AETierManager.manageEvent to allow it to dispatch this AEEvent to the active AETier and its registered AEScript.
Returns: boolean
True to indicate the event executed properly
Overrides: Base.AEEvent.execute

getDataForTask(self)

source code 
Fetches data out of this ViewChange for use by a AEScript.EventScript.onViewChange-Task.
Returns: dictionary
Dictionary of parameters to be passed to a AEScript.EventScript.onViewChange-Task as follows:
  • por: Point of regard to the top of the new view
  • title: String containing the window title of the view which changed
  • gained: The type of view change, indicated by one of the integer class variables
Overrides: Base.AEEvent.getDataForTask

Instance Variable Details [hide private]

title

Name of the root element of the new view (e.g. title of the foreground window)
Type:
string