widgets.pyi 831 B

12345678910111213141516171819202122232425262728293031
  1. from typing import Any, Literal
  2. from matplotlib.axes import Axes
  3. from matplotlib.backend_bases import Event, MouseButton
  4. from matplotlib.widgets import AxesWidget, Widget
  5. def get_ax() -> Axes: ...
  6. def noop(*args: Any, **kwargs: Any) -> None: ...
  7. def mock_event(
  8. ax: Axes,
  9. button: MouseButton | int | Literal["up", "down"] | None = ...,
  10. xdata: float = ...,
  11. ydata: float = ...,
  12. key: str | None = ...,
  13. step: int = ...,
  14. ) -> Event: ...
  15. def do_event(
  16. tool: AxesWidget,
  17. etype: str,
  18. button: MouseButton | int | Literal["up", "down"] | None = ...,
  19. xdata: float = ...,
  20. ydata: float = ...,
  21. key: str | None = ...,
  22. step: int = ...,
  23. ) -> None: ...
  24. def click_and_drag(
  25. tool: Widget,
  26. start: tuple[float, float],
  27. end: tuple[float, float],
  28. key: str | None = ...,
  29. ) -> None: ...