| | |
- Method resolution order:
- Script
- orca.default.Script
- orca.script.Script
Methods defined here:
- __init__(self, app)
- onFocus(self, event)
- # This function is called whenever an object within Mozilla receives
# focus
- onLinkSelected(self, event)
- # This function is called when a hyperlink is selected - This happens
# when a link is navigated to using tab/shift-tab
- sayAll()
Methods inherited from orca.default.Script:
- clusterZonesByLine(self, zones)
- Given a list of interesting accessible objects (the zones),
returns a list of lines in order from the top to bottom, where
each line is a list of accessible objects in order from left
to right.
- findCommonAncestor(self, a, b)
- Finds the common ancestor between Accessible a and Accessible b.
Arguments:
- a: Accessible
- b: Accessible
- getBrailleGenerator(self)
- Returns the braille generator for this script.
- getFlatReviewContext(self)
- Returns the flat review context, creating one if necessary.
- getShowingZones(self)
- Returns a list of all interesting, non-intersecting,
regions that are drawn in the currently active window. Each
element of the list is the Accessible object associated with a
given region. The term 'zone' here is inherited from OCR
algorithms and techniques.
The objects are returned in no particular order.
Arguments:
- root: the Accessible object to traverse
Returns: a list of all objects under the specified object
- getSpeechGenerator(self)
- Returns the speech generator for this script.
- getVisualParent(self, obj)
- Returns the logical visual container for the given object or None
if no such object exists. The logical visual container differs from
the component hierarchy in that it eliminates non-visual layout
elements (e.g., panels without names or borders) from the hierarchy.
- goBrailleHome(self, inputEvent=None)
- Returns to the component with focus.
- leftClickReviewItem(self, inputEvent=None)
- Performs a left mouse button click on the current item.
- locusOfFocusChanged(self, event, oldLocusOfFocus, newLocusOfFocus)
- Called when the visual object with focus changes.
Arguments:
- event: if not None, the Event that caused the change
- oldLocusOfFocus: Accessible that is the old locus of focus
- newLocusOfFocus: Accessible that is the new locus of focus
- noOp(self, event)
- Just here to capture events.
Arguments:
- event: the Event
- onActiveDescendantChanged(self, event)
- Called when an object who manages its own descendants detects a
change in one of its children.
Arguments:
- event: the Event
- onCaretMoved(self, event)
- Called whenever the caret moves.
Arguments:
- event: the Event
- onMouseButton(self, event)
- Called whenever a mouse button is pressed or released.
Arguments:
- event: the Event
- onNameChanged(self, event)
- Called whenever a property on an object changes.
Arguments:
- event: the Event
- onSelectionChanged(self, event)
- Called when an object's selection changes.
Arguments:
- event: the Event
- onStateChanged(self, event)
- Called whenever an object's state changes. Currently, the
state changes for non-focused objects are ignored.
Arguments:
- event: the Event
- onTextDeleted(self, event)
- Called whenever text is deleted from an object.
Arguments:
- event: the Event
- onTextInserted(self, event)
- Called whenever text is inserted into an object.
Arguments:
- event: the Event
- onValueChanged(self, event)
- Called whenever an object's value changes. Currently, the
value changes for non-focused objects are ignored.
Arguments:
- event: the Event
- onWindowActivated(self, event)
- Called whenever a toplevel window is activated.
Arguments:
- event: the Event
- onWindowDeactivated(self, event)
- Called whenever a toplevel window is deactivated.
Arguments:
- event: the Event
- outputCharAttributes(self, attributes)
- Speak each of the text attributes given dictionary.
Arguments:
- attributes: a dictionary of text attributes to speak.
- panBrailleLeft(self, inputEvent=None, panAmount=0)
- Pans the braille display to the left. If panAmount is non-zero,
the display is panned by that many cells. If it is 0, the display
is panned one full display width. In flat review mode, panning
beyond the beginning will take you to the end of the previous line.
In focus tracking mode, the cursor stays at its logical position.
In flat review mode, the review cursor moves to character
associated with cell 0.
- panBrailleLeftOneChar(self, inputEvent=None)
- Nudges the braille display one character to the left.
In focus tracking mode, the cursor stays at its logical position.
In flat review mode, the review cursor moves to character
associated with cell 0.
- panBrailleRight(self, inputEvent=None, panAmount=0)
- Pans the braille display to the right. If panAmount is non-zero,
the display is panned by that many cells. If it is 0, the display
is panned one full display width. In flat review mode, panning
beyond the end will take you to the begininng of the next line.
In focus tracking mode, the cursor stays at its logical position.
In flat review mode, the review cursor moves to character
associated with cell 0.
- panBrailleRightOneChar(self, inputEvent=None)
- Nudges the braille display one character to the right.
In focus tracking mode, the cursor stays at its logical position.
In flat review mode, the review cursor moves to character
associated with cell 0.
- processObjectEvent(self, event)
- Processes all object events of interest to this script. Note
that this script may be passed events it doesn't care about, so
it needs to react accordingly.
Arguments:
- event: the Event
- readCharAttributes(self, inputEvent=None)
- Reads the attributes associated with the current text character.
Calls outCharAttributes to speak a list of attributes. By default,
a certain set of attributes will be spoken. If this is not desired,
then individual application scripts should override this method to
only speak the subset required.
- reviewAbove(self, inputEvent)
- Moves the flat review context to the character most directly
above the current flat review cursor. Places the flat review
cursor at character.
- reviewBelow(self, inputEvent)
- Moves the flat review context to the character most directly
below the current flat review cursor. Places the flat review
cursor at character.
- reviewBottomLeft(self, inputEvent)
- Moves the flat review context to the beginning of the
last line in the window. Places the flat review cursor at
the beginning of the line.
- reviewCurrentAccessible(self, inputEvent)
- reviewCurrentCharacter(self, inputEvent)
- reviewCurrentItem(self, inputEvent, targetCursorCell=0)
- Presents the current item to the user.
- reviewCurrentLine(self, inputEvent)
- Presents the current flat review line via braille and speech.
- reviewEnd(self, inputEvent)
- Moves the flat review context to the end of the
last line in the window. Places the flat review cursor
at the end of the line.
- reviewEndOfLine(self, inputEvent)
- Moves the flat review context to the end of the line. Places
the flat review cursor at the end of the line.
- reviewHome(self, inputEvent)
- Moves the flat review context to the top left of the current
window.
- reviewNextCharacter(self, inputEvent)
- Moves the flat review context to the next character. Places
the flat review cursor at character.
- reviewNextItem(self, inputEvent)
- Moves the flat review context to the next item. Places
the flat review cursor at the beginning of the item.
- reviewNextLine(self, inputEvent)
- Moves the flat review context to the beginning of the
next line. Places the flat review cursor at the beginning
of the line.
- reviewPreviousCharacter(self, inputEvent)
- Moves the flat review context to the previous character. Places
the flat review cursor at character.
- reviewPreviousItem(self, inputEvent)
- Moves the flat review context to the previous item. Places
the flat review cursor at the beginning of the item.
- reviewPreviousLine(self, inputEvent)
- Moves the flat review context to the beginning of the
previous line.
- rightClickReviewItem(self, inputEvent=None)
- Performs a right mouse button click on the current item.
- showZones(self, inputEvent)
- Debug routine to paint rectangles around the discrete
interesting (e.g., text) zones in the active window for
this application.
- textAttrsToDictionary(self, str)
- Converts a string of text attribute tokens of the form
<key>:<value>; into a dictionary of keys and values.
Text before the colon is the key and text afterwards is the
value. If there is a final semi-colon, then it's ignored.
Arguments:
- str: the string of tokens containing <key>:<value>; pairs.
Returns a dictionary of key/value items.
- toggleFlatReviewMode(self, inputEvent=None)
- Toggles between flat review mode and focus tracking mode.
- toggleTableCellReadMode(self, inputEvent=None)
- Toggles an indicator for whether we should just read the current
table cell or read the whole row.
- updateBraille(self, obj, extraRegion=None)
- Updates the braille display to show the give object.
Arguments:
- obj: the Accessible
- extra: extra Region to add to the end
- updateBrailleReview(self, targetCursorCell=0)
- Obtains the braille regions for the current flat review line
and displays them on the braille display. If the targetCursorCell
is non-0, then an attempt will be made to postion the review cursor
at that cell. Otherwise, we will pan in display-sized increments
to show the review cursor.
- visualAppearanceChanged(self, event, obj)
- Called when the visual appearance of an object changes. This
method should not be called for objects whose visual appearance
changes solely because of focus -- setLocusOfFocus is used for that.
Instead, it is intended mostly for objects whose notional 'value' has
changed, such as a checkbox changing state, a progress bar advancing,
a slider moving, text inserted, caret moved, etc.
Arguments:
- event: if not None, the Event that caused this to happen
- obj: the Accessible whose visual appearance changed.
- whereAmI(self, inputEvent)
Methods inherited from orca.script.Script:
- processBrailleEvent(self, brailleEvent)
- Called whenever a key is pressed on the Braille display.
This method will primarily use the braillebindings field of
this script instance see if this script has an interest in the
event.
NOTE: there is latent, but unsupported, logic for allowing
the user's user-settings.py file to extend and/or override
the braillebindings for a script.
Arguments:
- brailleEvent: an instance of input_event.BrailleEvent
Returns True if the event was consumed; otherwise False
- processKeyboardEvent(self, keyboardEvent)
- Processes the given keyboard event. This method is called
synchronously from the AT-SPI registry and should be
performant. In addition, it must return True if it has
consumed the event (and False if not).
This method will primarily use the keybindings field of this
script instance see if this script has an interest in the
event.
NOTE: there is latent, but unsupported, logic for allowing
the user's user-settings.py file to extend and/or override
the keybindings for a script.
Arguments:
- keyboardEvent: an instance of input_event.KeyboardEvent
Returns True if the event was consumed; otherwise False
|