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

@runtime_checkable
class XMenu(XInterface, Protocol):
    def addMenuListener(self, xListener: XMenuListener) -> None: ...
    def removeMenuListener(self, xListener: XMenuListener) -> None: ...
    def insertItem(self, nItemId: int, aText: str, nItemStyle: int, nItemPos: int) -> None: ...
    def removeItem(self, nItemPos: int, nCount: int) -> None: ...
    def clear(self) -> None: ...
    def getItemCount(self) -> int: ...
    def getItemId(self, nItemPos: int) -> int: ...
    def getItemPos(self, nItemId: int) -> int: ...
    def getItemType(self, nItemPos: int) -> MenuItemType: ...
    def enableItem(self, nItemId: int, bEnable: bool) -> None: ...
    def isItemEnabled(self, nItemId: int) -> bool: ...
    def hideDisabledEntries(self, bHide: bool) -> None: ...
    def enableAutoMnemonics(self, bEnable: bool) -> None: ...
    def setItemText(self, nItemId: int, aText: str) -> None: ...
    def getItemText(self, nItemId: int) -> str: ...
    def setCommand(self, nItemId: int, aCommand: str) -> None: ...
    def getCommand(self, nItemId: int) -> str: ...
    def setHelpCommand(self, nItemId: int, aCommand: str) -> None: ...
    def getHelpCommand(self, nItemId: int) -> str: ...
    def setHelpText(self, nItemId: int, sHelpText: str) -> None: ...
    def getHelpText(self, nItemId: int) -> str: ...
    def setTipHelpText(self, nItemId: int, sTipHelpText: str) -> None: ...
    def getTipHelpText(self, nItemId: int) -> str: ...
    def isPopupMenu(self) -> bool: ...
    def setPopupMenu(self, nItemId: int, aPopupMenu: XPopupMenu) -> None: ...
    def getPopupMenu(self, nItemId: int) -> XPopupMenu: ...
