.. _stdlib_imgui_style_builtin: ================================================ Style helpers — colors, vars, push/pop, themes ================================================ .. das:module:: imgui_style_builtin Style stack primitives plus the ``with_style((key, val), …) { … }`` call_macro for scoped style overrides. ``push_style_one`` is overloaded for color (``ImGuiCol`` key with ``ImVec4`` or packed ``uint``) and var (``ImGuiStyleVar`` key with ``float`` or ``ImVec2``); ``pop_style_n(n)`` rolls back exactly ``n`` entries via a per-thread kind stack that batches into one ``PopStyleColor`` + one ``PopStyleVar`` call. The ``with_style`` macro emits push/invoke/pop in source order for arbitrary heterogeneous tuples — what daslang's uniform varargs can't express. +++++++++++ Call macros +++++++++++ .. _call-macro-imgui_style_builtin-with_style: .. das:attribute:: with_style Function annotation with_style ++++++++ Push/pop ++++++++ * :ref:`pop_style_n (n: int) ` * :ref:`push_style_one (idx: ImGuiCol; col: uint) ` * :ref:`push_style_one (idx: ImGuiStyleVar; val: ImVec2) ` * :ref:`push_style_one (idx: ImGuiCol; col: ImVec4) ` * :ref:`push_style_one (idx: ImGuiStyleVar; val: float) ` .. _function-imgui_style_builtin_pop_style_n_int: .. das:function:: pop_style_n(n: int) Pop the last ``n`` entries pushed via :ref:`push_style_one `, issuing one bulk ``PopStyleColor`` and one bulk ``PopStyleVar``. :Arguments: * **n** : int push_style_one ^^^^^^^^^^^^^^ .. _function-imgui_style_builtin_push_style_one_ImGuiCol_uint: .. das:function:: push_style_one(idx: ImGuiCol; col: uint) Push one ImGui style entry — color (``ImGuiCol`` key) or var (``ImGuiStyleVar`` key); paired with :ref:`pop_style_n `. :Arguments: * **idx** : :ref:`ImGuiCol ` * **col** : uint .. _function-imgui_style_builtin_push_style_one_ImGuiStyleVar_ImVec2: .. das:function:: push_style_one(idx: ImGuiStyleVar; val: ImVec2) .. _function-imgui_style_builtin_push_style_one_ImGuiCol_ImVec4: .. das:function:: push_style_one(idx: ImGuiCol; col: ImVec4) .. _function-imgui_style_builtin_push_style_one_ImGuiStyleVar_float: .. das:function:: push_style_one(idx: ImGuiStyleVar; val: float)