| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- ###############################################################################
- # This file is a part of Dear ImGui Bundle, NOT a part of imgui-knobs
- # -----------------------------------------------------------------------------
- # imgui_knobs.pyi: auto-generated bindings for imgui-knobs (Knobs for ImGui)
- # See https://github.com/altschuler/imgui-knobs
- #
- # Most of the code of this file is automatically generated (using https://pthom.github.io/litgen/),
- # and is generally very close to the C++ version. Comments, docs are identical.
- # Do not manually edit the autogenerated parts (look for "Autogenerated" comments)!
- ###############################################################################
- from typing import Tuple, Optional, overload
- import enum
- from imgui_bundle.imgui import ImColor
- ImGuiKnobFlags = int
- ImGuiKnobVariant = int
- # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! AUTOGENERATED CODE !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- # <litgen_stub> // Autogenerated code below! Do not edit!
- #################### <generated_from:imgui-knobs.h> ####################
- class ImGuiKnobFlags_(enum.IntEnum):
- no_title = enum.auto() # (= 1 << 0)
- no_input = enum.auto() # (= 1 << 1)
- value_tooltip = enum.auto() # (= 1 << 2)
- drag_horizontal = enum.auto() # (= 1 << 3)
- drag_vertical = enum.auto() # (= 1 << 4)
- logarithmic = enum.auto() # (= 1 << 5)
- always_clamp = enum.auto() # (= 1 << 6)
- class ImGuiKnobVariant_(enum.IntEnum):
- tick = enum.auto() # (= 1 << 0)
- dot = enum.auto() # (= 1 << 1)
- wiper = enum.auto() # (= 1 << 2)
- wiper_only = enum.auto() # (= 1 << 3)
- wiper_dot = enum.auto() # (= 1 << 4)
- stepped = enum.auto() # (= 1 << 5)
- space = enum.auto() # (= 1 << 6)
- class color_set:
- base: ImColor
- hovered: ImColor
- active: ImColor
- @overload
- def __init__(self, base: ImColor, hovered: ImColor, active: ImColor) -> None:
- pass
- @overload
- def __init__(self) -> None:
- pass
- @overload
- def __init__(self, color: ImColor) -> None:
- pass
- class KnobColors:
- primary: color_set
- secondary: color_set
- track: color_set
- def __init__(
- self,
- primary: Optional[color_set] = None,
- secondary: Optional[color_set] = None,
- track: Optional[color_set] = None,
- ) -> None:
- """Auto-generated default constructor with named params
- Python bindings defaults:
- If any of the params below is None, then its default value below will be used:
- * primary: color_set()
- * secondary: color_set()
- * track: color_set()
- """
- pass
- def set_knob_colors(colors: KnobColors) -> None:
- """Set custom knob colors. Pass individual color_sets for primary (indicator),
- secondary (circle body), and track (background arc).
- """
- pass
- def unset_knob_colors() -> None:
- """Reset to theme-aware defaults (auto-detects dark/light theme)."""
- pass
- def knob(
- label: str,
- p_value: float,
- v_min: float,
- v_max: float,
- speed: float = 0,
- format: str = "%.3",
- variant: Optional[ImGuiKnobVariant] = None,
- size: float = 0,
- flags: ImGuiKnobFlags = 0,
- steps: int = 10,
- angle_min: float = -1,
- angle_max: float = -1,
- ) -> Tuple[bool, float]:
- """Python bindings defaults:
- If variant is None, then its default value will be: ImGuiKnobVariant_.tick
- """
- pass
- def knob_int(
- label: str,
- p_value: int,
- v_min: int,
- v_max: int,
- speed: float = 0,
- format: str = "%i",
- variant: Optional[ImGuiKnobVariant] = None,
- size: float = 0,
- flags: ImGuiKnobFlags = 0,
- steps: int = 10,
- angle_min: float = -1,
- angle_max: float = -1,
- ) -> Tuple[bool, int]:
- """Python bindings defaults:
- If variant is None, then its default value will be: ImGuiKnobVariant_.tick
- """
- pass
- #################### </generated_from:imgui-knobs.h> ####################
- # </litgen_stub> // Autogenerated code end!
|