from __future__ import annotations
from typing import Any, Protocol, runtime_checkable

@runtime_checkable
class XPopupMenu(XMenu, Protocol):
    def insertSeparator(self, nItemPos: int) -> None: ...
    def setDefaultItem(self, nItemId: int) -> None: ...
    def getDefaultItem(self) -> int: ...
    def checkItem(self, nItemId: int, bCheck: bool) -> None: ...
    def isItemChecked(self, nItemId: int) -> bool: ...
    def execute(self, Parent: XWindowPeer, Position: Rectangle, Direction: int) -> int: ...
    def isInExecute(self) -> bool: ...
    def endExecute(self) -> None: ...
    def setAcceleratorKeyEvent(self, nItemId: int, aKeyEvent: KeyEvent) -> None: ...
    def getAcceleratorKeyEvent(self, nItemId: int) -> KeyEvent: ...
    def setItemImage(self, nItemId: int, xGraphic: XGraphic, bScale: bool) -> None: ...
    def getItemImage(self, nItemId: int) -> XGraphic: ...
