| | |
- Line
- Region
-
- Component
-
- ReviewComponent
- ReviewText
- Text
class Component(Region) |
| |
A subclass of Region backed by an accessible. This Region will react
to any cursor routing key events and perform the default action on the
accessible, if a default action exists. |
| |
Methods defined here:
- __init__(self, accessible, string, cursorOffset=0)
- Creates a new Component.
Arguments:
- accessible: the accessible
- string: the string to use to represent the component
- cursorOffset: a 0-based index saying where to draw the cursor
for this Region if it gets focus.
- processCursorKey(self, offset)
- Processes a cursor key press on this Component. The offset is
0-based, where 0 represents the leftmost character of string
associated with this region. Note that the zeroeth character may have
been scrolled off the display.
|
class Line |
| |
A horizontal line on the display. Each Line is composed of a sequential
set of Regions. |
| |
Methods defined here:
- __init__(self, region=None)
- addRegion(self, region)
- addRegions(self, regions)
- getLineInfo(self)
- Computes the complete string for this line as well as a
0-based index where the focused region starts on this line.
If the region with focus is not on this line, then the index
will be -1.
Returns [string, offsetIndex]
- getRegionAtOffset(self, offset)
- Finds the Region at the given 0-based offset in this line.
Returns the [region, offsetinregion] where the region is
the region at the given offset, and offsetinregion is the
0-based offset from the beginning of the region, representing
where in the region the given offset is.
- processCursorKey(self, offset)
- Processes a cursor key press on this Component. The offset is
0-based, where 0 represents the leftmost character of string
associated with this line. Note that the zeroeth character may have
been scrolled off the display.
|
class Region |
| |
A Braille region to be displayed on the display. The width of
each region is determined by its string. |
| |
Methods defined here:
- __init__(self, string, cursorOffset=0)
- Creates a new Region containing the given string.
Arguments:
- string: the string to be displayed
- cursorOffset: a 0-based index saying where to draw the cursor
for this Region if it gets focus.
- processCursorKey(self, offset)
- Processes a cursor key press on this Component. The offset is
0-based, where 0 represents the leftmost character of string
associated with this region. Note that the zeroeth character may have
been scrolled off the display.
|
class ReviewComponent(Component) |
| |
A subclass of Component that is to be used for flat review mode. |
| |
- Method resolution order:
- ReviewComponent
- Component
- Region
Methods defined here:
- __init__(self, accessible, string, cursorOffset, zone)
- Creates a new Component.
Arguments:
- accessible: the accessible
- string: the string to use to represent the component
- cursorOffset: a 0-based index saying where to draw the cursor
for this Region if it gets focus.
- zone: the flat review Zone associated with this component
Methods inherited from Component:
- processCursorKey(self, offset)
- Processes a cursor key press on this Component. The offset is
0-based, where 0 represents the leftmost character of string
associated with this region. Note that the zeroeth character may have
been scrolled off the display.
|
class ReviewText(Region) |
| |
A subclass of Region backed by a Text object. This Region will
does not react to the caret changes, but will react if one updates
the cursorPosition. This class is meant to be used by flat review
mode to show the current character position. |
| |
Methods defined here:
- __init__(self, accessible, string, lineOffset, zone)
- Creates a new Text region.
Arguments:
- accessible: the accessible that implements AccessibleText
- string: the string to use to represent the component
- lineOffset: the character offset into where the text line starts
- zone: the flat review Zone associated with this component
- processCursorKey(self, offset)
- Processes a cursor key press on this Component. The offset is
0-based, where 0 represents the leftmost character of text associated
with this region. Note that the zeroeth character may have been
scrolled off the display.
|
class Text(Region) |
| |
A subclass of Region backed by a Text object. This Region will
react to any cursor routing key events by positioning the caret in
the associated text object. The line displayed will be the
contents of the text object preceded by an optional label.
[[[TODO: WDW - need to add in text selection capabilities. Logged
as bugzilla bug 319754.]]] |
| |
Methods defined here:
- __init__(self, accessible, label=None)
- Creates a new Text region.
Arguments:
- accessible: the accessible that implements AccessibleText
- label: an optional label to display
- processCursorKey(self, offset)
- Processes a cursor key press on this Component. The offset is
0-based, where 0 represents the leftmost character of text associated
with this region. Note that the zeroeth character may have been
scrolled off the display.
- repositionCursor(self)
- Attempts to reposition the cursor in response to a new
caret position. If it is possible (i.e., the caret is on
the same line as it was), reposition the cursor and return
True. Otherwise, return False.
| |