LibreOffice LibreOffice 25.8 SDK API Reference

Public Member Functions | List of all members
XTextComponent Interface Referencepublished

gives access to the text of a component and makes it possible to register event listeners. More...

`import"XTextComponent.idl";`

Inheritance diagram for XTextComponent:

## Public Member Functions
void | addTextListener ([in] com::sun::star::awt::XTextListener l)
| registers a text event listener. More...
void | removeTextListener ([in] com::sun::star::awt::XTextListener l)
| unregisters a text event listener. More...
void | setText ([in] string aText)
| sets the text of the component. More...
void | insertText ([in] com::sun::star::awt::Selection Sel, [in] string Text)
| inserts text at the specified position. More...
string | getText ()
| returns the text of the component. More...
string | getSelectedText ()
| returns the currently selected text. More...
void | setSelection ([in] com::sun::star::awt::Selection aSelection)
| sets the user selection. More...
com::sun::star::awt::Selection | getSelection ()
| returns the current user selection. More...
boolean | isEditable ()
| returns if the text is editable by the user. More...
void | setEditable ([in] boolean bEditable)
| makes the text editable for the user or read-only. More...
void | setMaxTextLen ([in] short nLen)
| sets the maximum text length. More...
short | getMaxTextLen ()
| returns the currently set maximum text length. More...
Public Member Functions inherited from XInterface
any | queryInterface ([in] type aType)
| queries for a new interface to an existing UNO object. More...
void | acquire ()
| increases the reference counter by one. More...
void | release ()
| decreases the reference counter by one. More...

## Detailed Description

gives access to the text of a component and makes it possible to register event listeners.

## Member Function Documentation

## ◆ addTextListener()

void addTextListener | ( | [in] com::sun::star::awt::XTextListener | l | ) |

registers a text event listener.

## ◆ getMaxTextLen()

short getMaxTextLen | ( |  | ) |

returns the currently set maximum text length.

## ◆ getSelectedText()

string getSelectedText | ( |  | ) |

returns the currently selected text.

## ◆ getSelection()

com::sun::star::awt::Selection getSelection | ( |  | ) |

returns the current user selection.

## ◆ getText()

string getText | ( |  | ) |

returns the text of the component.

## ◆ insertText()

void insertText | ( | [in] com::sun::star::awt::Selection | Sel,
|  | [in] string | Text
| ) |  |

inserts text at the specified position.

## ◆ isEditable()

boolean isEditable | ( |  | ) |

returns if the text is editable by the user.

## ◆ removeTextListener()

void removeTextListener | ( | [in] com::sun::star::awt::XTextListener | l | ) |

unregisters a text event listener.

## ◆ setEditable()

void setEditable | ( | [in] boolean | bEditable | ) |

makes the text editable for the user or read-only.

## ◆ setMaxTextLen()

void setMaxTextLen | ( | [in] short | nLen | ) |

sets the maximum text length.

## ◆ setSelection()

void setSelection | ( | [in] com::sun::star::awt::Selection | aSelection | ) |

sets the user selection.

## ◆ setText()

void setText | ( | [in] string | aText | ) |

sets the text of the component.

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

- com/sun/star/awt/XTextComponent.idl