ImGui Knobs: rotary knobs for numeric values, in several styles (tick, dot, wiper, stepped, space...).
The C++ API of ImGui Knobs as it is bound to Python: the entries of the module imgui_bundle.imgui_knobs, in the same order, with their C++ signatures and the headers’ comments. From the stubs: the functions excluded from the bindings, the typedefs and the macros are absent.
imgui-knobs.h¶
ImGuiKnobFlags_ (enum)¶
| Member | Value | |
|---|---|---|
ImGuiKnobFlags_NoTitle = 1 << 0 | 1 << 0 | |
ImGuiKnobFlags_NoInput = 1 << 1 | 1 << 1 | |
ImGuiKnobFlags_ValueTooltip = 1 << 2 | 1 << 2 | |
ImGuiKnobFlags_DragHorizontal = 1 << 3 | 1 << 3 | |
ImGuiKnobFlags_DragVertical = 1 << 4 | 1 << 4 | |
ImGuiKnobFlags_Logarithmic = 1 << 5 | 1 << 5 | |
ImGuiKnobFlags_AlwaysClamp = 1 << 6 | 1 << 6 |
ImGuiKnobVariant_ (enum)¶
| Member | Value | |
|---|---|---|
ImGuiKnobVariant_Tick = 1 << 0 | 1 << 0 | |
ImGuiKnobVariant_Dot = 1 << 1 | 1 << 1 | |
ImGuiKnobVariant_Wiper = 1 << 2 | 1 << 2 | |
ImGuiKnobVariant_WiperOnly = 1 << 3 | 1 << 3 | |
ImGuiKnobVariant_WiperDot = 1 << 4 | 1 << 4 | |
ImGuiKnobVariant_Stepped = 1 << 5 | 1 << 5 | |
ImGuiKnobVariant_Space = 1 << 6, } | 1 << 6 |
color_set (struct)¶
| Member | |
|---|---|
ImColor base; | |
ImColor hovered; | |
ImColor active; |
color_set::color_set¶
color_set(ImColor base, ImColor hovered, ImColor active)color_set() : base(ImColor(0, 0, 0)), hovered(ImColor(0, 0, 0)), active(ImColor(0, 0, 0));color_set(ImColor color);KnobColors (struct)¶
| Member | |
|---|---|
color_set primary; | |
color_set secondary; | |
color_set track; |
ImGuiKnobs::SetKnobColors¶
void SetKnobColors(const KnobColors& colors);Set custom knob colors. Pass individual color_sets for primary (indicator), secondary (circle body), and track (background arc).
ImGuiKnobs::UnsetKnobColors¶
void UnsetKnobColors();Reset to theme-aware defaults (auto-detects dark/light theme).
ImGuiKnobs::Knob¶
bool Knob( const char *label, float *p_value, float v_min, float v_max, float speed = 0, const char *format = "%.3f", ImGuiKnobVariant variant = ImGuiKnobVariant_Tick, float size = 0, ImGuiKnobFlags flags = 0, int steps = 10, float angle_min = -1, float angle_max = -1);ImGuiKnobs::KnobInt¶
bool KnobInt( const char *label, int *p_value, int v_min, int v_max, float speed = 0, const char *format = "%i", ImGuiKnobVariant variant = ImGuiKnobVariant_Tick, float size = 0, ImGuiKnobFlags flags = 0, int steps = 10, float angle_min = -1, float angle_max = -1);