from __future__ import annotations
from typing import Any, Protocol, runtime_checkable
from com.sun.star.uno import XInterface

@runtime_checkable
class XTextComponent(XInterface, Protocol):
    def addTextListener(self, l: XTextListener) -> None: ...
    def removeTextListener(self, l: XTextListener) -> None: ...
    def setText(self, aText: str) -> None: ...
    def insertText(self, Sel: Selection, Text: str) -> None: ...
    def getText(self) -> str: ...
    def getSelectedText(self) -> str: ...
    def setSelection(self, aSelection: Selection) -> None: ...
    def getSelection(self) -> Selection: ...
    def isEditable(self) -> bool: ...
    def setEditable(self, bEditable: bool) -> None: ...
    def setMaxTextLen(self, nLen: int) -> None: ...
    def getMaxTextLen(self) -> int: ...
