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

Class CaretChange

source code

  object --+    
           |    
Base.AEEvent --+
               |
              CaretChange

Event that fires when the caret moves in an accessible.

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. The AEMonitor can use this information to build its menus.

Instance Methods [hide private]
 
__init__(self, por, text, text_offset, added=None, **kwargs)
Calls the base class (which set the event priority) and then stores the text and offset to be passed along to the AETier as part of the event.
source code
string
__str__(self)
Returns a human readable representation of this event including its name, its text, its text offset, and whether the text was added, removed, or moved.
source code
boolean
execute(self)
Contacts the AccessEngine.AETierManager so it can manage the caret change event.
source code
AEPor
getFocusPOR(self)
Returns the AEPor for caret movement events.
source code
dictionary
getDataForTask(self)
Fetches data out of this CaretChange for use by a AEScript.EventScript.onCaretChange-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 added
True when text added, False when text deleted, and None (the default) when event is for caret movement only
string text
The text inserted, deleted or the line of the caret
integer text_offset
The offset of the inserted/deleted text or the line offset when movement only

Inherited from Base.AEEvent: layer, por, priority

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, por, text, text_offset, added=None, **kwargs)
(Constructor)

source code 
Calls the base class (which set the event priority) and then stores the text and offset to be passed along to the AETier as part of the event.
Parameters:
  • por (AEPor) - Point of regard
  • text (string) - The text inserted, deleted or the line of the caret
  • text_offset (integer) - The offset of the inserted/deleted text or the line offset when movement only
  • added (boolean) - True when text added, False when text deleted, and None (the default) when event is for caret movement only
Overrides: Base.AEEvent.__init__

__str__(self)
(Informal representation operator)

source code 
Returns a human readable representation of this event including its name, its text, its text offset, and whether the text was added, removed, or moved.
Returns: string
Information about this event
Overrides: Base.AEEvent.__str__

execute(self)

source code 
Contacts the AccessEngine.AETierManager so it can manage the caret change event.
Returns: boolean
True if there is an active view, False if not to delay execution of this event until there is
Overrides: Base.AEEvent.execute

getFocusPOR(self)

source code 
Returns the AEPor for caret movement events. Used by AETier to maintain a focus AEPor.
Returns: AEPor
Point-of-regard for this focus event
Raises:
  • AttributeError - When the event does not represent a change in the focus

getDataForTask(self)

source code 
Fetches data out of this CaretChange for use by a AEScript.EventScript.onCaretChange-Task.
Returns: dictionary
Dictionary of parameters to be passed to a AEScript.EventScript.onCaretChange-Task as follows:
  • por: The AEPor of the accessible in which the caret moved
  • text: The text inserted, deleted or the line of the caret
  • text_offset: The offset of the inserted/deleted text or the line offset when movement only
  • added: Boolean that is True when the text was added
Overrides: Base.AEEvent.getDataForTask