imgui_knobs.pyi 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. ###############################################################################
  2. # This file is a part of Dear ImGui Bundle, NOT a part of imgui-knobs
  3. # -----------------------------------------------------------------------------
  4. # imgui_knobs.pyi: auto-generated bindings for imgui-knobs (Knobs for ImGui)
  5. # See https://github.com/altschuler/imgui-knobs
  6. #
  7. # Most of the code of this file is automatically generated (using https://pthom.github.io/litgen/),
  8. # and is generally very close to the C++ version. Comments, docs are identical.
  9. # Do not manually edit the autogenerated parts (look for "Autogenerated" comments)!
  10. ###############################################################################
  11. from typing import Tuple, Optional, overload
  12. import enum
  13. from imgui_bundle.imgui import ImColor
  14. ImGuiKnobFlags = int
  15. ImGuiKnobVariant = int
  16. # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! AUTOGENERATED CODE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  17. # <litgen_stub> // Autogenerated code below! Do not edit!
  18. #################### <generated_from:imgui-knobs.h> ####################
  19. class ImGuiKnobFlags_(enum.IntEnum):
  20. no_title = enum.auto() # (= 1 << 0)
  21. no_input = enum.auto() # (= 1 << 1)
  22. value_tooltip = enum.auto() # (= 1 << 2)
  23. drag_horizontal = enum.auto() # (= 1 << 3)
  24. drag_vertical = enum.auto() # (= 1 << 4)
  25. logarithmic = enum.auto() # (= 1 << 5)
  26. always_clamp = enum.auto() # (= 1 << 6)
  27. class ImGuiKnobVariant_(enum.IntEnum):
  28. tick = enum.auto() # (= 1 << 0)
  29. dot = enum.auto() # (= 1 << 1)
  30. wiper = enum.auto() # (= 1 << 2)
  31. wiper_only = enum.auto() # (= 1 << 3)
  32. wiper_dot = enum.auto() # (= 1 << 4)
  33. stepped = enum.auto() # (= 1 << 5)
  34. space = enum.auto() # (= 1 << 6)
  35. class color_set:
  36. base: ImColor
  37. hovered: ImColor
  38. active: ImColor
  39. @overload
  40. def __init__(self, base: ImColor, hovered: ImColor, active: ImColor) -> None:
  41. pass
  42. @overload
  43. def __init__(self) -> None:
  44. pass
  45. @overload
  46. def __init__(self, color: ImColor) -> None:
  47. pass
  48. class KnobColors:
  49. primary: color_set
  50. secondary: color_set
  51. track: color_set
  52. def __init__(
  53. self,
  54. primary: Optional[color_set] = None,
  55. secondary: Optional[color_set] = None,
  56. track: Optional[color_set] = None,
  57. ) -> None:
  58. """Auto-generated default constructor with named params
  59. Python bindings defaults:
  60. If any of the params below is None, then its default value below will be used:
  61. * primary: color_set()
  62. * secondary: color_set()
  63. * track: color_set()
  64. """
  65. pass
  66. def set_knob_colors(colors: KnobColors) -> None:
  67. """Set custom knob colors. Pass individual color_sets for primary (indicator),
  68. secondary (circle body), and track (background arc).
  69. """
  70. pass
  71. def unset_knob_colors() -> None:
  72. """Reset to theme-aware defaults (auto-detects dark/light theme)."""
  73. pass
  74. def knob(
  75. label: str,
  76. p_value: float,
  77. v_min: float,
  78. v_max: float,
  79. speed: float = 0,
  80. format: str = "%.3",
  81. variant: Optional[ImGuiKnobVariant] = None,
  82. size: float = 0,
  83. flags: ImGuiKnobFlags = 0,
  84. steps: int = 10,
  85. angle_min: float = -1,
  86. angle_max: float = -1,
  87. ) -> Tuple[bool, float]:
  88. """Python bindings defaults:
  89. If variant is None, then its default value will be: ImGuiKnobVariant_.tick
  90. """
  91. pass
  92. def knob_int(
  93. label: str,
  94. p_value: int,
  95. v_min: int,
  96. v_max: int,
  97. speed: float = 0,
  98. format: str = "%i",
  99. variant: Optional[ImGuiKnobVariant] = None,
  100. size: float = 0,
  101. flags: ImGuiKnobFlags = 0,
  102. steps: int = 10,
  103. angle_min: float = -1,
  104. angle_max: float = -1,
  105. ) -> Tuple[bool, int]:
  106. """Python bindings defaults:
  107. If variant is None, then its default value will be: ImGuiKnobVariant_.tick
  108. """
  109. pass
  110. #################### </generated_from:imgui-knobs.h> ####################
  111. # </litgen_stub> // Autogenerated code end!