interface nsIAccessibleText
nsIAccessibleText interface
- readonly attribute long caretOffset
- Gets the offset of a caret
- readonly attribute long characterCount
- A read only attribute.
- boolean setCaretOffset (in long offset)
- Sets the caret (cursor) position to the specified offset
- DOMString getText (in long startOffset, in long endOffset)
- Gets the text between the specified starting offset and the end offset
- AString getTextAfterOffset (in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset)
- Gets the specified text.
- AString getTextAtOffset (in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset)
- Gets the specified text.
- wchar getCharacterAtOffset (in long offset)
- Gets the character at the specified offset
- nsISupports getAttributeRange (in long offset, out long rangeStartOffset, out long rangeEndOffset)
- Creates a nsISupports which consists of the attributes explicitly set at the position offset in the text.
- AString getTextBeforeOffset (in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset)
- Gets the specified text.
- void getCharacterExtents (in long offset, out long x, out long y, out long length, out long width, in nsAccessibleCoordType coordType)
- Given an offset, the x, y, width, and length values are filled appropriately.
- long getOffsetAtPoint (in long x, in long y, in nsAccessibleCoordType coordType)
- Gets the offset of the character located at coordinates x and y.
- void getSelectionBounds (in long selectionNum, out long startOffset, out long endOffset)
- Gets the text from the specified selection.
- boolean setSelectionBounds (in long selectionNum, in long startOffset, in long endOffset)
- Sets the start and end offset of the specified selection.
- boolean addSelection (in long selectionNum, in long startOffset, in long endOffset)
- Adds a selection bounded by the specified offsets
- boolean removeSelection (in long selectionNum)
- Removes a selection bounded by the specified offsets
Public Fields
Public Methods
Documentation
nsIAccessibleText interface
- readonly attribute long caretOffset
-
Gets the offset of a caret
- boolean setCaretOffset(in long offset)
-
Sets the caret (cursor) position to the specified offset
- Parameters:
-
offset - specify the position of the caret
- Returns:
-
a boolean result. TRUE if success, FALSE otherwise.
- readonly attribute long characterCount
-
A read only attribute. Gets the count of character in the specified text.
- DOMString getText(in long startOffset, in long endOffset)
-
Gets the text between the specified starting offset and the end offset
- Parameters:
-
startOffset - indicate the starting position of the text
endOffset - indicate the end position of the text
- Returns:
-
the text from startOffset up to endOffset
- AString getTextAfterOffset(in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset)
-
Gets the specified text.
- Parameters:
-
offset - the position of the specified text
boundaryType - a nsAccessibleTextBoundary parameter showing the text boundary types
startOffset - the start offset of the returned string
endOffset - the end offset of the returned string
- Returns:
-
the text in AString style after offset bounded by the specified boundaryType
- AString getTextAtOffset(in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset)
-
Gets the specified text.
- Parameters:
-
offset - the position of specified text
boundaryType - indicate the text boundary types
startOffset - the starting position of the text
endOffset - the end position of the text
- Returns:
-
the specified text at the offset in AString
- wchar getCharacterAtOffset(in long offset)
-
Gets the character at the specified offset
- Parameters:
-
offset - indicate the position of the character
- Returns:
-
the specified character
- nsISupports getAttributeRange(in long offset, out long rangeStartOffset, out long rangeEndOffset)
-
Creates a nsISupports which consists of the attributes explicitly set at
the position offset in the text. start_offset and end_offset are set to the
start and end of the range around offset where the attributes are invariant.
- Parameters:
-
offset - the offset at which to get the attributes
rangeStartOffset - output the start offset of the range
rangeEndOffset - output the end offset of the range
- Returns:
-
an nsISupports which contains the attributes explicitly set at offset.
- AString getTextBeforeOffset(in long offset, in nsAccessibleTextBoundary boundaryType, out long startOffset, out long endOffset)
-
Gets the specified text.
- Parameters:
-
offset - the position of specified text
boundaryType - indicate the text boundary types
startOffset - the starting position of the text
endOffset - the end position of the text
- Returns:
-
the text before offset in AString style bounded by the specified boundary_type.
- void getCharacterExtents(in long offset, out long x, out long y, out long length, out long width, in nsAccessibleCoordType coordType)
-
Given an offset, the x, y, width, and length values are filled appropriately.
- Parameters:
-
offset - the position of the given character
coordType - specify whether coordinates are relative to the screen or widget window
x - output the x value of the character
y - output the y value of the character @length output the length of the character @width output the width of the character
- long getOffsetAtPoint(in long x, in long y, in nsAccessibleCoordType coordType)
-
Gets the offset of the character located at coordinates x and y. x and
y are interpreted as being relative to the screen or this widget's window
depending on coords.
- Parameters:
-
x - screen x-position of character
y - screen y-position of character
coordType - specify whether coordinates are relative to the screen or widget window
- void getSelectionBounds(in long selectionNum, out long startOffset, out long endOffset)
-
Gets the text from the specified selection.
- Parameters:
-
selectionNum - The selection number. The selected regions are assigned
numbers that correspond to how far the region is from the start of the text.
The selected region closest to the beginning of the text region is assigned
the number 0, etc. Note that adding, moving or deleting a selected region
can change the numbering.
startOffset - passes back the start position of the selected region
endOffset - passes back the end position of the selected region
- Returns:
-
the text from the specified selection
- boolean setSelectionBounds(in long selectionNum, in long startOffset, in long endOffset)
-
Sets the start and end offset of the specified selection.
- Parameters:
-
selectionNum - The selection number. The selected regions are assigned
numbers that correspond to how far the region is from the start of the text.
The selected region closest to the beginning of the text region is assigned
the number 0, etc. Note that adding, moving or deleting a selected region
can change the numbering.
startOffset - the new start position of the selection
endOffset - the new end position of the selection
- Returns:
-
the result of setting selection bounds. If success, returns true. Else
returns false.
- boolean addSelection(in long selectionNum, in long startOffset, in long endOffset)
-
Adds a selection bounded by the specified offsets
- Parameters:
-
selectionNum - The selection number.
startOffset - the start position of the selected region
endOffset - the end position of the selected region
- Returns:
-
the result of adding selection. If success, returns true. Else returns
false.
- boolean removeSelection(in long selectionNum)
-
Removes a selection bounded by the specified offsets
- Parameters:
-
selectionNum - The selection number.
- Returns:
-
the result of adding selection. If success, returns true. Else returns
false.
- This class has no child classes.
This page was generated with the help of DOC++ .