Loading...
Searching...
No Matches
juce::AccessibilityTextInterface Class Referenceabstract

## Detailed Description

An abstract interface which represents a UI element that supports a text interface.

A UI element can use this interface to provide extended textual information which cannot be conveyed using just the title, description, and help text properties of AccessibilityHandler. This is typically for text that an accessibility client might want to read line-by-line, or provide text selection and input for.

The documentation for this class was generated from the following file:

- juce_gui_basics/accessibility/interfaces/juce_AccessibilityTextInterface.h

## Public Member Functions

virtual | ~AccessibilityTextInterface ()=default
| Destructor.
virtual bool | isDisplayingProtectedText () const =0
| Returns true if the text being displayed is protected and should not be exposed to the user, for example a password entry field.
virtual bool | isReadOnly () const =0
| Returns true if the text being displayed is read-only or false if editable.
virtual int | getTotalNumCharacters () const =0
| Returns the total number of characters in the text element.
virtual Range< int > | getSelection () const =0
| Returns the range of characters that are currently selected, or an empty range if nothing is selected.
virtual void | setSelection (Range< int > newRange)=0
| Selects a section of the text.
virtual int | getTextInsertionOffset () const =0
| Gets the current text insertion position, if supported.
virtual String | getText (Range< int > range) const =0
| Returns a section of text.
String | getAllText () const
| Returns the full text.
virtual void | setText (const String &newText)=0
| Replaces the text with a new string.
virtual RectangleList< int > | getTextBounds (Range< int > textRange) const =0
| Returns the bounding box in screen coordinates for a range of text.
virtual int | getOffsetAtPoint (Point< int > point) const =0
| Returns the index of the character at a given position in screen coordinates.

## Constructors and Destructors

## ~AccessibilityTextInterface()

virtual juce::AccessibilityTextInterface::~AccessibilityTextInterface | ( |  | ) |

virtual default

Destructor.

## Member Functions

## isDisplayingProtectedText()

virtual bool juce::AccessibilityTextInterface::isDisplayingProtectedText | ( |  | ) | const

pure virtual

Returns true if the text being displayed is protected and should not be exposed to the user, for example a password entry field.

## isReadOnly()

virtual bool juce::AccessibilityTextInterface::isReadOnly | ( |  | ) | const

pure virtual

Returns true if the text being displayed is read-only or false if editable.

## getTotalNumCharacters()

virtual int juce::AccessibilityTextInterface::getTotalNumCharacters | ( |  | ) | const

pure virtual

Returns the total number of characters in the text element.

Referenced by getAllText().

## getSelection()

virtual Range< int > juce::AccessibilityTextInterface::getSelection | ( |  | ) | const

pure virtual

Returns the range of characters that are currently selected, or an empty range if nothing is selected.

## setSelection()

virtual void juce::AccessibilityTextInterface::setSelection | ( | Range< int > | newRange | ) |

pure virtual

Selects a section of the text.

## getTextInsertionOffset()

virtual int juce::AccessibilityTextInterface::getTextInsertionOffset | ( |  | ) | const

pure virtual

Gets the current text insertion position, if supported.

## getText()

virtual String juce::AccessibilityTextInterface::getText | ( | Range< int > | range | ) | const

pure virtual

Returns a section of text.

Referenced by getAllText().

## getAllText()

String juce::AccessibilityTextInterface::getAllText | ( |  | ) | const

inline

Returns the full text.

References getText(), and getTotalNumCharacters().

## setText()

virtual void juce::AccessibilityTextInterface::setText | ( | const String & | newText | ) |

pure virtual

Replaces the text with a new string.

## getTextBounds()

virtual RectangleList< int > juce::AccessibilityTextInterface::getTextBounds | ( | Range< int > | textRange | ) | const

pure virtual

Returns the bounding box in screen coordinates for a range of text.

As the range may span multiple lines, this method returns a RectangleList.

## getOffsetAtPoint()

virtual int juce::AccessibilityTextInterface::getOffsetAtPoint | ( | Point< int > | point | ) | const

pure virtual

Returns the index of the character at a given position in screen coordinates.

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited