diff --git a/CMakeLists.txt b/CMakeLists.txt index 320877d..c6b2e26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1.0) +cmake_minimum_required(VERSION 3.12) project(polyscope-py) # Gather dependencies @@ -24,6 +24,8 @@ pybind11_add_module(polyscope_bindings src/cpp/managed_buffer.cpp src/cpp/imgui.cpp ) +set_property(TARGET polyscope_bindings PROPERTY CXX_STANDARD 17) +set_property(TARGET polyscope_bindings PROPERTY CXX_STANDARD_REQUIRED TRUE) set_target_properties(polyscope_bindings PROPERTIES CXX_VISIBILITY_PRESET "default") target_include_directories(polyscope_bindings PUBLIC "${EIGEN3_INCLUDE_DIR}") diff --git a/codegen/gen_imgui_bindings.py b/codegen/gen_imgui_bindings.py new file mode 100644 index 0000000..b264c81 --- /dev/null +++ b/codegen/gen_imgui_bindings.py @@ -0,0 +1,1239 @@ +from typing import List, Optional, Callable +import json +from pathlib import Path +from pydantic import BaseModel +from collections import defaultdict +from functools import partial +from enum import Enum, StrEnum + + +class Parameter(BaseModel): + name: str + type: str + default: Optional[str] = None + + +class Function(BaseModel): + name: str + return_type: str + parameters: List[Parameter] + description: Optional[str] = None + + +class Functions(BaseModel): + namespace: str + functions: List[Function] + + +class EnumValue(BaseModel): + name: str + value: Optional[str | int] = None + description: Optional[str] = None + + +class Enum(BaseModel): + name: str + values: List[EnumValue] + + +class Library(BaseModel): + functions: Functions + enums: List[Enum] + + +library: Library = Library.parse_obj( + json.loads((Path(__file__).parent / "imgui-bindings.json").read_bytes()) +) + + +def as_string_literal(s: str) -> str: + return f'"{s}"' + + +class ArgBinding(BaseModel): + arg_name: Optional[str] = None + arg_type: Optional[str] = None + arg_default: Optional[str] = None + decl_name: Optional[str] = None + decl: Optional[str] = None + ret: Optional[str] = None + ret_type: Optional[str] = None + + def pybind_arg_arg(self) -> Optional[str]: + if self.arg_name is None: + return None + + arg = f"py::arg({as_string_literal(self.arg_name)})" + if self.arg_default is not None: + arg = f"{arg} = {self.arg_default}" + return arg + + def cpp_arg(self) -> Optional[str]: + if self.arg_name is None: + return None + + return f"{self.arg_type} {self.arg_name}" + + +def const_char_ptr(param: Parameter) -> ArgBinding: + if param.default == "NULL": + arg_name = param.name + decl_name = f"{param.name}_" + decl = f"const char *{decl_name} = {arg_name}.has_value() ? {arg_name}.value().c_str() : nullptr;" + return ArgBinding( + arg_name=arg_name, + arg_type="const std::optional&", + arg_default="std::nullopt", + decl_name=decl_name, + decl=decl, + ret=None, + ) + else: + arg_default = None + if param.default is not None: + arg_default = param.default + return ArgBinding( + arg_name=param.name, + arg_type=param.type, + arg_default=arg_default, + decl_name=param.name, + decl=None, + ret=None, + ) + + +def const_imvec2_ptr(param: Parameter) -> ArgBinding: + if param.default == "NULL": + arg_name = param.name + decl_name = f"{param.name}_" + decl = f"const ImVec2 *{decl_name} = {arg_name}.has_value() ? &{arg_name}.value() : nullptr;" + return ArgBinding( + arg_name=arg_name, + arg_type="const std::optional&", + arg_default="std::nullopt", + decl_name=decl_name, + decl=decl, + ret=None, + ) + else: + raise ValueError("Not Implemented") + + +def ptr(param: Parameter, type: str) -> ArgBinding: + arg_name = param.name + decl_name = f"{param.name}_" + decl = f"{type} *{decl_name} = &{arg_name};" + return ArgBinding( + arg_name=arg_name, + arg_type=type, + arg_default=param.default, + decl_name=decl_name, + decl=decl, + ret=arg_name, + ret_type=type, + ) + + +def bool_ptr(param: Parameter) -> ArgBinding: + if param.default is not None and param.default == "NULL": + arg_name = "open" + arg_type = "std::optional" + decl_name = param.name + decl = f"bool *{decl_name} = {arg_name}.has_value() ? &{arg_name}.value() : nullptr;" + ret = arg_name + return ArgBinding( + arg_name=arg_name, + arg_type=arg_type, + arg_default="std::nullopt", + decl_name=decl_name, + decl=decl, + ret=ret, + ret_type=arg_type, + ) + else: + return ptr(param, "bool") + + +def pass_thru(param: Parameter) -> ArgBinding: + return ArgBinding( + arg_name=param.name, + arg_type=param.type, + arg_default=param.default, + decl_name=param.name, + decl=None, + ret=None, + ) + + +double_ptr = partial(ptr, type="double") +float_ptr = partial(ptr, type="float") +int_ptr = partial(ptr, type="int") + + +def const_char_ptr_array(param: Parameter) -> ArgBinding: + arg_name = param.name + decl_name = f"{param.name}_" + decl = f"const auto {decl_name} = convert_string_items({arg_name});" + return ArgBinding( + arg_name=arg_name, + arg_type="const std::vector&", + arg_default=param.default, + decl_name=f"{decl_name}.data()", + decl=decl, + ret=None, + ) + + +def imgui_style_ptr(param: Parameter) -> ArgBinding: + return ArgBinding( + arg_name=None, + arg_type=None, + arg_default=None, + decl_name=None, + decl=None, + ret=None, + ) + + +def array_n(param: Parameter, type: str, n: int) -> ArgBinding: + arg_type = f"std::array<{type}, {n}>" + return ArgBinding( + arg_name=param.name, + arg_type=arg_type, + arg_default=param.default, + decl_name=f"{param.name}.data()", + decl=None, + ret=param.name, + ret_type=arg_type, + ) + + +def const_void_ptr(param: Parameter) -> ArgBinding: + arg_name = param.name + decl_name = f"{param.name}_" + decl = f"void* {decl_name} = PyBytes_AsString({arg_name}.ptr());" + return ArgBinding( + arg_name=arg_name, + arg_type="py::bytes&", + arg_default=param.default, + decl_name=decl_name, + decl=decl, + ret=None, + ) + + +float_array_2 = partial(array_n, type="float", n=2) +float_array_3 = partial(array_n, type="float", n=3) +float_array_4 = partial(array_n, type="float", n=4) +int_array_2 = partial(array_n, type="int", n=2) +int_array_3 = partial(array_n, type="int", n=3) +int_array_4 = partial(array_n, type="int", n=4) + + +param_dispatch = { + "bool*": bool_ptr, + "bool": pass_thru, + "const char*": const_char_ptr, + "ImGuiWindowFlags": pass_thru, + "ImGuiTreeNodeFlags": pass_thru, + "ImGuiSelectableFlags": pass_thru, + "ImGuiInputTextFlags": pass_thru, + "ImGuiPopupFlags": pass_thru, + "ImGuiDragDropFlags": pass_thru, + "ImGuiID": pass_thru, + "ImGuiCol": pass_thru, + "double*": double_ptr, + "float*": float_ptr, + "float[2]": float_array_2, + "float[3]": float_array_3, + "float[4]": float_array_4, + "double": pass_thru, + "float": pass_thru, + "int": pass_thru, + "ImU32": pass_thru, + "unsigned int": pass_thru, + "int*": int_ptr, + "int[2]": int_array_2, + "int[3]": int_array_3, + "int[4]": int_array_4, + "unsigned int*": int_ptr, + "ImGuiSliderFlags": pass_thru, + "ImGuiColorEditFlags": pass_thru, + "ImGuiCond": pass_thru, + "const ImVec2&": pass_thru, + "const ImVec4&": pass_thru, + "ImGuiChildFlags": pass_thru, + "ImGuiStyleVar": pass_thru, + "const char* const[]": const_char_ptr_array, + "ImGuiStyle*": imgui_style_ptr, + "const void*": const_void_ptr, + "ImGuiTabItemFlags": pass_thru, + "const ImVec2*": const_imvec2_ptr, +} + + +def esc_description(desc: str) -> str: + return desc.replace('"', '\\"') + + +def combo_items_count_param(param: Parameter) -> ArgBinding: + decl = f"const auto {param.name} = items_.size();" + return ArgBinding( + arg_name=None, + arg_type=None, + arg_default=None, + decl_name=param.name, + decl=decl, + ret=None, + ) + + +def color_picker4_ref_col(param: Parameter) -> ArgBinding: + decl_name = f"{param.name}_" + decl = f"const float * {decl_name} = {param.name} ? &{param.name}.value()[0] : nullptr;" + return ArgBinding( + arg_name=param.name, + arg_type="const std::optional>&", + arg_default="std::nullopt", + decl_name=decl_name, + decl=decl, + ret=None, + ) + + +def const_char_ptr_fmt(param: Parameter) -> ArgBinding: + return ArgBinding( + arg_name=None, + arg_type=None, + arg_default=None, + decl_name='"%s"', + decl=None, + ret=None, + ) + + +def elipses(param: Parameter) -> ArgBinding: + arg_name = "text" + return ArgBinding( + arg_name=arg_name, + arg_type="const char *", + arg_default=None, + decl_name=arg_name, + decl=None, + ret=None, + ) + + +def char_ptr_buf(param: Parameter) -> ArgBinding: + arg_name = "str" + decl_name = "str_" + decl = f"auto {decl_name} = {arg_name};" + return ArgBinding( + arg_name=arg_name, + arg_type="const std::string&", + arg_default=None, + decl_name=f"&{decl_name}", + decl=decl, + ret=decl_name, + ret_type="const char*", + ) + + +def input_text_flags(param: Parameter) -> ArgBinding: + decl = f""" + IM_ASSERT(({param.name} & ImGuiInputTextFlags_CallbackResize) == 0); + {param.name} |= ImGuiInputTextFlags_CallbackResize; + """ + return ArgBinding( + arg_name=param.name, + arg_type=param.type, + arg_default=param.default, + decl_name=param.name, + decl=decl, + ret=None, + ) + + +def empty(param: Parameter) -> ArgBinding: + return ArgBinding() + + +def drag_drop_size(param: Parameter) -> ArgBinding: + decl_name = "data_size" + decl = f"const auto {decl_name} = PyBytes_Size(data.ptr());" + return ArgBinding( + arg_name=None, + arg_type=None, + arg_default=None, + decl_name=decl_name, + decl=decl, + ret=None, + ) + + +def route_param(param: Parameter, func: Function) -> Callable[[Parameter], ArgBinding]: + if func.name == "Combo" and param.name == "items_count": + return combo_items_count_param + if func.name == "ColorPicker4" and param.name == "ref_col": + return color_picker4_ref_col + if param.name == "fmt" and param.type == "const char*": + return const_char_ptr_fmt + if param.name == "...": + return elipses + if param.name == "buf" and param.type == "char*": + return char_ptr_buf + if param.name == "flags" and param.type == "ImGuiInputTextFlags": + return input_text_flags + if param.name == "buf_size" and param.type == "size_t": + return empty + if param.type == "ImGuiInputTextCallback": + return empty + if param.name == "user_data" and param.type == "void*": + return empty + if func.name == "SetDragDropPayload" and param.name == "sz": + return drag_drop_size + + if param.type not in param_dispatch: + raise ValueError( + f"Unknown parameter type: {param.type} in function {func.name}" + ) + + return param_dispatch[param.type] + + +class FuncBindingStyle(StrEnum): + FunctionPtr = "FunctionPtr" + Lambda = "Lambda" + + +class CustomReturn(BaseModel): + ret_assign: str + ret_expr: str + + +class BoundFunction(BaseModel): + namespace: str + func: Function + binding_style: FuncBindingStyle + py_args: List[ArgBinding] + ret_types: List[str] + ret_custom: Optional[CustomReturn] = None + ret_policy: Optional[str] = None + + def cpp_name(self) -> str: + return f"{self.namespace}::{self.func.name}" + + def cpp_func_ptr(self) -> str: + return f"&{self.cpp_name()}" + + def pybind_name_arg(self) -> str: + return as_string_literal(self.func.name) + + def pybind_args(self) -> List[str]: + args = [] + for py_arg in self.py_args: + arg = py_arg.pybind_arg_arg() + if arg is not None: + args.append(arg) + return args + + def cpp_args(self) -> List[str]: + args = [] + for py_arg in self.py_args: + arg = py_arg.cpp_arg() + if arg is not None: + args.append(arg) + return args + + def pybind_description_arg(self) -> Optional[str]: + if self.func.description is None: + return None + return as_string_literal(esc_description(self.func.description)) + + +def function_ptr( + namespace: str, + func: Function, + ret_policy: Optional[str] = None, +) -> BoundFunction: + py_args: List[ArgBinding] = [] + for param in func.parameters: + py_args.append( + ArgBinding( + arg_name=param.name, + arg_type=param.type, + arg_default=param.default, + ) + ) + + ret_types = [] + if func.return_type != "void": + ret_types.append(func.return_type) + + return BoundFunction( + namespace=namespace, + func=func, + binding_style=FuncBindingStyle.FunctionPtr, + py_args=py_args, + ret_types=ret_types, + ret_policy=ret_policy, + ) + + +def drag_drop_payload(namespace: str, func: Function) -> CustomReturn: + name = "payload" + return CustomReturn( + ret_assign=f"const auto *{name}", + ret_expr=f"py::bytes(static_cast({name}->Data), {name}->DataSize)", + ) + + +custom_ret_dispatch = { + "AcceptDragDropPayload": drag_drop_payload, + "GetDragDropPayload": drag_drop_payload, +} + + +def collect_ret_types(func: Function, py_args: List[ArgBinding]) -> List[str]: + ret_types = [] + if func.return_type != "void": + ret_types.append(func.return_type) + + for py_arg in py_args: + if py_arg.ret_type is not None: + ret_types.append(py_arg.ret_type) + + return ret_types + + +def wrapped_binding(namespace: str, func: Function) -> BoundFunction: + py_args: List[ArgBinding] = [] + for param in func.parameters: + f = route_param(param, func) + py_args.append(f(param)) + + ret_custom: Optional[CustomReturn] = None + if func.name in custom_ret_dispatch: + ret_custom = custom_ret_dispatch[func.name](namespace, func) + + return BoundFunction( + namespace=namespace, + func=func, + binding_style=FuncBindingStyle.Lambda, + py_args=py_args, + ret_custom=ret_custom, + ret_types=collect_ret_types(func, py_args), + ) + + +def wrap_color_conversion(namespace: str, func: Function) -> BoundFunction: + arg_name = "".join([param.name for param in func.parameters[:3]]) + decl_name = ( + f"std::get<0>({arg_name}), std::get<1>({arg_name}), std::get<2>({arg_name})" + ) + py_args = [ + ArgBinding( + arg_name=arg_name, + arg_type="const std::tuple&", + arg_default=None, + decl_name=decl_name, + ), + ArgBinding( + decl="float out0, out1, out2;", + decl_name="out0, out1, out2", + ret="std::make_tuple(out0, out1, out2)", + ret_type="std::tuple", + ), + ] + + return BoundFunction( + namespace=namespace, + func=func, + binding_style=FuncBindingStyle.Lambda, + py_args=py_args, + ret_types=collect_ret_types(func, py_args), + ) + + +function_ptr_ret_reference = partial( + function_ptr, + ret_policy="py::return_value_policy::reference", +) + + +template_dispatch = { + "CreateContext": None, + "DestroyContext": None, + "GetCurrentContext": None, + "SetCurrentContext": None, + "GetIO": None, # TODO + "GetStyle": None, # TODO + "NewFrame": function_ptr, + "EndFrame": function_ptr, + "Render": function_ptr, + "GetDrawData": None, + "ShowDemoWindow": wrapped_binding, + "ShowMetricsWindow": wrapped_binding, + "ShowStyleEditor": wrapped_binding, + "ShowUserGuide": function_ptr, + "GetVersion": function_ptr, + "StyleColorsDark": wrapped_binding, + "StyleColorsLight": wrapped_binding, + "StyleColorsClassic": wrapped_binding, + "Begin": wrapped_binding, + "End": function_ptr, + "BeginChild": wrapped_binding, + "EndChild": function_ptr, + "IsWindowAppearing": function_ptr, + "IsWindowCollapsed": function_ptr, + "IsWindowFocused": function_ptr, + "IsWindowHovered": function_ptr, + "GetWindowDrawList": None, + "GetWindowPos": function_ptr, + "GetWindowSize": function_ptr, + "SetNextWindowPos": function_ptr, + "SetNextWindowSize": function_ptr, + "SetNextWindowSizeConstraints": None, + "SetNextWindowContentSize": function_ptr, + "SetNextWindowCollapsed": function_ptr, + "SetNextWindowFocus": function_ptr, + "SetNextWindowScroll": function_ptr, + "SetNextWindowBgAlpha": function_ptr, + "SetWindowPos": wrapped_binding, + "SetWindowSize": wrapped_binding, + "SetWindowCollapsed": wrapped_binding, + "SetWindowFocus": wrapped_binding, + "SetWindowFontScale": None, # Obsolete + "GetScrollX": function_ptr, + "GetScrollY": function_ptr, + "SetScrollX": function_ptr, + "SetScrollY": function_ptr, + "GetScrollMaxX": function_ptr, + "GetScrollMaxY": function_ptr, + "SetScrollHereX": function_ptr, + "SetScrollHereY": function_ptr, + "SetScrollFromPosX": function_ptr, + "SetScrollFromPosY": function_ptr, + "PushFont": None, # TODO + "PopFont": None, # TODO + "PushStyleColor": wrapped_binding, + "PopStyleColor": function_ptr, + "PushStyleVar": wrapped_binding, + "PopStyleVar": function_ptr, + "PushItemFlag": function_ptr, + "PopItemFlag": function_ptr, + "PushItemWidth": function_ptr, + "PopItemWidth": function_ptr, + "SetNextItemWidth": function_ptr, + "CalcItemWidth": function_ptr, + "PushTextWrapPos": function_ptr, + "PopTextWrapPos": function_ptr, + "GetFont": None, # TODO + "GetFontSize": function_ptr, + "GetFontTexUvWhitePixel": function_ptr, + "GetColorU32": wrapped_binding, + "GetStyleColorVec4": function_ptr, + "GetCursorScreenPos": function_ptr, + "SetCursorScreenPos": function_ptr, + "GetContentRegionAvail": function_ptr, + "GetCursorPos": function_ptr, + "GetCursorPosX": function_ptr, + "GetCursorPosY": function_ptr, + "SetCursorPos": function_ptr, + "SetCursorPosX": function_ptr, + "SetCursorPosY": function_ptr, + "GetCursorStartPos": function_ptr, + "Separator": function_ptr, + "SameLine": function_ptr, + "NewLine": function_ptr, + "Dummy": function_ptr, + "Unindent": function_ptr, + "BeginGroup": function_ptr, + "EndGroup": function_ptr, + "AlignTextToFramePadding": function_ptr, + "GetTextLineHeight": function_ptr, + "GetTextLineHeightWithSpacing": function_ptr, + "GetFrameHeight": function_ptr, + "GetFrameHeightWithSpacing": function_ptr, + "PushID": wrapped_binding, + "GetID": wrapped_binding, + # "TextUnformatted": function_ptr, + "TextUnformatted": None, # TODO + "Text": wrapped_binding, + "TextV": None, + "TextColored": wrapped_binding, + "TextColoredV": None, + "TextDisabled": wrapped_binding, + "TextDisabledV": None, + "TextWrapped": wrapped_binding, + "TextWrappedV": None, + "LabelText": wrapped_binding, + "LabelTextV": None, + "BulletText": wrapped_binding, + "BulletTextV": None, + "SeparatorText": function_ptr, + "Button": function_ptr, + "SmallButton": function_ptr, + "InvisibleButton": function_ptr, + "ArrowButton": function_ptr, + "Checkbox": wrapped_binding, + "CheckboxFlags": wrapped_binding, + "RadioButton": wrapped_binding, + "ProgressBar": wrapped_binding, + "Bullet": function_ptr, + "TextLink": function_ptr, + "TextLinkOpenURL": wrapped_binding, + "Image": None, # TODO + "ImageButton": None, # TODO + "BeginCombo": function_ptr, + "EndCombo": function_ptr, + "Combo": wrapped_binding, + "DragFloat": wrapped_binding, + "DragFloat2": wrapped_binding, + "DragFloat3": wrapped_binding, + "DragFloat4": wrapped_binding, + "DragFloatRange2": wrapped_binding, + "DragInt": wrapped_binding, + "DragInt2": wrapped_binding, + "DragInt3": wrapped_binding, + "DragInt4": wrapped_binding, + "DragIntRange2": wrapped_binding, + "DragScalar": None, + "DragScalarN": None, + "SliderFloat": wrapped_binding, + "SliderFloat2": wrapped_binding, + "SliderFloat3": wrapped_binding, + "SliderFloat4": wrapped_binding, + "SliderAngle": wrapped_binding, + "SliderInt": wrapped_binding, + "SliderInt2": wrapped_binding, + "SliderInt3": wrapped_binding, + "SliderInt4": wrapped_binding, + "SliderScalar": None, + "SliderScalarN": None, + "VSliderFloat": wrapped_binding, + "VSliderInt": wrapped_binding, + "VSliderScalar": None, + "InputText": wrapped_binding, + "InputTextMultiline": wrapped_binding, + "InputTextWithHint": wrapped_binding, + "InputFloat": wrapped_binding, + "InputFloat2": wrapped_binding, + "InputFloat3": wrapped_binding, + "InputFloat4": wrapped_binding, + "InputInt": wrapped_binding, + "InputInt2": wrapped_binding, + "InputInt3": wrapped_binding, + "InputInt4": wrapped_binding, + "InputDouble": wrapped_binding, + "InputScalar": None, + "InputScalarN": None, + "ColorEdit3": wrapped_binding, + "ColorEdit4": wrapped_binding, + "ColorPicker3": wrapped_binding, + "ColorPicker4": wrapped_binding, + "ColorButton": function_ptr, + "SetColorEditOptions": function_ptr, + "TreeNode": wrapped_binding, + "TreeNodeV": None, + "TreeNodeEx": wrapped_binding, + "TreeNodeExV": None, + "TreePush": wrapped_binding, + "TreePop": function_ptr, + "GetTreeNodeToLabelSpacing": function_ptr, + "CollapsingHeader": wrapped_binding, + "SetNextItemOpen": function_ptr, + "Selectable": wrapped_binding, + "BeginMultiSelect": None, # TODO + "EndMultiSelect": None, # TODO + "SetNextItemSelectionUserData": None, + "IsItemToggledSelection": function_ptr, + "BeginListBox": function_ptr, + "EndListBox": function_ptr, + "ListBox": wrapped_binding, + "PlotLines": None, # TODO + "PlotHistogram": None, # TODO + "Value": wrapped_binding, + "BeginMenuBar": function_ptr, + "EndMenuBar": function_ptr, + "BeginMainMenuBar": function_ptr, + "EndMainMenuBar": function_ptr, + "BeginMenu": function_ptr, + "EndMenu": function_ptr, + "MenuItem": wrapped_binding, + "BeginTooltip": function_ptr, + "EndTooltip": function_ptr, + "SetTooltip": wrapped_binding, + "SetTooltipV": None, + "BeginItemTooltip": function_ptr, + "EndItemTooltip": function_ptr, + "SetItemTooltip": wrapped_binding, + "SetItemTooltipV": None, + "BeginPopup": function_ptr, + "BeginPopupModal": wrapped_binding, + "EndPopup": function_ptr, + "OpenPopup": wrapped_binding, + "OpenPopupOnItemClick": wrapped_binding, + "CloseCurrentPopup": function_ptr, + "BeginPopupContextItem": wrapped_binding, + "BeginPopupContextWindow": wrapped_binding, + "BeginPopupContextVoid": wrapped_binding, + "IsPopupOpen": function_ptr, + "BeginTable": function_ptr, + "EndTable": function_ptr, + "TableNextColumn": function_ptr, + "TableSetColumnIndex": function_ptr, + "TableSetupColumn": function_ptr, + "TableSetupScrollFreeze": function_ptr, + "TableHeader": function_ptr, + "TableHeadersRow": function_ptr, + "TableAngledHeadersRow": function_ptr, + "TableGetSortSpecs": None, # TODO + "TableGetColumnCount": function_ptr, + "TableGetColumnIndex": function_ptr, + "TableGetRowIndex": function_ptr, + "TableGetColumnName": function_ptr, + "TableGetColumnFlags": function_ptr, + "TableSetColumnEnabled": function_ptr, + "TableGetHoveredColumn": function_ptr, + "TableSetBgColor": function_ptr, + "Columns": wrapped_binding, + "NextColumn": function_ptr, + "GetColumnIndex": function_ptr, + "GetColumnWidth": function_ptr, + "SetColumnWidth": function_ptr, + "GetColumnOffset": function_ptr, + "SetColumnOffset": function_ptr, + "GetColumnsCount": function_ptr, + "BeginTabBar": function_ptr, + "EndTabBar": function_ptr, + "BeginTabItem": wrapped_binding, + "EndTabItem": function_ptr, + "TabItemButton": function_ptr, + "SetTabItemClosed": function_ptr, + "LogToTTY": function_ptr, + "LogToFile": wrapped_binding, + "LogToClipboard": function_ptr, + "LogFinish": function_ptr, + "LogButtons": function_ptr, + "LogText": wrapped_binding, + "LogTextV": None, + "BeginDragDropSource": function_ptr, + "SetDragDropPayload": wrapped_binding, + "EndDragDropSource": function_ptr, + "BeginDragDropTarget": function_ptr, + "AcceptDragDropPayload": wrapped_binding, + "EndDragDropTarget": function_ptr, + "GetDragDropPayload": wrapped_binding, + "BeginDisabled": function_ptr, + "EndDisabled": function_ptr, + "PushClipRect": function_ptr, + "PopClipRect": function_ptr, + "SetItemDefaultFocus": function_ptr, + "SetKeyboardFocusHere": function_ptr, + "SetNextItemAllowOverlap": function_ptr, + "IsItemHovered": function_ptr, + "IsItemActive": function_ptr, + "IsItemFocused": function_ptr, + "IsItemClicked": function_ptr, + "IsItemVisible": function_ptr, + "IsItemEdited": function_ptr, + "IsItemActivated": function_ptr, + "IsItemDeactivated": function_ptr, + "IsItemDeactivatedAfterEdit": function_ptr, + "IsItemToggledOpen": function_ptr, + "IsAnyItemHovered": function_ptr, + "IsAnyItemActive": function_ptr, + "IsAnyItemFocused": function_ptr, + "GetItemID": function_ptr, + "GetItemRectMin": function_ptr, + "GetItemRectMax": function_ptr, + "GetItemRectSize": function_ptr, + "GetMainViewport": None, + "GetBackgroundDrawList": None, + "IsRectVisible": wrapped_binding, + "GetTime": function_ptr, + "GetDrawListSharedData": None, + "GetStyleColorName": function_ptr, + "SetStateStorage": None, + "GetStateStorage": None, + "CalcTextSize": None, + "ColorConvertU32ToFloat4": None, + "ColorConvertFloat4ToU32": None, + "ColorConvertRGBtoHSV": wrap_color_conversion, + "ColorConvertHSVtoRGB": wrap_color_conversion, + "IsKeyDown": function_ptr, + "IsKeyPressed": function_ptr, + "IsKeyReleased": function_ptr, + "IsKeyChordPressed": function_ptr, + "GetKeyPressedAmount": function_ptr, + "GetKeyName": function_ptr, + "SetNextFrameWantCaptureKeyboard": function_ptr, + "Shortcut": function_ptr, + "SetNextItemShortcut": function_ptr, + "SetItemKeyOwner": function_ptr, + "IsMouseDown": function_ptr, + "IsMouseClicked": function_ptr, + "IsMouseReleased": function_ptr, + "IsMouseDoubleClicked": function_ptr, + "GetMouseClickedCount": function_ptr, + "IsMouseHoveringRect": function_ptr, + "IsMousePosValid": wrapped_binding, + "IsAnyMouseDown": function_ptr, + "IsMouseDragging": function_ptr, + "GetMouseDragDelta": function_ptr, + "ResetMouseDragDelta": function_ptr, + "GetMouseCursor": function_ptr, + "SetMouseCursor": function_ptr, + "SetNextFrameWantCaptureMouse": function_ptr, + "GetClipboardText": function_ptr, + "LoadIniSettingsFromDisk": function_ptr, + "LoadIniSettingsFromMemory": None, + "SaveIniSettingsToDisk": function_ptr, + "DebugTextEncoding": function_ptr, + "DebugFlashStyleColor": function_ptr, + "DebugStartItemPicker": function_ptr, + "DebugCheckVersionAndDataLayout": function_ptr, + "SetAllocatorFunctions": None, + "GetAllocatorFunctions": None, + "MemAlloc": None, + "MemFree": None, +} + + +def funcs_filter(func: Function) -> bool: + if func.name in {"PushID", "GetID"}: + for param in func.parameters: + if param.type == "const void*": + return False + elif func.name in {"Combo"}: + for param in func.parameters: + if param.type == "const char* (*)(void* user_data, int idx)": + return False + elif func.name in {"TreeNode", "TreeNodeEx"}: + for param in func.parameters: + if param.type == "const void*" or param.name == "fmt": + # TODO fmt + return False + elif func.name in {"ListBox"}: + for param in func.parameters: + if param.name == "getter": + # TODO fmt + return False + elif func.name in {"TreePush"}: + for param in func.parameters: + if param.type == "const void*": + return False + elif func.name in {"CheckboxFlags", "Value"}: + if func.parameters[-1].type == "unsigned int": + return False + return True + + +def gen_def(bound_func: BoundFunction, f: str) -> str: + args = [ + bound_func.pybind_name_arg(), + f, + ] + args.extend(bound_func.pybind_args()) + description_arg = bound_func.pybind_description_arg() + if description_arg is not None: + args.append(description_arg) + + if bound_func.ret_policy is not None: + args.append(bound_func.ret_policy) + + args_str = ", ".join(args) + return f"m.def({args_str});" + + +def gen_function_ptr_binding(bound_func: BoundFunction) -> str: + return gen_def(bound_func, bound_func.cpp_func_ptr()) + + +def gen_lambda_binding(bound_func: BoundFunction) -> str: + args = ", ".join(bound_func.cpp_args()) + decls = "\n".join( + [py_arg.decl for py_arg in bound_func.py_args if py_arg.decl is not None] + ) + f_call_args = ", ".join( + [ + py_arg.decl_name + for py_arg in bound_func.py_args + if py_arg.decl_name is not None + ] + ) + + ret_names = [] + f_call = f"{bound_func.cpp_name()}({f_call_args});" + if bound_func.func.return_type == "void": + call = f_call + else: + if bound_func.ret_custom is None: + call = f"const auto res_ = {f_call}" + ret_names.append("res_") + else: + call = f"{bound_func.ret_custom.ret_assign} = {f_call}" + ret_names.append(bound_func.ret_custom.ret_expr) + + ret_names.extend( + [py_arg.ret for py_arg in bound_func.py_args if py_arg.ret is not None] + ) + if len(ret_names) == 0: + ret = "" + elif len(ret_names) == 1: + ret = f"return {ret_names[0]};" + else: + ret_args = ", ".join(ret_names) + ret = f"return std::make_tuple({ret_args});" + + f_lambda = f""" + []({args}) {{ + {decls} + {call} + {ret} + }} + """ + + return gen_def(bound_func, f_lambda) + + +bound_funcs = [] +for func in library.functions.functions: + if not funcs_filter(func): + continue + + if func.name in template_dispatch: + f = template_dispatch[func.name] + + if f is not None: + bound_func = f(library.functions.namespace, func) + bound_funcs.append(bound_func) + + +gen_funcs: List[str] = [] +for bound_func in bound_funcs: + if bound_func.binding_style == FuncBindingStyle.FunctionPtr: + gen_funcs.append(gen_function_ptr_binding(bound_func)) + elif bound_func.binding_style == FuncBindingStyle.Lambda: + gen_funcs.append(gen_lambda_binding(bound_func)) + +is_arithmitic_enum = { + "ImGuiWindowFlags_", + "ImGuiChildFlags_", + "ImGuiItemFlags_", + "ImGuiInputTextFlags_", + "ImGuiTreeNodeFlags_", + "ImGuiPopupFlags_", + "ImGuiSelectableFlags_", + "ImGuiComboFlags_", + "ImGuiTabBarFlags_", + "ImGuiTabItemFlags_", + "ImGuiFocusedFlags_", + "ImGuiHoveredFlags_", + "ImGuiDragDropFlags_", + "ImGuiInputFlags_", + "ImGuiConfigFlags_", + "ImGuiBackendFlags_", + "ImGuiButtonFlags_", + "ImGuiColorEditFlags_", + "ImGuiSliderFlags_", + "ImGuiTableFlags_", + "ImGuiTableColumnFlags_", + "ImGuiTableRowFlags_", +} + + +def enum_py_name(name: str) -> str: + enum_name = enum.name + if enum_name.endswith("_"): + enum_name = enum_name[:-1] + return enum_name + + +bound_enums = [] +for enum in library.enums: + values = [] + for enum_value in enum.values: + value = f'.value("{enum_value.name}", {enum.name}::{enum_value.name})' + values.append(value) + + enum_name = enum_py_name(enum.name) + + args = ["m", f'"{enum_name}"'] + is_arithmentic = enum.name in is_arithmitic_enum + if is_arithmentic: + args.append("py::arithmetic()") + + gen_args = ", ".join(args) + gen_values = "".join(values) + + bound_enum = f""" + py::enum_<{enum.name}>({gen_args}) + {gen_values} + .export_values(); + """ + + bound_enums.append(bound_enum) + + +gen_bound_functions = "\n".join(gen_funcs) +gen_bound_enums = "\n".join(bound_enums) +pybind_module = f""" +#include "imgui.h" +#include "misc/cpp/imgui_stdlib.h" + +#include +#include +#include +#include + +#include "imgui_utils.h" + +namespace py = pybind11; + +void bind_imgui_funcs(py::module& m) {{ + {gen_bound_functions} +}} + +void bind_imgui_enums(py::module& m) {{ + {gen_bound_enums} +}} + +void bind_imgui(py::module& m) {{ + auto mod_imgui = m.def_submodule("imgui", "ImGui bindings"); + bind_imgui_funcs(mod_imgui); + bind_imgui_enums(mod_imgui); +}} +""" + +# # print(pybind_module) + + +dest_path = Path(__file__).parent.parent / "src" / "cpp" / "imgui.cpp" +dest_path.write_text(pybind_module) + +cpp_type_to_py_type = { + "std::optional": "Optional[bool]", + "const char*": "str", + "const char *": "str", + "const ImVec2&": "Tuple[float, float]", + "const ImVec4&": "Tuple[float, float, float, float]", + "std::array": "Tuple[float, float]", + "std::array": "Tuple[float, float, float]", + "std::array": "Tuple[float, float, float, float]", + "const std::vector&": "List[str]", + "std::array": "Tuple[int, int]", + "std::array": "Tuple[int, int, int]", + "std::array": "Tuple[int, int, int, int]", + "const std::optional>&": "Optional[Tuple[float, float, float, float]]", + "ImU32": "int", + "const std::tuple&": "Tuple[float, float, float]", + "std::tuple": "Tuple[float, float, float]", + "const std::string&": "str", + "double": "float", + "py::bytes&": "bytes", + "const std::optional&": "Optional[str]", + "const std::optional&": "Optional[Tuple[float, float]]", + "size_t": "int", + "const ImGuiPayload*": "bytes", + "ImVec2": "Tuple[float, float]", +} + + +def py_type(cpp_type: str) -> str: + if cpp_type in cpp_type_to_py_type: + return cpp_type_to_py_type[cpp_type] + else: + return cpp_type + + +def py_default(py_arg: ArgBinding, default: str) -> str: + if default == "std::nullopt": + return None + elif "ImVec2" in default: + return ( + default.replace("ImVec2", "") + .replace("f", "") + .replace("FLT_MIN", "1.175494e-38") + ) + elif default[-1] == "f": + return default[:-1] + elif default == "false": + return "False" + elif default == "true": + return "True" + else: + return default + + +def binding_pyi(bound_func: BoundFunction) -> str: + def_args: List[str] = [] + for py_arg in bound_func.py_args: + if py_arg.arg_name is not None: + def_arg = f"{py_arg.arg_name}: {py_type(py_arg.arg_type)}" + if py_arg.arg_default is not None: + default = py_default(py_arg, py_arg.arg_default) + def_arg += f" = {default}" + def_args.append(def_arg) + + def_rets: List[str] = [] + if bound_func.func.return_type != "void": + def_rets.append(f"{py_type(bound_func.func.return_type)}") + for py_arg in bound_func.py_args: + if py_arg.ret_type is not None: + def_rets.append(f"{py_type(py_arg.ret_type)}") + + def_args_str = ", ".join(def_args) + + if len(def_rets) == 0: + def_ret_str = "None" + elif len(def_rets) == 1: + def_ret_str = def_rets[0] + else: + def_ret_str = f"Tuple[{', '.join(def_rets)}]" + + return f"def {bound_func.func.name}({def_args_str}) -> {def_ret_str}: ..." + + +pyi_bound_funcs = [] +for bound_func in bound_funcs: + pyi_bound_funcs.append(binding_pyi(bound_func)) + +pyi_bound_enums = [] +for enum in library.enums: + enum_name = enum_py_name(enum.name) + lines = [] + lines.append(f"class {enum_name}(Enum):") + gen_value = 0 + for enum_value in enum.values: + if enum_value.value is None: + value = gen_value + gen_value += 1 + else: + value = enum_value.value + lines.append(f" {enum_value.name} = {value}") + + pyi_bound_enums.append("\n".join(lines)) + + +pyi_gen_bound_enums = "\n\n".join(pyi_bound_enums) +pyi_gen_bound_funcs = "\n".join(pyi_bound_funcs) +pyi_module = f""" +from typing import List, NewType, Optional, Tuple, Union, overload +from enum import Enum + +ImGuiID = NewType("ImGuiID", int) +ImGuiKeyChord = NewType("ImGuiKeyChord", int) + +{pyi_gen_bound_enums} + +{pyi_gen_bound_funcs} +""" + +print(pyi_module) +pyi_dest_path = ( + Path(__file__).parent.parent / "src" / "polyscope_bindings" / "imgui.pyi" +) +print(pyi_dest_path) +pyi_dest_path.write_text(pyi_module) diff --git a/codegen/imgui-bindings.json b/codegen/imgui-bindings.json new file mode 100644 index 0000000..9694f42 --- /dev/null +++ b/codegen/imgui-bindings.json @@ -0,0 +1,8984 @@ +{ + "functions": { + "namespace": "ImGui", + "functions": [ + { + "name": "CreateContext", + "return_type": "ImGuiContext*", + "parameters": [ + { + "name": "shared_font_atlas", + "type": "ImFontAtlas*", + "default": "NULL" + } + ], + "description": "Creates a new ImGui context. You can optionally provide a shared font atlas." + }, + { + "name": "DestroyContext", + "return_type": "void", + "parameters": [ + { + "name": "ctx", + "type": "ImGuiContext*", + "default": "NULL" + } + ], + "description": "Destroys the specified ImGui context or the current context if none is provided." + }, + { + "name": "GetCurrentContext", + "return_type": "ImGuiContext*", + "parameters": [], + "description": "Returns the current ImGui context." + }, + { + "name": "SetCurrentContext", + "return_type": "void", + "parameters": [ + { + "name": "ctx", + "type": "ImGuiContext*" + } + ], + "description": "Sets the specified ImGui context as the current context." + }, + { + "name": "GetIO", + "return_type": "ImGuiIO&", + "parameters": [], + "description": "Returns a reference to the ImGuiIO structure, which contains input/output data and configuration options." + }, + { + "name": "GetStyle", + "return_type": "ImGuiStyle&", + "parameters": [], + "description": "Returns a reference to the ImGuiStyle structure, which contains style configurations like colors and sizes." + }, + { + "name": "NewFrame", + "return_type": "void", + "parameters": [], + "description": "Starts a new ImGui frame. This must be called before any other ImGui commands in a frame." + }, + { + "name": "EndFrame", + "return_type": "void", + "parameters": [], + "description": "Ends the current ImGui frame. If you don't need to render data, you can call this without Render()." + }, + { + "name": "Render", + "return_type": "void", + "parameters": [], + "description": "Ends the ImGui frame and finalizes the draw data, which can then be rendered." + }, + { + "name": "GetDrawData", + "return_type": "ImDrawData*", + "parameters": [], + "description": "Returns a pointer to the draw data after Render() has been called." + }, + { + "name": "ShowDemoWindow", + "return_type": "void", + "parameters": [ + { + "name": "p_open", + "type": "bool*", + "default": "NULL" + } + ], + "description": "Creates a demo window that demonstrates most ImGui features." + }, + { + "name": "ShowMetricsWindow", + "return_type": "void", + "parameters": [ + { + "name": "p_open", + "type": "bool*", + "default": "NULL" + } + ], + "description": "Creates a Metrics/Debugger window that displays internal state and other metrics." + }, + { + "name": "ShowStyleEditor", + "return_type": "void", + "parameters": [ + { + "name": "ref", + "type": "ImGuiStyle*", + "default": "NULL" + } + ], + "description": "Opens the style editor, which allows you to customize the style parameters." + }, + { + "name": "ShowUserGuide", + "return_type": "void", + "parameters": [], + "description": "Shows a user guide window with basic help and information about ImGui usage." + }, + { + "name": "GetVersion", + "return_type": "const char*", + "parameters": [], + "description": "Returns the ImGui version as a string." + }, + { + "name": "StyleColorsDark", + "return_type": "void", + "parameters": [ + { + "name": "dst", + "type": "ImGuiStyle*", + "default": "NULL" + } + ], + "description": "Applies the default dark style to the current context." + }, + { + "name": "StyleColorsLight", + "return_type": "void", + "parameters": [ + { + "name": "dst", + "type": "ImGuiStyle*", + "default": "NULL" + } + ], + "description": "Applies the default light style to the current context." + }, + { + "name": "StyleColorsClassic", + "return_type": "void", + "parameters": [ + { + "name": "dst", + "type": "ImGuiStyle*", + "default": "NULL" + } + ], + "description": "Applies the classic ImGui style to the current context." + }, + { + "name": "Begin", + "return_type": "bool", + "parameters": [ + { + "name": "name", + "type": "const char*" + }, + { + "name": "p_open", + "type": "bool*", + "default": "NULL" + }, + { + "name": "flags", + "type": "ImGuiWindowFlags", + "default": "0" + } + ], + "description": "Begins a new window. Returns true if the window is visible." + }, + { + "name": "End", + "return_type": "void", + "parameters": [], + "description": "Ends the current window." + }, + { + "name": "BeginChild", + "return_type": "bool", + "parameters": [ + { + "name": "str_id", + "type": "const char*" + }, + { + "name": "size", + "type": "const ImVec2&", + "default": "ImVec2(0, 0)" + }, + { + "name": "child_flags", + "type": "ImGuiChildFlags", + "default": "0" + }, + { + "name": "window_flags", + "type": "ImGuiWindowFlags", + "default": "0" + } + ], + "description": "Begins a child window, which is a self-contained scrolling/clipping region." + }, + { + "name": "EndChild", + "return_type": "void", + "parameters": [], + "description": "Ends a child window." + }, + { + "name": "IsWindowAppearing", + "return_type": "bool", + "parameters": [], + "description": "Returns true if the current window is appearing." + }, + { + "name": "IsWindowCollapsed", + "return_type": "bool", + "parameters": [], + "description": "Returns true if the current window is collapsed." + }, + { + "name": "IsWindowFocused", + "return_type": "bool", + "parameters": [ + { + "name": "flags", + "type": "ImGuiFocusedFlags", + "default": "0" + } + ], + "description": "Returns true if the current window is focused, or its root/child depending on flags." + }, + { + "name": "IsWindowHovered", + "return_type": "bool", + "parameters": [ + { + "name": "flags", + "type": "ImGuiHoveredFlags", + "default": "0" + } + ], + "description": "Returns true if the current window is hovered and hoverable." + }, + { + "name": "GetWindowDrawList", + "return_type": "ImDrawList*", + "parameters": [], + "description": "Returns the draw list associated with the current window." + }, + { + "name": "GetWindowPos", + "return_type": "ImVec2", + "parameters": [], + "description": "Returns the current window position in screen space." + }, + { + "name": "GetWindowSize", + "return_type": "ImVec2", + "parameters": [], + "description": "Returns the current window size." + }, + { + "name": "SetNextWindowPos", + "return_type": "void", + "parameters": [ + { + "name": "pos", + "type": "const ImVec2&" + }, + { + "name": "cond", + "type": "ImGuiCond", + "default": "0" + }, + { + "name": "pivot", + "type": "const ImVec2&", + "default": "ImVec2(0, 0)" + } + ], + "description": "Sets the position for the next window. Call before Begin()." + }, + { + "name": "SetNextWindowSize", + "return_type": "void", + "parameters": [ + { + "name": "size", + "type": "const ImVec2&" + }, + { + "name": "cond", + "type": "ImGuiCond", + "default": "0" + } + ], + "description": "Sets the size for the next window. Call before Begin()." + }, + { + "name": "SetNextWindowSizeConstraints", + "return_type": "void", + "parameters": [ + { + "name": "size_min", + "type": "const ImVec2&" + }, + { + "name": "size_max", + "type": "const ImVec2&" + }, + { + "name": "custom_callback", + "type": "ImGuiSizeCallback", + "default": "NULL" + }, + { + "name": "custom_callback_data", + "type": "void*", + "default": "NULL" + } + ], + "description": "Sets the size limits for the next window. Use 0.0f or FLT_MAX if no limits are desired. Custom callbacks can be used for complex constraints." + }, + { + "name": "SetNextWindowContentSize", + "return_type": "void", + "parameters": [ + { + "name": "size", + "type": "const ImVec2&" + } + ], + "description": "Sets the content size for the next window (scrollable client area). This does not include window decorations like the title bar or menu bar." + }, + { + "name": "SetNextWindowCollapsed", + "return_type": "void", + "parameters": [ + { + "name": "collapsed", + "type": "bool" + }, + { + "name": "cond", + "type": "ImGuiCond", + "default": "0" + } + ], + "description": "Sets the collapsed state for the next window. This should be called before Begin()." + }, + { + "name": "SetNextWindowFocus", + "return_type": "void", + "parameters": [], + "description": "Sets the next window to be focused and top-most. This should be called before Begin()." + }, + { + "name": "SetNextWindowScroll", + "return_type": "void", + "parameters": [ + { + "name": "scroll", + "type": "const ImVec2&" + } + ], + "description": "Sets the scrolling position for the next window. Use < 0.0f for an axis to leave it unchanged." + }, + { + "name": "SetNextWindowBgAlpha", + "return_type": "void", + "parameters": [ + { + "name": "alpha", + "type": "float" + } + ], + "description": "Sets the background color alpha for the next window. This can be used to override the alpha component of ImGuiCol_WindowBg/ChildBg/PopupBg." + }, + { + "name": "SetWindowPos", + "return_type": "void", + "parameters": [ + { + "name": "pos", + "type": "const ImVec2&" + }, + { + "name": "cond", + "type": "ImGuiCond", + "default": "0" + } + ], + "description": "(Not recommended) Sets the current window position. This should be called within a Begin()/End() block. Prefer using SetNextWindowPos()." + }, + { + "name": "SetWindowSize", + "return_type": "void", + "parameters": [ + { + "name": "size", + "type": "const ImVec2&" + }, + { + "name": "cond", + "type": "ImGuiCond", + "default": "0" + } + ], + "description": "(Not recommended) Sets the current window size. This should be called within a Begin()/End() block. Prefer using SetNextWindowSize()." + }, + { + "name": "SetWindowCollapsed", + "return_type": "void", + "parameters": [ + { + "name": "collapsed", + "type": "bool" + }, + { + "name": "cond", + "type": "ImGuiCond", + "default": "0" + } + ], + "description": "(Not recommended) Sets the current window collapsed state. Prefer using SetNextWindowCollapsed()." + }, + { + "name": "SetWindowFocus", + "return_type": "void", + "parameters": [], + "description": "(Not recommended) Sets the current window to be focused and top-most. Prefer using SetNextWindowFocus()." + }, + { + "name": "SetWindowFontScale", + "return_type": "void", + "parameters": [ + { + "name": "scale", + "type": "float" + } + ], + "description": "[OBSOLETE] Sets the font scale for the current window. It is recommended to adjust IO.FontGlobalScale or reload the font instead." + }, + { + "name": "SetWindowPos", + "return_type": "void", + "parameters": [ + { + "name": "name", + "type": "const char*" + }, + { + "name": "pos", + "type": "const ImVec2&" + }, + { + "name": "cond", + "type": "ImGuiCond", + "default": "0" + } + ], + "description": "Sets the position of the window specified by name." + }, + { + "name": "SetWindowSize", + "return_type": "void", + "parameters": [ + { + "name": "name", + "type": "const char*" + }, + { + "name": "size", + "type": "const ImVec2&" + }, + { + "name": "cond", + "type": "ImGuiCond", + "default": "0" + } + ], + "description": "Sets the size of the window specified by name. Set an axis to 0.0f to force an auto-fit." + }, + { + "name": "SetWindowCollapsed", + "return_type": "void", + "parameters": [ + { + "name": "name", + "type": "const char*" + }, + { + "name": "collapsed", + "type": "bool" + }, + { + "name": "cond", + "type": "ImGuiCond", + "default": "0" + } + ], + "description": "Sets the collapsed state of the window specified by name." + }, + { + "name": "SetWindowFocus", + "return_type": "void", + "parameters": [ + { + "name": "name", + "type": "const char*" + } + ], + "description": "Sets the window specified by name to be focused and top-most." + }, + { + "name": "GetScrollX", + "return_type": "float", + "parameters": [], + "description": "Returns the horizontal scrolling amount, ranging from 0 to GetScrollMaxX()." + }, + { + "name": "GetScrollY", + "return_type": "float", + "parameters": [], + "description": "Returns the vertical scrolling amount, ranging from 0 to GetScrollMaxY()." + }, + { + "name": "SetScrollX", + "return_type": "void", + "parameters": [ + { + "name": "scroll_x", + "type": "float" + } + ], + "description": "Sets the horizontal scrolling amount, ranging from 0 to GetScrollMaxX()." + }, + { + "name": "SetScrollY", + "return_type": "void", + "parameters": [ + { + "name": "scroll_y", + "type": "float" + } + ], + "description": "Sets the vertical scrolling amount, ranging from 0 to GetScrollMaxY()." + }, + { + "name": "GetScrollMaxX", + "return_type": "float", + "parameters": [], + "description": "Returns the maximum horizontal scrolling amount, calculated as ContentSize.x - WindowSize.x - DecorationsSize.x." + }, + { + "name": "GetScrollMaxY", + "return_type": "float", + "parameters": [], + "description": "Returns the maximum vertical scrolling amount, calculated as ContentSize.y - WindowSize.y - DecorationsSize.y." + }, + { + "name": "SetScrollHereX", + "return_type": "void", + "parameters": [ + { + "name": "center_x_ratio", + "type": "float", + "default": "0.5f" + } + ], + "description": "Adjusts the horizontal scrolling amount to make the current cursor position visible. center_x_ratio=0.0 aligns left, 0.5 centers, 1.0 aligns right." + }, + { + "name": "SetScrollHereY", + "return_type": "void", + "parameters": [ + { + "name": "center_y_ratio", + "type": "float", + "default": "0.5f" + } + ], + "description": "Adjusts the vertical scrolling amount to make the current cursor position visible. center_y_ratio=0.0 aligns top, 0.5 centers, 1.0 aligns bottom." + }, + { + "name": "SetScrollFromPosX", + "return_type": "void", + "parameters": [ + { + "name": "local_x", + "type": "float" + }, + { + "name": "center_x_ratio", + "type": "float", + "default": "0.5f" + } + ], + "description": "Adjusts the horizontal scrolling amount to make the specified position visible. Use GetCursorStartPos() + offset to compute a valid position." + }, + { + "name": "SetScrollFromPosY", + "return_type": "void", + "parameters": [ + { + "name": "local_y", + "type": "float" + }, + { + "name": "center_y_ratio", + "type": "float", + "default": "0.5f" + } + ], + "description": "Adjusts the vertical scrolling amount to make the specified position visible. Use GetCursorStartPos() + offset to compute a valid position." + }, + { + "name": "PushFont", + "return_type": "void", + "parameters": [ + { + "name": "font", + "type": "ImFont*" + } + ], + "description": "Pushes the specified font onto the font stack. Use NULL to push the default font." + }, + { + "name": "PopFont", + "return_type": "void", + "parameters": [], + "description": "Pops the last font pushed onto the font stack." + }, + { + "name": "PushStyleColor", + "return_type": "void", + "parameters": [ + { + "name": "idx", + "type": "ImGuiCol" + }, + { + "name": "col", + "type": "ImU32" + } + ], + "description": "Pushes a style color onto the style color stack, modifying the color specified by idx." + }, + { + "name": "PushStyleColor", + "return_type": "void", + "parameters": [ + { + "name": "idx", + "type": "ImGuiCol" + }, + { + "name": "col", + "type": "const ImVec4&" + } + ], + "description": "Pushes a style color onto the style color stack, modifying the color specified by idx." + }, + { + "name": "PopStyleColor", + "return_type": "void", + "parameters": [ + { + "name": "count", + "type": "int", + "default": "1" + } + ], + "description": "Pops one or more style colors from the style color stack." + }, + { + "name": "PushStyleVar", + "return_type": "void", + "parameters": [ + { + "name": "idx", + "type": "ImGuiStyleVar" + }, + { + "name": "val", + "type": "float" + } + ], + "description": "Pushes a style variable onto the style variable stack, modifying the float variable specified by idx." + }, + { + "name": "PushStyleVar", + "return_type": "void", + "parameters": [ + { + "name": "idx", + "type": "ImGuiStyleVar" + }, + { + "name": "val", + "type": "const ImVec2&" + } + ], + "description": "Pushes a style variable onto the style variable stack, modifying the ImVec2 variable specified by idx." + }, + { + "name": "PopStyleVar", + "return_type": "void", + "parameters": [ + { + "name": "count", + "type": "int", + "default": "1" + } + ], + "description": "Pops one or more style variables from the style variable stack." + }, + { + "name": "PushItemFlag", + "return_type": "void", + "parameters": [ + { + "name": "option", + "type": "ImGuiItemFlags" + }, + { + "name": "enabled", + "type": "bool" + } + ], + "description": "Pushes an item flag onto the item flag stack, modifying the specified option." + }, + { + "name": "PopItemFlag", + "return_type": "void", + "parameters": [], + "description": "Pops the last item flag pushed onto the item flag stack." + }, + { + "name": "PushItemWidth", + "return_type": "void", + "parameters": [ + { + "name": "item_width", + "type": "float" + } + ], + "description": "Pushes the width of items for common large 'item+label' widgets. >0.0f: width in pixels, <0.0f aligns the width to the right of the window." + }, + { + "name": "PopItemWidth", + "return_type": "void", + "parameters": [], + "description": "Pops the last item width pushed onto the item width stack." + }, + { + "name": "SetNextItemWidth", + "return_type": "void", + "parameters": [ + { + "name": "item_width", + "type": "float" + } + ], + "description": "Sets the width of the next common large 'item+label' widget. >0.0f: width in pixels, <0.0f aligns the width to the right of the window." + }, + { + "name": "CalcItemWidth", + "return_type": "float", + "parameters": [], + "description": "Calculates the width of the item given the pushed settings and current cursor position." + }, + { + "name": "PushTextWrapPos", + "return_type": "void", + "parameters": [ + { + "name": "wrap_local_pos_x", + "type": "float", + "default": "0.0f" + } + ], + "description": "Pushes the word-wrapping position for Text*() commands. < 0.0f: no wrapping; 0.0f: wrap to end of window; > 0.0f: wrap at 'wrap_pos_x' position in window local space." + }, + { + "name": "PopTextWrapPos", + "return_type": "void", + "parameters": [], + "description": "Pops the last word-wrapping position pushed onto the stack." + }, + { + "name": "GetFont", + "return_type": "ImFont*", + "parameters": [], + "description": "Returns the current font being used." + }, + { + "name": "GetFontSize", + "return_type": "float", + "parameters": [], + "description": "Returns the current font size in pixels, with the current scale applied." + }, + { + "name": "GetFontTexUvWhitePixel", + "return_type": "ImVec2", + "parameters": [], + "description": "Returns the UV coordinate for a white pixel, useful for drawing custom shapes via the ImDrawList API." + }, + { + "name": "GetColorU32", + "return_type": "ImU32", + "parameters": [ + { + "name": "idx", + "type": "ImGuiCol" + }, + { + "name": "alpha_mul", + "type": "float", + "default": "1.0f" + } + ], + "description": "Retrieves the style color specified by idx, with the style alpha applied and an optional extra alpha multiplier, packed as a 32-bit value suitable for ImDrawList." + }, + { + "name": "GetColorU32", + "return_type": "ImU32", + "parameters": [ + { + "name": "col", + "type": "const ImVec4&" + } + ], + "description": "Retrieves the given color with the style alpha applied, packed as a 32-bit value suitable for ImDrawList." + }, + { + "name": "GetColorU32", + "return_type": "ImU32", + "parameters": [ + { + "name": "col", + "type": "ImU32" + }, + { + "name": "alpha_mul", + "type": "float", + "default": "1.0f" + } + ], + "description": "Retrieves the given color with the style alpha applied, packed as a 32-bit value suitable for ImDrawList." + }, + { + "name": "GetStyleColorVec4", + "return_type": "const ImVec4&", + "parameters": [ + { + "name": "idx", + "type": "ImGuiCol" + } + ], + "description": "Retrieves the style color as stored in the ImGuiStyle structure. Use this to feed back into PushStyleColor(), otherwise use GetColorU32() to get the style color with style alpha baked in." + }, + { + "name": "GetCursorScreenPos", + "return_type": "ImVec2", + "parameters": [], + "description": "Returns the current cursor position in absolute screen coordinates. This is typically the best function to use for getting cursor position." + }, + { + "name": "SetCursorScreenPos", + "return_type": "void", + "parameters": [ + { + "name": "pos", + "type": "const ImVec2&" + } + ], + "description": "Sets the cursor position in absolute screen coordinates." + }, + { + "name": "GetContentRegionAvail", + "return_type": "ImVec2", + "parameters": [], + "description": "Returns the available space from the current position. This is typically the best function to use for getting the available content region." + }, + { + "name": "GetCursorPos", + "return_type": "ImVec2", + "parameters": [], + "description": "Returns the current cursor position in window-local coordinates." + }, + { + "name": "GetCursorPosX", + "return_type": "float", + "parameters": [], + "description": "Returns the X coordinate of the current cursor position in window-local coordinates." + }, + { + "name": "GetCursorPosY", + "return_type": "float", + "parameters": [], + "description": "Returns the Y coordinate of the current cursor position in window-local coordinates." + }, + { + "name": "SetCursorPos", + "return_type": "void", + "parameters": [ + { + "name": "local_pos", + "type": "const ImVec2&" + } + ], + "description": "Sets the cursor position in window-local coordinates." + }, + { + "name": "SetCursorPosX", + "return_type": "void", + "parameters": [ + { + "name": "local_x", + "type": "float" + } + ], + "description": "Sets the X coordinate of the cursor position in window-local coordinates." + }, + { + "name": "SetCursorPosY", + "return_type": "void", + "parameters": [ + { + "name": "local_y", + "type": "float" + } + ], + "description": "Sets the Y coordinate of the cursor position in window-local coordinates." + }, + { + "name": "GetCursorStartPos", + "return_type": "ImVec2", + "parameters": [], + "description": "Returns the initial cursor position in window-local coordinates. Call GetCursorScreenPos() after Begin() to get the absolute coordinates version." + }, + { + "name": "Separator", + "return_type": "void", + "parameters": [], + "description": "Creates a separator, generally horizontal. Inside a menu bar or in horizontal layout mode, this becomes a vertical separator." + }, + { + "name": "SameLine", + "return_type": "void", + "parameters": [ + { + "name": "offset_from_start_x", + "type": "float", + "default": "0.0f" + }, + { + "name": "spacing", + "type": "float", + "default": "-1.0f" + } + ], + "description": "Lays out widgets horizontally by undoing the last carriage return. The X position is given in window coordinates." + }, + { + "name": "NewLine", + "return_type": "void", + "parameters": [], + "description": "Forces a new line when in a horizontal-layout context or undoes a SameLine()." + }, + { + "name": "Spacing", + "return_type": "void", + "parameters": [], + "description": "Adds vertical spacing." + }, + { + "name": "Dummy", + "return_type": "void", + "parameters": [ + { + "name": "size", + "type": "const ImVec2&" + } + ], + "description": "Adds a dummy item of the given size. Unlike InvisibleButton(), Dummy() won't take mouse clicks or be navigable." + }, + { + "name": "Indent", + "return_type": "void", + "parameters": [ + { + "name": "indent_w", + "type": "float", + "default": "0.0f" + } + ], + "description": "Moves the content position to the right by indent_w, or by style.IndentSpacing if indent_w <= 0." + }, + { + "name": "Unindent", + "return_type": "void", + "parameters": [ + { + "name": "indent_w", + "type": "float", + "default": "0.0f" + } + ], + "description": "Moves the content position back to the left by indent_w, or by style.IndentSpacing if indent_w <= 0." + }, + { + "name": "BeginGroup", + "return_type": "void", + "parameters": [], + "description": "Locks the horizontal starting position for a group of items." + }, + { + "name": "EndGroup", + "return_type": "void", + "parameters": [], + "description": "Unlocks the horizontal starting position for a group of items and captures the whole group bounding box as one 'item.'" + }, + { + "name": "AlignTextToFramePadding", + "return_type": "void", + "parameters": [], + "description": "Vertically aligns the upcoming text baseline to FramePadding.y, so that it aligns properly with regularly framed items." + }, + { + "name": "GetTextLineHeight", + "return_type": "float", + "parameters": [], + "description": "Returns the height of a text line, approximately equal to FontSize." + }, + { + "name": "GetTextLineHeightWithSpacing", + "return_type": "float", + "parameters": [], + "description": "Returns the height of a text line, including spacing. Approximately equal to FontSize + style.ItemSpacing.y." + }, + { + "name": "GetFrameHeight", + "return_type": "float", + "parameters": [], + "description": "Returns the height of a frame, approximately equal to FontSize + style.FramePadding.y * 2." + }, + { + "name": "GetFrameHeightWithSpacing", + "return_type": "float", + "parameters": [], + "description": "Returns the height of a frame, including spacing. Approximately equal to FontSize + style.FramePadding.y * 2 + style.ItemSpacing.y." + }, + { + "name": "PushID", + "return_type": "void", + "parameters": [ + { + "name": "str_id", + "type": "const char*" + } + ], + "description": "Pushes a string into the ID stack (will hash the string)." + }, + { + "name": "PushID", + "return_type": "void", + "parameters": [ + { + "name": "str_id_begin", + "type": "const char*" + }, + { + "name": "str_id_end", + "type": "const char*" + } + ], + "description": "Pushes a substring into the ID stack (will hash the string)." + }, + { + "name": "PushID", + "return_type": "void", + "parameters": [ + { + "name": "ptr_id", + "type": "const void*" + } + ], + "description": "Pushes a pointer into the ID stack (will hash the pointer)." + }, + { + "name": "PushID", + "return_type": "void", + "parameters": [ + { + "name": "int_id", + "type": "int" + } + ], + "description": "Pushes an integer into the ID stack (will hash the integer)." + }, + { + "name": "PopID", + "return_type": "void", + "parameters": [], + "description": "Pops from the ID stack." + }, + { + "name": "GetID", + "return_type": "ImGuiID", + "parameters": [ + { + "name": "str_id", + "type": "const char*" + } + ], + "description": "Calculates a unique ID by hashing the entire ID stack with the given parameter. Useful for querying ImGuiStorage." + }, + { + "name": "GetID", + "return_type": "ImGuiID", + "parameters": [ + { + "name": "str_id_begin", + "type": "const char*" + }, + { + "name": "str_id_end", + "type": "const char*" + } + ], + "description": "Calculates a unique ID by hashing the entire ID stack with the given substring." + }, + { + "name": "GetID", + "return_type": "ImGuiID", + "parameters": [ + { + "name": "ptr_id", + "type": "const void*" + } + ], + "description": "Calculates a unique ID by hashing the entire ID stack with the given pointer." + }, + { + "name": "GetID", + "return_type": "ImGuiID", + "parameters": [ + { + "name": "int_id", + "type": "int" + } + ], + "description": "Calculates a unique ID by hashing the entire ID stack with the given integer." + }, + { + "name": "TextUnformatted", + "return_type": "void", + "parameters": [ + { + "name": "text", + "type": "const char*" + }, + { + "name": "text_end", + "type": "const char*", + "default": "NULL" + } + ], + "description": "Displays raw text without formatting. This is roughly equivalent to Text('%s', text) but faster and with no memory copy, buffer size limits, or null termination requirement if text_end is specified." + }, + { + "name": "Text", + "return_type": "void", + "parameters": [ + { + "name": "fmt", + "type": "const char*" + }, + { + "name": "...", + "type": "..." + } + ], + "description": "Displays formatted text." + }, + { + "name": "TextV", + "return_type": "void", + "parameters": [ + { + "name": "fmt", + "type": "const char*" + }, + { + "name": "args", + "type": "va_list" + } + ], + "description": "Displays formatted text using a va_list." + }, + { + "name": "TextColored", + "return_type": "void", + "parameters": [ + { + "name": "col", + "type": "const ImVec4&" + }, + { + "name": "fmt", + "type": "const char*" + }, + { + "name": "...", + "type": "..." + } + ], + "description": "Displays formatted text with the specified color." + }, + { + "name": "TextColoredV", + "return_type": "void", + "parameters": [ + { + "name": "col", + "type": "const ImVec4&" + }, + { + "name": "fmt", + "type": "const char*" + }, + { + "name": "args", + "type": "va_list" + } + ], + "description": "Displays formatted text with the specified color using a va_list." + }, + { + "name": "TextDisabled", + "return_type": "void", + "parameters": [ + { + "name": "fmt", + "type": "const char*" + }, + { + "name": "...", + "type": "..." + } + ], + "description": "Displays formatted text in a disabled style (gray color)." + }, + { + "name": "TextDisabledV", + "return_type": "void", + "parameters": [ + { + "name": "fmt", + "type": "const char*" + }, + { + "name": "args", + "type": "va_list" + } + ], + "description": "Displays formatted text in a disabled style (gray color) using a va_list." + }, + { + "name": "TextWrapped", + "return_type": "void", + "parameters": [ + { + "name": "fmt", + "type": "const char*" + }, + { + "name": "...", + "type": "..." + } + ], + "description": "Displays formatted text with word-wrapping enabled. The text will wrap at the end of the window or column by default." + }, + { + "name": "TextWrappedV", + "return_type": "void", + "parameters": [ + { + "name": "fmt", + "type": "const char*" + }, + { + "name": "args", + "type": "va_list" + } + ], + "description": "Displays formatted text with word-wrapping enabled using a va_list." + }, + { + "name": "LabelText", + "return_type": "void", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "fmt", + "type": "const char*" + }, + { + "name": "...", + "type": "..." + } + ], + "description": "Displays a label and value aligned in the same way as value+label widgets." + }, + { + "name": "LabelTextV", + "return_type": "void", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "fmt", + "type": "const char*" + }, + { + "name": "args", + "type": "va_list" + } + ], + "description": "Displays a label and value aligned in the same way as value+label widgets using a va_list." + }, + { + "name": "BulletText", + "return_type": "void", + "parameters": [ + { + "name": "fmt", + "type": "const char*" + }, + { + "name": "...", + "type": "..." + } + ], + "description": "Displays a bullet followed by formatted text." + }, + { + "name": "BulletTextV", + "return_type": "void", + "parameters": [ + { + "name": "fmt", + "type": "const char*" + }, + { + "name": "args", + "type": "va_list" + } + ], + "description": "Displays a bullet followed by formatted text using a va_list." + }, + { + "name": "SeparatorText", + "return_type": "void", + "parameters": [ + { + "name": "label", + "type": "const char*" + } + ], + "description": "Displays formatted text with a horizontal line separator." + }, + { + "name": "Button", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "size", + "type": "const ImVec2&", + "default": "ImVec2(0, 0)" + } + ], + "description": "Creates a button with the specified label and size. Returns true when the button is pressed." + }, + { + "name": "SmallButton", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + } + ], + "description": "Creates a small button with the specified label. Useful for embedding within text." + }, + { + "name": "InvisibleButton", + "return_type": "bool", + "parameters": [ + { + "name": "str_id", + "type": "const char*" + }, + { + "name": "size", + "type": "const ImVec2&" + }, + { + "name": "flags", + "type": "ImGuiButtonFlags", + "default": "0" + } + ], + "description": "Creates an invisible button with flexible behavior, frequently used to build custom behaviors using the public API (along with IsItemActive, IsItemHovered, etc.)." + }, + { + "name": "ArrowButton", + "return_type": "bool", + "parameters": [ + { + "name": "str_id", + "type": "const char*" + }, + { + "name": "dir", + "type": "ImGuiDir" + } + ], + "description": "Creates a square button with an arrow shape pointing in the specified direction." + }, + { + "name": "Checkbox", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "bool*" + } + ], + "description": "Creates a checkbox with the specified label and boolean value. Returns true when the checkbox is clicked." + }, + { + "name": "CheckboxFlags", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "flags", + "type": "int*" + }, + { + "name": "flags_value", + "type": "int" + } + ], + "description": "Creates a checkbox that toggles specific flags within an integer." + }, + { + "name": "CheckboxFlags", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "flags", + "type": "unsigned int*" + }, + { + "name": "flags_value", + "type": "unsigned int" + } + ], + "description": "Creates a checkbox that toggles specific flags within an unsigned integer." + }, + { + "name": "RadioButton", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "active", + "type": "bool" + } + ], + "description": "Creates a radio button with the specified label and active state." + }, + { + "name": "RadioButton", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "int*" + }, + { + "name": "v_button", + "type": "int" + } + ], + "description": "Creates a radio button that sets the specified integer value when clicked." + }, + { + "name": "ProgressBar", + "return_type": "void", + "parameters": [ + { + "name": "fraction", + "type": "float" + }, + { + "name": "size_arg", + "type": "const ImVec2&", + "default": "ImVec2(-FLT_MIN, 0)" + }, + { + "name": "overlay", + "type": "const char*", + "default": "NULL" + } + ], + "description": "Creates a progress bar with the specified fraction of completion, size, and optional overlay text." + }, + { + "name": "Bullet", + "return_type": "void", + "parameters": [], + "description": "Draws a small circle and keeps the cursor on the same line. Advances cursor x position by GetTreeNodeToLabelSpacing(), the same distance that TreeNode() uses." + }, + { + "name": "TextLink", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + } + ], + "description": "Creates a hyperlink-style text button that returns true when clicked." + }, + { + "name": "TextLinkOpenURL", + "return_type": "void", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "url", + "type": "const char*", + "default": "NULL" + } + ], + "description": "Creates a hyperlink-style text button that automatically opens the specified URL when clicked." + }, + { + "name": "Image", + "return_type": "void", + "parameters": [ + { + "name": "user_texture_id", + "type": "ImTextureID" + }, + { + "name": "image_size", + "type": "const ImVec2&" + }, + { + "name": "uv0", + "type": "const ImVec2&", + "default": "ImVec2(0, 0)" + }, + { + "name": "uv1", + "type": "const ImVec2&", + "default": "ImVec2(1, 1)" + }, + { + "name": "tint_col", + "type": "const ImVec4&", + "default": "ImVec4(1, 1, 1, 1)" + }, + { + "name": "border_col", + "type": "const ImVec4&", + "default": "ImVec4(0, 0, 0, 0)" + } + ], + "description": "Displays an image using the provided texture ID, size, UV coordinates, tint color, and border color." + }, + { + "name": "ImageButton", + "return_type": "bool", + "parameters": [ + { + "name": "str_id", + "type": "const char*" + }, + { + "name": "user_texture_id", + "type": "ImTextureID" + }, + { + "name": "image_size", + "type": "const ImVec2&" + }, + { + "name": "uv0", + "type": "const ImVec2&", + "default": "ImVec2(0, 0)" + }, + { + "name": "uv1", + "type": "const ImVec2&", + "default": "ImVec2(1, 1)" + }, + { + "name": "bg_col", + "type": "const ImVec4&", + "default": "ImVec4(0, 0, 0, 0)" + }, + { + "name": "tint_col", + "type": "const ImVec4&", + "default": "ImVec4(1, 1, 1, 1)" + } + ], + "description": "Creates a button with an image, using the provided texture ID, size, UV coordinates, background color, and tint color." + }, + { + "name": "BeginCombo", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "preview_value", + "type": "const char*" + }, + { + "name": "flags", + "type": "ImGuiComboFlags", + "default": "0" + } + ], + "description": "Begins a combo box (dropdown) with the specified label and preview value. Returns true if the combo box is open." + }, + { + "name": "EndCombo", + "return_type": "void", + "parameters": [], + "description": "Ends a combo box. Should only be called if BeginCombo() returns true." + }, + { + "name": "Combo", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "current_item", + "type": "int*" + }, + { + "name": "items", + "type": "const char* const[]" + }, + { + "name": "items_count", + "type": "int" + }, + { + "name": "popup_max_height_in_items", + "type": "int", + "default": "-1" + } + ], + "description": "Creates a combo box (dropdown) with the specified label, current item index, and items array. Returns true if the selection is changed." + }, + { + "name": "Combo", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "current_item", + "type": "int*" + }, + { + "name": "items_separated_by_zeros", + "type": "const char*" + }, + { + "name": "popup_max_height_in_items", + "type": "int", + "default": "-1" + } + ], + "description": "Creates a combo box (dropdown) with items separated by null characters. Returns true if the selection is changed." + }, + { + "name": "Combo", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "current_item", + "type": "int*" + }, + { + "name": "getter", + "type": "const char* (*)(void* user_data, int idx)" + }, + { + "name": "user_data", + "type": "void*" + }, + { + "name": "items_count", + "type": "int" + }, + { + "name": "popup_max_height_in_items", + "type": "int", + "default": "-1" + } + ], + "description": "Creates a combo box (dropdown) with a custom item getter function. Returns true if the selection is changed." + }, + { + "name": "DragFloat", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "float*" + }, + { + "name": "v_speed", + "type": "float", + "default": "1.0f" + }, + { + "name": "v_min", + "type": "float", + "default": "0.0f" + }, + { + "name": "v_max", + "type": "float", + "default": "0.0f" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%.3f\"" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a draggable float slider with the specified label, value, speed, minimum/maximum values, format string, and optional flags. Returns true if the value is changed." + }, + { + "name": "DragFloat2", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "float[2]" + }, + { + "name": "v_speed", + "type": "float", + "default": "1.0f" + }, + { + "name": "v_min", + "type": "float", + "default": "0.0f" + }, + { + "name": "v_max", + "type": "float", + "default": "0.0f" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%.3f\"" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a draggable float2 slider with the specified label, value, speed, minimum/maximum values, format string, and optional flags. Returns true if the value is changed." + }, + { + "name": "DragFloat3", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "float[3]" + }, + { + "name": "v_speed", + "type": "float", + "default": "1.0f" + }, + { + "name": "v_min", + "type": "float", + "default": "0.0f" + }, + { + "name": "v_max", + "type": "float", + "default": "0.0f" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%.3f\"" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a draggable float3 slider with the specified label, value, speed, minimum/maximum values, format string, and optional flags. Returns true if the value is changed." + }, + { + "name": "DragFloat4", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "float[4]" + }, + { + "name": "v_speed", + "type": "float", + "default": "1.0f" + }, + { + "name": "v_min", + "type": "float", + "default": "0.0f" + }, + { + "name": "v_max", + "type": "float", + "default": "0.0f" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%.3f\"" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a draggable float4 slider with the specified label, value, speed, minimum/maximum values, format string, and optional flags. Returns true if the value is changed." + }, + { + "name": "DragFloatRange2", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v_current_min", + "type": "float*" + }, + { + "name": "v_current_max", + "type": "float*" + }, + { + "name": "v_speed", + "type": "float", + "default": "1.0f" + }, + { + "name": "v_min", + "type": "float", + "default": "0.0f" + }, + { + "name": "v_max", + "type": "float", + "default": "0.0f" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%.3f\"" + }, + { + "name": "format_max", + "type": "const char*", + "default": "NULL" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a draggable float range slider with the specified label, current min/max values, speed, minimum/maximum values, format strings, and optional flags. Returns true if the values are changed." + }, + { + "name": "DragInt", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "int*" + }, + { + "name": "v_speed", + "type": "float", + "default": "1.0f" + }, + { + "name": "v_min", + "type": "int", + "default": "0" + }, + { + "name": "v_max", + "type": "int", + "default": "0" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%d\"" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a draggable integer slider with the specified label, value, speed, minimum/maximum values, format string, and optional flags. Returns true if the value is changed." + }, + { + "name": "DragInt2", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "int[2]" + }, + { + "name": "v_speed", + "type": "float", + "default": "1.0f" + }, + { + "name": "v_min", + "type": "int", + "default": "0" + }, + { + "name": "v_max", + "type": "int", + "default": "0" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%d\"" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a draggable int2 slider with the specified label, value, speed, minimum/maximum values, format string, and optional flags. Returns true if the value is changed." + }, + { + "name": "DragInt3", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "int[3]" + }, + { + "name": "v_speed", + "type": "float", + "default": "1.0f" + }, + { + "name": "v_min", + "type": "int", + "default": "0" + }, + { + "name": "v_max", + "type": "int", + "default": "0" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%d\"" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a draggable int3 slider with the specified label, value, speed, minimum/maximum values, format string, and optional flags. Returns true if the value is changed." + }, + { + "name": "DragInt4", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "int[4]" + }, + { + "name": "v_speed", + "type": "float", + "default": "1.0f" + }, + { + "name": "v_min", + "type": "int", + "default": "0" + }, + { + "name": "v_max", + "type": "int", + "default": "0" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%d\"" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a draggable int4 slider with the specified label, value, speed, minimum/maximum values, format string, and optional flags. Returns true if the value is changed." + }, + { + "name": "DragIntRange2", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v_current_min", + "type": "int*" + }, + { + "name": "v_current_max", + "type": "int*" + }, + { + "name": "v_speed", + "type": "float", + "default": "1.0f" + }, + { + "name": "v_min", + "type": "int", + "default": "0" + }, + { + "name": "v_max", + "type": "int", + "default": "0" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%d\"" + }, + { + "name": "format_max", + "type": "const char*", + "default": "NULL" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a draggable integer range slider with the specified label, current min/max values, speed, minimum/maximum values, format strings, and optional flags. Returns true if the values are changed." + }, + { + "name": "DragScalar", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "data_type", + "type": "ImGuiDataType" + }, + { + "name": "p_data", + "type": "void*" + }, + { + "name": "v_speed", + "type": "float", + "default": "1.0f" + }, + { + "name": "p_min", + "type": "const void*", + "default": "NULL" + }, + { + "name": "p_max", + "type": "const void*", + "default": "NULL" + }, + { + "name": "format", + "type": "const char*", + "default": "NULL" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a draggable scalar slider for arbitrary data types with the specified label, data type, value, speed, minimum/maximum values, format string, and optional flags. Returns true if the value is changed." + }, + { + "name": "DragScalarN", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "data_type", + "type": "ImGuiDataType" + }, + { + "name": "p_data", + "type": "void*" + }, + { + "name": "components", + "type": "int" + }, + { + "name": "v_speed", + "type": "float", + "default": "1.0f" + }, + { + "name": "p_min", + "type": "const void*", + "default": "NULL" + }, + { + "name": "p_max", + "type": "const void*", + "default": "NULL" + }, + { + "name": "format", + "type": "const char*", + "default": "NULL" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a draggable scalar slider for arbitrary data types with the specified label, data type, value, number of components, speed, minimum/maximum values, format string, and optional flags. Returns true if the value is changed." + }, + { + "name": "SliderFloat", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "float*" + }, + { + "name": "v_min", + "type": "float" + }, + { + "name": "v_max", + "type": "float" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%.3f\"" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a slider for floating-point values with the specified label, value, min/max range, format string, and optional flags. Returns true if the value is changed." + }, + { + "name": "SliderFloat2", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "float[2]" + }, + { + "name": "v_min", + "type": "float" + }, + { + "name": "v_max", + "type": "float" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%.3f\"" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a slider for two floating-point values with the specified label, values, min/max range, format string, and optional flags. Returns true if the values are changed." + }, + { + "name": "SliderFloat3", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "float[3]" + }, + { + "name": "v_min", + "type": "float" + }, + { + "name": "v_max", + "type": "float" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%.3f\"" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a slider for three floating-point values with the specified label, values, min/max range, format string, and optional flags. Returns true if the values are changed." + }, + { + "name": "SliderFloat4", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "float[4]" + }, + { + "name": "v_min", + "type": "float" + }, + { + "name": "v_max", + "type": "float" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%.3f\"" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a slider for four floating-point values with the specified label, values, min/max range, format string, and optional flags. Returns true if the values are changed." + }, + { + "name": "SliderAngle", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v_rad", + "type": "float*" + }, + { + "name": "v_degrees_min", + "type": "float", + "default": "-360.0f" + }, + { + "name": "v_degrees_max", + "type": "float", + "default": "+360.0f" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%.0f deg\"" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a slider for angles with the specified label, value in radians, min/max range in degrees, format string, and optional flags. Returns true if the value is changed." + }, + { + "name": "SliderInt", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "int*" + }, + { + "name": "v_min", + "type": "int" + }, + { + "name": "v_max", + "type": "int" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%d\"" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a slider for integer values with the specified label, value, min/max range, format string, and optional flags. Returns true if the value is changed." + }, + { + "name": "SliderInt2", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "int[2]" + }, + { + "name": "v_min", + "type": "int" + }, + { + "name": "v_max", + "type": "int" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%d\"" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a slider for two integer values with the specified label, values, min/max range, format string, and optional flags. Returns true if the values are changed." + }, + { + "name": "SliderInt3", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "int[3]" + }, + { + "name": "v_min", + "type": "int" + }, + { + "name": "v_max", + "type": "int" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%d\"" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a slider for three integer values with the specified label, values, min/max range, format string, and optional flags. Returns true if the values are changed." + }, + { + "name": "SliderInt4", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "int[4]" + }, + { + "name": "v_min", + "type": "int" + }, + { + "name": "v_max", + "type": "int" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%d\"" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a slider for four integer values with the specified label, values, min/max range, format string, and optional flags. Returns true if the values are changed." + }, + { + "name": "SliderScalar", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "data_type", + "type": "ImGuiDataType" + }, + { + "name": "p_data", + "type": "void*" + }, + { + "name": "p_min", + "type": "const void*" + }, + { + "name": "p_max", + "type": "const void*" + }, + { + "name": "format", + "type": "const char*", + "default": "NULL" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a slider for arbitrary scalar types with the specified label, data type, value, min/max range, format string, and optional flags. Returns true if the value is changed." + }, + { + "name": "SliderScalarN", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "data_type", + "type": "ImGuiDataType" + }, + { + "name": "p_data", + "type": "void*" + }, + { + "name": "components", + "type": "int" + }, + { + "name": "p_min", + "type": "const void*" + }, + { + "name": "p_max", + "type": "const void*" + }, + { + "name": "format", + "type": "const char*", + "default": "NULL" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a slider for multiple scalar values of arbitrary types with the specified label, data type, values, min/max range, format string, and optional flags. Returns true if the values are changed." + }, + { + "name": "VSliderFloat", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "size", + "type": "const ImVec2&" + }, + { + "name": "v", + "type": "float*" + }, + { + "name": "v_min", + "type": "float" + }, + { + "name": "v_max", + "type": "float" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%.3f\"" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a vertical slider for floating-point values with the specified label, size, value, min/max range, format string, and optional flags. Returns true if the value is changed." + }, + { + "name": "VSliderInt", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "size", + "type": "const ImVec2&" + }, + { + "name": "v", + "type": "int*" + }, + { + "name": "v_min", + "type": "int" + }, + { + "name": "v_max", + "type": "int" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%d\"" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a vertical slider for integer values with the specified label, size, value, min/max range, format string, and optional flags. Returns true if the value is changed." + }, + { + "name": "VSliderScalar", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "size", + "type": "const ImVec2&" + }, + { + "name": "data_type", + "type": "ImGuiDataType" + }, + { + "name": "p_data", + "type": "void*" + }, + { + "name": "p_min", + "type": "const void*" + }, + { + "name": "p_max", + "type": "const void*" + }, + { + "name": "format", + "type": "const char*", + "default": "NULL" + }, + { + "name": "flags", + "type": "ImGuiSliderFlags", + "default": "0" + } + ], + "description": "Creates a vertical slider for arbitrary scalar types with the specified label, size, data type, value, min/max range, format string, and optional flags. Returns true if the value is changed." + }, + { + "name": "InputText", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "buf", + "type": "char*" + }, + { + "name": "buf_size", + "type": "size_t" + }, + { + "name": "flags", + "type": "ImGuiInputTextFlags", + "default": "0" + }, + { + "name": "callback", + "type": "ImGuiInputTextCallback", + "default": "NULL" + }, + { + "name": "user_data", + "type": "void*", + "default": "NULL" + } + ], + "description": "Creates a text input field with the specified label, buffer, buffer size, optional flags, callback, and user data. Returns true if the text is changed." + }, + { + "name": "InputTextMultiline", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "buf", + "type": "char*" + }, + { + "name": "buf_size", + "type": "size_t" + }, + { + "name": "size", + "type": "const ImVec2&", + "default": "ImVec2(0, 0)" + }, + { + "name": "flags", + "type": "ImGuiInputTextFlags", + "default": "0" + }, + { + "name": "callback", + "type": "ImGuiInputTextCallback", + "default": "NULL" + }, + { + "name": "user_data", + "type": "void*", + "default": "NULL" + } + ], + "description": "Creates a multiline text input field with the specified label, buffer, buffer size, size, optional flags, callback, and user data. Returns true if the text is changed." + }, + { + "name": "InputTextWithHint", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "hint", + "type": "const char*" + }, + { + "name": "buf", + "type": "char*" + }, + { + "name": "buf_size", + "type": "size_t" + }, + { + "name": "flags", + "type": "ImGuiInputTextFlags", + "default": "0" + }, + { + "name": "callback", + "type": "ImGuiInputTextCallback", + "default": "NULL" + }, + { + "name": "user_data", + "type": "void*", + "default": "NULL" + } + ], + "description": "Creates a text input field with a hint, using the specified label, hint, buffer, buffer size, optional flags, callback, and user data. Returns true if the text is changed." + }, + { + "name": "InputFloat", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "float*" + }, + { + "name": "step", + "type": "float", + "default": "0.0f" + }, + { + "name": "step_fast", + "type": "float", + "default": "0.0f" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%.3f\"" + }, + { + "name": "flags", + "type": "ImGuiInputTextFlags", + "default": "0" + } + ], + "description": "Creates a text input field for floating-point values with the specified label, value, optional step, fast step, format string, and flags. Returns true if the value is changed." + }, + { + "name": "InputFloat2", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "float[2]" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%.3f\"" + }, + { + "name": "flags", + "type": "ImGuiInputTextFlags", + "default": "0" + } + ], + "description": "Creates a text input field for two floating-point values with the specified label, values, format string, and optional flags. Returns true if the values are changed." + }, + { + "name": "InputFloat3", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "float[3]" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%.3f\"" + }, + { + "name": "flags", + "type": "ImGuiInputTextFlags", + "default": "0" + } + ], + "description": "Creates a text input field for three floating-point values with the specified label, values, format string, and optional flags. Returns true if the values are changed." + }, + { + "name": "InputFloat4", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "float[4]" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%.3f\"" + }, + { + "name": "flags", + "type": "ImGuiInputTextFlags", + "default": "0" + } + ], + "description": "Creates a text input field for four floating-point values with the specified label, values, format string, and optional flags. Returns true if the values are changed." + }, + { + "name": "InputInt", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "int*" + }, + { + "name": "step", + "type": "int", + "default": "1" + }, + { + "name": "step_fast", + "type": "int", + "default": "100" + }, + { + "name": "flags", + "type": "ImGuiInputTextFlags", + "default": "0" + } + ], + "description": "Creates a text input field for integer values with the specified label, value, optional step, fast step, and flags. Returns true if the value is changed." + }, + { + "name": "InputInt2", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "int[2]" + }, + { + "name": "flags", + "type": "ImGuiInputTextFlags", + "default": "0" + } + ], + "description": "Creates a text input field for two integer values with the specified label, values, and optional flags. Returns true if the values are changed." + }, + { + "name": "InputInt3", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "int[3]" + }, + { + "name": "flags", + "type": "ImGuiInputTextFlags", + "default": "0" + } + ], + "description": "Creates a text input field for three integer values with the specified label, values, and optional flags. Returns true if the values are changed." + }, + { + "name": "InputInt4", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "int[4]" + }, + { + "name": "flags", + "type": "ImGuiInputTextFlags", + "default": "0" + } + ], + "description": "Creates a text input field for four integer values with the specified label, values, and optional flags. Returns true if the values are changed." + }, + { + "name": "InputDouble", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "v", + "type": "double*" + }, + { + "name": "step", + "type": "double", + "default": "0.0" + }, + { + "name": "step_fast", + "type": "double", + "default": "0.0" + }, + { + "name": "format", + "type": "const char*", + "default": "\"%.6f\"" + }, + { + "name": "flags", + "type": "ImGuiInputTextFlags", + "default": "0" + } + ], + "description": "Creates a text input field for double values with the specified label, value, optional step, fast step, format string, and flags. Returns true if the value is changed." + }, + { + "name": "InputScalar", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "data_type", + "type": "ImGuiDataType" + }, + { + "name": "p_data", + "type": "void*" + }, + { + "name": "p_step", + "type": "const void*", + "default": "NULL" + }, + { + "name": "p_step_fast", + "type": "const void*", + "default": "NULL" + }, + { + "name": "format", + "type": "const char*", + "default": "NULL" + }, + { + "name": "flags", + "type": "ImGuiInputTextFlags", + "default": "0" + } + ], + "description": "Creates a text input field for arbitrary scalar types with the specified label, data type, value, optional step, fast step, format string, and flags. Returns true if the value is changed." + }, + { + "name": "InputScalarN", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "data_type", + "type": "ImGuiDataType" + }, + { + "name": "p_data", + "type": "void*" + }, + { + "name": "components", + "type": "int" + }, + { + "name": "p_step", + "type": "const void*", + "default": "NULL" + }, + { + "name": "p_step_fast", + "type": "const void*", + "default": "NULL" + }, + { + "name": "format", + "type": "const char*", + "default": "NULL" + }, + { + "name": "flags", + "type": "ImGuiInputTextFlags", + "default": "0" + } + ], + "description": "Creates a text input field for multiple scalar values of arbitrary types with the specified label, data type, values, optional step, fast step, format string, and flags. Returns true if the values are changed." + }, + { + "name": "ColorEdit3", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "col", + "type": "float[3]" + }, + { + "name": "flags", + "type": "ImGuiColorEditFlags", + "default": "0" + } + ], + "description": "Edits an RGB color value with an optional set of flags. Returns true if the color was changed." + }, + { + "name": "ColorEdit4", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "col", + "type": "float[4]" + }, + { + "name": "flags", + "type": "ImGuiColorEditFlags", + "default": "0" + } + ], + "description": "Edits an RGBA color value with an optional set of flags. Returns true if the color was changed." + }, + { + "name": "ColorPicker3", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "col", + "type": "float[3]" + }, + { + "name": "flags", + "type": "ImGuiColorEditFlags", + "default": "0" + } + ], + "description": "Displays a color picker for an RGB color value with an optional set of flags. Returns true if the color was changed." + }, + { + "name": "ColorPicker4", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "col", + "type": "float[4]" + }, + { + "name": "flags", + "type": "ImGuiColorEditFlags", + "default": "0" + }, + { + "name": "ref_col", + "type": "const float*", + "default": "NULL" + } + ], + "description": "Displays a color picker for an RGBA color value with an optional set of flags and reference color. Returns true if the color was changed." + }, + { + "name": "ColorButton", + "return_type": "bool", + "parameters": [ + { + "name": "desc_id", + "type": "const char*" + }, + { + "name": "col", + "type": "const ImVec4&" + }, + { + "name": "flags", + "type": "ImGuiColorEditFlags", + "default": "0" + }, + { + "name": "size", + "type": "const ImVec2&", + "default": "ImVec2(0, 0)" + } + ], + "description": "Displays a color square/button with the specified color, size, and flags. Returns true if the button was pressed." + }, + { + "name": "SetColorEditOptions", + "return_type": "void", + "parameters": [ + { + "name": "flags", + "type": "ImGuiColorEditFlags" + } + ], + "description": "Sets the color edit options, typically called during application startup. Allows selecting a default format, picker type, etc." + }, + { + "name": "TreeNode", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + } + ], + "description": "Creates a tree node with the specified label. Returns true if the node is open, in which case TreePop() should be called to close it." + }, + { + "name": "TreeNode", + "return_type": "bool", + "parameters": [ + { + "name": "str_id", + "type": "const char*" + }, + { + "name": "fmt", + "type": "const char*", + "annotation": "IM_FMTARGS(2)" + } + ], + "description": "Creates a tree node with the specified ID and formatted label. Returns true if the node is open." + }, + { + "name": "TreeNode", + "return_type": "bool", + "parameters": [ + { + "name": "ptr_id", + "type": "const void*" + }, + { + "name": "fmt", + "type": "const char*", + "annotation": "IM_FMTARGS(2)" + } + ], + "description": "Creates a tree node with the specified pointer ID and formatted label. Returns true if the node is open." + }, + { + "name": "TreeNodeV", + "return_type": "bool", + "parameters": [ + { + "name": "str_id", + "type": "const char*" + }, + { + "name": "fmt", + "type": "const char*", + "annotation": "IM_FMTLIST(2)" + }, + { + "name": "args", + "type": "va_list" + } + ], + "description": "Creates a tree node with the specified ID and formatted label (va_list version). Returns true if the node is open." + }, + { + "name": "TreeNodeV", + "return_type": "bool", + "parameters": [ + { + "name": "ptr_id", + "type": "const void*" + }, + { + "name": "fmt", + "type": "const char*", + "annotation": "IM_FMTLIST(2)" + }, + { + "name": "args", + "type": "va_list" + } + ], + "description": "Creates a tree node with the specified pointer ID and formatted label (va_list version). Returns true if the node is open." + }, + { + "name": "TreeNodeEx", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "flags", + "type": "ImGuiTreeNodeFlags", + "default": "0" + } + ], + "description": "Creates an extended tree node with the specified label and flags. Returns true if the node is open." + }, + { + "name": "TreeNodeEx", + "return_type": "bool", + "parameters": [ + { + "name": "str_id", + "type": "const char*" + }, + { + "name": "flags", + "type": "ImGuiTreeNodeFlags", + "default": "0" + }, + { + "name": "fmt", + "type": "const char*", + "annotation": "IM_FMTARGS(3)" + } + ], + "description": "Creates an extended tree node with the specified ID, formatted label, and flags. Returns true if the node is open." + }, + { + "name": "TreeNodeEx", + "return_type": "bool", + "parameters": [ + { + "name": "ptr_id", + "type": "const void*" + }, + { + "name": "flags", + "type": "ImGuiTreeNodeFlags", + "default": "0" + }, + { + "name": "fmt", + "type": "const char*", + "annotation": "IM_FMTARGS(3)" + } + ], + "description": "Creates an extended tree node with the specified pointer ID, formatted label, and flags. Returns true if the node is open." + }, + { + "name": "TreeNodeExV", + "return_type": "bool", + "parameters": [ + { + "name": "str_id", + "type": "const char*" + }, + { + "name": "flags", + "type": "ImGuiTreeNodeFlags", + "default": "0" + }, + { + "name": "fmt", + "type": "const char*", + "annotation": "IM_FMTLIST(3)" + }, + { + "name": "args", + "type": "va_list" + } + ], + "description": "Creates an extended tree node with the specified ID, formatted label (va_list version), and flags. Returns true if the node is open." + }, + { + "name": "TreeNodeExV", + "return_type": "bool", + "parameters": [ + { + "name": "ptr_id", + "type": "const void*" + }, + { + "name": "flags", + "type": "ImGuiTreeNodeFlags", + "default": "0" + }, + { + "name": "fmt", + "type": "const char*", + "annotation": "IM_FMTLIST(3)" + }, + { + "name": "args", + "type": "va_list" + } + ], + "description": "Creates an extended tree node with the specified pointer ID, formatted label (va_list version), and flags. Returns true if the node is open." + }, + { + "name": "TreePush", + "return_type": "void", + "parameters": [ + { + "name": "str_id", + "type": "const char*" + } + ], + "description": "Pushes a string into the tree node stack, increasing the indentation level." + }, + { + "name": "TreePush", + "return_type": "void", + "parameters": [ + { + "name": "ptr_id", + "type": "const void*" + } + ], + "description": "Pushes a pointer into the tree node stack, increasing the indentation level." + }, + { + "name": "TreePop", + "return_type": "void", + "parameters": [], + "description": "Pops the last element from the tree node stack, decreasing the indentation level." + }, + { + "name": "GetTreeNodeToLabelSpacing", + "return_type": "float", + "parameters": [], + "description": "Returns the horizontal distance preceding the label when using TreeNode() or Bullet()." + }, + { + "name": "CollapsingHeader", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "flags", + "type": "ImGuiTreeNodeFlags", + "default": "0" + } + ], + "description": "Creates a collapsible header with the specified label and flags. Returns true if the header is open." + }, + { + "name": "CollapsingHeader", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "p_visible", + "type": "bool*" + }, + { + "name": "flags", + "type": "ImGuiTreeNodeFlags", + "default": "0" + } + ], + "description": "Creates a collapsible header with the specified label, visibility flag, and flags. Returns true if the header is open." + }, + { + "name": "SetNextItemOpen", + "return_type": "void", + "parameters": [ + { + "name": "is_open", + "type": "bool" + }, + { + "name": "cond", + "type": "ImGuiCond", + "default": "0" + } + ], + "description": "Sets the next TreeNode or CollapsingHeader open state." + }, + { + "name": "SetNextItemStorageID", + "return_type": "void", + "parameters": [ + { + "name": "storage_id", + "type": "ImGuiID" + } + ], + "description": "Sets the storage ID to use for the next TreeNode or CollapsingHeader." + }, + { + "name": "Selectable", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "selected", + "type": "bool", + "default": "false" + }, + { + "name": "flags", + "type": "ImGuiSelectableFlags", + "default": "0" + }, + { + "name": "size", + "type": "const ImVec2&", + "default": "ImVec2(0, 0)" + } + ], + "description": "Creates a selectable item with the specified label, selection state, flags, and size. Returns true if the item is clicked." + }, + { + "name": "Selectable", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "p_selected", + "type": "bool*" + }, + { + "name": "flags", + "type": "ImGuiSelectableFlags", + "default": "0" + }, + { + "name": "size", + "type": "const ImVec2&", + "default": "ImVec2(0, 0)" + } + ], + "description": "Creates a selectable item with the specified label, pointer to the selection state, flags, and size. Returns true if the item is clicked." + }, + { + "name": "BeginMultiSelect", + "return_type": "ImGuiMultiSelectIO*", + "parameters": [ + { + "name": "flags", + "type": "ImGuiMultiSelectFlags" + }, + { + "name": "selection_size", + "type": "int", + "default": "-1" + }, + { + "name": "items_count", + "type": "int", + "default": "-1" + } + ], + "description": "Begins a multi-select operation. Returns a pointer to ImGuiMultiSelectIO." + }, + { + "name": "EndMultiSelect", + "return_type": "ImGuiMultiSelectIO*", + "parameters": [], + "description": "Ends a multi-select operation. Returns a pointer to ImGuiMultiSelectIO." + }, + { + "name": "SetNextItemSelectionUserData", + "return_type": "void", + "parameters": [ + { + "name": "selection_user_data", + "type": "ImGuiSelectionUserData" + } + ], + "description": "Sets user data for the next item's selection." + }, + { + "name": "IsItemToggledSelection", + "return_type": "bool", + "parameters": [], + "description": "Checks if the selection state of the last item was toggled. Useful for retrieving per-item information before reaching EndMultiSelect." + }, + { + "name": "BeginListBox", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "size", + "type": "const ImVec2&", + "default": "ImVec2(0, 0)" + } + ], + "description": "Opens a framed scrolling region for a list box with the specified label and size." + }, + { + "name": "EndListBox", + "return_type": "void", + "parameters": [], + "description": "Ends the list box opened by BeginListBox. Should be called only if BeginListBox returned true." + }, + { + "name": "ListBox", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "current_item", + "type": "int*" + }, + { + "name": "items", + "type": "const char* const[]" + }, + { + "name": "items_count", + "type": "int" + }, + { + "name": "height_in_items", + "type": "int", + "default": "-1" + } + ], + "description": "Displays a list box with the specified label, current item index, items array, item count, and optional height in items. Returns true if the current item was changed." + }, + { + "name": "ListBox", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "current_item", + "type": "int*" + }, + { + "name": "getter", + "type": "const char* (*)(void* user_data, int idx)" + }, + { + "name": "user_data", + "type": "void*" + }, + { + "name": "items_count", + "type": "int" + }, + { + "name": "height_in_items", + "type": "int", + "default": "-1" + } + ], + "description": "Displays a list box with the specified label, current item index, getter function, user data, item count, and optional height in items. Returns true if the current item was changed." + }, + { + "name": "PlotLines", + "return_type": "void", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "values", + "type": "const float*" + }, + { + "name": "values_count", + "type": "int" + }, + { + "name": "values_offset", + "type": "int", + "default": "0" + }, + { + "name": "overlay_text", + "type": "const char*", + "default": "NULL" + }, + { + "name": "scale_min", + "type": "float", + "default": "FLT_MAX" + }, + { + "name": "scale_max", + "type": "float", + "default": "FLT_MAX" + }, + { + "name": "graph_size", + "type": "ImVec2", + "default": "ImVec2(0, 0)" + }, + { + "name": "stride", + "type": "int", + "default": "sizeof(float)" + } + ], + "description": "Plots a series of lines using the specified label, values array, value count, and optional parameters." + }, + { + "name": "PlotLines", + "return_type": "void", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "values_getter", + "type": "float(*)(void* data, int idx)" + }, + { + "name": "data", + "type": "void*" + }, + { + "name": "values_count", + "type": "int" + }, + { + "name": "values_offset", + "type": "int", + "default": "0" + }, + { + "name": "overlay_text", + "type": "const char*", + "default": "NULL" + }, + { + "name": "scale_min", + "type": "float", + "default": "FLT_MAX" + }, + { + "name": "scale_max", + "type": "float", + "default": "FLT_MAX" + }, + { + "name": "graph_size", + "type": "ImVec2", + "default": "ImVec2(0, 0)" + } + ], + "description": "Plots a series of lines using a getter function with the specified label, data, value count, and optional parameters." + }, + { + "name": "PlotHistogram", + "return_type": "void", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "values", + "type": "const float*" + }, + { + "name": "values_count", + "type": "int" + }, + { + "name": "values_offset", + "type": "int", + "default": "0" + }, + { + "name": "overlay_text", + "type": "const char*", + "default": "NULL" + }, + { + "name": "scale_min", + "type": "float", + "default": "FLT_MAX" + }, + { + "name": "scale_max", + "type": "float", + "default": "FLT_MAX" + }, + { + "name": "graph_size", + "type": "ImVec2", + "default": "ImVec2(0, 0)" + }, + { + "name": "stride", + "type": "int", + "default": "sizeof(float)" + } + ], + "description": "Plots a histogram using the specified label, values array, value count, and optional parameters." + }, + { + "name": "PlotHistogram", + "return_type": "void", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "values_getter", + "type": "float(*)(void* data, int idx)" + }, + { + "name": "data", + "type": "void*" + }, + { + "name": "values_count", + "type": "int" + }, + { + "name": "values_offset", + "type": "int", + "default": "0" + }, + { + "name": "overlay_text", + "type": "const char*", + "default": "NULL" + }, + { + "name": "scale_min", + "type": "float", + "default": "FLT_MAX" + }, + { + "name": "scale_max", + "type": "float", + "default": "FLT_MAX" + }, + { + "name": "graph_size", + "type": "ImVec2", + "default": "ImVec2(0, 0)" + } + ], + "description": "Plots a histogram using a getter function with the specified label, data, value count, and optional parameters." + }, + { + "name": "Value", + "return_type": "void", + "parameters": [ + { + "name": "prefix", + "type": "const char*" + }, + { + "name": "b", + "type": "bool" + } + ], + "description": "Displays a boolean value with a prefix in the format \"prefix: value\"." + }, + { + "name": "Value", + "return_type": "void", + "parameters": [ + { + "name": "prefix", + "type": "const char*" + }, + { + "name": "v", + "type": "int" + } + ], + "description": "Displays an integer value with a prefix in the format \"prefix: value\"." + }, + { + "name": "Value", + "return_type": "void", + "parameters": [ + { + "name": "prefix", + "type": "const char*" + }, + { + "name": "v", + "type": "unsigned int" + } + ], + "description": "Displays an unsigned integer value with a prefix in the format \"prefix: value\"." + }, + { + "name": "Value", + "return_type": "void", + "parameters": [ + { + "name": "prefix", + "type": "const char*" + }, + { + "name": "v", + "type": "float" + }, + { + "name": "float_format", + "type": "const char*", + "default": "NULL" + } + ], + "description": "Displays a floating-point value with a prefix in the format \"prefix: value\". Optionally specify the format for the float." + }, + { + "name": "BeginMenuBar", + "return_type": "bool", + "parameters": [], + "description": "Appends to the menu bar of the current window. Requires ImGuiWindowFlags_MenuBar flag to be set on the parent window." + }, + { + "name": "EndMenuBar", + "return_type": "void", + "parameters": [], + "description": "Ends the menu bar. Should be called only if BeginMenuBar() returned true." + }, + { + "name": "BeginMainMenuBar", + "return_type": "bool", + "parameters": [], + "description": "Creates and appends to a full-screen menu bar." + }, + { + "name": "EndMainMenuBar", + "return_type": "void", + "parameters": [], + "description": "Ends the main menu bar. Should be called only if BeginMainMenuBar() returned true." + }, + { + "name": "BeginMenu", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "enabled", + "type": "bool", + "default": "true" + } + ], + "description": "Creates a sub-menu entry. Should call EndMenu() if this returns true." + }, + { + "name": "EndMenu", + "return_type": "void", + "parameters": [], + "description": "Ends the menu created by BeginMenu(). Should be called only if BeginMenu() returned true." + }, + { + "name": "MenuItem", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "shortcut", + "type": "const char*", + "default": "NULL" + }, + { + "name": "selected", + "type": "bool", + "default": "false" + }, + { + "name": "enabled", + "type": "bool", + "default": "true" + } + ], + "description": "Creates a menu item with an optional shortcut, selection state, and enabled state. Returns true when activated." + }, + { + "name": "MenuItem", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "shortcut", + "type": "const char*" + }, + { + "name": "p_selected", + "type": "bool*" + }, + { + "name": "enabled", + "type": "bool", + "default": "true" + } + ], + "description": "Creates a menu item with an optional shortcut and enabled state, and toggles the selection state if p_selected is not NULL. Returns true when activated." + }, + { + "name": "BeginTooltip", + "return_type": "bool", + "parameters": [], + "description": "Begins a tooltip window. Should call EndTooltip() if this returns true." + }, + { + "name": "EndTooltip", + "return_type": "void", + "parameters": [], + "description": "Ends the tooltip window. Should be called only if BeginTooltip() or BeginItemTooltip() returned true." + }, + { + "name": "SetTooltip", + "return_type": "void", + "parameters": [ + { + "name": "fmt", + "type": "const char*" + }, + { + "name": "...", + "type": "..." + } + ], + "description": "Sets a text-only tooltip. Often used after a call to ImGui::IsItemHovered()." + }, + { + "name": "SetTooltipV", + "return_type": "void", + "parameters": [ + { + "name": "fmt", + "type": "const char*" + }, + { + "name": "args", + "type": "va_list" + } + ], + "description": "Sets a text-only tooltip using a va_list of arguments." + }, + { + "name": "BeginItemTooltip", + "return_type": "bool", + "parameters": [], + "description": "Begins a tooltip window if the preceding item was hovered. Should call EndTooltip() if this returns true." + }, + { + "name": "SetItemTooltip", + "return_type": "void", + "parameters": [ + { + "name": "fmt", + "type": "const char*" + }, + { + "name": "...", + "type": "" + } + ], + "description": "Sets a text-only tooltip if the preceding item was hovered." + }, + { + "name": "SetItemTooltipV", + "return_type": "void", + "parameters": [ + { + "name": "fmt", + "type": "const char*" + }, + { + "name": "args", + "type": "va_list" + } + ], + "description": "Sets a text-only tooltip using a va_list of arguments if the preceding item was hovered." + }, + { + "name": "BeginPopup", + "return_type": "bool", + "parameters": [ + { + "name": "str_id", + "type": "const char*" + }, + { + "name": "flags", + "type": "ImGuiWindowFlags", + "default": "0" + } + ], + "description": "Begins a popup window with the specified ID and flags. Should call EndPopup() if this returns true." + }, + { + "name": "BeginPopupModal", + "return_type": "bool", + "parameters": [ + { + "name": "name", + "type": "const char*" + }, + { + "name": "p_open", + "type": "bool*", + "default": "NULL" + }, + { + "name": "flags", + "type": "ImGuiWindowFlags", + "default": "0" + } + ], + "description": "Begins a modal popup window with the specified name and flags. Should call EndPopup() if this returns true." + }, + { + "name": "EndPopup", + "return_type": "void", + "parameters": [], + "description": "Ends a popup window. Should be called only if BeginPopup() or BeginPopupModal() returned true." + }, + { + "name": "OpenPopup", + "return_type": "void", + "parameters": [ + { + "name": "str_id", + "type": "const char*" + }, + { + "name": "popup_flags", + "type": "ImGuiPopupFlags", + "default": "0" + } + ], + "description": "Marks the popup as open. Should not be called every frame." + }, + { + "name": "OpenPopup", + "return_type": "void", + "parameters": [ + { + "name": "id", + "type": "ImGuiID" + }, + { + "name": "popup_flags", + "type": "ImGuiPopupFlags", + "default": "0" + } + ], + "description": "Marks the popup with the specified ID as open, facilitating calling from nested stacks." + }, + { + "name": "OpenPopupOnItemClick", + "return_type": "void", + "parameters": [ + { + "name": "str_id", + "type": "const char*", + "default": "NULL" + }, + { + "name": "popup_flags", + "type": "ImGuiPopupFlags", + "default": "1" + } + ], + "description": "Helper to open a popup when clicked on the last item. Defaults to right mouse button click." + }, + { + "name": "CloseCurrentPopup", + "return_type": "void", + "parameters": [], + "description": "Manually closes the current popup." + }, + { + "name": "BeginPopupContextItem", + "return_type": "bool", + "parameters": [ + { + "name": "str_id", + "type": "const char*", + "default": "NULL" + }, + { + "name": "popup_flags", + "type": "ImGuiPopupFlags", + "default": "1" + } + ], + "description": "Opens and begins a popup when clicked on the last item. Returns true if the popup is open." + }, + { + "name": "BeginPopupContextWindow", + "return_type": "bool", + "parameters": [ + { + "name": "str_id", + "type": "const char*", + "default": "NULL" + }, + { + "name": "popup_flags", + "type": "ImGuiPopupFlags", + "default": "1" + } + ], + "description": "Opens and begins a popup when clicked on the current window. Returns true if the popup is open." + }, + { + "name": "BeginPopupContextVoid", + "return_type": "bool", + "parameters": [ + { + "name": "str_id", + "type": "const char*", + "default": "NULL" + }, + { + "name": "popup_flags", + "type": "ImGuiPopupFlags", + "default": "1" + } + ], + "description": "Opens and begins a popup when clicked in a void area (where there are no windows). Returns true if the popup is open." + }, + { + "name": "IsPopupOpen", + "return_type": "bool", + "parameters": [ + { + "name": "str_id", + "type": "const char*" + }, + { + "name": "flags", + "type": "ImGuiPopupFlags", + "default": "0" + } + ], + "description": "Returns true if the popup with the specified ID is open." + }, + { + "name": "BeginTable", + "return_type": "bool", + "parameters": [ + { + "name": "str_id", + "type": "const char*" + }, + { + "name": "columns", + "type": "int" + }, + { + "name": "flags", + "type": "ImGuiTableFlags", + "default": "0" + }, + { + "name": "outer_size", + "type": "const ImVec2&", + "default": "ImVec2(0.0f, 0.0f)" + }, + { + "name": "inner_width", + "type": "float", + "default": "0.0f" + } + ], + "description": "Begins a table with the specified number of columns and options. Returns true if the table is successfully created." + }, + { + "name": "EndTable", + "return_type": "void", + "parameters": [], + "description": "Ends the table created by BeginTable(). Should be called only if BeginTable() returned true." + }, + { + "name": "TableNextRow", + "return_type": "void", + "parameters": [ + { + "name": "row_flags", + "type": "ImGuiTableRowFlags", + "default": "0" + }, + { + "name": "min_row_height", + "type": "float", + "default": "0.0f" + } + ], + "description": "Appends into the first cell of a new row." + }, + { + "name": "TableNextColumn", + "return_type": "bool", + "parameters": [], + "description": "Appends into the next column (or the first column of the next row if currently in the last column). Returns true when the column is visible." + }, + { + "name": "TableSetColumnIndex", + "return_type": "bool", + "parameters": [ + { + "name": "column_n", + "type": "int" + } + ], + "description": "Sets the current column index for the next item in the table." + }, + { + "name": "TableSetupColumn", + "return_type": "void", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "flags", + "type": "ImGuiTableColumnFlags", + "default": "0" + }, + { + "name": "init_width_or_weight", + "type": "float", + "default": "0.0f" + }, + { + "name": "user_id", + "type": "ImGuiID", + "default": "0" + } + ], + "description": "Sets up a column in a table. You can provide a label, flags, initial width or weight, and an optional user ID." + }, + { + "name": "TableSetupScrollFreeze", + "return_type": "void", + "parameters": [ + { + "name": "cols", + "type": "int" + }, + { + "name": "rows", + "type": "int" + } + ], + "description": "Freezes the specified number of columns and rows, keeping them visible when the table is scrolled." + }, + { + "name": "TableHeader", + "return_type": "void", + "parameters": [ + { + "name": "label", + "type": "const char*" + } + ], + "description": "Submits a single header cell manually, rarely used." + }, + { + "name": "TableHeadersRow", + "return_type": "void", + "parameters": [], + "description": "Submits a row with header cells based on data provided to TableSetupColumn(). Also submits the context menu." + }, + { + "name": "TableAngledHeadersRow", + "return_type": "void", + "parameters": [], + "description": "Submits a row with angled headers for columns marked with the ImGuiTableColumnFlags_AngledHeader flag. This must be the first row." + }, + { + "name": "TableGetSortSpecs", + "return_type": "ImGuiTableSortSpecs*", + "parameters": [], + "description": "Gets the latest sort specs for the table. Returns NULL if sorting is not active. Do not hold onto the returned pointer over multiple frames." + }, + { + "name": "TableGetColumnCount", + "return_type": "int", + "parameters": [], + "description": "Returns the number of columns in the current table." + }, + { + "name": "TableGetColumnIndex", + "return_type": "int", + "parameters": [], + "description": "Returns the current column index." + }, + { + "name": "TableGetRowIndex", + "return_type": "int", + "parameters": [], + "description": "Returns the current row index." + }, + { + "name": "TableGetColumnName", + "return_type": "const char*", + "parameters": [ + { + "name": "column_n", + "type": "int", + "default": "-1" + } + ], + "description": "Returns the name of the column specified by column_n. Pass -1 to use the current column." + }, + { + "name": "TableGetColumnFlags", + "return_type": "ImGuiTableColumnFlags", + "parameters": [ + { + "name": "column_n", + "type": "int", + "default": "-1" + } + ], + "description": "Returns the flags associated with the specified column, or the current column if column_n is -1." + }, + { + "name": "TableSetColumnEnabled", + "return_type": "void", + "parameters": [ + { + "name": "column_n", + "type": "int" + }, + { + "name": "v", + "type": "bool" + } + ], + "description": "Changes the enabled/disabled state of a column. Set to false to hide the column." + }, + { + "name": "TableGetHoveredColumn", + "return_type": "int", + "parameters": [], + "description": "Returns the index of the hovered column, or -1 if no column is hovered." + }, + { + "name": "TableSetBgColor", + "return_type": "void", + "parameters": [ + { + "name": "target", + "type": "ImGuiTableBgTarget" + }, + { + "name": "color", + "type": "ImU32" + }, + { + "name": "column_n", + "type": "int", + "default": "-1" + } + ], + "description": "Sets the background color for a cell, row, or column. See ImGuiTableBgTarget_ flags for details." + }, + { + "name": "Columns", + "return_type": "void", + "parameters": [ + { + "name": "count", + "type": "int", + "default": "1" + }, + { + "name": "id", + "type": "const char*", + "default": "NULL" + }, + { + "name": "border", + "type": "bool", + "default": "true" + } + ], + "description": "Legacy columns API. Sets up a number of columns. Use Tables instead for new implementations." + }, + { + "name": "NextColumn", + "return_type": "void", + "parameters": [], + "description": "Moves to the next column in the current row, or to the first column of the next row if the current row is finished." + }, + { + "name": "GetColumnIndex", + "return_type": "int", + "parameters": [], + "description": "Returns the current column index in the legacy Columns API." + }, + { + "name": "GetColumnWidth", + "return_type": "float", + "parameters": [ + { + "name": "column_index", + "type": "int", + "default": "-1" + } + ], + "description": "Returns the width of the specified column in pixels, or the current column if column_index is -1." + }, + { + "name": "SetColumnWidth", + "return_type": "void", + "parameters": [ + { + "name": "column_index", + "type": "int" + }, + { + "name": "width", + "type": "float" + } + ], + "description": "Sets the width of the specified column in pixels." + }, + { + "name": "GetColumnOffset", + "return_type": "float", + "parameters": [ + { + "name": "column_index", + "type": "int", + "default": "-1" + } + ], + "description": "Gets the position of the column line in pixels from the left side of the content region." + }, + { + "name": "SetColumnOffset", + "return_type": "void", + "parameters": [ + { + "name": "column_index", + "type": "int" + }, + { + "name": "offset_x", + "type": "float" + } + ], + "description": "Sets the position of the column line in pixels from the left side of the content region." + }, + { + "name": "GetColumnsCount", + "return_type": "int", + "parameters": [], + "description": "Returns the number of columns in the legacy Columns API." + }, + { + "name": "BeginTabBar", + "return_type": "bool", + "parameters": [ + { + "name": "str_id", + "type": "const char*" + }, + { + "name": "flags", + "type": "ImGuiTabBarFlags", + "default": "0" + } + ], + "description": "Begins a tab bar. Returns true if the tab bar is successfully created." + }, + { + "name": "EndTabBar", + "return_type": "void", + "parameters": [], + "description": "Ends the tab bar created by BeginTabBar(). Should be called only if BeginTabBar() returned true." + }, + { + "name": "BeginTabItem", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "p_open", + "type": "bool*", + "default": "NULL" + }, + { + "name": "flags", + "type": "ImGuiTabItemFlags", + "default": "0" + } + ], + "description": "Begins a tab item. Returns true if the tab is selected." + }, + { + "name": "EndTabItem", + "return_type": "void", + "parameters": [], + "description": "Ends the tab item created by BeginTabItem(). Should be called only if BeginTabItem() returned true." + }, + { + "name": "TabItemButton", + "return_type": "bool", + "parameters": [ + { + "name": "label", + "type": "const char*" + }, + { + "name": "flags", + "type": "ImGuiTabItemFlags", + "default": "0" + } + ], + "description": "Creates a tab that behaves like a button. Returns true when clicked." + }, + { + "name": "SetTabItemClosed", + "return_type": "void", + "parameters": [ + { + "name": "tab_or_docked_window_label", + "type": "const char*" + } + ], + "description": "Notifies the TabBar or Docking system of a closed tab or window ahead of time. This is useful to reduce visual flicker on reorderable tab bars." + }, + { + "name": "LogToTTY", + "return_type": "void", + "parameters": [ + { + "name": "auto_open_depth", + "type": "int", + "default": "-1" + } + ], + "description": "Starts logging output to the terminal (stdout)." + }, + { + "name": "LogToFile", + "return_type": "void", + "parameters": [ + { + "name": "auto_open_depth", + "type": "int", + "default": "-1" + }, + { + "name": "filename", + "type": "const char*", + "default": "NULL" + } + ], + "description": "Starts logging output to a file. If filename is NULL, the log is written to 'imgui_log.txt'." + }, + { + "name": "LogToClipboard", + "return_type": "void", + "parameters": [ + { + "name": "auto_open_depth", + "type": "int", + "default": "-1" + } + ], + "description": "Starts logging output to the OS clipboard." + }, + { + "name": "LogFinish", + "return_type": "void", + "parameters": [], + "description": "Stops logging and closes any file or clipboard output." + }, + { + "name": "LogButtons", + "return_type": "void", + "parameters": [], + "description": "Helper function to display buttons for logging to tty, file, or clipboard." + }, + { + "name": "LogText", + "return_type": "void", + "parameters": [ + { + "name": "fmt", + "type": "const char*" + }, + { + "name": "...", + "type": "" + } + ], + "description": "Logs formatted text directly to the current log output without displaying it on the screen." + }, + { + "name": "LogTextV", + "return_type": "void", + "parameters": [ + { + "name": "fmt", + "type": "const char*" + }, + { + "name": "args", + "type": "va_list" + } + ], + "description": "Logs formatted text directly to the current log output using a va_list for arguments." + }, + { + "name": "BeginDragDropSource", + "return_type": "bool", + "parameters": [ + { + "name": "flags", + "type": "ImGuiDragDropFlags", + "default": "0" + } + ], + "description": "Starts a drag-and-drop source. If this returns true, you should call SetDragDropPayload() and EndDragDropSource()." + }, + { + "name": "SetDragDropPayload", + "return_type": "bool", + "parameters": [ + { + "name": "type", + "type": "const char*" + }, + { + "name": "data", + "type": "const void*" + }, + { + "name": "sz", + "type": "size_t" + }, + { + "name": "cond", + "type": "ImGuiCond", + "default": "0" + } + ], + "description": "Sets the payload data for the current drag-and-drop operation. The type is a user-defined string." + }, + { + "name": "EndDragDropSource", + "return_type": "void", + "parameters": [], + "description": "Ends a drag-and-drop source operation. Should be called only if BeginDragDropSource() returns true." + }, + { + "name": "BeginDragDropTarget", + "return_type": "bool", + "parameters": [], + "description": "Marks an item as a possible drag-and-drop target. If this returns true, you can call AcceptDragDropPayload() and EndDragDropTarget()." + }, + { + "name": "AcceptDragDropPayload", + "return_type": "const ImGuiPayload*", + "parameters": [ + { + "name": "type", + "type": "const char*" + }, + { + "name": "flags", + "type": "ImGuiDragDropFlags", + "default": "0" + } + ], + "description": "Accepts the drag-and-drop payload if it matches the specified type. Returns the payload data if accepted." + }, + { + "name": "EndDragDropTarget", + "return_type": "void", + "parameters": [], + "description": "Ends a drag-and-drop target operation. Should be called only if BeginDragDropTarget() returns true." + }, + { + "name": "GetDragDropPayload", + "return_type": "const ImGuiPayload*", + "parameters": [], + "description": "Peeks directly into the current drag-and-drop payload from anywhere. Returns NULL if drag-and-drop is inactive." + }, + { + "name": "BeginDisabled", + "return_type": "void", + "parameters": [ + { + "name": "disabled", + "type": "bool", + "default": "true" + } + ], + "description": "Disables user interactions and dims item visuals. Can be nested." + }, + { + "name": "EndDisabled", + "return_type": "void", + "parameters": [], + "description": "Ends the disabled section started by BeginDisabled()." + }, + { + "name": "PushClipRect", + "return_type": "void", + "parameters": [ + { + "name": "clip_rect_min", + "type": "const ImVec2&" + }, + { + "name": "clip_rect_max", + "type": "const ImVec2&" + }, + { + "name": "intersect_with_current_clip_rect", + "type": "bool" + } + ], + "description": "Pushes a clipping rectangle onto the stack. Mouse hovering is affected by this call." + }, + { + "name": "PopClipRect", + "return_type": "void", + "parameters": [], + "description": "Pops the last clipping rectangle from the stack." + }, + { + "name": "SetItemDefaultFocus", + "return_type": "void", + "parameters": [], + "description": "Sets the last item as the default focused item of a window." + }, + { + "name": "SetKeyboardFocusHere", + "return_type": "void", + "parameters": [ + { + "name": "offset", + "type": "int", + "default": "0" + } + ], + "description": "Focuses the keyboard on the next widget. Positive offset can be used to access sub-components, and -1 to access the previous widget." + }, + { + "name": "SetNextItemAllowOverlap", + "return_type": "void", + "parameters": [], + "description": "Allows the next item to overlap with others." + }, + { + "name": "IsItemHovered", + "return_type": "bool", + "parameters": [ + { + "name": "flags", + "type": "ImGuiHoveredFlags", + "default": "0" + } + ], + "description": "Checks if the last item is hovered and usable. Can be customized with ImGuiHoveredFlags." + }, + { + "name": "IsItemActive", + "return_type": "bool", + "parameters": [], + "description": "Checks if the last item is active (e.g., button being held, text field being edited)." + }, + { + "name": "IsItemFocused", + "return_type": "bool", + "parameters": [], + "description": "Checks if the last item is focused for keyboard or gamepad navigation." + }, + { + "name": "IsItemClicked", + "return_type": "bool", + "parameters": [ + { + "name": "mouse_button", + "type": "ImGuiMouseButton", + "default": "0" + } + ], + "description": "Checks if the last item is hovered and clicked with the specified mouse button." + }, + { + "name": "IsItemVisible", + "return_type": "bool", + "parameters": [], + "description": "Checks if the last item is visible (i.e., not clipped or scrolled out of view)." + }, + { + "name": "IsItemEdited", + "return_type": "bool", + "parameters": [], + "description": "Checks if the last item modified its underlying value or was pressed during this frame." + }, + { + "name": "IsItemActivated", + "return_type": "bool", + "parameters": [], + "description": "Checks if the last item was just made active (previously inactive)." + }, + { + "name": "IsItemDeactivated", + "return_type": "bool", + "parameters": [], + "description": "Checks if the last item was just made inactive (previously active). Useful for Undo/Redo patterns." + }, + { + "name": "IsItemDeactivatedAfterEdit", + "return_type": "bool", + "parameters": [], + "description": "Checks if the last item was just made inactive and modified its value while active. Useful for Undo/Redo patterns." + }, + { + "name": "IsItemToggledOpen", + "return_type": "bool", + "parameters": [], + "description": "Checks if the last item's open state was toggled (e.g., TreeNode())." + }, + { + "name": "IsAnyItemHovered", + "return_type": "bool", + "parameters": [], + "description": "Checks if any item is currently hovered." + }, + { + "name": "IsAnyItemActive", + "return_type": "bool", + "parameters": [], + "description": "Checks if any item is currently active." + }, + { + "name": "IsAnyItemFocused", + "return_type": "bool", + "parameters": [], + "description": "Checks if any item is currently focused." + }, + { + "name": "GetItemID", + "return_type": "ImGuiID", + "parameters": [], + "description": "Returns the ID of the last item." + }, + { + "name": "GetItemRectMin", + "return_type": "ImVec2", + "parameters": [], + "description": "Returns the upper-left bounding rectangle of the last item in screen space." + }, + { + "name": "GetItemRectMax", + "return_type": "ImVec2", + "parameters": [], + "description": "Returns the lower-right bounding rectangle of the last item in screen space." + }, + { + "name": "GetItemRectSize", + "return_type": "ImVec2", + "parameters": [], + "description": "Returns the size of the last item." + }, + { + "name": "GetMainViewport", + "return_type": "ImGuiViewport*", + "parameters": [], + "description": "Returns the primary/default viewport. This is never NULL." + }, + { + "name": "GetBackgroundDrawList", + "return_type": "ImDrawList*", + "parameters": [], + "description": "Returns a draw list for drawing shapes/text behind Dear ImGui content." + }, + { + "name": "GetForegroundDrawList", + "return_type": "ImDrawList*", + "parameters": [], + "description": "Returns a draw list for drawing shapes/text over Dear ImGui content." + }, + { + "name": "IsRectVisible", + "return_type": "bool", + "parameters": [ + { + "name": "size", + "type": "const ImVec2&" + } + ], + "description": "Checks if a rectangle (starting from the cursor position) of the given size is visible and not clipped." + }, + { + "name": "IsRectVisible", + "return_type": "bool", + "parameters": [ + { + "name": "rect_min", + "type": "const ImVec2&" + }, + { + "name": "rect_max", + "type": "const ImVec2&" + } + ], + "description": "Checks if a rectangle defined by rect_min and rect_max is visible and not clipped." + }, + { + "name": "GetTime", + "return_type": "double", + "parameters": [], + "description": "Returns the global ImGui time, incremented by io.DeltaTime every frame." + }, + { + "name": "GetFrameCount", + "return_type": "int", + "parameters": [], + "description": "Returns the global ImGui frame count, incremented by 1 every frame." + }, + { + "name": "GetDrawListSharedData", + "return_type": "ImDrawListSharedData*", + "parameters": [], + "description": "Returns shared data for ImDrawList instances." + }, + { + "name": "GetStyleColorName", + "return_type": "const char*", + "parameters": [ + { + "name": "idx", + "type": "ImGuiCol" + } + ], + "description": "Returns a string representing the enum value of a style color." + }, + { + "name": "SetStateStorage", + "return_type": "void", + "parameters": [ + { + "name": "storage", + "type": "ImGuiStorage*" + } + ], + "description": "Replaces the current window storage with custom storage." + }, + { + "name": "GetStateStorage", + "return_type": "ImGuiStorage*", + "parameters": [], + "description": "Returns the current state storage." + }, + { + "name": "CalcTextSize", + "return_type": "ImVec2", + "parameters": [ + { + "name": "text", + "type": "const char*" + }, + { + "name": "text_end", + "type": "const char*", + "default": "NULL" + }, + { + "name": "hide_text_after_double_hash", + "type": "bool", + "default": "false" + }, + { + "name": "wrap_width", + "type": "float", + "default": "-1.0f" + } + ], + "description": "Calculates the size of a text string, considering optional wrapping and special handling of double hashes." + }, + { + "name": "ColorConvertU32ToFloat4", + "return_type": "ImVec4", + "parameters": [ + { + "name": "in", + "type": "ImU32" + } + ], + "description": "Converts a packed 32-bit color value to a floating-point ImVec4." + }, + { + "name": "ColorConvertFloat4ToU32", + "return_type": "ImU32", + "parameters": [ + { + "name": "in", + "type": "const ImVec4&" + } + ], + "description": "Converts a floating-point ImVec4 color to a packed 32-bit value." + }, + { + "name": "ColorConvertRGBtoHSV", + "return_type": "void", + "parameters": [ + { + "name": "r", + "type": "float" + }, + { + "name": "g", + "type": "float" + }, + { + "name": "b", + "type": "float" + }, + { + "name": "out_h", + "type": "float&" + }, + { + "name": "out_s", + "type": "float&" + }, + { + "name": "out_v", + "type": "float&" + } + ], + "description": "Converts RGB color values to HSV." + }, + { + "name": "ColorConvertHSVtoRGB", + "return_type": "void", + "parameters": [ + { + "name": "h", + "type": "float" + }, + { + "name": "s", + "type": "float" + }, + { + "name": "v", + "type": "float" + }, + { + "name": "out_r", + "type": "float&" + }, + { + "name": "out_g", + "type": "float&" + }, + { + "name": "out_b", + "type": "float&" + } + ], + "description": "Converts HSV color values to RGB." + }, + { + "name": "IsKeyDown", + "return_type": "bool", + "parameters": [ + { + "name": "key", + "type": "ImGuiKey" + } + ], + "description": "Checks if a key is being held down." + }, + { + "name": "IsKeyPressed", + "return_type": "bool", + "parameters": [ + { + "name": "key", + "type": "ImGuiKey" + }, + { + "name": "repeat", + "type": "bool", + "default": "true" + } + ], + "description": "Checks if a key was pressed (transitioned from not pressed to pressed). If repeat is true, considers io.KeyRepeatDelay / KeyRepeatRate." + }, + { + "name": "IsKeyReleased", + "return_type": "bool", + "parameters": [ + { + "name": "key", + "type": "ImGuiKey" + } + ], + "description": "Checks if a key was released (transitioned from pressed to not pressed)." + }, + { + "name": "IsKeyChordPressed", + "return_type": "bool", + "parameters": [ + { + "name": "key_chord", + "type": "ImGuiKeyChord" + } + ], + "description": "Checks if a key chord (combination of modifiers and a key) was pressed." + }, + { + "name": "GetKeyPressedAmount", + "return_type": "int", + "parameters": [ + { + "name": "key", + "type": "ImGuiKey" + }, + { + "name": "repeat_delay", + "type": "float" + }, + { + "name": "rate", + "type": "float" + } + ], + "description": "Returns the number of times a key has been pressed considering the provided repeat rate and delay." + }, + { + "name": "GetKeyName", + "return_type": "const char*", + "parameters": [ + { + "name": "key", + "type": "ImGuiKey" + } + ], + "description": "[DEBUG] Returns the English name of the key." + }, + { + "name": "SetNextFrameWantCaptureKeyboard", + "return_type": "void", + "parameters": [ + { + "name": "want_capture_keyboard", + "type": "bool" + } + ], + "description": "Overrides the io.WantCaptureKeyboard flag for the next frame." + }, + { + "name": "Shortcut", + "return_type": "bool", + "parameters": [ + { + "name": "key_chord", + "type": "ImGuiKeyChord" + }, + { + "name": "flags", + "type": "ImGuiInputFlags", + "default": "0" + } + ], + "description": "Submits a shortcut route, and returns true if the shortcut is currently active and routed." + }, + { + "name": "SetNextItemShortcut", + "return_type": "void", + "parameters": [ + { + "name": "key_chord", + "type": "ImGuiKeyChord" + }, + { + "name": "flags", + "type": "ImGuiInputFlags", + "default": "0" + } + ], + "description": "Sets the shortcut for the next item." + }, + { + "name": "SetItemKeyOwner", + "return_type": "void", + "parameters": [ + { + "name": "key", + "type": "ImGuiKey" + } + ], + "description": "Sets the key owner to the last item ID if it is hovered or active." + }, + { + "name": "IsMouseDown", + "return_type": "bool", + "parameters": [ + { + "name": "button", + "type": "ImGuiMouseButton" + } + ], + "description": "Checks if a mouse button is being held down." + }, + { + "name": "IsMouseClicked", + "return_type": "bool", + "parameters": [ + { + "name": "button", + "type": "ImGuiMouseButton" + }, + { + "name": "repeat", + "type": "bool", + "default": "false" + } + ], + "description": "Checks if a mouse button was clicked (transitioned from not pressed to pressed)." + }, + { + "name": "IsMouseReleased", + "return_type": "bool", + "parameters": [ + { + "name": "button", + "type": "ImGuiMouseButton" + } + ], + "description": "Checks if a mouse button was released (transitioned from pressed to not pressed)." + }, + { + "name": "IsMouseDoubleClicked", + "return_type": "bool", + "parameters": [ + { + "name": "button", + "type": "ImGuiMouseButton" + } + ], + "description": "Checks if a mouse button was double-clicked." + }, + { + "name": "GetMouseClickedCount", + "return_type": "int", + "parameters": [ + { + "name": "button", + "type": "ImGuiMouseButton" + } + ], + "description": "Returns the number of successive clicks of a mouse button." + }, + { + "name": "IsMouseHoveringRect", + "return_type": "bool", + "parameters": [ + { + "name": "r_min", + "type": "const ImVec2&" + }, + { + "name": "r_max", + "type": "const ImVec2&" + }, + { + "name": "clip", + "type": "bool", + "default": "true" + } + ], + "description": "Checks if the mouse is hovering a given bounding rectangle in screen space." + }, + { + "name": "IsMousePosValid", + "return_type": "bool", + "parameters": [ + { + "name": "mouse_pos", + "type": "const ImVec2*", + "default": "NULL" + } + ], + "description": "Checks if the mouse position is valid." + }, + { + "name": "IsAnyMouseDown", + "return_type": "bool", + "parameters": [], + "description": "Checks if any mouse button is being held down." + }, + { + "name": "GetMousePos", + "return_type": "ImVec2", + "parameters": [], + "description": "Returns the current mouse position." + }, + { + "name": "GetMousePosOnOpeningCurrentPopup", + "return_type": "ImVec2", + "parameters": [], + "description": "Returns the mouse position at the time of opening the current popup." + }, + { + "name": "IsMouseDragging", + "return_type": "bool", + "parameters": [ + { + "name": "button", + "type": "ImGuiMouseButton" + }, + { + "name": "lock_threshold", + "type": "float", + "default": "-1.0f" + } + ], + "description": "Checks if the mouse is dragging (moving while holding a button down)." + }, + { + "name": "GetMouseDragDelta", + "return_type": "ImVec2", + "parameters": [ + { + "name": "button", + "type": "ImGuiMouseButton", + "default": "0" + }, + { + "name": "lock_threshold", + "type": "float", + "default": "-1.0f" + } + ], + "description": "Returns the delta (change in position) from the initial click position while dragging." + }, + { + "name": "ResetMouseDragDelta", + "return_type": "void", + "parameters": [ + { + "name": "button", + "type": "ImGuiMouseButton", + "default": "0" + } + ], + "description": "Resets the mouse drag delta for the specified button." + }, + { + "name": "GetMouseCursor", + "return_type": "ImGuiMouseCursor", + "parameters": [], + "description": "Returns the current desired mouse cursor shape." + }, + { + "name": "SetMouseCursor", + "return_type": "void", + "parameters": [ + { + "name": "cursor_type", + "type": "ImGuiMouseCursor" + } + ], + "description": "Sets the desired mouse cursor shape." + }, + { + "name": "SetNextFrameWantCaptureMouse", + "return_type": "void", + "parameters": [ + { + "name": "want_capture_mouse", + "type": "bool" + } + ], + "description": "Overrides the io.WantCaptureMouse flag for the next frame." + }, + { + "name": "GetClipboardText", + "return_type": "const char*", + "parameters": [], + "description": "Returns the text currently in the clipboard." + }, + { + "name": "SetClipboardText", + "return_type": "void", + "parameters": [ + { + "name": "text", + "type": "const char*" + } + ], + "description": "Sets the text in the clipboard." + }, + { + "name": "LoadIniSettingsFromDisk", + "return_type": "void", + "parameters": [ + { + "name": "ini_filename", + "type": "const char*" + } + ], + "description": "Loads ini settings from the specified file." + }, + { + "name": "LoadIniSettingsFromMemory", + "return_type": "void", + "parameters": [ + { + "name": "ini_data", + "type": "const char*" + }, + { + "name": "ini_size", + "type": "size_t", + "default": "0" + } + ], + "description": "Loads ini settings from the specified memory buffer." + }, + { + "name": "SaveIniSettingsToDisk", + "return_type": "void", + "parameters": [ + { + "name": "ini_filename", + "type": "const char*" + } + ], + "description": "Saves ini settings to the specified file." + }, + { + "name": "SaveIniSettingsToMemory", + "return_type": "const char*", + "parameters": [ + { + "name": "out_ini_size", + "type": "size_t*", + "default": "NULL" + } + ], + "description": "Returns a zero-terminated string with the ini data which you can save manually." + }, + { + "name": "DebugTextEncoding", + "return_type": "void", + "parameters": [ + { + "name": "text", + "type": "const char*" + } + ], + "description": "Debugs the text encoding." + }, + { + "name": "DebugFlashStyleColor", + "return_type": "void", + "parameters": [ + { + "name": "idx", + "type": "ImGuiCol" + } + ], + "description": "Debugs by flashing a style color." + }, + { + "name": "DebugStartItemPicker", + "return_type": "void", + "parameters": [], + "description": "Starts the item picker for debugging." + }, + { + "name": "DebugCheckVersionAndDataLayout", + "return_type": "bool", + "parameters": [ + { + "name": "version_str", + "type": "const char*" + }, + { + "name": "sz_io", + "type": "size_t" + }, + { + "name": "sz_style", + "type": "size_t" + }, + { + "name": "sz_vec2", + "type": "size_t" + }, + { + "name": "sz_vec4", + "type": "size_t" + }, + { + "name": "sz_drawvert", + "type": "size_t" + }, + { + "name": "sz_drawidx", + "type": "size_t" + } + ], + "description": "Checks the version and data layout for debugging." + }, + { + "name": "SetAllocatorFunctions", + "return_type": "void", + "parameters": [ + { + "name": "alloc_func", + "type": "ImGuiMemAllocFunc" + }, + { + "name": "free_func", + "type": "ImGuiMemFreeFunc" + }, + { + "name": "user_data", + "type": "void*", + "default": "NULL" + } + ], + "description": "Sets the custom memory allocator functions." + }, + { + "name": "GetAllocatorFunctions", + "return_type": "void", + "parameters": [ + { + "name": "p_alloc_func", + "type": "ImGuiMemAllocFunc*" + }, + { + "name": "p_free_func", + "type": "ImGuiMemFreeFunc*" + }, + { + "name": "p_user_data", + "type": "void**" + } + ], + "description": "Gets the current memory allocator functions." + }, + { + "name": "MemAlloc", + "return_type": "void*", + "parameters": [ + { + "name": "size", + "type": "size_t" + } + ], + "description": "Allocates memory using the custom allocator." + }, + { + "name": "MemFree", + "return_type": "void", + "parameters": [ + { + "name": "ptr", + "type": "void*" + } + ], + "description": "Frees memory using the custom allocator." + } + ] + }, + "enums": [ + { + "name": "ImGuiMultiSelectFlags_", + "values": [ + { + "name": "ImGuiMultiSelectFlags_None", + "value": 0, + "description": "No flags." + }, + { + "name": "ImGuiMultiSelectFlags_SingleSelect", + "value": 1, + "description": "Disable selecting more than one item. This allows single-selection code to share the same logic. It essentially disables the main purpose of BeginMultiSelect() though." + }, + { + "name": "ImGuiMultiSelectFlags_NoSelectAll", + "value": 2, + "description": "Disable CTRL+A shortcut to select all." + }, + { + "name": "ImGuiMultiSelectFlags_NoRangeSelect", + "value": 4, + "description": "Disable Shift+selection mouse/keyboard support. Useful for unordered 2D selection. Ensures contiguous SetRange requests are not combined into one." + }, + { + "name": "ImGuiMultiSelectFlags_NoAutoSelect", + "value": 8, + "description": "Disable selecting items when navigating. Useful for supporting range-select in a list of checkboxes." + }, + { + "name": "ImGuiMultiSelectFlags_NoAutoClear", + "value": 16, + "description": "Disable clearing selection when navigating or selecting another item. Generally used with ImGuiMultiSelectFlags_NoAutoSelect." + }, + { + "name": "ImGuiMultiSelectFlags_NoAutoClearOnReselect", + "value": 32, + "description": "Disable clearing selection when clicking/selecting an already selected item." + }, + { + "name": "ImGuiMultiSelectFlags_BoxSelect1d", + "value": 64, + "description": "Enable box-selection with same width and same x position items. Box-selection works better with a bit of spacing between items' hit-boxes." + }, + { + "name": "ImGuiMultiSelectFlags_BoxSelect2d", + "value": 128, + "description": "Enable box-selection with varying width or varying x position items support. Alters clipping logic, so horizontal movements update selection of normally clipped items." + }, + { + "name": "ImGuiMultiSelectFlags_BoxSelectNoScroll", + "value": 256, + "description": "Disable scrolling when box-selecting near the edges of the scope." + }, + { + "name": "ImGuiMultiSelectFlags_ClearOnEscape", + "value": 512, + "description": "Clear selection when pressing Escape while the scope is focused." + }, + { + "name": "ImGuiMultiSelectFlags_ClearOnClickVoid", + "value": 1024, + "description": "Clear selection when clicking on an empty location within the scope." + }, + { + "name": "ImGuiMultiSelectFlags_ScopeWindow", + "value": 2048, + "description": "Scope for _BoxSelect and _ClearOnClickVoid is the whole window (Default)." + }, + { + "name": "ImGuiMultiSelectFlags_ScopeRect", + "value": 4096, + "description": "Scope for _BoxSelect and _ClearOnClickVoid is the rectangle encompassing BeginMultiSelect()/EndMultiSelect()." + }, + { + "name": "ImGuiMultiSelectFlags_SelectOnClick", + "value": 8192, + "description": "Apply selection on mouse down when clicking on an unselected item. (Default)" + }, + { + "name": "ImGuiMultiSelectFlags_SelectOnClickRelease", + "value": 16384, + "description": "Apply selection on mouse release when clicking an unselected item. Allows dragging an unselected item without altering selection." + }, + { + "name": "ImGuiMultiSelectFlags_NavWrapX", + "value": 65536, + "description": "[Temporary] Enable navigation wrapping on the X axis. Provided as a convenience until a more general Nav API is available." + } + ] + }, + { + "name": "ImGuiWindowFlags_", + "values": [ + { + "name": "ImGuiWindowFlags_None", + "value": 0, + "description": "No window flags." + }, + { + "name": "ImGuiWindowFlags_NoTitleBar", + "value": "1 << 0", + "description": "Disable title-bar." + }, + { + "name": "ImGuiWindowFlags_NoResize", + "value": "1 << 1", + "description": "Disable user resizing with the lower-right grip." + }, + { + "name": "ImGuiWindowFlags_NoMove", + "value": "1 << 2", + "description": "Disable user moving the window." + }, + { + "name": "ImGuiWindowFlags_NoScrollbar", + "value": "1 << 3", + "description": "Disable scrollbars (window can still scroll with mouse or programmatically)." + }, + { + "name": "ImGuiWindowFlags_NoScrollWithMouse", + "value": "1 << 4", + "description": "Disable user vertically scrolling with mouse wheel. On child window, mouse wheel will be forwarded to the parent unless NoScrollbar is also set." + }, + { + "name": "ImGuiWindowFlags_NoCollapse", + "value": "1 << 5", + "description": "Disable user collapsing window by double-clicking on it. Also referred to as Window Menu Button (e.g. within a docking node)." + }, + { + "name": "ImGuiWindowFlags_AlwaysAutoResize", + "value": "1 << 6", + "description": "Resize every window to its content every frame." + }, + { + "name": "ImGuiWindowFlags_NoBackground", + "value": "1 << 7", + "description": "Disable drawing background color (WindowBg, etc.) and outside border. Similar as using SetNextWindowBgAlpha(0.0f)." + }, + { + "name": "ImGuiWindowFlags_NoSavedSettings", + "value": "1 << 8", + "description": "Never load/save settings in .ini file." + }, + { + "name": "ImGuiWindowFlags_NoMouseInputs", + "value": "1 << 9", + "description": "Disable catching mouse, hovering test with pass through." + }, + { + "name": "ImGuiWindowFlags_MenuBar", + "value": "1 << 10", + "description": "Has a menu-bar." + }, + { + "name": "ImGuiWindowFlags_HorizontalScrollbar", + "value": "1 << 11", + "description": "Allow horizontal scrollbar to appear (off by default). You may use SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width." + }, + { + "name": "ImGuiWindowFlags_NoFocusOnAppearing", + "value": "1 << 12", + "description": "Disable taking focus when transitioning from hidden to visible state." + }, + { + "name": "ImGuiWindowFlags_NoBringToFrontOnFocus", + "value": "1 << 13", + "description": "Disable bringing window to front when taking focus (e.g. clicking on it or programmatically giving it focus)." + }, + { + "name": "ImGuiWindowFlags_AlwaysVerticalScrollbar", + "value": "1 << 14", + "description": "Always show vertical scrollbar (even if ContentSize.y < Size.y)." + }, + { + "name": "ImGuiWindowFlags_AlwaysHorizontalScrollbar", + "value": "1 << 15", + "description": "Always show horizontal scrollbar (even if ContentSize.x < Size.x)." + }, + { + "name": "ImGuiWindowFlags_NoNavInputs", + "value": "1 << 16", + "description": "No gamepad/keyboard navigation within the window." + }, + { + "name": "ImGuiWindowFlags_NoNavFocus", + "value": "1 << 17", + "description": "No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB)." + }, + { + "name": "ImGuiWindowFlags_UnsavedDocument", + "value": "1 << 18", + "description": "Display a dot next to the title. When used in a tab/docking context, tab is selected when clicking the X + closure is not assumed." + }, + { + "name": "ImGuiWindowFlags_NoNav", + "value": "ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus", + "description": "Shortcut for no navigation inputs or focus." + }, + { + "name": "ImGuiWindowFlags_NoDecoration", + "value": "ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse", + "description": "Shortcut for no decorations (title bar, resize, scrollbar, collapse)." + }, + { + "name": "ImGuiWindowFlags_NoInputs", + "value": "ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus", + "description": "Shortcut for no inputs (mouse and navigation)." + }, + { + "name": "ImGuiWindowFlags_ChildWindow", + "value": "1 << 24", + "description": "Don't use! For internal use by BeginChild()." + }, + { + "name": "ImGuiWindowFlags_Tooltip", + "value": "1 << 25", + "description": "Don't use! For internal use by BeginTooltip()." + }, + { + "name": "ImGuiWindowFlags_Popup", + "value": "1 << 26", + "description": "Don't use! For internal use by BeginPopup()." + }, + { + "name": "ImGuiWindowFlags_Modal", + "value": "1 << 27", + "description": "Don't use! For internal use by BeginPopupModal()." + }, + { + "name": "ImGuiWindowFlags_ChildMenu", + "value": "1 << 28", + "description": "Don't use! For internal use by BeginMenu()." + }, + { + "name": "ImGuiWindowFlags_AlwaysUseWindowPadding", + "value": "1 << 30", + "description": "Obsoleted in 1.90.0: Use ImGuiChildFlags_AlwaysUseWindowPadding in BeginChild() call." + }, + { + "name": "ImGuiWindowFlags_NavFlattened", + "value": "1 << 31", + "description": "Obsoleted in 1.90.9: Use ImGuiChildFlags_NavFlattened in BeginChild() call." + } + ] + }, + { + "name": "ImGuiChildFlags_", + "values": [ + { + "name": "ImGuiChildFlags_None", + "value": 0, + "description": "No child window flags." + }, + { + "name": "ImGuiChildFlags_Border", + "value": "1 << 0", + "description": "Show an outer border and enable WindowPadding. (IMPORTANT: this is always == 1 == true for legacy reason)." + }, + { + "name": "ImGuiChildFlags_AlwaysUseWindowPadding", + "value": "1 << 1", + "description": "Pad with style.WindowPadding even if no border is drawn (no padding by default for non-bordered child windows because it makes more sense)." + }, + { + "name": "ImGuiChildFlags_ResizeX", + "value": "1 << 2", + "description": "Allow resize from right border (layout direction). Enable .ini saving (unless ImGuiWindowFlags_NoSavedSettings passed to window flags)." + }, + { + "name": "ImGuiChildFlags_ResizeY", + "value": "1 << 3", + "description": "Allow resize from bottom border (layout direction)." + }, + { + "name": "ImGuiChildFlags_AutoResizeX", + "value": "1 << 4", + "description": "Enable auto-resizing width. Read 'IMPORTANT: Size measurement' details above." + }, + { + "name": "ImGuiChildFlags_AutoResizeY", + "value": "1 << 5", + "description": "Enable auto-resizing height. Read 'IMPORTANT: Size measurement' details above." + }, + { + "name": "ImGuiChildFlags_AlwaysAutoResize", + "value": "1 << 6", + "description": "Combined with AutoResizeX/AutoResizeY. Always measure size even when child is hidden, always return true, always disable clipping optimization! NOT RECOMMENDED." + }, + { + "name": "ImGuiChildFlags_FrameStyle", + "value": "1 << 7", + "description": "Style the child window like a framed item: use FrameBg, FrameRounding, FrameBorderSize, FramePadding instead of ChildBg, ChildRounding, ChildBorderSize, WindowPadding." + }, + { + "name": "ImGuiChildFlags_NavFlattened", + "value": "1 << 8", + "description": "[BETA] Share focus scope, allow gamepad/keyboard navigation to cross over parent border to this child or between sibling child windows." + } + ] + }, + { + "name": "ImGuiItemFlags_", + "values": [ + { + "name": "ImGuiItemFlags_None", + "value": 0, + "description": "(Default) No item flags." + }, + { + "name": "ImGuiItemFlags_NoTabStop", + "value": "1 << 0", + "description": "Disable keyboard tabbing. This is a 'lighter' version of ImGuiItemFlags_NoNav." + }, + { + "name": "ImGuiItemFlags_NoNav", + "value": "1 << 1", + "description": "Disable any form of focusing (keyboard/gamepad directional navigation and SetKeyboardFocusHere() calls)." + }, + { + "name": "ImGuiItemFlags_NoNavDefaultFocus", + "value": "1 << 2", + "description": "Disable item being a candidate for default focus (e.g. used by title bar items)." + }, + { + "name": "ImGuiItemFlags_ButtonRepeat", + "value": "1 << 3", + "description": "Any button-like behavior will have repeat mode enabled (based on io.KeyRepeatDelay and io.KeyRepeatRate values)." + }, + { + "name": "ImGuiItemFlags_AutoClosePopups", + "value": "1 << 4", + "description": "MenuItem()/Selectable() automatically close their parent popup window." + } + ] + }, + { + "name": "ImGuiInputTextFlags_", + "values": [ + { + "name": "ImGuiInputTextFlags_None", + "value": 0, + "description": "No input text flags." + }, + { + "name": "ImGuiInputTextFlags_CharsDecimal", + "value": "1 << 0", + "description": "Allow 0123456789.+-*/" + }, + { + "name": "ImGuiInputTextFlags_CharsHexadecimal", + "value": "1 << 1", + "description": "Allow 0123456789ABCDEFabcdef" + }, + { + "name": "ImGuiInputTextFlags_CharsScientific", + "value": "1 << 2", + "description": "Allow 0123456789.+-*/eE (Scientific notation input)" + }, + { + "name": "ImGuiInputTextFlags_CharsUppercase", + "value": "1 << 3", + "description": "Turn a..z into A..Z" + }, + { + "name": "ImGuiInputTextFlags_CharsNoBlank", + "value": "1 << 4", + "description": "Filter out spaces, tabs" + }, + { + "name": "ImGuiInputTextFlags_AllowTabInput", + "value": "1 << 5", + "description": "Pressing TAB inputs a '\\t' character into the text field" + }, + { + "name": "ImGuiInputTextFlags_EnterReturnsTrue", + "value": "1 << 6", + "description": "Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider looking at the IsItemDeactivatedAfterEdit() function." + }, + { + "name": "ImGuiInputTextFlags_EscapeClearsAll", + "value": "1 << 7", + "description": "Escape key clears content if not empty, and deactivates otherwise (contrast to default behavior of Escape to revert)." + }, + { + "name": "ImGuiInputTextFlags_CtrlEnterForNewLine", + "value": "1 << 8", + "description": "In multi-line mode, validate with Enter, add new line with Ctrl+Enter (default is opposite: validate with Ctrl+Enter, add line with Enter)." + }, + { + "name": "ImGuiInputTextFlags_ReadOnly", + "value": "1 << 9", + "description": "Read-only mode" + }, + { + "name": "ImGuiInputTextFlags_Password", + "value": "1 << 10", + "description": "Password mode, display all characters as '*', disable copy" + }, + { + "name": "ImGuiInputTextFlags_AlwaysOverwrite", + "value": "1 << 11", + "description": "Overwrite mode" + }, + { + "name": "ImGuiInputTextFlags_AutoSelectAll", + "value": "1 << 12", + "description": "Select entire text when first taking mouse focus" + }, + { + "name": "ImGuiInputTextFlags_ParseEmptyRefVal", + "value": "1 << 13", + "description": "InputFloat(), InputInt(), InputScalar() etc. only: parse empty string as zero value." + }, + { + "name": "ImGuiInputTextFlags_DisplayEmptyRefVal", + "value": "1 << 14", + "description": "InputFloat(), InputInt(), InputScalar() etc. only: when value is zero, do not display it. Generally used with ImGuiInputTextFlags_ParseEmptyRefVal." + }, + { + "name": "ImGuiInputTextFlags_NoHorizontalScroll", + "value": "1 << 15", + "description": "Disable following the cursor horizontally" + }, + { + "name": "ImGuiInputTextFlags_NoUndoRedo", + "value": "1 << 16", + "description": "Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own undo/redo stack you need e.g. to call ClearActiveID()." + }, + { + "name": "ImGuiInputTextFlags_CallbackCompletion", + "value": "1 << 17", + "description": "Callback on pressing TAB (for completion handling)" + }, + { + "name": "ImGuiInputTextFlags_CallbackHistory", + "value": "1 << 18", + "description": "Callback on pressing Up/Down arrows (for history handling)" + }, + { + "name": "ImGuiInputTextFlags_CallbackAlways", + "value": "1 << 19", + "description": "Callback on each iteration. User code may query cursor position, modify text buffer." + }, + { + "name": "ImGuiInputTextFlags_CallbackCharFilter", + "value": "1 << 20", + "description": "Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard." + }, + { + "name": "ImGuiInputTextFlags_CallbackResize", + "value": "1 << 21", + "description": "Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. Notify when the string wants to be resized (for string types which hold a cache of their Size). You will be provided a new BufSize in the callback and NEED to honor it." + }, + { + "name": "ImGuiInputTextFlags_CallbackEdit", + "value": "1 << 22", + "description": "Callback on any edit (note that InputText() already returns true on edit, the callback is useful mainly to manipulate the underlying buffer while focus is active)" + } + ] + }, + { + "name": "ImGuiTreeNodeFlags_", + "values": [ + { + "name": "ImGuiTreeNodeFlags_None", + "value": 0, + "description": "No tree node flags." + }, + { + "name": "ImGuiTreeNodeFlags_Selected", + "value": "1 << 0", + "description": "Draw as selected." + }, + { + "name": "ImGuiTreeNodeFlags_Framed", + "value": "1 << 1", + "description": "Draw frame with background (e.g., for CollapsingHeader)." + }, + { + "name": "ImGuiTreeNodeFlags_AllowOverlap", + "value": "1 << 2", + "description": "Hit testing to allow subsequent widgets to overlap this one." + }, + { + "name": "ImGuiTreeNodeFlags_NoTreePushOnOpen", + "value": "1 << 3", + "description": "Don't do a TreePush() when open (e.g., for CollapsingHeader) = no extra indent nor pushing on ID stack." + }, + { + "name": "ImGuiTreeNodeFlags_NoAutoOpenOnLog", + "value": "1 << 4", + "description": "Don't automatically and temporarily open node when Logging is active (by default logging will automatically open tree nodes)." + }, + { + "name": "ImGuiTreeNodeFlags_DefaultOpen", + "value": "1 << 5", + "description": "Default node to be open." + }, + { + "name": "ImGuiTreeNodeFlags_OpenOnDoubleClick", + "value": "1 << 6", + "description": "Need double-click to open node." + }, + { + "name": "ImGuiTreeNodeFlags_OpenOnArrow", + "value": "1 << 7", + "description": "Only open when clicking on the arrow part. If ImGuiTreeNodeFlags_OpenOnDoubleClick is also set, single-click arrow or double-click all box to open." + }, + { + "name": "ImGuiTreeNodeFlags_Leaf", + "value": "1 << 8", + "description": "No collapsing, no arrow (use as a convenience for leaf nodes)." + }, + { + "name": "ImGuiTreeNodeFlags_Bullet", + "value": "1 << 9", + "description": "Display a bullet instead of arrow. IMPORTANT: node can still be marked open/close if you don't set the _Leaf flag!" + }, + { + "name": "ImGuiTreeNodeFlags_FramePadding", + "value": "1 << 10", + "description": "Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding() before the node." + }, + { + "name": "ImGuiTreeNodeFlags_SpanAvailWidth", + "value": "1 << 11", + "description": "Extend hit box to the right-most edge, even if not framed. This is not the default in order to allow adding other items on the same line without using AllowOverlap mode." + }, + { + "name": "ImGuiTreeNodeFlags_SpanFullWidth", + "value": "1 << 12", + "description": "Extend hit box to the left-most and right-most edges (cover the indent area)." + }, + { + "name": "ImGuiTreeNodeFlags_SpanTextWidth", + "value": "1 << 13", + "description": "Narrow hit box + narrow hovering highlight, will only cover the label text." + }, + { + "name": "ImGuiTreeNodeFlags_SpanAllColumns", + "value": "1 << 14", + "description": "Frame will span all columns of its container table (text will still fit in current column)." + }, + { + "name": "ImGuiTreeNodeFlags_NavLeftJumpsBackHere", + "value": "1 << 15", + "description": "(WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop)." + }, + { + "name": "ImGuiTreeNodeFlags_CollapsingHeader", + "value": "ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog", + "description": "Combined flags for a collapsing header (framed, no tree push on open, no auto-open on log)." + }, + { + "name": "ImGuiTreeNodeFlags_AllowItemOverlap", + "value": "ImGuiTreeNodeFlags_AllowOverlap", + "description": "Renamed in 1.89.7: Allow subsequent widgets to overlap this one." + } + ] + }, + { + "name": "ImGuiPopupFlags_", + "values": [ + { + "name": "ImGuiPopupFlags_None", + "value": 0, + "description": "No popup flags." + }, + { + "name": "ImGuiPopupFlags_MouseButtonLeft", + "value": 0, + "description": "For BeginPopupContext*(): open on Left Mouse release. Guaranteed to always be 0 (same as ImGuiMouseButton_Left)." + }, + { + "name": "ImGuiPopupFlags_MouseButtonRight", + "value": 1, + "description": "For BeginPopupContext*(): open on Right Mouse release. Guaranteed to always be 1 (same as ImGuiMouseButton_Right)." + }, + { + "name": "ImGuiPopupFlags_MouseButtonMiddle", + "value": 2, + "description": "For BeginPopupContext*(): open on Middle Mouse release. Guaranteed to always be 2 (same as ImGuiMouseButton_Middle)." + }, + { + "name": "ImGuiPopupFlags_MouseButtonMask_", + "value": "0x1F", + "description": "Mask for mouse button flags." + }, + { + "name": "ImGuiPopupFlags_MouseButtonDefault_", + "value": 1, + "description": "Default mouse button flag for popups." + }, + { + "name": "ImGuiPopupFlags_NoReopen", + "value": "1 << 5", + "description": "For OpenPopup*(), BeginPopupContext*(): don't reopen the same popup if already open (won't reposition, won't reinitialize navigation)." + }, + { + "name": "ImGuiPopupFlags_NoOpenOverExistingPopup", + "value": "1 << 7", + "description": "For OpenPopup*(), BeginPopupContext*(): don't open if there's already a popup at the same level of the popup stack." + }, + { + "name": "ImGuiPopupFlags_NoOpenOverItems", + "value": "1 << 8", + "description": "For BeginPopupContextWindow(): don't return true when hovering items, only when hovering empty space." + }, + { + "name": "ImGuiPopupFlags_AnyPopupId", + "value": "1 << 10", + "description": "For IsPopupOpen(): ignore the ImGuiID parameter and test for any popup." + }, + { + "name": "ImGuiPopupFlags_AnyPopupLevel", + "value": "1 << 11", + "description": "For IsPopupOpen(): search/test at any level of the popup stack (default test in the current level)." + }, + { + "name": "ImGuiPopupFlags_AnyPopup", + "value": "ImGuiPopupFlags_AnyPopupId | ImGuiPopupFlags_AnyPopupLevel", + "description": "Combination of AnyPopupId and AnyPopupLevel flags for testing any popup at any level." + } + ] + }, + { + "name": "ImGuiSelectableFlags_", + "values": [ + { + "name": "ImGuiSelectableFlags_None", + "value": 0, + "description": "No selectable flags." + }, + { + "name": "ImGuiSelectableFlags_NoAutoClosePopups", + "value": "1 << 0", + "description": "Clicking this doesn't close parent popup window (overrides ImGuiItemFlags_AutoClosePopups)." + }, + { + "name": "ImGuiSelectableFlags_SpanAllColumns", + "value": "1 << 1", + "description": "Frame will span all columns of its container table (text will still fit in current column)." + }, + { + "name": "ImGuiSelectableFlags_AllowDoubleClick", + "value": "1 << 2", + "description": "Generate press events on double clicks too." + }, + { + "name": "ImGuiSelectableFlags_Disabled", + "value": "1 << 3", + "description": "Cannot be selected, display grayed out text." + }, + { + "name": "ImGuiSelectableFlags_AllowOverlap", + "value": "1 << 4", + "description": "(WIP) Hit testing to allow subsequent widgets to overlap this one." + }, + { + "name": "ImGuiSelectableFlags_Highlight", + "value": "1 << 5", + "description": "Make the item be displayed as if it is hovered." + }, + { + "name": "ImGuiSelectableFlags_DontClosePopups", + "value": "ImGuiSelectableFlags_NoAutoClosePopups", + "description": "Renamed in 1.91.0: Don't close popups." + }, + { + "name": "ImGuiSelectableFlags_AllowItemOverlap", + "value": "ImGuiSelectableFlags_AllowOverlap", + "description": "Renamed in 1.89.7: Allow item overlap." + } + ] + }, + { + "name": "ImGuiComboFlags_", + "values": [ + { + "name": "ImGuiComboFlags_None", + "value": 0, + "description": "No combo flags." + }, + { + "name": "ImGuiComboFlags_PopupAlignLeft", + "value": "1 << 0", + "description": "Align the popup toward the left by default." + }, + { + "name": "ImGuiComboFlags_HeightSmall", + "value": "1 << 1", + "description": "Max ~4 items visible. Tip: Use SetNextWindowSizeConstraints() prior to BeginCombo() for a specific size." + }, + { + "name": "ImGuiComboFlags_HeightRegular", + "value": "1 << 2", + "description": "Max ~8 items visible (default)." + }, + { + "name": "ImGuiComboFlags_HeightLarge", + "value": "1 << 3", + "description": "Max ~20 items visible." + }, + { + "name": "ImGuiComboFlags_HeightLargest", + "value": "1 << 4", + "description": "As many fitting items as possible." + }, + { + "name": "ImGuiComboFlags_NoArrowButton", + "value": "1 << 5", + "description": "Display on the preview box without the square arrow button." + }, + { + "name": "ImGuiComboFlags_NoPreview", + "value": "1 << 6", + "description": "Display only a square arrow button." + }, + { + "name": "ImGuiComboFlags_WidthFitPreview", + "value": "1 << 7", + "description": "Width dynamically calculated from preview contents." + }, + { + "name": "ImGuiComboFlags_HeightMask_", + "value": "ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest", + "description": "Combination of all height flags." + } + ] + }, + { + "name": "ImGuiTabBarFlags_", + "values": [ + { + "name": "ImGuiTabBarFlags_None", + "value": 0, + "description": "No tab bar flags." + }, + { + "name": "ImGuiTabBarFlags_Reorderable", + "value": "1 << 0", + "description": "Allow manually dragging tabs to re-order them. New tabs are appended at the end of the list." + }, + { + "name": "ImGuiTabBarFlags_AutoSelectNewTabs", + "value": "1 << 1", + "description": "Automatically select new tabs when they appear." + }, + { + "name": "ImGuiTabBarFlags_TabListPopupButton", + "value": "1 << 2", + "description": "Disable buttons to open the tab list popup." + }, + { + "name": "ImGuiTabBarFlags_NoCloseWithMiddleMouseButton", + "value": "1 << 3", + "description": "Disable closing tabs with the middle mouse button. You may handle this manually." + }, + { + "name": "ImGuiTabBarFlags_NoTabListScrollingButtons", + "value": "1 << 4", + "description": "Disable scrolling buttons when tabs don't fit." + }, + { + "name": "ImGuiTabBarFlags_NoTooltip", + "value": "1 << 5", + "description": "Disable tooltips when hovering a tab." + }, + { + "name": "ImGuiTabBarFlags_DrawSelectedOverline", + "value": "1 << 6", + "description": "Draw selected overline markers over the selected tab." + }, + { + "name": "ImGuiTabBarFlags_FittingPolicyResizeDown", + "value": "1 << 7", + "description": "Resize tabs when they don't fit." + }, + { + "name": "ImGuiTabBarFlags_FittingPolicyScroll", + "value": "1 << 8", + "description": "Add scroll buttons when tabs don't fit." + }, + { + "name": "ImGuiTabBarFlags_FittingPolicyMask_", + "value": "ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll", + "description": "Mask for fitting policy flags." + }, + { + "name": "ImGuiTabBarFlags_FittingPolicyDefault_", + "value": "ImGuiTabBarFlags_FittingPolicyResizeDown", + "description": "Default fitting policy (resize down)." + } + ] + }, + { + "name": "ImGuiTabItemFlags_", + "values": [ + { + "name": "ImGuiTabItemFlags_None", + "value": 0, + "description": "No tab item flags." + }, + { + "name": "ImGuiTabItemFlags_UnsavedDocument", + "value": "1 << 0", + "description": "Display a dot next to the title and set ImGuiTabItemFlags_NoAssumedClosure." + }, + { + "name": "ImGuiTabItemFlags_SetSelected", + "value": "1 << 1", + "description": "Programmatically make the tab selected when calling BeginTabItem()." + }, + { + "name": "ImGuiTabItemFlags_NoCloseWithMiddleMouseButton", + "value": "1 << 2", + "description": "Disable behavior of closing tabs with middle mouse button. You may handle this manually." + }, + { + "name": "ImGuiTabItemFlags_NoPushId", + "value": "1 << 3", + "description": "Don't call PushID()/PopID() on BeginTabItem()/EndTabItem()." + }, + { + "name": "ImGuiTabItemFlags_NoTooltip", + "value": "1 << 4", + "description": "Disable tooltip for the given tab." + }, + { + "name": "ImGuiTabItemFlags_NoReorder", + "value": "1 << 5", + "description": "Disable reordering this tab or having another tab cross over this tab." + }, + { + "name": "ImGuiTabItemFlags_Leading", + "value": "1 << 6", + "description": "Enforce the tab position to the left of the tab bar." + }, + { + "name": "ImGuiTabItemFlags_Trailing", + "value": "1 << 7", + "description": "Enforce the tab position to the right of the tab bar." + }, + { + "name": "ImGuiTabItemFlags_NoAssumedClosure", + "value": "1 << 8", + "description": "Tab is selected when trying to close, closure is not immediately assumed." + } + ] + }, + { + "name": "ImGuiFocusedFlags_", + "values": [ + { + "name": "ImGuiFocusedFlags_None", + "value": 0, + "description": "No focused flags." + }, + { + "name": "ImGuiFocusedFlags_ChildWindows", + "value": "1 << 0", + "description": "Return true if any children of the window is focused." + }, + { + "name": "ImGuiFocusedFlags_RootWindow", + "value": "1 << 1", + "description": "Test from root window (top most parent of the current hierarchy)." + }, + { + "name": "ImGuiFocusedFlags_AnyWindow", + "value": "1 << 2", + "description": "Return true if any window is focused. Do NOT use for low-level input dispatching, use 'io.WantCaptureMouse' instead." + }, + { + "name": "ImGuiFocusedFlags_NoPopupHierarchy", + "value": "1 << 3", + "description": "Do not consider popup hierarchy when used with _ChildWindows or _RootWindow." + }, + { + "name": "ImGuiFocusedFlags_RootAndChildWindows", + "value": "ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows", + "description": "Test from root and child windows." + } + ] + }, + { + "name": "ImGuiHoveredFlags_", + "values": [ + { + "name": "ImGuiHoveredFlags_None", + "value": 0, + "description": "Return true if directly over the item/window, not obstructed by another window or active popup." + }, + { + "name": "ImGuiHoveredFlags_ChildWindows", + "value": "1 << 0", + "description": "IsWindowHovered() only: Return true if any children of the window is hovered." + }, + { + "name": "ImGuiHoveredFlags_RootWindow", + "value": "1 << 1", + "description": "IsWindowHovered() only: Test from root window." + }, + { + "name": "ImGuiHoveredFlags_AnyWindow", + "value": "1 << 2", + "description": "IsWindowHovered() only: Return true if any window is hovered." + }, + { + "name": "ImGuiHoveredFlags_NoPopupHierarchy", + "value": "1 << 3", + "description": "IsWindowHovered() only: Do not consider popup hierarchy." + }, + { + "name": "ImGuiHoveredFlags_AllowWhenBlockedByPopup", + "value": "1 << 5", + "description": "Return true even if a popup window is normally blocking access to this item/window." + }, + { + "name": "ImGuiHoveredFlags_AllowWhenBlockedByActiveItem", + "value": "1 << 7", + "description": "Return true even if an active item is blocking access. Useful for Drag and Drop patterns." + }, + { + "name": "ImGuiHoveredFlags_AllowWhenOverlappedByItem", + "value": "1 << 8", + "description": "IsItemHovered() only: Return true even if the item uses AllowOverlap mode and is overlapped by another hoverable item." + }, + { + "name": "ImGuiHoveredFlags_AllowWhenOverlappedByWindow", + "value": "1 << 9", + "description": "IsItemHovered() only: Return true even if the position is obstructed or overlapped by another window." + }, + { + "name": "ImGuiHoveredFlags_AllowWhenDisabled", + "value": "1 << 10", + "description": "IsItemHovered() only: Return true even if the item is disabled." + }, + { + "name": "ImGuiHoveredFlags_NoNavOverride", + "value": "1 << 11", + "description": "IsItemHovered() only: Disable using gamepad/keyboard navigation state when active, always query mouse." + }, + { + "name": "ImGuiHoveredFlags_AllowWhenOverlapped", + "value": "ImGuiHoveredFlags_AllowWhenOverlappedByItem | ImGuiHoveredFlags_AllowWhenOverlappedByWindow", + "description": "Combination of AllowWhenOverlappedByItem and AllowWhenOverlappedByWindow flags." + }, + { + "name": "ImGuiHoveredFlags_RectOnly", + "value": "ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped", + "description": "Combination of flags for hit testing only." + }, + { + "name": "ImGuiHoveredFlags_RootAndChildWindows", + "value": "ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows", + "description": "Combination of RootWindow and ChildWindows flags." + }, + { + "name": "ImGuiHoveredFlags_ForTooltip", + "value": "1 << 12", + "description": "Shortcut for standard flags when using IsItemHovered() + SetTooltip() sequence." + }, + { + "name": "ImGuiHoveredFlags_Stationary", + "value": "1 << 13", + "description": "Require mouse to be stationary for a period before returning true." + }, + { + "name": "ImGuiHoveredFlags_DelayNone", + "value": "1 << 14", + "description": "IsItemHovered() only: Return true immediately (default)." + }, + { + "name": "ImGuiHoveredFlags_DelayShort", + "value": "1 << 15", + "description": "IsItemHovered() only: Return true after a short delay." + }, + { + "name": "ImGuiHoveredFlags_DelayNormal", + "value": "1 << 16", + "description": "IsItemHovered() only: Return true after a normal delay." + }, + { + "name": "ImGuiHoveredFlags_NoSharedDelay", + "value": "1 << 17", + "description": "IsItemHovered() only: Disable shared delay system." + } + ] + }, + { + "name": "ImGuiDragDropFlags_", + "values": [ + { + "name": "ImGuiDragDropFlags_None", + "value": 0, + "description": "No drag and drop flags." + }, + { + "name": "ImGuiDragDropFlags_SourceNoPreviewTooltip", + "value": "1 << 0", + "description": "Disable preview tooltip. Disables the default tooltip when BeginDragDropSource is successful." + }, + { + "name": "ImGuiDragDropFlags_SourceNoDisableHover", + "value": "1 << 1", + "description": "Disable clearing hover state when dragging, so IsItemHovered() still returns true." + }, + { + "name": "ImGuiDragDropFlags_SourceNoHoldToOpenOthers", + "value": "1 << 2", + "description": "Disable the behavior that allows to open tree nodes and collapsing headers by holding over them while dragging a source item." + }, + { + "name": "ImGuiDragDropFlags_SourceAllowNullID", + "value": "1 << 3", + "description": "Allow items with no unique identifier to be used as drag source by manufacturing a temporary ID." + }, + { + "name": "ImGuiDragDropFlags_SourceExtern", + "value": "1 << 4", + "description": "External source (from outside of dear imgui), won't attempt to read current item/window info." + }, + { + "name": "ImGuiDragDropFlags_PayloadAutoExpire", + "value": "1 << 5", + "description": "Automatically expire the payload if the source ceases to be submitted." + }, + { + "name": "ImGuiDragDropFlags_PayloadNoCrossContext", + "value": "1 << 6", + "description": "Hint that the payload may not be copied outside the current dear imgui context." + }, + { + "name": "ImGuiDragDropFlags_PayloadNoCrossProcess", + "value": "1 << 7", + "description": "Hint that the payload may not be copied outside the current process." + }, + { + "name": "ImGuiDragDropFlags_AcceptBeforeDelivery", + "value": "1 << 10", + "description": "AcceptDragDropPayload() will return true even before the mouse button is released." + }, + { + "name": "ImGuiDragDropFlags_AcceptNoDrawDefaultRect", + "value": "1 << 11", + "description": "Do not draw the default highlight rectangle when hovering over the target." + }, + { + "name": "ImGuiDragDropFlags_AcceptNoPreviewTooltip", + "value": "1 << 12", + "description": "Request hiding the BeginDragDropSource tooltip from the BeginDragDropTarget site." + }, + { + "name": "ImGuiDragDropFlags_AcceptPeekOnly", + "value": "ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect", + "description": "For peeking ahead and inspecting the payload before delivery." + } + ] + }, + { + "name": "ImGuiDataType_", + "values": [ + { + "name": "ImGuiDataType_S8", + "description": "signed char / char (with sensible compilers)" + }, + { + "name": "ImGuiDataType_U8", + "description": "unsigned char" + }, + { + "name": "ImGuiDataType_S16", + "description": "short" + }, + { + "name": "ImGuiDataType_U16", + "description": "unsigned short" + }, + { + "name": "ImGuiDataType_S32", + "description": "int" + }, + { + "name": "ImGuiDataType_U32", + "description": "unsigned int" + }, + { + "name": "ImGuiDataType_S64", + "description": "long long / __int64" + }, + { + "name": "ImGuiDataType_U64", + "description": "unsigned long long / unsigned __int64" + }, + { + "name": "ImGuiDataType_Float", + "description": "float" + }, + { + "name": "ImGuiDataType_Double", + "description": "double" + }, + { + "name": "ImGuiDataType_Bool", + "description": "bool (provided for user convenience, not supported by scalar widgets)" + }, + { + "name": "ImGuiDataType_COUNT", + "description": "Number of data types" + } + ] + }, + { + "name": "ImGuiDir", + "values": [ + { + "name": "ImGuiDir_None", + "value": -1, + "description": "No direction" + }, + { + "name": "ImGuiDir_Left", + "value": 0, + "description": "Left direction" + }, + { + "name": "ImGuiDir_Right", + "value": 1, + "description": "Right direction" + }, + { + "name": "ImGuiDir_Up", + "value": 2, + "description": "Up direction" + }, + { + "name": "ImGuiDir_Down", + "value": 3, + "description": "Down direction" + }, + { + "name": "ImGuiDir_COUNT", + "description": "Number of directions" + } + ] + }, + { + "name": "ImGuiSortDirection", + "values": [ + { + "name": "ImGuiSortDirection_None", + "value": 0, + "description": "No sort direction" + }, + { + "name": "ImGuiSortDirection_Ascending", + "value": 1, + "description": "Ascending order (e.g., 0->9, A->Z)" + }, + { + "name": "ImGuiSortDirection_Descending", + "value": 2, + "description": "Descending order (e.g., 9->0, Z->A)" + } + ] + }, + { + "name": "ImGuiKey", + "values": [ + { + "name": "ImGuiKey_None", + "value": 0, + "description": "No key" + }, + { + "name": "ImGuiKey_Tab", + "value": 512, + "description": "Tab key" + }, + { + "name": "ImGuiKey_LeftArrow", + "description": "Left arrow key" + }, + { + "name": "ImGuiKey_RightArrow", + "description": "Right arrow key" + }, + { + "name": "ImGuiKey_UpArrow", + "description": "Up arrow key" + }, + { + "name": "ImGuiKey_DownArrow", + "description": "Down arrow key" + }, + { + "name": "ImGuiKey_PageUp", + "description": "Page Up key" + }, + { + "name": "ImGuiKey_PageDown", + "description": "Page Down key" + }, + { + "name": "ImGuiKey_Home", + "description": "Home key" + }, + { + "name": "ImGuiKey_End", + "description": "End key" + }, + { + "name": "ImGuiKey_Insert", + "description": "Insert key" + }, + { + "name": "ImGuiKey_Delete", + "description": "Delete key" + }, + { + "name": "ImGuiKey_Backspace", + "description": "Backspace key" + }, + { + "name": "ImGuiKey_Space", + "description": "Space key" + }, + { + "name": "ImGuiKey_Enter", + "description": "Enter key" + }, + { + "name": "ImGuiKey_Escape", + "description": "Escape key" + }, + { + "name": "ImGuiKey_LeftCtrl", + "description": "Left Control key" + }, + { + "name": "ImGuiKey_LeftShift", + "description": "Left Shift key" + }, + { + "name": "ImGuiKey_LeftAlt", + "description": "Left Alt key" + }, + { + "name": "ImGuiKey_LeftSuper", + "description": "Left Super key (Windows/Command)" + }, + { + "name": "ImGuiKey_RightCtrl", + "description": "Right Control key" + }, + { + "name": "ImGuiKey_RightShift", + "description": "Right Shift key" + }, + { + "name": "ImGuiKey_RightAlt", + "description": "Right Alt key" + }, + { + "name": "ImGuiKey_RightSuper", + "description": "Right Super key (Windows/Command)" + }, + { + "name": "ImGuiKey_Menu", + "description": "Menu key" + }, + { + "name": "ImGuiKey_0", + "description": "Number 0 key" + }, + { + "name": "ImGuiKey_1", + "description": "Number 1 key" + }, + { + "name": "ImGuiKey_2", + "description": "Number 2 key" + }, + { + "name": "ImGuiKey_3", + "description": "Number 3 key" + }, + { + "name": "ImGuiKey_4", + "description": "Number 4 key" + }, + { + "name": "ImGuiKey_5", + "description": "Number 5 key" + }, + { + "name": "ImGuiKey_6", + "description": "Number 6 key" + }, + { + "name": "ImGuiKey_7", + "description": "Number 7 key" + }, + { + "name": "ImGuiKey_8", + "description": "Number 8 key" + }, + { + "name": "ImGuiKey_9", + "description": "Number 9 key" + }, + { + "name": "ImGuiKey_A", + "description": "A key" + }, + { + "name": "ImGuiKey_B", + "description": "B key" + }, + { + "name": "ImGuiKey_C", + "description": "C key" + }, + { + "name": "ImGuiKey_D", + "description": "D key" + }, + { + "name": "ImGuiKey_E", + "description": "E key" + }, + { + "name": "ImGuiKey_F", + "description": "F key" + }, + { + "name": "ImGuiKey_G", + "description": "G key" + }, + { + "name": "ImGuiKey_H", + "description": "H key" + }, + { + "name": "ImGuiKey_I", + "description": "I key" + }, + { + "name": "ImGuiKey_J", + "description": "J key" + }, + { + "name": "ImGuiKey_K", + "description": "K key" + }, + { + "name": "ImGuiKey_L", + "description": "L key" + }, + { + "name": "ImGuiKey_M", + "description": "M key" + }, + { + "name": "ImGuiKey_N", + "description": "N key" + }, + { + "name": "ImGuiKey_O", + "description": "O key" + }, + { + "name": "ImGuiKey_P", + "description": "P key" + }, + { + "name": "ImGuiKey_Q", + "description": "Q key" + }, + { + "name": "ImGuiKey_R", + "description": "R key" + }, + { + "name": "ImGuiKey_S", + "description": "S key" + }, + { + "name": "ImGuiKey_T", + "description": "T key" + }, + { + "name": "ImGuiKey_U", + "description": "U key" + }, + { + "name": "ImGuiKey_V", + "description": "V key" + }, + { + "name": "ImGuiKey_W", + "description": "W key" + }, + { + "name": "ImGuiKey_X", + "description": "X key" + }, + { + "name": "ImGuiKey_Y", + "description": "Y key" + }, + { + "name": "ImGuiKey_Z", + "description": "Z key" + }, + { + "name": "ImGuiKey_F1", + "description": "F1 key" + }, + { + "name": "ImGuiKey_F2", + "description": "F2 key" + }, + { + "name": "ImGuiKey_F3", + "description": "F3 key" + }, + { + "name": "ImGuiKey_F4", + "description": "F4 key" + }, + { + "name": "ImGuiKey_F5", + "description": "F5 key" + }, + { + "name": "ImGuiKey_F6", + "description": "F6 key" + }, + { + "name": "ImGuiKey_F7", + "description": "F7 key" + }, + { + "name": "ImGuiKey_F8", + "description": "F8 key" + }, + { + "name": "ImGuiKey_F9", + "description": "F9 key" + }, + { + "name": "ImGuiKey_F10", + "description": "F10 key" + }, + { + "name": "ImGuiKey_F11", + "description": "F11 key" + }, + { + "name": "ImGuiKey_F12", + "description": "F12 key" + }, + { + "name": "ImGuiKey_F13", + "description": "F13 key" + }, + { + "name": "ImGuiKey_F14", + "description": "F14 key" + }, + { + "name": "ImGuiKey_F15", + "description": "F15 key" + }, + { + "name": "ImGuiKey_F16", + "description": "F16 key" + }, + { + "name": "ImGuiKey_F17", + "description": "F17 key" + }, + { + "name": "ImGuiKey_F18", + "description": "F18 key" + }, + { + "name": "ImGuiKey_F19", + "description": "F19 key" + }, + { + "name": "ImGuiKey_F20", + "description": "F20 key" + }, + { + "name": "ImGuiKey_F21", + "description": "F21 key" + }, + { + "name": "ImGuiKey_F22", + "description": "F22 key" + }, + { + "name": "ImGuiKey_F23", + "description": "F23 key" + }, + { + "name": "ImGuiKey_F24", + "description": "F24 key" + }, + { + "name": "ImGuiKey_Apostrophe", + "description": "Apostrophe key (')" + }, + { + "name": "ImGuiKey_Comma", + "description": "Comma key (,)" + }, + { + "name": "ImGuiKey_Minus", + "description": "Minus key (-)" + }, + { + "name": "ImGuiKey_Period", + "description": "Period key (.)" + }, + { + "name": "ImGuiKey_Slash", + "description": "Slash key (/)" + }, + { + "name": "ImGuiKey_Semicolon", + "description": "Semicolon key (;)" + }, + { + "name": "ImGuiKey_Equal", + "description": "Equal key (=)" + }, + { + "name": "ImGuiKey_LeftBracket", + "description": "Left Bracket key ([)" + }, + { + "name": "ImGuiKey_Backslash", + "description": "Backslash key (\\)" + }, + { + "name": "ImGuiKey_RightBracket", + "description": "Right Bracket key (])" + }, + { + "name": "ImGuiKey_GraveAccent", + "description": "Grave Accent key (`)" + }, + { + "name": "ImGuiKey_CapsLock", + "description": "Caps Lock key" + }, + { + "name": "ImGuiKey_ScrollLock", + "description": "Scroll Lock key" + }, + { + "name": "ImGuiKey_NumLock", + "description": "Num Lock key" + }, + { + "name": "ImGuiKey_PrintScreen", + "description": "Print Screen key" + }, + { + "name": "ImGuiKey_Pause", + "description": "Pause key" + }, + { + "name": "ImGuiKey_Keypad0", + "description": "Keypad 0" + }, + { + "name": "ImGuiKey_Keypad1", + "description": "Keypad 1" + }, + { + "name": "ImGuiKey_Keypad2", + "description": "Keypad 2" + }, + { + "name": "ImGuiKey_Keypad3", + "description": "Keypad 3" + }, + { + "name": "ImGuiKey_Keypad4", + "description": "Keypad 4" + }, + { + "name": "ImGuiKey_Keypad5", + "description": "Keypad 5" + }, + { + "name": "ImGuiKey_Keypad6", + "description": "Keypad 6" + }, + { + "name": "ImGuiKey_Keypad7", + "description": "Keypad 7" + }, + { + "name": "ImGuiKey_Keypad8", + "description": "Keypad 8" + }, + { + "name": "ImGuiKey_Keypad9", + "description": "Keypad 9" + }, + { + "name": "ImGuiKey_KeypadDecimal", + "description": "Keypad Decimal" + }, + { + "name": "ImGuiKey_KeypadDivide", + "description": "Keypad Divide" + }, + { + "name": "ImGuiKey_KeypadMultiply", + "description": "Keypad Multiply" + }, + { + "name": "ImGuiKey_KeypadSubtract", + "description": "Keypad Subtract" + }, + { + "name": "ImGuiKey_KeypadAdd", + "description": "Keypad Add" + }, + { + "name": "ImGuiKey_KeypadEnter", + "description": "Keypad Enter" + }, + { + "name": "ImGuiKey_KeypadEqual", + "description": "Keypad Equal" + }, + { + "name": "ImGuiKey_AppBack", + "description": "App Back key (Browser Back)" + }, + { + "name": "ImGuiKey_AppForward", + "description": "App Forward key" + }, + { + "name": "ImGuiKey_GamepadStart", + "description": "Gamepad Start (Menu on Xbox, + on Switch, Start/Options on PS)" + }, + { + "name": "ImGuiKey_GamepadBack", + "description": "Gamepad Back (View on Xbox, - on Switch, Share on PS)" + }, + { + "name": "ImGuiKey_GamepadFaceLeft", + "description": "Gamepad Face Left (X on Xbox, Y on Switch, Square on PS)" + }, + { + "name": "ImGuiKey_GamepadFaceRight", + "description": "Gamepad Face Right (B on Xbox, A on Switch, Circle on PS)" + }, + { + "name": "ImGuiKey_GamepadFaceUp", + "description": "Gamepad Face Up (Y on Xbox, X on Switch, Triangle on PS)" + }, + { + "name": "ImGuiKey_GamepadFaceDown", + "description": "Gamepad Face Down (A on Xbox, B on Switch, Cross on PS)" + }, + { + "name": "ImGuiKey_GamepadDpadLeft", + "description": "Gamepad D-pad Left" + }, + { + "name": "ImGuiKey_GamepadDpadRight", + "description": "Gamepad D-pad Right" + }, + { + "name": "ImGuiKey_GamepadDpadUp", + "description": "Gamepad D-pad Up" + }, + { + "name": "ImGuiKey_GamepadDpadDown", + "description": "Gamepad D-pad Down" + }, + { + "name": "ImGuiKey_GamepadL1", + "description": "Gamepad L1 (L Bumper on Xbox, L on Switch, L1 on PS)" + }, + { + "name": "ImGuiKey_GamepadR1", + "description": "Gamepad R1 (R Bumper on Xbox, R on Switch, R1 on PS)" + }, + { + "name": "ImGuiKey_GamepadL2", + "description": "Gamepad L2 (L Trigger on Xbox, ZL on Switch, L2 on PS) [Analog]" + }, + { + "name": "ImGuiKey_GamepadR2", + "description": "Gamepad R2 (R Trigger on Xbox, ZR on Switch, R2 on PS) [Analog]" + }, + { + "name": "ImGuiKey_GamepadL3", + "description": "Gamepad L3 (L Stick on Xbox, L3 on Switch, L3 on PS)" + }, + { + "name": "ImGuiKey_GamepadR3", + "description": "Gamepad R3 (R Stick on Xbox, R3 on Switch, R3 on PS)" + }, + { + "name": "ImGuiKey_GamepadLStickLeft", + "description": "[Analog] Gamepad L Stick Left" + }, + { + "name": "ImGuiKey_GamepadLStickRight", + "description": "[Analog] Gamepad L Stick Right" + }, + { + "name": "ImGuiKey_GamepadLStickUp", + "description": "[Analog] Gamepad L Stick Up" + }, + { + "name": "ImGuiKey_GamepadLStickDown", + "description": "[Analog] Gamepad L Stick Down" + }, + { + "name": "ImGuiKey_GamepadRStickLeft", + "description": "[Analog] Gamepad R Stick Left" + }, + { + "name": "ImGuiKey_GamepadRStickRight", + "description": "[Analog] Gamepad R Stick Right" + }, + { + "name": "ImGuiKey_GamepadRStickUp", + "description": "[Analog] Gamepad R Stick Up" + }, + { + "name": "ImGuiKey_GamepadRStickDown", + "description": "[Analog] Gamepad R Stick Down" + }, + { + "name": "ImGuiKey_MouseLeft", + "description": "Mouse Left Button" + }, + { + "name": "ImGuiKey_MouseRight", + "description": "Mouse Right Button" + }, + { + "name": "ImGuiKey_MouseMiddle", + "description": "Mouse Middle Button" + }, + { + "name": "ImGuiKey_MouseX1", + "description": "Mouse X1 Button" + }, + { + "name": "ImGuiKey_MouseX2", + "description": "Mouse X2 Button" + }, + { + "name": "ImGuiKey_MouseWheelX", + "description": "Mouse Wheel X Axis" + }, + { + "name": "ImGuiKey_MouseWheelY", + "description": "Mouse Wheel Y Axis" + }, + { + "name": "ImGuiKey_ReservedForModCtrl", + "description": "Reserved for Modifier Control" + }, + { + "name": "ImGuiKey_ReservedForModShift", + "description": "Reserved for Modifier Shift" + }, + { + "name": "ImGuiKey_ReservedForModAlt", + "description": "Reserved for Modifier Alt" + }, + { + "name": "ImGuiKey_ReservedForModSuper", + "description": "Reserved for Modifier Super" + }, + { + "name": "ImGuiKey_COUNT", + "description": "Total Count of Keys" + }, + { + "name": "ImGuiMod_None", + "description": "No Modifier" + }, + { + "name": "ImGuiMod_Ctrl", + "description": "Control Modifier" + }, + { + "name": "ImGuiMod_Shift", + "description": "Shift Modifier" + }, + { + "name": "ImGuiMod_Alt", + "description": "Alt Modifier" + }, + { + "name": "ImGuiMod_Super", + "description": "Super (Windows/Command) Modifier" + }, + { + "name": "ImGuiMod_Mask_", + "description": "Modifier Mask (4-bits)" + }, + { + "name": "ImGuiKey_NamedKey_BEGIN", + "description": "Named Key Start (512)" + }, + { + "name": "ImGuiKey_NamedKey_END", + "description": "Named Key End" + }, + { + "name": "ImGuiKey_NamedKey_COUNT", + "description": "Count of Named Keys" + }, + { + "name": "ImGuiKey_KeysData_SIZE", + "description": "Size of KeysData" + }, + { + "name": "ImGuiKey_KeysData_OFFSET", + "description": "Offset of KeysData" + } + ] + }, + { + "name": "ImGuiInputFlags_", + "values": [ + { + "name": "ImGuiInputFlags_None", + "value": 0, + "description": "No input flags." + }, + { + "name": "ImGuiInputFlags_Repeat", + "value": 1, + "description": "Enable repeat. Return true on successive repeats. Default for legacy IsKeyPressed(). NOT default for legacy IsMouseClicked(). MUST BE == 1." + }, + { + "name": "ImGuiInputFlags_RouteActive", + "value": 1024, + "description": "Route to active item only." + }, + { + "name": "ImGuiInputFlags_RouteFocused", + "value": 2048, + "description": "Route to windows in the focus stack (DEFAULT). Deep-most focused window takes inputs. Active item takes inputs over deep-most focused window." + }, + { + "name": "ImGuiInputFlags_RouteGlobal", + "value": 4096, + "description": "Global route (unless a focused window or active item registered the route)." + }, + { + "name": "ImGuiInputFlags_RouteAlways", + "value": 8192, + "description": "Do not register route, poll keys directly." + }, + { + "name": "ImGuiInputFlags_RouteOverFocused", + "value": 16384, + "description": "Option: global route: higher priority than focused route (unless active item in focused route)." + }, + { + "name": "ImGuiInputFlags_RouteOverActive", + "value": 32768, + "description": "Option: global route: higher priority than active item. Unlikely you need to use that: will interfere with every active items, e.g., CTRL+A registered by InputText will be overridden by this. May not be fully honored as user/internal code is likely to always assume they can access keys when active." + }, + { + "name": "ImGuiInputFlags_RouteUnlessBgFocused", + "value": 65536, + "description": "Option: global route: will not be applied if underlying background/void is focused (i.e., no Dear ImGui windows are focused). Useful for overlay applications." + }, + { + "name": "ImGuiInputFlags_RouteFromRootWindow", + "value": 131072, + "description": "Option: route evaluated from the point of view of root window rather than current window." + }, + { + "name": "ImGuiInputFlags_Tooltip", + "value": 262144, + "description": "Automatically display a tooltip when hovering item [BETA] Unsure of right API (opt-in/opt-out)." + } + ] + }, + { + "name": "ImGuiConfigFlags_", + "values": [ + { + "name": "ImGuiConfigFlags_None", + "value": 0, + "description": "No configuration flags." + }, + { + "name": "ImGuiConfigFlags_NavEnableKeyboard", + "value": 1, + "description": "Master keyboard navigation enable flag. Enables full Tabbing + directional arrows + space/enter to activate." + }, + { + "name": "ImGuiConfigFlags_NavEnableGamepad", + "value": 2, + "description": "Master gamepad navigation enable flag. Backend also needs to set ImGuiBackendFlags_HasGamepad." + }, + { + "name": "ImGuiConfigFlags_NavEnableSetMousePos", + "value": 4, + "description": "Instruct navigation to move the mouse cursor. May be useful on TV/console systems where moving a virtual mouse is awkward." + }, + { + "name": "ImGuiConfigFlags_NavNoCaptureKeyboard", + "value": 8, + "description": "Instruct navigation to not set the io.WantCaptureKeyboard flag when io.NavActive is set." + }, + { + "name": "ImGuiConfigFlags_NoMouse", + "value": 16, + "description": "Instruct dear imgui to disable mouse inputs and interactions." + }, + { + "name": "ImGuiConfigFlags_NoMouseCursorChange", + "value": 32, + "description": "Instruct backend to not alter mouse cursor shape and visibility." + }, + { + "name": "ImGuiConfigFlags_NoKeyboard", + "value": 64, + "description": "Instruct dear imgui to disable keyboard inputs and interactions." + }, + { + "name": "ImGuiConfigFlags_IsSRGB", + "value": 1048576, + "description": "Application is SRGB-aware." + }, + { + "name": "ImGuiConfigFlags_IsTouchScreen", + "value": 2097152, + "description": "Application is using a touch screen instead of a mouse." + } + ] + }, + { + "name": "ImGuiBackendFlags_", + "values": [ + { + "name": "ImGuiBackendFlags_None", + "value": 0, + "description": "No backend flags." + }, + { + "name": "ImGuiBackendFlags_HasGamepad", + "value": 1, + "description": "Backend Platform supports gamepad and currently has one connected." + }, + { + "name": "ImGuiBackendFlags_HasMouseCursors", + "value": 2, + "description": "Backend Platform supports honoring GetMouseCursor() value to change the OS cursor shape." + }, + { + "name": "ImGuiBackendFlags_HasSetMousePos", + "value": 4, + "description": "Backend Platform supports io.WantSetMousePos requests to reposition the OS mouse position." + }, + { + "name": "ImGuiBackendFlags_RendererHasVtxOffset", + "value": 8, + "description": "Backend Renderer supports ImDrawCmd::VtxOffset, enabling output of large meshes (64K+ vertices) while still using 16-bit indices." + } + ] + }, + { + "name": "ImGuiCol_", + "values": [ + { + "name": "ImGuiCol_Text", + "value": 0, + "description": "" + }, + { + "name": "ImGuiCol_TextDisabled", + "value": 1, + "description": "" + }, + { + "name": "ImGuiCol_WindowBg", + "value": 2, + "description": "Background of normal windows" + }, + { + "name": "ImGuiCol_ChildBg", + "value": 3, + "description": "Background of child windows" + }, + { + "name": "ImGuiCol_PopupBg", + "value": 4, + "description": "Background of popups, menus, tooltips windows" + }, + { + "name": "ImGuiCol_Border", + "value": 5, + "description": "" + }, + { + "name": "ImGuiCol_BorderShadow", + "value": 6, + "description": "" + }, + { + "name": "ImGuiCol_FrameBg", + "value": 7, + "description": "Background of checkbox, radio button, plot, slider, text input" + }, + { + "name": "ImGuiCol_FrameBgHovered", + "value": 8, + "description": "" + }, + { + "name": "ImGuiCol_FrameBgActive", + "value": 9, + "description": "" + }, + { + "name": "ImGuiCol_TitleBg", + "value": 10, + "description": "Title bar" + }, + { + "name": "ImGuiCol_TitleBgActive", + "value": 11, + "description": "Title bar when focused" + }, + { + "name": "ImGuiCol_TitleBgCollapsed", + "value": 12, + "description": "Title bar when collapsed" + }, + { + "name": "ImGuiCol_MenuBarBg", + "value": 13, + "description": "" + }, + { + "name": "ImGuiCol_ScrollbarBg", + "value": 14, + "description": "" + }, + { + "name": "ImGuiCol_ScrollbarGrab", + "value": 15, + "description": "" + }, + { + "name": "ImGuiCol_ScrollbarGrabHovered", + "value": 16, + "description": "" + }, + { + "name": "ImGuiCol_ScrollbarGrabActive", + "value": 17, + "description": "" + }, + { + "name": "ImGuiCol_CheckMark", + "value": 18, + "description": "Checkbox tick and RadioButton circle" + }, + { + "name": "ImGuiCol_SliderGrab", + "value": 19, + "description": "" + }, + { + "name": "ImGuiCol_SliderGrabActive", + "value": 20, + "description": "" + }, + { + "name": "ImGuiCol_Button", + "value": 21, + "description": "" + }, + { + "name": "ImGuiCol_ButtonHovered", + "value": 22, + "description": "" + }, + { + "name": "ImGuiCol_ButtonActive", + "value": 23, + "description": "" + }, + { + "name": "ImGuiCol_Header", + "value": 24, + "description": "Header* colors are used for CollapsingHeader, TreeNode, Selectable, MenuItem" + }, + { + "name": "ImGuiCol_HeaderHovered", + "value": 25, + "description": "" + }, + { + "name": "ImGuiCol_HeaderActive", + "value": 26, + "description": "" + }, + { + "name": "ImGuiCol_Separator", + "value": 27, + "description": "" + }, + { + "name": "ImGuiCol_SeparatorHovered", + "value": 28, + "description": "" + }, + { + "name": "ImGuiCol_SeparatorActive", + "value": 29, + "description": "" + }, + { + "name": "ImGuiCol_ResizeGrip", + "value": 30, + "description": "Resize grip in lower-right and lower-left corners of windows." + }, + { + "name": "ImGuiCol_ResizeGripHovered", + "value": 31, + "description": "" + }, + { + "name": "ImGuiCol_ResizeGripActive", + "value": 32, + "description": "" + }, + { + "name": "ImGuiCol_TabHovered", + "value": 33, + "description": "Tab background, when hovered" + }, + { + "name": "ImGuiCol_Tab", + "value": 34, + "description": "Tab background, when tab-bar is focused & tab is unselected" + }, + { + "name": "ImGuiCol_TabSelected", + "value": 35, + "description": "Tab background, when tab-bar is focused & tab is selected" + }, + { + "name": "ImGuiCol_TabSelectedOverline", + "value": 36, + "description": "Tab horizontal overline, when tab-bar is focused & tab is selected" + }, + { + "name": "ImGuiCol_TabDimmed", + "value": 37, + "description": "Tab background, when tab-bar is unfocused & tab is unselected" + }, + { + "name": "ImGuiCol_TabDimmedSelected", + "value": 38, + "description": "Tab background, when tab-bar is unfocused & tab is selected" + }, + { + "name": "ImGuiCol_TabDimmedSelectedOverline", + "value": 39, + "description": "..horizontal overline, when tab-bar is unfocused & tab is selected" + }, + { + "name": "ImGuiCol_PlotLines", + "value": 40, + "description": "" + }, + { + "name": "ImGuiCol_PlotLinesHovered", + "value": 41, + "description": "" + }, + { + "name": "ImGuiCol_PlotHistogram", + "value": 42, + "description": "" + }, + { + "name": "ImGuiCol_PlotHistogramHovered", + "value": 43, + "description": "" + }, + { + "name": "ImGuiCol_TableHeaderBg", + "value": 44, + "description": "Table header background" + }, + { + "name": "ImGuiCol_TableBorderStrong", + "value": 45, + "description": "Table outer and header borders (prefer using Alpha=1.0 here)" + }, + { + "name": "ImGuiCol_TableBorderLight", + "value": 46, + "description": "Table inner borders (prefer using Alpha=1.0 here)" + }, + { + "name": "ImGuiCol_TableRowBg", + "value": 47, + "description": "Table row background (even rows)" + }, + { + "name": "ImGuiCol_TableRowBgAlt", + "value": 48, + "description": "Table row background (odd rows)" + }, + { + "name": "ImGuiCol_TextLink", + "value": 49, + "description": "Hyperlink color" + }, + { + "name": "ImGuiCol_TextSelectedBg", + "value": 50, + "description": "" + }, + { + "name": "ImGuiCol_DragDropTarget", + "value": 51, + "description": "Rectangle highlighting a drop target" + }, + { + "name": "ImGuiCol_NavHighlight", + "value": 52, + "description": "Gamepad/keyboard: current highlighted item" + }, + { + "name": "ImGuiCol_NavWindowingHighlight", + "value": 53, + "description": "Highlight window when using CTRL+TAB" + }, + { + "name": "ImGuiCol_NavWindowingDimBg", + "value": 54, + "description": "Darken/colorize entire screen behind the CTRL+TAB window list, when active" + }, + { + "name": "ImGuiCol_ModalWindowDimBg", + "value": 55, + "description": "Darken/colorize entire screen behind a modal window, when one is active" + } + ] + }, + { + "name": "ImGuiStyleVar_", + "values": [ + { + "name": "ImGuiStyleVar_Alpha", + "value": 0, + "description": "Alpha" + }, + { + "name": "ImGuiStyleVar_DisabledAlpha", + "value": 1, + "description": "DisabledAlpha" + }, + { + "name": "ImGuiStyleVar_WindowPadding", + "value": 2, + "description": "WindowPadding" + }, + { + "name": "ImGuiStyleVar_WindowRounding", + "value": 3, + "description": "WindowRounding" + }, + { + "name": "ImGuiStyleVar_WindowBorderSize", + "value": 4, + "description": "WindowBorderSize" + }, + { + "name": "ImGuiStyleVar_WindowMinSize", + "value": 5, + "description": "WindowMinSize" + }, + { + "name": "ImGuiStyleVar_WindowTitleAlign", + "value": 6, + "description": "WindowTitleAlign" + }, + { + "name": "ImGuiStyleVar_ChildRounding", + "value": 7, + "description": "ChildRounding" + }, + { + "name": "ImGuiStyleVar_ChildBorderSize", + "value": 8, + "description": "ChildBorderSize" + }, + { + "name": "ImGuiStyleVar_PopupRounding", + "value": 9, + "description": "PopupRounding" + }, + { + "name": "ImGuiStyleVar_PopupBorderSize", + "value": 10, + "description": "PopupBorderSize" + }, + { + "name": "ImGuiStyleVar_FramePadding", + "value": 11, + "description": "FramePadding" + }, + { + "name": "ImGuiStyleVar_FrameRounding", + "value": 12, + "description": "FrameRounding" + }, + { + "name": "ImGuiStyleVar_FrameBorderSize", + "value": 13, + "description": "FrameBorderSize" + }, + { + "name": "ImGuiStyleVar_ItemSpacing", + "value": 14, + "description": "ItemSpacing" + }, + { + "name": "ImGuiStyleVar_ItemInnerSpacing", + "value": 15, + "description": "ItemInnerSpacing" + }, + { + "name": "ImGuiStyleVar_IndentSpacing", + "value": 16, + "description": "IndentSpacing" + }, + { + "name": "ImGuiStyleVar_CellPadding", + "value": 17, + "description": "CellPadding" + }, + { + "name": "ImGuiStyleVar_ScrollbarSize", + "value": 18, + "description": "ScrollbarSize" + }, + { + "name": "ImGuiStyleVar_ScrollbarRounding", + "value": 19, + "description": "ScrollbarRounding" + }, + { + "name": "ImGuiStyleVar_GrabMinSize", + "value": 20, + "description": "GrabMinSize" + }, + { + "name": "ImGuiStyleVar_GrabRounding", + "value": 21, + "description": "GrabRounding" + }, + { + "name": "ImGuiStyleVar_TabRounding", + "value": 22, + "description": "TabRounding" + }, + { + "name": "ImGuiStyleVar_TabBorderSize", + "value": 23, + "description": "TabBorderSize" + }, + { + "name": "ImGuiStyleVar_TabBarBorderSize", + "value": 24, + "description": "TabBarBorderSize" + }, + { + "name": "ImGuiStyleVar_TabBarOverlineSize", + "value": 25, + "description": "TabBarOverlineSize" + }, + { + "name": "ImGuiStyleVar_TableAngledHeadersAngle", + "value": 26, + "description": "TableAngledHeadersAngle" + }, + { + "name": "ImGuiStyleVar_TableAngledHeadersTextAlign", + "value": 27, + "description": "TableAngledHeadersTextAlign" + }, + { + "name": "ImGuiStyleVar_ButtonTextAlign", + "value": 28, + "description": "ButtonTextAlign" + }, + { + "name": "ImGuiStyleVar_SelectableTextAlign", + "value": 29, + "description": "SelectableTextAlign" + }, + { + "name": "ImGuiStyleVar_SeparatorTextBorderSize", + "value": 30, + "description": "SeparatorTextBorderSize" + }, + { + "name": "ImGuiStyleVar_SeparatorTextAlign", + "value": 31, + "description": "SeparatorTextAlign" + }, + { + "name": "ImGuiStyleVar_SeparatorTextPadding", + "value": 32, + "description": "SeparatorTextPadding" + } + ] + }, + { + "name": "ImGuiButtonFlags_", + "values": [ + { + "name": "ImGuiButtonFlags_None", + "value": 0, + "description": "" + }, + { + "name": "ImGuiButtonFlags_MouseButtonLeft", + "value": 1, + "description": "React on left mouse button (default)" + }, + { + "name": "ImGuiButtonFlags_MouseButtonRight", + "value": 2, + "description": "React on right mouse button" + }, + { + "name": "ImGuiButtonFlags_MouseButtonMiddle", + "value": 4, + "description": "React on center mouse button" + } + ] + }, + { + "name": "ImGuiColorEditFlags_", + "values": [ + { + "name": "ImGuiColorEditFlags_None", + "value": 0, + "description": "" + }, + { + "name": "ImGuiColorEditFlags_NoAlpha", + "value": 2, + "description": "ColorEdit, ColorPicker, ColorButton: ignore Alpha component (will only read 3 components from the input pointer)." + }, + { + "name": "ImGuiColorEditFlags_NoPicker", + "value": 4, + "description": "ColorEdit: disable picker when clicking on color square." + }, + { + "name": "ImGuiColorEditFlags_NoOptions", + "value": 8, + "description": "ColorEdit: disable toggling options menu when right-clicking on inputs/small preview." + }, + { + "name": "ImGuiColorEditFlags_NoSmallPreview", + "value": 16, + "description": "ColorEdit, ColorPicker: disable color square preview next to the inputs. (e.g. to show only the inputs)" + }, + { + "name": "ImGuiColorEditFlags_NoInputs", + "value": 32, + "description": "ColorEdit, ColorPicker: disable inputs sliders/text widgets (e.g. to show only the small preview color square)." + }, + { + "name": "ImGuiColorEditFlags_NoTooltip", + "value": 64, + "description": "ColorEdit, ColorPicker, ColorButton: disable tooltip when hovering the preview." + }, + { + "name": "ImGuiColorEditFlags_NoLabel", + "value": 128, + "description": "ColorEdit, ColorPicker: disable display of inline text label (the label is still forwarded to the tooltip and picker)." + }, + { + "name": "ImGuiColorEditFlags_NoSidePreview", + "value": 256, + "description": "ColorPicker: disable bigger color preview on right side of the picker, use small color square preview instead." + }, + { + "name": "ImGuiColorEditFlags_NoDragDrop", + "value": 512, + "description": "ColorEdit: disable drag and drop target. ColorButton: disable drag and drop source." + }, + { + "name": "ImGuiColorEditFlags_NoBorder", + "value": 1024, + "description": "ColorButton: disable border (which is enforced by default)." + }, + { + "name": "ImGuiColorEditFlags_AlphaBar", + "value": 65536, + "description": "ColorEdit, ColorPicker: show vertical alpha bar/gradient in picker." + }, + { + "name": "ImGuiColorEditFlags_AlphaPreview", + "value": 131072, + "description": "ColorEdit, ColorPicker, ColorButton: display preview as a transparent color over a checkerboard, instead of opaque." + }, + { + "name": "ImGuiColorEditFlags_AlphaPreviewHalf", + "value": 262144, + "description": "ColorEdit, ColorPicker, ColorButton: display half opaque / half checkerboard, instead of opaque." + }, + { + "name": "ImGuiColorEditFlags_HDR", + "value": 524288, + "description": "(WIP) ColorEdit: Currently only disable 0.0f..1.0f limits in RGBA edition (note: you probably want to use ImGuiColorEditFlags_Float flag as well)." + }, + { + "name": "ImGuiColorEditFlags_DisplayRGB", + "value": 1048576, + "description": "ColorEdit: override _display_ type among RGB/HSV/Hex. ColorPicker: select any combination using one or more of RGB/HSV/Hex." + }, + { + "name": "ImGuiColorEditFlags_DisplayHSV", + "value": 2097152, + "description": "Display as HSV." + }, + { + "name": "ImGuiColorEditFlags_DisplayHex", + "value": 4194304, + "description": "Display as Hex." + }, + { + "name": "ImGuiColorEditFlags_Uint8", + "value": 8388608, + "description": "ColorEdit, ColorPicker, ColorButton: display values formatted as 0..255." + }, + { + "name": "ImGuiColorEditFlags_Float", + "value": 16777216, + "description": "ColorEdit, ColorPicker, ColorButton: display values formatted as 0.0f..1.0f floats instead of 0..255 integers." + }, + { + "name": "ImGuiColorEditFlags_PickerHueBar", + "value": 33554432, + "description": "ColorPicker: bar for Hue, rectangle for Sat/Value." + }, + { + "name": "ImGuiColorEditFlags_PickerHueWheel", + "value": 67108864, + "description": "ColorPicker: wheel for Hue, triangle for Sat/Value." + }, + { + "name": "ImGuiColorEditFlags_InputRGB", + "value": 134217728, + "description": "ColorEdit, ColorPicker: input and output data in RGB format." + }, + { + "name": "ImGuiColorEditFlags_InputHSV", + "value": 268435456, + "description": "ColorEdit, ColorPicker: input and output data in HSV format." + } + ] + }, + { + "name": "ImGuiSliderFlags_", + "values": [ + { + "name": "ImGuiSliderFlags_None", + "value": 0, + "description": "" + }, + { + "name": "ImGuiSliderFlags_AlwaysClamp", + "value": 16, + "description": "Clamp value to min/max bounds when input manually with CTRL+Click. By default CTRL+Click allows going out of bounds." + }, + { + "name": "ImGuiSliderFlags_Logarithmic", + "value": 32, + "description": "Make the widget logarithmic (linear otherwise)." + }, + { + "name": "ImGuiSliderFlags_NoRoundToFormat", + "value": 64, + "description": "Disable rounding underlying value to match precision of the display format string (e.g. %.3f values are rounded to those 3 digits)." + }, + { + "name": "ImGuiSliderFlags_NoInput", + "value": 128, + "description": "Disable CTRL+Click or Enter key allowing to input text directly into the widget." + }, + { + "name": "ImGuiSliderFlags_WrapAround", + "value": 256, + "description": "Enable wrapping around from max to min and from min to max (only supported by DragXXX() functions for now)." + } + ] + }, + { + "name": "ImGuiMouseButton_", + "values": [ + { + "name": "ImGuiMouseButton_Left", + "value": 0, + "description": "" + }, + { + "name": "ImGuiMouseButton_Right", + "value": 1, + "description": "" + }, + { + "name": "ImGuiMouseButton_Middle", + "value": 2, + "description": "" + }, + { + "name": "ImGuiMouseButton_COUNT", + "value": 5, + "description": "" + } + ] + }, + { + "name": "ImGuiMouseCursor_", + "values": [ + { + "name": "ImGuiMouseCursor_None", + "value": -1, + "description": "" + }, + { + "name": "ImGuiMouseCursor_Arrow", + "value": 0, + "description": "" + }, + { + "name": "ImGuiMouseCursor_TextInput", + "value": 1, + "description": "When hovering over InputText, etc." + }, + { + "name": "ImGuiMouseCursor_ResizeAll", + "value": 2, + "description": "(Unused by Dear ImGui functions)" + }, + { + "name": "ImGuiMouseCursor_ResizeNS", + "value": 3, + "description": "When hovering over a horizontal border" + }, + { + "name": "ImGuiMouseCursor_ResizeEW", + "value": 4, + "description": "When hovering over a vertical border or a column" + }, + { + "name": "ImGuiMouseCursor_ResizeNESW", + "value": 5, + "description": "When hovering over the bottom-left corner of a window" + }, + { + "name": "ImGuiMouseCursor_ResizeNWSE", + "value": 6, + "description": "When hovering over the bottom-right corner of a window" + }, + { + "name": "ImGuiMouseCursor_Hand", + "value": 7, + "description": "(Unused by Dear ImGui functions. Use for e.g. hyperlinks)" + }, + { + "name": "ImGuiMouseCursor_NotAllowed", + "value": 8, + "description": "When hovering something with disallowed interaction. Usually a crossed circle." + }, + { + "name": "ImGuiMouseCursor_COUNT", + "value": 9, + "description": "" + } + ] + }, + { + "name": "ImGuiMouseSource", + "values": [ + { + "name": "ImGuiMouseSource_Mouse", + "value": 0, + "description": "Input is coming from an actual mouse." + }, + { + "name": "ImGuiMouseSource_TouchScreen", + "value": 1, + "description": "Input is coming from a touch screen (no hovering prior to initial press, less precise initial press aiming, dual-axis wheeling possible)." + }, + { + "name": "ImGuiMouseSource_Pen", + "value": 2, + "description": "Input is coming from a pressure/magnetic pen (often used in conjunction with high-sampling rates)." + }, + { + "name": "ImGuiMouseSource_COUNT", + "value": 3, + "description": "" + } + ] + }, + { + "name": "ImGuiCond_", + "values": [ + { + "name": "ImGuiCond_None", + "value": 0, + "description": "No condition (always set the variable), same as _Always" + }, + { + "name": "ImGuiCond_Always", + "value": 1, + "description": "No condition (always set the variable), same as _None" + }, + { + "name": "ImGuiCond_Once", + "value": 2, + "description": "Set the variable once per runtime session (only the first call will succeed)" + }, + { + "name": "ImGuiCond_FirstUseEver", + "value": 4, + "description": "Set the variable if the object/window has no persistently saved data (no entry in .ini file)" + }, + { + "name": "ImGuiCond_Appearing", + "value": 8, + "description": "Set the variable if the object/window is appearing after being hidden/inactive (or the first time)" + } + ] + }, + { + "name": "ImGuiTableFlags_", + "values": [ + { + "name": "ImGuiTableFlags_None", + "value": 0, + "description": "No flags." + }, + { + "name": "ImGuiTableFlags_Resizable", + "value": 1, + "description": "Enable resizing columns." + }, + { + "name": "ImGuiTableFlags_Reorderable", + "value": 2, + "description": "Enable reordering columns in header row." + }, + { + "name": "ImGuiTableFlags_Hideable", + "value": 4, + "description": "Enable hiding/disabling columns in context menu." + }, + { + "name": "ImGuiTableFlags_Sortable", + "value": 8, + "description": "Enable sorting." + }, + { + "name": "ImGuiTableFlags_NoSavedSettings", + "value": 16, + "description": "Disable persisting columns order, width and sort settings in the .ini file." + }, + { + "name": "ImGuiTableFlags_ContextMenuInBody", + "value": 32, + "description": "Right-click on columns body/contents will display table context menu." + }, + { + "name": "ImGuiTableFlags_RowBg", + "value": 64, + "description": "Set each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt." + }, + { + "name": "ImGuiTableFlags_BordersInnerH", + "value": 128, + "description": "Draw horizontal borders between rows." + }, + { + "name": "ImGuiTableFlags_BordersOuterH", + "value": 256, + "description": "Draw horizontal borders at the top and bottom." + }, + { + "name": "ImGuiTableFlags_BordersInnerV", + "value": 512, + "description": "Draw vertical borders between columns." + }, + { + "name": "ImGuiTableFlags_BordersOuterV", + "value": 1024, + "description": "Draw vertical borders on the left and right sides." + }, + { + "name": "ImGuiTableFlags_BordersH", + "value": 1280, + "description": "Draw horizontal borders." + }, + { + "name": "ImGuiTableFlags_BordersV", + "value": 1536, + "description": "Draw vertical borders." + }, + { + "name": "ImGuiTableFlags_BordersInner", + "value": 640, + "description": "Draw inner borders." + }, + { + "name": "ImGuiTableFlags_BordersOuter", + "value": 1280, + "description": "Draw outer borders." + }, + { + "name": "ImGuiTableFlags_Borders", + "value": 1920, + "description": "Draw all borders." + }, + { + "name": "ImGuiTableFlags_NoBordersInBody", + "value": 2048, + "description": "[ALPHA] Disable vertical borders in columns Body." + }, + { + "name": "ImGuiTableFlags_NoBordersInBodyUntilResize", + "value": 4096, + "description": "[ALPHA] Disable vertical borders in columns Body until hovered for resize." + }, + { + "name": "ImGuiTableFlags_SizingFixedFit", + "value": 8192, + "description": "Columns default to _WidthFixed or _WidthAuto, matching contents width." + }, + { + "name": "ImGuiTableFlags_SizingFixedSame", + "value": 16384, + "description": "Columns default to _WidthFixed or _WidthAuto, matching the maximum contents width of all columns." + }, + { + "name": "ImGuiTableFlags_SizingStretchProp", + "value": 24576, + "description": "Columns default to _WidthStretch with default weights proportional to each columns contents widths." + }, + { + "name": "ImGuiTableFlags_SizingStretchSame", + "value": 32768, + "description": "Columns default to _WidthStretch with default weights all equal." + }, + { + "name": "ImGuiTableFlags_NoHostExtendX", + "value": 65536, + "description": "Make outer width auto-fit to columns, overriding outer_size.x value." + }, + { + "name": "ImGuiTableFlags_NoHostExtendY", + "value": 131072, + "description": "Make outer height stop exactly at outer_size.y." + }, + { + "name": "ImGuiTableFlags_NoKeepColumnsVisible", + "value": 262144, + "description": "Disable keeping column always minimally visible when ScrollX is off." + }, + { + "name": "ImGuiTableFlags_PreciseWidths", + "value": 524288, + "description": "Disable distributing remainder width to stretched columns." + }, + { + "name": "ImGuiTableFlags_NoClip", + "value": 1048576, + "description": "Disable clipping rectangle for every individual columns." + }, + { + "name": "ImGuiTableFlags_PadOuterX", + "value": 2097152, + "description": "Default if BordersOuterV is on. Enable outermost padding." + }, + { + "name": "ImGuiTableFlags_NoPadOuterX", + "value": 4194304, + "description": "Default if BordersOuterV is off. Disable outermost padding." + }, + { + "name": "ImGuiTableFlags_NoPadInnerX", + "value": 8388608, + "description": "Disable inner padding between columns." + }, + { + "name": "ImGuiTableFlags_ScrollX", + "value": 16777216, + "description": "Enable horizontal scrolling." + }, + { + "name": "ImGuiTableFlags_ScrollY", + "value": 33554432, + "description": "Enable vertical scrolling." + }, + { + "name": "ImGuiTableFlags_SortMulti", + "value": 67108864, + "description": "Hold shift when clicking headers to sort on multiple columns." + }, + { + "name": "ImGuiTableFlags_SortTristate", + "value": 134217728, + "description": "Allow no sorting, disable default sorting." + }, + { + "name": "ImGuiTableFlags_HighlightHoveredColumn", + "value": 268435456, + "description": "Highlight column headers when hovered." + }, + { + "name": "ImGuiTableFlags_SizingMask_", + "value": 61440, + "description": "[Internal] Sizing mask for columns." + } + ] + }, + { + "name": "ImGuiTableColumnFlags_", + "values": [ + { + "name": "ImGuiTableColumnFlags_None", + "value": 0, + "description": "No flags." + }, + { + "name": "ImGuiTableColumnFlags_Disabled", + "value": 1, + "description": "Hide column, won't show in context menu." + }, + { + "name": "ImGuiTableColumnFlags_DefaultHide", + "value": 2, + "description": "Default as a hidden/disabled column." + }, + { + "name": "ImGuiTableColumnFlags_DefaultSort", + "value": 4, + "description": "Default as a sorting column." + }, + { + "name": "ImGuiTableColumnFlags_WidthStretch", + "value": 8, + "description": "Column will stretch." + }, + { + "name": "ImGuiTableColumnFlags_WidthFixed", + "value": 16, + "description": "Column will not stretch." + }, + { + "name": "ImGuiTableColumnFlags_NoResize", + "value": 32, + "description": "Disable manual resizing." + }, + { + "name": "ImGuiTableColumnFlags_NoReorder", + "value": 64, + "description": "Disable manual reordering of this column." + }, + { + "name": "ImGuiTableColumnFlags_NoHide", + "value": 128, + "description": "Disable ability to hide/disable this column." + }, + { + "name": "ImGuiTableColumnFlags_NoClip", + "value": 256, + "description": "Disable clipping for this column." + }, + { + "name": "ImGuiTableColumnFlags_NoSort", + "value": 512, + "description": "Disable ability to sort on this field." + }, + { + "name": "ImGuiTableColumnFlags_NoSortAscending", + "value": 1024, + "description": "Disable ability to sort in the ascending direction." + }, + { + "name": "ImGuiTableColumnFlags_NoSortDescending", + "value": 2048, + "description": "Disable ability to sort in the descending direction." + }, + { + "name": "ImGuiTableColumnFlags_NoHeaderLabel", + "value": 4096, + "description": "TableHeadersRow() will not submit horizontal label for this column." + }, + { + "name": "ImGuiTableColumnFlags_NoHeaderWidth", + "value": 8192, + "description": "Disable header text width contribution to automatic column width." + }, + { + "name": "ImGuiTableColumnFlags_PreferSortAscending", + "value": 16384, + "description": "Make the initial sort direction Ascending when first sorting on this column." + }, + { + "name": "ImGuiTableColumnFlags_PreferSortDescending", + "value": 32768, + "description": "Make the initial sort direction Descending when first sorting on this column." + }, + { + "name": "ImGuiTableColumnFlags_IndentEnable", + "value": 65536, + "description": "Use current Indent value when entering cell." + }, + { + "name": "ImGuiTableColumnFlags_IndentDisable", + "value": 131072, + "description": "Ignore current Indent value when entering cell." + }, + { + "name": "ImGuiTableColumnFlags_AngledHeader", + "value": 262144, + "description": "TableHeadersRow() will submit an angled header row for this column." + }, + { + "name": "ImGuiTableColumnFlags_IsEnabled", + "value": 16777216, + "description": "Status: is enabled (not hidden by user/api)." + }, + { + "name": "ImGuiTableColumnFlags_IsVisible", + "value": 33554432, + "description": "Status: is visible (enabled and not clipped by scrolling)." + }, + { + "name": "ImGuiTableColumnFlags_IsSorted", + "value": 67108864, + "description": "Status: is currently part of the sort specs." + }, + { + "name": "ImGuiTableColumnFlags_IsHovered", + "value": 134217728, + "description": "Status: is hovered by mouse." + }, + { + "name": "ImGuiTableColumnFlags_WidthMask_", + "value": 24, + "description": "[Internal] Width mask for columns." + }, + { + "name": "ImGuiTableColumnFlags_IndentMask_", + "value": 196608, + "description": "[Internal] Indent mask for columns." + }, + { + "name": "ImGuiTableColumnFlags_StatusMask_", + "value": 251658240, + "description": "[Internal] Status mask for columns." + }, + { + "name": "ImGuiTableColumnFlags_NoDirectResize_", + "value": 1073741824, + "description": "[Internal] Disable user resizing this column directly." + } + ] + }, + { + "name": "ImGuiTableRowFlags_", + "values": [ + { + "name": "ImGuiTableRowFlags_None", + "value": 0, + "description": "No flags." + }, + { + "name": "ImGuiTableRowFlags_Headers", + "value": 1, + "description": "Identify header row (set default background color + width of its contents accounted differently for auto column width)." + } + ] + }, + { + "name": "ImGuiTableBgTarget_", + "values": [ + { + "name": "ImGuiTableBgTarget_None", + "value": 0, + "description": "No background color target." + }, + { + "name": "ImGuiTableBgTarget_RowBg0", + "value": 1, + "description": "Set row background color 0 (generally used for background, automatically set when ImGuiTableFlags_RowBg is used)." + }, + { + "name": "ImGuiTableBgTarget_RowBg1", + "value": 2, + "description": "Set row background color 1 (generally used for selection marking)." + }, + { + "name": "ImGuiTableBgTarget_CellBg", + "value": 3, + "description": "Set cell background color (top-most color)." + } + ] + } + ] +} diff --git a/deps/polyscope b/deps/polyscope index 3f52c5e..764ef46 160000 --- a/deps/polyscope +++ b/deps/polyscope @@ -1 +1 @@ -Subproject commit 3f52c5ec9adf8fd872d4e1f5cdbaf6f074175f0d +Subproject commit 764ef46a9f84f5bfaf83d66ae7e861f7eb943610 diff --git a/src/cpp/core.cpp b/src/cpp/core.cpp index fca4458..cfe3ab1 100644 --- a/src/cpp/core.cpp +++ b/src/cpp/core.cpp @@ -525,7 +525,6 @@ PYBIND11_MODULE(polyscope_bindings, m) { bind_camera_view(m); bind_managed_buffer(m); bind_imgui(m); - } // clang-format on diff --git a/src/cpp/imgui.cpp b/src/cpp/imgui.cpp index 75fa3b0..3ec2d48 100644 --- a/src/cpp/imgui.cpp +++ b/src/cpp/imgui.cpp @@ -1,2344 +1,2110 @@ + #include "imgui.h" +#include "misc/cpp/imgui_stdlib.h" #include #include #include #include -namespace py = pybind11; +#include "imgui_utils.h" -// Type translations between Python and ImGui. Prefer native Python types (tuples, arrays), translating into ImGui -// equivalents. -using Vec2T = std::tuple; -using Vec4T = std::tuple; - -ImVec2 to_vec2(const Vec2T& v) { return ImVec2(std::get<0>(v), std::get<1>(v)); } -ImVec4 to_vec4(const Vec4T& v) { return ImVec4(std::get<0>(v), std::get<1>(v), std::get<2>(v), std::get<3>(v)); } - -Vec2T from_vec2(const ImVec2& v) { return std::make_tuple(v.x, v.y); } -Vec4T from_vec4(const ImVec4& v) { return std::make_tuple(v.x, v.y, v.z, v.w); } - -struct InputTextCallback_UserData { - std::string* str; - ImGuiInputTextCallback chain_callback; - void* chain_callback_user_data; -}; - -std::vector convert_string_items(const std::vector& items) { - auto _items = std::vector(); - _items.reserve(items.size()); - for (const auto& item : items) { - _items.push_back(item.data()); - } - return _items; -} - -static int input_text_callback(ImGuiInputTextCallbackData* data) { - auto* user_data = reinterpret_cast(data->UserData); - if (data->EventFlag == ImGuiInputTextFlags_CallbackResize) { - // Resize string callback - // If for some reason we refuse the new length (BufTextLen) and/or capacity (BufSize) we - // need to set them back to what we want. - auto* str = user_data->str; - IM_ASSERT(data->Buf == str->c_str()); - str->resize(data->BufTextLen); - data->Buf = (char*)str->c_str(); - } else if (user_data->chain_callback) { - // Forward to user callback, if any - data->UserData = user_data->chain_callback_user_data; - return user_data->chain_callback(data); - } - return 0; -} - - -void bind_imgui_structs(py::module& m); -void bind_imgui_methods(py::module& m); -void bind_imgui_enums(py::module& m); - -void bind_imgui(py::module& m) { - auto imgui_module = m.def_submodule("imgui", "ImGui bindings"); - bind_imgui_structs(imgui_module); - bind_imgui_methods(imgui_module); - bind_imgui_enums(imgui_module); -} - -// clang-format off - - -// clang-format off -void bind_imgui_structs(py::module& m) { - - // ImGuiIO - py::class_(m, "ImGuiIO") - .def_readwrite("DisplaySize" ,&ImGuiIO::DisplaySize ) - .def_readwrite("DeltaTime" ,&ImGuiIO::DeltaTime ) - .def_readwrite("IniSavingRate" ,&ImGuiIO::IniSavingRate ) - .def_readwrite("IniFilename" ,&ImGuiIO::IniFilename ) - .def_readwrite("MouseDoubleClickTime" ,&ImGuiIO::MouseDoubleClickTime ) - .def_readwrite("MouseDoubleClickMaxDist" ,&ImGuiIO::MouseDoubleClickMaxDist ) - .def_readwrite("MouseDragThreshold" ,&ImGuiIO::MouseDragThreshold ) - .def_property_readonly("KeyMap" , [](py::object& ob) { ImGuiIO& o = ob.cast(); return py::array{ImGuiKey_COUNT, o.KeyMap, ob};}) - .def_readwrite("KeyRepeatDelay" ,&ImGuiIO::KeyRepeatDelay ) - .def_readwrite("KeyRepeatRate" ,&ImGuiIO::KeyRepeatRate ) - .def_readwrite("Fonts" ,&ImGuiIO::Fonts ) - .def_readwrite("FontGlobalScale" ,&ImGuiIO::FontGlobalScale ) - .def_readwrite("FontAllowUserScaling" ,&ImGuiIO::FontAllowUserScaling ) - .def_readwrite("FontDefault" ,&ImGuiIO::FontDefault ) - .def_readwrite("DisplayFramebufferScale" ,&ImGuiIO::DisplayFramebufferScale ) - .def_readwrite("MouseDrawCursor" ,&ImGuiIO::MouseDrawCursor ) - .def_readwrite("ConfigMacOSXBehaviors" ,&ImGuiIO::ConfigMacOSXBehaviors ) - .def_readwrite("ConfigInputTextCursorBlink" ,&ImGuiIO::ConfigInputTextCursorBlink ) - .def_readwrite("ConfigDragClickToInputText" ,&ImGuiIO::ConfigDragClickToInputText ) - .def_readwrite("ConfigWindowsResizeFromEdges" ,&ImGuiIO::ConfigWindowsResizeFromEdges ) - .def_readwrite("ConfigWindowsMoveFromTitleBarOnly" ,&ImGuiIO::ConfigWindowsMoveFromTitleBarOnly ) - .def_readwrite("ConfigMemoryCompactTimer" ,&ImGuiIO::ConfigMemoryCompactTimer ) - .def_property_readonly("MousePos" , [](py::object& ob) { ImGuiIO& o = ob.cast(); return from_vec2(o.MousePos);}) - .def_property_readonly("MouseDown" , [](py::object& ob) { ImGuiIO& o = ob.cast(); return py::array{5, o.MouseDown , ob};}) - .def_readwrite("MouseWheel" ,&ImGuiIO::MouseWheel ) - .def_readwrite("MouseWheelH" ,&ImGuiIO::MouseWheelH ) - .def_readwrite("KeyCtrl" ,&ImGuiIO::KeyCtrl ) - .def_readwrite("KeyShift" ,&ImGuiIO::KeyShift ) - .def_readwrite("KeyAlt" ,&ImGuiIO::KeyAlt ) - .def_readwrite("KeySuper" ,&ImGuiIO::KeySuper ) - .def_property_readonly("KeysDown" , [](py::object& ob) { ImGuiIO& o = ob.cast(); return py::array{512, o.KeysDown , ob};}) - .def_property_readonly("NavInputs" , [](py::object& ob) { ImGuiIO& o = ob.cast(); return py::array{ImGuiNavInput_COUNT, o.NavInputs , ob};}) - .def_readwrite("WantCaptureMouse" ,&ImGuiIO::WantCaptureMouse ) - .def_readwrite("WantCaptureKeyboard" ,&ImGuiIO::WantCaptureKeyboard ) - .def_readwrite("WantTextInput" ,&ImGuiIO::WantTextInput ) - .def_readwrite("WantSetMousePos" ,&ImGuiIO::WantSetMousePos ) - .def_readwrite("WantSaveIniSettings" ,&ImGuiIO::WantSaveIniSettings ) - .def_readwrite("NavActive" ,&ImGuiIO::NavActive ) - .def_readwrite("NavVisible" ,&ImGuiIO::NavVisible ) - .def_readwrite("Framerate" ,&ImGuiIO::Framerate ) - .def_readwrite("MetricsRenderVertices" ,&ImGuiIO::MetricsRenderVertices ) - .def_readwrite("MetricsRenderIndices" ,&ImGuiIO::MetricsRenderIndices ) - .def_readwrite("MetricsRenderWindows" ,&ImGuiIO::MetricsRenderWindows ) - .def_readwrite("MetricsActiveWindows" ,&ImGuiIO::MetricsActiveWindows ) - .def_property_readonly("MouseDelta" , [](py::object& ob) { ImGuiIO& o = ob.cast(); return from_vec2(o.MouseDelta);}) - .def_readwrite("WantCaptureMouseUnlessPopupClose" ,&ImGuiIO::WantCaptureMouseUnlessPopupClose ) - .def_readwrite("KeyMods" ,&ImGuiIO::KeyMods ) - .def_readwrite("MousePosPrev" ,&ImGuiIO::MousePosPrev ) - .def_property_readonly("MouseClickedPos" , [](py::object& ob) { ImGuiIO& o = ob.cast(); return py::array{5, o.MouseClickedPos, ob};}) - .def_property_readonly("MouseClickedTime" , [](py::object& ob) { ImGuiIO& o = ob.cast(); return py::array{5, o.MouseClickedTime, ob};}) - .def_property_readonly("MouseClicked" , [](py::object& ob) { ImGuiIO& o = ob.cast(); return py::array{5, o.MouseClicked, ob};}) - .def_property_readonly("MouseDoubleClicked" , [](py::object& ob) { ImGuiIO& o = ob.cast(); return py::array{5, o.MouseDoubleClicked, ob};}) - .def_property_readonly("MouseClickedCount" , [](py::object& ob) { ImGuiIO& o = ob.cast(); return py::array{5, o.MouseClickedCount, ob};}) - .def_property_readonly("MouseClickedLastCount" , [](py::object& ob) { ImGuiIO& o = ob.cast(); return py::array{5, o.MouseClickedLastCount, ob};}) - .def_property_readonly("MouseReleased" , [](py::object& ob) { ImGuiIO& o = ob.cast(); return py::array{5, o.MouseReleased, ob};}) - .def_property_readonly("MouseDownOwned" , [](py::object& ob) { ImGuiIO& o = ob.cast(); return py::array{5, o.MouseDownOwned, ob};}) - .def_property_readonly("MouseDownOwnedUnlessPopupClose" , [](py::object& ob) { ImGuiIO& o = ob.cast(); return py::array{5, o.MouseDownOwnedUnlessPopupClose, ob};}) - .def_property_readonly("MouseDownDuration" , [](py::object& ob) { ImGuiIO& o = ob.cast(); return py::array{5, o.MouseDownDuration, ob};}) - .def_property_readonly("MouseDownDurationPrev" , [](py::object& ob) { ImGuiIO& o = ob.cast(); return py::array{5, o.MouseDownDurationPrev, ob};}) - .def_property_readonly("MouseDragMaxDistanceSqr" , [](py::object& ob) { ImGuiIO& o = ob.cast(); return py::array{5, o.MouseDragMaxDistanceSqr, ob};}) - .def_readwrite("PenPressure" ,&ImGuiIO::PenPressure ) - .def_readwrite("AppFocusLost" ,&ImGuiIO::AppFocusLost ) - .def_readwrite("InputQueueSurrogate" ,&ImGuiIO::InputQueueSurrogate ) - .def_readwrite("InputQueueCharacters" ,&ImGuiIO::InputQueueCharacters ) - - ; - - - py::class_(m, "ImFontAtlas") - .def("AddFontFromFileTTF", - [](py::object& ob, std::string filename, float size_pixels) { ImFontAtlas& o = ob.cast(); return o.AddFontFromFileTTF(filename.c_str(), size_pixels);}, - py::return_value_policy::reference) - - // TODO add bindings to the rest of the font functions - - ; - - py::class_(m, "ImFont") - - // TODO add bindings to the rest of the font functions - - ; +namespace py = pybind11; +void bind_imgui_funcs(py::module& m) { + m.def("NewFrame", &ImGui::NewFrame, + "Starts a new ImGui frame. This must be called before any other ImGui commands in a frame."); + m.def("EndFrame", &ImGui::EndFrame, + "Ends the current ImGui frame. If you don't need to render data, you can call this without Render()."); + m.def("Render", &ImGui::Render, "Ends the ImGui frame and finalizes the draw data, which can then be rendered."); + m.def( + "ShowDemoWindow", + [](std::optional open) { + bool* p_open = open.has_value() ? &open.value() : nullptr; + ImGui::ShowDemoWindow(p_open); + return open; + }, + py::arg("open") = std::nullopt, "Creates a demo window that demonstrates most ImGui features."); + m.def( + "ShowMetricsWindow", + [](std::optional open) { + bool* p_open = open.has_value() ? &open.value() : nullptr; + ImGui::ShowMetricsWindow(p_open); + return open; + }, + py::arg("open") = std::nullopt, + "Creates a Metrics/Debugger window that displays internal state and other metrics."); + m.def( + "ShowStyleEditor", []() { ImGui::ShowStyleEditor(); }, + "Opens the style editor, which allows you to customize the style parameters."); + m.def("ShowUserGuide", &ImGui::ShowUserGuide, + "Shows a user guide window with basic help and information about ImGui usage."); + m.def("GetVersion", &ImGui::GetVersion, "Returns the ImGui version as a string."); + m.def( + "StyleColorsDark", []() { ImGui::StyleColorsDark(); }, "Applies the default dark style to the current context."); + m.def( + "StyleColorsLight", []() { ImGui::StyleColorsLight(); }, + "Applies the default light style to the current context."); + m.def( + "StyleColorsClassic", []() { ImGui::StyleColorsClassic(); }, + "Applies the classic ImGui style to the current context."); + m.def( + "Begin", + [](const char* name, std::optional open, ImGuiWindowFlags flags) { + bool* p_open = open.has_value() ? &open.value() : nullptr; + const auto res_ = ImGui::Begin(name, p_open, flags); + return std::make_tuple(res_, open); + }, + py::arg("name"), py::arg("open") = std::nullopt, py::arg("flags") = 0, + "Begins a new window. Returns true if the window is visible."); + m.def("End", &ImGui::End, "Ends the current window."); + m.def( + "BeginChild", + [](const char* str_id, const ImVec2& size, ImGuiChildFlags child_flags, ImGuiWindowFlags window_flags) { + const auto res_ = ImGui::BeginChild(str_id, size, child_flags, window_flags); + return res_; + }, + py::arg("str_id"), py::arg("size") = ImVec2(0, 0), py::arg("child_flags") = 0, py::arg("window_flags") = 0, + "Begins a child window, which is a self-contained scrolling/clipping region."); + m.def("EndChild", &ImGui::EndChild, "Ends a child window."); + m.def("IsWindowAppearing", &ImGui::IsWindowAppearing, "Returns true if the current window is appearing."); + m.def("IsWindowCollapsed", &ImGui::IsWindowCollapsed, "Returns true if the current window is collapsed."); + m.def("IsWindowFocused", &ImGui::IsWindowFocused, py::arg("flags") = 0, + "Returns true if the current window is focused, or its root/child depending on flags."); + m.def("IsWindowHovered", &ImGui::IsWindowHovered, py::arg("flags") = 0, + "Returns true if the current window is hovered and hoverable."); + m.def("GetWindowPos", &ImGui::GetWindowPos, "Returns the current window position in screen space."); + m.def("GetWindowSize", &ImGui::GetWindowSize, "Returns the current window size."); + m.def("SetNextWindowPos", &ImGui::SetNextWindowPos, py::arg("pos"), py::arg("cond") = 0, + py::arg("pivot") = ImVec2(0, 0), "Sets the position for the next window. Call before Begin()."); + m.def("SetNextWindowSize", &ImGui::SetNextWindowSize, py::arg("size"), py::arg("cond") = 0, + "Sets the size for the next window. Call before Begin()."); + m.def("SetNextWindowContentSize", &ImGui::SetNextWindowContentSize, py::arg("size"), + "Sets the content size for the next window (scrollable client area). This does not include window decorations " + "like the title bar or menu bar."); + m.def("SetNextWindowCollapsed", &ImGui::SetNextWindowCollapsed, py::arg("collapsed"), py::arg("cond") = 0, + "Sets the collapsed state for the next window. This should be called before Begin()."); + m.def("SetNextWindowFocus", &ImGui::SetNextWindowFocus, + "Sets the next window to be focused and top-most. This should be called before Begin()."); + m.def("SetNextWindowScroll", &ImGui::SetNextWindowScroll, py::arg("scroll"), + "Sets the scrolling position for the next window. Use < 0.0f for an axis to leave it unchanged."); + m.def("SetNextWindowBgAlpha", &ImGui::SetNextWindowBgAlpha, py::arg("alpha"), + "Sets the background color alpha for the next window. This can be used to override the alpha component of " + "ImGuiCol_WindowBg/ChildBg/PopupBg."); + m.def( + "SetWindowPos", [](const ImVec2& pos, ImGuiCond cond) { ImGui::SetWindowPos(pos, cond); }, py::arg("pos"), + py::arg("cond") = 0, + "(Not recommended) Sets the current window position. This should be called within a Begin()/End() block. Prefer " + "using SetNextWindowPos()."); + m.def( + "SetWindowSize", [](const ImVec2& size, ImGuiCond cond) { ImGui::SetWindowSize(size, cond); }, py::arg("size"), + py::arg("cond") = 0, + "(Not recommended) Sets the current window size. This should be called within a Begin()/End() block. Prefer " + "using SetNextWindowSize()."); + m.def( + "SetWindowCollapsed", [](bool collapsed, ImGuiCond cond) { ImGui::SetWindowCollapsed(collapsed, cond); }, + py::arg("collapsed"), py::arg("cond") = 0, + "(Not recommended) Sets the current window collapsed state. Prefer using SetNextWindowCollapsed()."); + m.def( + "SetWindowFocus", []() { ImGui::SetWindowFocus(); }, + "(Not recommended) Sets the current window to be focused and top-most. Prefer using SetNextWindowFocus()."); + m.def( + "SetWindowPos", [](const char* name, const ImVec2& pos, ImGuiCond cond) { ImGui::SetWindowPos(name, pos, cond); }, + py::arg("name"), py::arg("pos"), py::arg("cond") = 0, "Sets the position of the window specified by name."); + m.def( + "SetWindowSize", + [](const char* name, const ImVec2& size, ImGuiCond cond) { ImGui::SetWindowSize(name, size, cond); }, + py::arg("name"), py::arg("size"), py::arg("cond") = 0, + "Sets the size of the window specified by name. Set an axis to 0.0f to force an auto-fit."); + m.def( + "SetWindowCollapsed", + [](const char* name, bool collapsed, ImGuiCond cond) { ImGui::SetWindowCollapsed(name, collapsed, cond); }, + py::arg("name"), py::arg("collapsed"), py::arg("cond") = 0, + "Sets the collapsed state of the window specified by name."); + m.def( + "SetWindowFocus", [](const char* name) { ImGui::SetWindowFocus(name); }, py::arg("name"), + "Sets the window specified by name to be focused and top-most."); + m.def("GetScrollX", &ImGui::GetScrollX, + "Returns the horizontal scrolling amount, ranging from 0 to GetScrollMaxX()."); + m.def("GetScrollY", &ImGui::GetScrollY, "Returns the vertical scrolling amount, ranging from 0 to GetScrollMaxY()."); + m.def("SetScrollX", &ImGui::SetScrollX, py::arg("scroll_x"), + "Sets the horizontal scrolling amount, ranging from 0 to GetScrollMaxX()."); + m.def("SetScrollY", &ImGui::SetScrollY, py::arg("scroll_y"), + "Sets the vertical scrolling amount, ranging from 0 to GetScrollMaxY()."); + m.def("GetScrollMaxX", &ImGui::GetScrollMaxX, + "Returns the maximum horizontal scrolling amount, calculated as ContentSize.x - WindowSize.x - " + "DecorationsSize.x."); + m.def( + "GetScrollMaxY", &ImGui::GetScrollMaxY, + "Returns the maximum vertical scrolling amount, calculated as ContentSize.y - WindowSize.y - DecorationsSize.y."); + m.def("SetScrollHereX", &ImGui::SetScrollHereX, py::arg("center_x_ratio") = 0.5f, + "Adjusts the horizontal scrolling amount to make the current cursor position visible. center_x_ratio=0.0 " + "aligns left, 0.5 centers, 1.0 aligns right."); + m.def("SetScrollHereY", &ImGui::SetScrollHereY, py::arg("center_y_ratio") = 0.5f, + "Adjusts the vertical scrolling amount to make the current cursor position visible. center_y_ratio=0.0 aligns " + "top, 0.5 centers, 1.0 aligns bottom."); + m.def("SetScrollFromPosX", &ImGui::SetScrollFromPosX, py::arg("local_x"), py::arg("center_x_ratio") = 0.5f, + "Adjusts the horizontal scrolling amount to make the specified position visible. Use GetCursorStartPos() + " + "offset to compute a valid position."); + m.def("SetScrollFromPosY", &ImGui::SetScrollFromPosY, py::arg("local_y"), py::arg("center_y_ratio") = 0.5f, + "Adjusts the vertical scrolling amount to make the specified position visible. Use GetCursorStartPos() + " + "offset to compute a valid position."); + m.def( + "PushStyleColor", [](ImGuiCol idx, ImU32 col) { ImGui::PushStyleColor(idx, col); }, py::arg("idx"), + py::arg("col"), "Pushes a style color onto the style color stack, modifying the color specified by idx."); + m.def( + "PushStyleColor", [](ImGuiCol idx, const ImVec4& col) { ImGui::PushStyleColor(idx, col); }, py::arg("idx"), + py::arg("col"), "Pushes a style color onto the style color stack, modifying the color specified by idx."); + m.def("PopStyleColor", &ImGui::PopStyleColor, py::arg("count") = 1, + "Pops one or more style colors from the style color stack."); + m.def( + "PushStyleVar", [](ImGuiStyleVar idx, float val) { ImGui::PushStyleVar(idx, val); }, py::arg("idx"), + py::arg("val"), + "Pushes a style variable onto the style variable stack, modifying the float variable specified by idx."); + m.def( + "PushStyleVar", [](ImGuiStyleVar idx, const ImVec2& val) { ImGui::PushStyleVar(idx, val); }, py::arg("idx"), + py::arg("val"), + "Pushes a style variable onto the style variable stack, modifying the ImVec2 variable specified by idx."); + m.def("PopStyleVar", &ImGui::PopStyleVar, py::arg("count") = 1, + "Pops one or more style variables from the style variable stack."); + m.def("PushItemFlag", &ImGui::PushItemFlag, py::arg("option"), py::arg("enabled"), + "Pushes an item flag onto the item flag stack, modifying the specified option."); + m.def("PopItemFlag", &ImGui::PopItemFlag, "Pops the last item flag pushed onto the item flag stack."); + m.def("PushItemWidth", &ImGui::PushItemWidth, py::arg("item_width"), + "Pushes the width of items for common large 'item+label' widgets. >0.0f: width in pixels, <0.0f aligns the " + "width to the right of the window."); + m.def("PopItemWidth", &ImGui::PopItemWidth, "Pops the last item width pushed onto the item width stack."); + m.def("SetNextItemWidth", &ImGui::SetNextItemWidth, py::arg("item_width"), + "Sets the width of the next common large 'item+label' widget. >0.0f: width in pixels, <0.0f aligns the width " + "to the right of the window."); + m.def("CalcItemWidth", &ImGui::CalcItemWidth, + "Calculates the width of the item given the pushed settings and current cursor position."); + m.def("PushTextWrapPos", &ImGui::PushTextWrapPos, py::arg("wrap_local_pos_x") = 0.0f, + "Pushes the word-wrapping position for Text*() commands. < 0.0f: no wrapping; 0.0f: wrap to end of window; > " + "0.0f: wrap at 'wrap_pos_x' position in window local space."); + m.def("PopTextWrapPos", &ImGui::PopTextWrapPos, "Pops the last word-wrapping position pushed onto the stack."); + m.def("GetFontSize", &ImGui::GetFontSize, "Returns the current font size in pixels, with the current scale applied."); + m.def("GetFontTexUvWhitePixel", &ImGui::GetFontTexUvWhitePixel, + "Returns the UV coordinate for a white pixel, useful for drawing custom shapes via the ImDrawList API."); + m.def( + "GetColorU32", + [](ImGuiCol idx, float alpha_mul) { + const auto res_ = ImGui::GetColorU32(idx, alpha_mul); + return res_; + }, + py::arg("idx"), py::arg("alpha_mul") = 1.0f, + "Retrieves the style color specified by idx, with the style alpha applied and an optional extra alpha " + "multiplier, packed as a 32-bit value suitable for ImDrawList."); + m.def( + "GetColorU32", + [](const ImVec4& col) { + const auto res_ = ImGui::GetColorU32(col); + return res_; + }, + py::arg("col"), + "Retrieves the given color with the style alpha applied, packed as a 32-bit value suitable for ImDrawList."); + m.def( + "GetColorU32", + [](ImU32 col, float alpha_mul) { + const auto res_ = ImGui::GetColorU32(col, alpha_mul); + return res_; + }, + py::arg("col"), py::arg("alpha_mul") = 1.0f, + "Retrieves the given color with the style alpha applied, packed as a 32-bit value suitable for ImDrawList."); + m.def("GetStyleColorVec4", &ImGui::GetStyleColorVec4, py::arg("idx"), + "Retrieves the style color as stored in the ImGuiStyle structure. Use this to feed back into PushStyleColor(), " + "otherwise use GetColorU32() to get the style color with style alpha baked in."); + m.def("GetCursorScreenPos", &ImGui::GetCursorScreenPos, + "Returns the current cursor position in absolute screen coordinates. This is typically the best function to " + "use for getting cursor position."); + m.def("SetCursorScreenPos", &ImGui::SetCursorScreenPos, py::arg("pos"), + "Sets the cursor position in absolute screen coordinates."); + m.def("GetContentRegionAvail", &ImGui::GetContentRegionAvail, + "Returns the available space from the current position. This is typically the best function to use for getting " + "the available content region."); + m.def("GetCursorPos", &ImGui::GetCursorPos, "Returns the current cursor position in window-local coordinates."); + m.def("GetCursorPosX", &ImGui::GetCursorPosX, + "Returns the X coordinate of the current cursor position in window-local coordinates."); + m.def("GetCursorPosY", &ImGui::GetCursorPosY, + "Returns the Y coordinate of the current cursor position in window-local coordinates."); + m.def("SetCursorPos", &ImGui::SetCursorPos, py::arg("local_pos"), + "Sets the cursor position in window-local coordinates."); + m.def("SetCursorPosX", &ImGui::SetCursorPosX, py::arg("local_x"), + "Sets the X coordinate of the cursor position in window-local coordinates."); + m.def("SetCursorPosY", &ImGui::SetCursorPosY, py::arg("local_y"), + "Sets the Y coordinate of the cursor position in window-local coordinates."); + m.def("GetCursorStartPos", &ImGui::GetCursorStartPos, + "Returns the initial cursor position in window-local coordinates. Call GetCursorScreenPos() after Begin() to " + "get the absolute coordinates version."); + m.def("Separator", &ImGui::Separator, + "Creates a separator, generally horizontal. Inside a menu bar or in horizontal layout mode, this becomes a " + "vertical separator."); + m.def("SameLine", &ImGui::SameLine, py::arg("offset_from_start_x") = 0.0f, py::arg("spacing") = -1.0f, + "Lays out widgets horizontally by undoing the last carriage return. The X position is given in window " + "coordinates."); + m.def("NewLine", &ImGui::NewLine, "Forces a new line when in a horizontal-layout context or undoes a SameLine()."); + m.def("Dummy", &ImGui::Dummy, py::arg("size"), + "Adds a dummy item of the given size. Unlike InvisibleButton(), Dummy() won't take mouse clicks or be " + "navigable."); + m.def("Unindent", &ImGui::Unindent, py::arg("indent_w") = 0.0f, + "Moves the content position back to the left by indent_w, or by style.IndentSpacing if indent_w <= 0."); + m.def("BeginGroup", &ImGui::BeginGroup, "Locks the horizontal starting position for a group of items."); + m.def("EndGroup", &ImGui::EndGroup, + "Unlocks the horizontal starting position for a group of items and captures the whole group bounding box as " + "one 'item.'"); + m.def("AlignTextToFramePadding", &ImGui::AlignTextToFramePadding, + "Vertically aligns the upcoming text baseline to FramePadding.y, so that it aligns properly with regularly " + "framed items."); + m.def("GetTextLineHeight", &ImGui::GetTextLineHeight, + "Returns the height of a text line, approximately equal to FontSize."); + m.def("GetTextLineHeightWithSpacing", &ImGui::GetTextLineHeightWithSpacing, + "Returns the height of a text line, including spacing. Approximately equal to FontSize + style.ItemSpacing.y."); + m.def("GetFrameHeight", &ImGui::GetFrameHeight, + "Returns the height of a frame, approximately equal to FontSize + style.FramePadding.y * 2."); + m.def("GetFrameHeightWithSpacing", &ImGui::GetFrameHeightWithSpacing, + "Returns the height of a frame, including spacing. Approximately equal to FontSize + style.FramePadding.y * 2 " + "+ style.ItemSpacing.y."); + m.def( + "PushID", [](const char* str_id) { ImGui::PushID(str_id); }, py::arg("str_id"), + "Pushes a string into the ID stack (will hash the string)."); + m.def( + "PushID", [](const char* str_id_begin, const char* str_id_end) { ImGui::PushID(str_id_begin, str_id_end); }, + py::arg("str_id_begin"), py::arg("str_id_end"), "Pushes a substring into the ID stack (will hash the string)."); + m.def( + "PushID", [](int int_id) { ImGui::PushID(int_id); }, py::arg("int_id"), + "Pushes an integer into the ID stack (will hash the integer)."); + m.def( + "GetID", + [](const char* str_id) { + const auto res_ = ImGui::GetID(str_id); + return res_; + }, + py::arg("str_id"), + "Calculates a unique ID by hashing the entire ID stack with the given parameter. Useful for querying " + "ImGuiStorage."); + m.def( + "GetID", + [](const char* str_id_begin, const char* str_id_end) { + const auto res_ = ImGui::GetID(str_id_begin, str_id_end); + return res_; + }, + py::arg("str_id_begin"), py::arg("str_id_end"), + "Calculates a unique ID by hashing the entire ID stack with the given substring."); + m.def( + "GetID", + [](int int_id) { + const auto res_ = ImGui::GetID(int_id); + return res_; + }, + py::arg("int_id"), "Calculates a unique ID by hashing the entire ID stack with the given integer."); + m.def("Text", [](const char* text) { ImGui::Text("%s", text); }, py::arg("text"), "Displays formatted text."); + m.def( + "TextColored", [](const ImVec4& col, const char* text) { ImGui::TextColored(col, "%s", text); }, py::arg("col"), + py::arg("text"), "Displays formatted text with the specified color."); + m.def( + "TextDisabled", [](const char* text) { ImGui::TextDisabled("%s", text); }, py::arg("text"), + "Displays formatted text in a disabled style (gray color)."); + m.def( + "TextWrapped", [](const char* text) { ImGui::TextWrapped("%s", text); }, py::arg("text"), + "Displays formatted text with word-wrapping enabled. The text will wrap at the end of the window or column by " + "default."); + m.def( + "LabelText", [](const char* label, const char* text) { ImGui::LabelText(label, "%s", text); }, py::arg("label"), + py::arg("text"), "Displays a label and value aligned in the same way as value+label widgets."); + m.def( + "BulletText", [](const char* text) { ImGui::BulletText("%s", text); }, py::arg("text"), + "Displays a bullet followed by formatted text."); + m.def("SeparatorText", &ImGui::SeparatorText, py::arg("label"), + "Displays formatted text with a horizontal line separator."); + m.def("Button", &ImGui::Button, py::arg("label"), py::arg("size") = ImVec2(0, 0), + "Creates a button with the specified label and size. Returns true when the button is pressed."); + m.def("SmallButton", &ImGui::SmallButton, py::arg("label"), + "Creates a small button with the specified label. Useful for embedding within text."); + m.def("InvisibleButton", &ImGui::InvisibleButton, py::arg("str_id"), py::arg("size"), py::arg("flags") = 0, + "Creates an invisible button with flexible behavior, frequently used to build custom behaviors using the " + "public API (along with IsItemActive, IsItemHovered, etc.)."); + m.def("ArrowButton", &ImGui::ArrowButton, py::arg("str_id"), py::arg("dir"), + "Creates a square button with an arrow shape pointing in the specified direction."); + m.def( + "Checkbox", + [](const char* label, bool v) { + bool* v_ = &v; + const auto res_ = ImGui::Checkbox(label, v_); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), + "Creates a checkbox with the specified label and boolean value. Returns true when the checkbox is clicked."); + m.def( + "CheckboxFlags", + [](const char* label, int flags, int flags_value) { + int* flags_ = &flags; + const auto res_ = ImGui::CheckboxFlags(label, flags_, flags_value); + return std::make_tuple(res_, flags); + }, + py::arg("label"), py::arg("flags"), py::arg("flags_value"), + "Creates a checkbox that toggles specific flags within an integer."); + m.def( + "RadioButton", + [](const char* label, bool active) { + const auto res_ = ImGui::RadioButton(label, active); + return res_; + }, + py::arg("label"), py::arg("active"), "Creates a radio button with the specified label and active state."); + m.def( + "RadioButton", + [](const char* label, int v, int v_button) { + int* v_ = &v; + const auto res_ = ImGui::RadioButton(label, v_, v_button); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("v_button"), + "Creates a radio button that sets the specified integer value when clicked."); + m.def( + "ProgressBar", + [](float fraction, const ImVec2& size_arg, const std::optional& overlay) { + const char* overlay_ = overlay.has_value() ? overlay.value().c_str() : nullptr; + ImGui::ProgressBar(fraction, size_arg, overlay_); + }, + py::arg("fraction"), py::arg("size_arg") = ImVec2(-FLT_MIN, 0), py::arg("overlay") = std::nullopt, + "Creates a progress bar with the specified fraction of completion, size, and optional overlay text."); + m.def("Bullet", &ImGui::Bullet, + "Draws a small circle and keeps the cursor on the same line. Advances cursor x position by " + "GetTreeNodeToLabelSpacing(), the same distance that TreeNode() uses."); + m.def("TextLink", &ImGui::TextLink, py::arg("label"), + "Creates a hyperlink-style text button that returns true when clicked."); + m.def( + "TextLinkOpenURL", + [](const char* label, const std::optional& url) { + const char* url_ = url.has_value() ? url.value().c_str() : nullptr; + ImGui::TextLinkOpenURL(label, url_); + }, + py::arg("label"), py::arg("url") = std::nullopt, + "Creates a hyperlink-style text button that automatically opens the specified URL when clicked."); + m.def("BeginCombo", &ImGui::BeginCombo, py::arg("label"), py::arg("preview_value"), py::arg("flags") = 0, + "Begins a combo box (dropdown) with the specified label and preview value. Returns true if the combo box is " + "open."); + m.def("EndCombo", &ImGui::EndCombo, "Ends a combo box. Should only be called if BeginCombo() returns true."); + m.def( + "Combo", + [](const char* label, int current_item, const std::vector& items, int popup_max_height_in_items) { + int* current_item_ = ¤t_item; + const auto items_ = convert_string_items(items); + const auto items_count = items_.size(); + const auto res_ = ImGui::Combo(label, current_item_, items_.data(), items_count, popup_max_height_in_items); + return std::make_tuple(res_, current_item); + }, + py::arg("label"), py::arg("current_item"), py::arg("items"), py::arg("popup_max_height_in_items") = -1, + "Creates a combo box (dropdown) with the specified label, current item index, and items array. Returns true if " + "the selection is changed."); + m.def( + "Combo", + [](const char* label, int current_item, const char* items_separated_by_zeros, int popup_max_height_in_items) { + int* current_item_ = ¤t_item; + const auto res_ = ImGui::Combo(label, current_item_, items_separated_by_zeros, popup_max_height_in_items); + return std::make_tuple(res_, current_item); + }, + py::arg("label"), py::arg("current_item"), py::arg("items_separated_by_zeros"), + py::arg("popup_max_height_in_items") = -1, + "Creates a combo box (dropdown) with items separated by null characters. Returns true if the selection is " + "changed."); + m.def( + "DragFloat", + [](const char* label, float v, float v_speed, float v_min, float v_max, const char* format, + ImGuiSliderFlags flags) { + float* v_ = &v; + const auto res_ = ImGui::DragFloat(label, v_, v_speed, v_min, v_max, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("v_speed") = 1.0f, py::arg("v_min") = 0.0f, py::arg("v_max") = 0.0f, + py::arg("format") = "%.3f", py::arg("flags") = 0, + "Creates a draggable float slider with the specified label, value, speed, minimum/maximum values, format string, " + "and optional flags. Returns true if the value is changed."); + m.def( + "DragFloat2", + [](const char* label, std::array v, float v_speed, float v_min, float v_max, const char* format, + ImGuiSliderFlags flags) { + const auto res_ = ImGui::DragFloat2(label, v.data(), v_speed, v_min, v_max, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("v_speed") = 1.0f, py::arg("v_min") = 0.0f, py::arg("v_max") = 0.0f, + py::arg("format") = "%.3f", py::arg("flags") = 0, + "Creates a draggable float2 slider with the specified label, value, speed, minimum/maximum values, format " + "string, and optional flags. Returns true if the value is changed."); + m.def( + "DragFloat3", + [](const char* label, std::array v, float v_speed, float v_min, float v_max, const char* format, + ImGuiSliderFlags flags) { + const auto res_ = ImGui::DragFloat3(label, v.data(), v_speed, v_min, v_max, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("v_speed") = 1.0f, py::arg("v_min") = 0.0f, py::arg("v_max") = 0.0f, + py::arg("format") = "%.3f", py::arg("flags") = 0, + "Creates a draggable float3 slider with the specified label, value, speed, minimum/maximum values, format " + "string, and optional flags. Returns true if the value is changed."); + m.def( + "DragFloat4", + [](const char* label, std::array v, float v_speed, float v_min, float v_max, const char* format, + ImGuiSliderFlags flags) { + const auto res_ = ImGui::DragFloat4(label, v.data(), v_speed, v_min, v_max, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("v_speed") = 1.0f, py::arg("v_min") = 0.0f, py::arg("v_max") = 0.0f, + py::arg("format") = "%.3f", py::arg("flags") = 0, + "Creates a draggable float4 slider with the specified label, value, speed, minimum/maximum values, format " + "string, and optional flags. Returns true if the value is changed."); + m.def( + "DragFloatRange2", + [](const char* label, float v_current_min, float v_current_max, float v_speed, float v_min, float v_max, + const char* format, const std::optional& format_max, ImGuiSliderFlags flags) { + float* v_current_min_ = &v_current_min; + float* v_current_max_ = &v_current_max; + const char* format_max_ = format_max.has_value() ? format_max.value().c_str() : nullptr; + const auto res_ = ImGui::DragFloatRange2(label, v_current_min_, v_current_max_, v_speed, v_min, v_max, format, + format_max_, flags); + return std::make_tuple(res_, v_current_min, v_current_max); + }, + py::arg("label"), py::arg("v_current_min"), py::arg("v_current_max"), py::arg("v_speed") = 1.0f, + py::arg("v_min") = 0.0f, py::arg("v_max") = 0.0f, py::arg("format") = "%.3f", + py::arg("format_max") = std::nullopt, py::arg("flags") = 0, + "Creates a draggable float range slider with the specified label, current min/max values, speed, minimum/maximum " + "values, format strings, and optional flags. Returns true if the values are changed."); + m.def( + "DragInt", + [](const char* label, int v, float v_speed, int v_min, int v_max, const char* format, ImGuiSliderFlags flags) { + int* v_ = &v; + const auto res_ = ImGui::DragInt(label, v_, v_speed, v_min, v_max, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("v_speed") = 1.0f, py::arg("v_min") = 0, py::arg("v_max") = 0, + py::arg("format") = "%d", py::arg("flags") = 0, + "Creates a draggable integer slider with the specified label, value, speed, minimum/maximum values, format " + "string, and optional flags. Returns true if the value is changed."); + m.def( + "DragInt2", + [](const char* label, std::array v, float v_speed, int v_min, int v_max, const char* format, + ImGuiSliderFlags flags) { + const auto res_ = ImGui::DragInt2(label, v.data(), v_speed, v_min, v_max, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("v_speed") = 1.0f, py::arg("v_min") = 0, py::arg("v_max") = 0, + py::arg("format") = "%d", py::arg("flags") = 0, + "Creates a draggable int2 slider with the specified label, value, speed, minimum/maximum values, format string, " + "and optional flags. Returns true if the value is changed."); + m.def( + "DragInt3", + [](const char* label, std::array v, float v_speed, int v_min, int v_max, const char* format, + ImGuiSliderFlags flags) { + const auto res_ = ImGui::DragInt3(label, v.data(), v_speed, v_min, v_max, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("v_speed") = 1.0f, py::arg("v_min") = 0, py::arg("v_max") = 0, + py::arg("format") = "%d", py::arg("flags") = 0, + "Creates a draggable int3 slider with the specified label, value, speed, minimum/maximum values, format string, " + "and optional flags. Returns true if the value is changed."); + m.def( + "DragInt4", + [](const char* label, std::array v, float v_speed, int v_min, int v_max, const char* format, + ImGuiSliderFlags flags) { + const auto res_ = ImGui::DragInt4(label, v.data(), v_speed, v_min, v_max, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("v_speed") = 1.0f, py::arg("v_min") = 0, py::arg("v_max") = 0, + py::arg("format") = "%d", py::arg("flags") = 0, + "Creates a draggable int4 slider with the specified label, value, speed, minimum/maximum values, format string, " + "and optional flags. Returns true if the value is changed."); + m.def( + "DragIntRange2", + [](const char* label, int v_current_min, int v_current_max, float v_speed, int v_min, int v_max, + const char* format, const std::optional& format_max, ImGuiSliderFlags flags) { + int* v_current_min_ = &v_current_min; + int* v_current_max_ = &v_current_max; + const char* format_max_ = format_max.has_value() ? format_max.value().c_str() : nullptr; + const auto res_ = ImGui::DragIntRange2(label, v_current_min_, v_current_max_, v_speed, v_min, v_max, format, + format_max_, flags); + return std::make_tuple(res_, v_current_min, v_current_max); + }, + py::arg("label"), py::arg("v_current_min"), py::arg("v_current_max"), py::arg("v_speed") = 1.0f, + py::arg("v_min") = 0, py::arg("v_max") = 0, py::arg("format") = "%d", py::arg("format_max") = std::nullopt, + py::arg("flags") = 0, + "Creates a draggable integer range slider with the specified label, current min/max values, speed, " + "minimum/maximum values, format strings, and optional flags. Returns true if the values are changed."); + m.def( + "SliderFloat", + [](const char* label, float v, float v_min, float v_max, const char* format, ImGuiSliderFlags flags) { + float* v_ = &v; + const auto res_ = ImGui::SliderFloat(label, v_, v_min, v_max, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("v_min"), py::arg("v_max"), py::arg("format") = "%.3f", + py::arg("flags") = 0, + "Creates a slider for floating-point values with the specified label, value, min/max range, format string, and " + "optional flags. Returns true if the value is changed."); + m.def( + "SliderFloat2", + [](const char* label, std::array v, float v_min, float v_max, const char* format, + ImGuiSliderFlags flags) { + const auto res_ = ImGui::SliderFloat2(label, v.data(), v_min, v_max, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("v_min"), py::arg("v_max"), py::arg("format") = "%.3f", + py::arg("flags") = 0, + "Creates a slider for two floating-point values with the specified label, values, min/max range, format string, " + "and optional flags. Returns true if the values are changed."); + m.def( + "SliderFloat3", + [](const char* label, std::array v, float v_min, float v_max, const char* format, + ImGuiSliderFlags flags) { + const auto res_ = ImGui::SliderFloat3(label, v.data(), v_min, v_max, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("v_min"), py::arg("v_max"), py::arg("format") = "%.3f", + py::arg("flags") = 0, + "Creates a slider for three floating-point values with the specified label, values, min/max range, format " + "string, and optional flags. Returns true if the values are changed."); + m.def( + "SliderFloat4", + [](const char* label, std::array v, float v_min, float v_max, const char* format, + ImGuiSliderFlags flags) { + const auto res_ = ImGui::SliderFloat4(label, v.data(), v_min, v_max, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("v_min"), py::arg("v_max"), py::arg("format") = "%.3f", + py::arg("flags") = 0, + "Creates a slider for four floating-point values with the specified label, values, min/max range, format string, " + "and optional flags. Returns true if the values are changed."); + m.def( + "SliderAngle", + [](const char* label, float v_rad, float v_degrees_min, float v_degrees_max, const char* format, + ImGuiSliderFlags flags) { + float* v_rad_ = &v_rad; + const auto res_ = ImGui::SliderAngle(label, v_rad_, v_degrees_min, v_degrees_max, format, flags); + return std::make_tuple(res_, v_rad); + }, + py::arg("label"), py::arg("v_rad"), py::arg("v_degrees_min") = -360.0f, py::arg("v_degrees_max") = +360.0f, + py::arg("format") = "%.0f deg", py::arg("flags") = 0, + "Creates a slider for angles with the specified label, value in radians, min/max range in degrees, format " + "string, and optional flags. Returns true if the value is changed."); + m.def( + "SliderInt", + [](const char* label, int v, int v_min, int v_max, const char* format, ImGuiSliderFlags flags) { + int* v_ = &v; + const auto res_ = ImGui::SliderInt(label, v_, v_min, v_max, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("v_min"), py::arg("v_max"), py::arg("format") = "%d", + py::arg("flags") = 0, + "Creates a slider for integer values with the specified label, value, min/max range, format string, and optional " + "flags. Returns true if the value is changed."); + m.def( + "SliderInt2", + [](const char* label, std::array v, int v_min, int v_max, const char* format, ImGuiSliderFlags flags) { + const auto res_ = ImGui::SliderInt2(label, v.data(), v_min, v_max, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("v_min"), py::arg("v_max"), py::arg("format") = "%d", + py::arg("flags") = 0, + "Creates a slider for two integer values with the specified label, values, min/max range, format string, and " + "optional flags. Returns true if the values are changed."); + m.def( + "SliderInt3", + [](const char* label, std::array v, int v_min, int v_max, const char* format, ImGuiSliderFlags flags) { + const auto res_ = ImGui::SliderInt3(label, v.data(), v_min, v_max, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("v_min"), py::arg("v_max"), py::arg("format") = "%d", + py::arg("flags") = 0, + "Creates a slider for three integer values with the specified label, values, min/max range, format string, and " + "optional flags. Returns true if the values are changed."); + m.def( + "SliderInt4", + [](const char* label, std::array v, int v_min, int v_max, const char* format, ImGuiSliderFlags flags) { + const auto res_ = ImGui::SliderInt4(label, v.data(), v_min, v_max, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("v_min"), py::arg("v_max"), py::arg("format") = "%d", + py::arg("flags") = 0, + "Creates a slider for four integer values with the specified label, values, min/max range, format string, and " + "optional flags. Returns true if the values are changed."); + m.def( + "VSliderFloat", + [](const char* label, const ImVec2& size, float v, float v_min, float v_max, const char* format, + ImGuiSliderFlags flags) { + float* v_ = &v; + const auto res_ = ImGui::VSliderFloat(label, size, v_, v_min, v_max, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("size"), py::arg("v"), py::arg("v_min"), py::arg("v_max"), py::arg("format") = "%.3f", + py::arg("flags") = 0, + "Creates a vertical slider for floating-point values with the specified label, size, value, min/max range, " + "format string, and optional flags. Returns true if the value is changed."); + m.def( + "VSliderInt", + [](const char* label, const ImVec2& size, int v, int v_min, int v_max, const char* format, + ImGuiSliderFlags flags) { + int* v_ = &v; + const auto res_ = ImGui::VSliderInt(label, size, v_, v_min, v_max, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("size"), py::arg("v"), py::arg("v_min"), py::arg("v_max"), py::arg("format") = "%d", + py::arg("flags") = 0, + "Creates a vertical slider for integer values with the specified label, size, value, min/max range, format " + "string, and optional flags. Returns true if the value is changed."); + m.def( + "InputText", + [](const char* label, const std::string& str, ImGuiInputTextFlags flags) { + auto str_ = str; + + IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); + flags |= ImGuiInputTextFlags_CallbackResize; + + const auto res_ = ImGui::InputText(label, &str_, flags); + return std::make_tuple(res_, str_); + }, + py::arg("label"), py::arg("str"), py::arg("flags") = 0, + "Creates a text input field with the specified label, buffer, buffer size, optional flags, callback, and user " + "data. Returns true if the text is changed."); + m.def( + "InputTextMultiline", + [](const char* label, const std::string& str, const ImVec2& size, ImGuiInputTextFlags flags) { + auto str_ = str; + + IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); + flags |= ImGuiInputTextFlags_CallbackResize; + + const auto res_ = ImGui::InputTextMultiline(label, &str_, size, flags); + return std::make_tuple(res_, str_); + }, + py::arg("label"), py::arg("str"), py::arg("size") = ImVec2(0, 0), py::arg("flags") = 0, + "Creates a multiline text input field with the specified label, buffer, buffer size, size, optional flags, " + "callback, and user data. Returns true if the text is changed."); + m.def( + "InputTextWithHint", + [](const char* label, const char* hint, const std::string& str, ImGuiInputTextFlags flags) { + auto str_ = str; + + IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); + flags |= ImGuiInputTextFlags_CallbackResize; + + const auto res_ = ImGui::InputTextWithHint(label, hint, &str_, flags); + return std::make_tuple(res_, str_); + }, + py::arg("label"), py::arg("hint"), py::arg("str"), py::arg("flags") = 0, + "Creates a text input field with a hint, using the specified label, hint, buffer, buffer size, optional flags, " + "callback, and user data. Returns true if the text is changed."); + m.def( + "InputFloat", + [](const char* label, float v, float step, float step_fast, const char* format, ImGuiInputTextFlags flags) { + float* v_ = &v; + + IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); + flags |= ImGuiInputTextFlags_CallbackResize; + + const auto res_ = ImGui::InputFloat(label, v_, step, step_fast, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("step") = 0.0f, py::arg("step_fast") = 0.0f, py::arg("format") = "%.3f", + py::arg("flags") = 0, + "Creates a text input field for floating-point values with the specified label, value, optional step, fast step, " + "format string, and flags. Returns true if the value is changed."); + m.def( + "InputFloat2", + [](const char* label, std::array v, const char* format, ImGuiInputTextFlags flags) { + IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); + flags |= ImGuiInputTextFlags_CallbackResize; + + const auto res_ = ImGui::InputFloat2(label, v.data(), format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("format") = "%.3f", py::arg("flags") = 0, + "Creates a text input field for two floating-point values with the specified label, values, format string, and " + "optional flags. Returns true if the values are changed."); + m.def( + "InputFloat3", + [](const char* label, std::array v, const char* format, ImGuiInputTextFlags flags) { + IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); + flags |= ImGuiInputTextFlags_CallbackResize; + + const auto res_ = ImGui::InputFloat3(label, v.data(), format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("format") = "%.3f", py::arg("flags") = 0, + "Creates a text input field for three floating-point values with the specified label, values, format string, and " + "optional flags. Returns true if the values are changed."); + m.def( + "InputFloat4", + [](const char* label, std::array v, const char* format, ImGuiInputTextFlags flags) { + IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); + flags |= ImGuiInputTextFlags_CallbackResize; + + const auto res_ = ImGui::InputFloat4(label, v.data(), format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("format") = "%.3f", py::arg("flags") = 0, + "Creates a text input field for four floating-point values with the specified label, values, format string, and " + "optional flags. Returns true if the values are changed."); + m.def( + "InputInt", + [](const char* label, int v, int step, int step_fast, ImGuiInputTextFlags flags) { + int* v_ = &v; + + IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); + flags |= ImGuiInputTextFlags_CallbackResize; + + const auto res_ = ImGui::InputInt(label, v_, step, step_fast, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("step") = 1, py::arg("step_fast") = 100, py::arg("flags") = 0, + "Creates a text input field for integer values with the specified label, value, optional step, fast step, and " + "flags. Returns true if the value is changed."); + m.def( + "InputInt2", + [](const char* label, std::array v, ImGuiInputTextFlags flags) { + IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); + flags |= ImGuiInputTextFlags_CallbackResize; + + const auto res_ = ImGui::InputInt2(label, v.data(), flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("flags") = 0, + "Creates a text input field for two integer values with the specified label, values, and optional flags. Returns " + "true if the values are changed."); + m.def( + "InputInt3", + [](const char* label, std::array v, ImGuiInputTextFlags flags) { + IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); + flags |= ImGuiInputTextFlags_CallbackResize; + + const auto res_ = ImGui::InputInt3(label, v.data(), flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("flags") = 0, + "Creates a text input field for three integer values with the specified label, values, and optional flags. " + "Returns true if the values are changed."); + m.def( + "InputInt4", + [](const char* label, std::array v, ImGuiInputTextFlags flags) { + IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); + flags |= ImGuiInputTextFlags_CallbackResize; + + const auto res_ = ImGui::InputInt4(label, v.data(), flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("flags") = 0, + "Creates a text input field for four integer values with the specified label, values, and optional flags. " + "Returns true if the values are changed."); + m.def( + "InputDouble", + [](const char* label, double v, double step, double step_fast, const char* format, ImGuiInputTextFlags flags) { + double* v_ = &v; + + IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); + flags |= ImGuiInputTextFlags_CallbackResize; + + const auto res_ = ImGui::InputDouble(label, v_, step, step_fast, format, flags); + return std::make_tuple(res_, v); + }, + py::arg("label"), py::arg("v"), py::arg("step") = 0.0, py::arg("step_fast") = 0.0, py::arg("format") = "%.6f", + py::arg("flags") = 0, + "Creates a text input field for double values with the specified label, value, optional step, fast step, format " + "string, and flags. Returns true if the value is changed."); + m.def( + "ColorEdit3", + [](const char* label, std::array col, ImGuiColorEditFlags flags) { + const auto res_ = ImGui::ColorEdit3(label, col.data(), flags); + return std::make_tuple(res_, col); + }, + py::arg("label"), py::arg("col"), py::arg("flags") = 0, + "Edits an RGB color value with an optional set of flags. Returns true if the color was changed."); + m.def( + "ColorEdit4", + [](const char* label, std::array col, ImGuiColorEditFlags flags) { + const auto res_ = ImGui::ColorEdit4(label, col.data(), flags); + return std::make_tuple(res_, col); + }, + py::arg("label"), py::arg("col"), py::arg("flags") = 0, + "Edits an RGBA color value with an optional set of flags. Returns true if the color was changed."); + m.def( + "ColorPicker3", + [](const char* label, std::array col, ImGuiColorEditFlags flags) { + const auto res_ = ImGui::ColorPicker3(label, col.data(), flags); + return std::make_tuple(res_, col); + }, + py::arg("label"), py::arg("col"), py::arg("flags") = 0, + "Displays a color picker for an RGB color value with an optional set of flags. Returns true if the color was " + "changed."); + m.def( + "ColorPicker4", + [](const char* label, std::array col, ImGuiColorEditFlags flags, + const std::optional>& ref_col) { + const float* ref_col_ = ref_col ? &ref_col.value()[0] : nullptr; + const auto res_ = ImGui::ColorPicker4(label, col.data(), flags, ref_col_); + return std::make_tuple(res_, col); + }, + py::arg("label"), py::arg("col"), py::arg("flags") = 0, py::arg("ref_col") = std::nullopt, + "Displays a color picker for an RGBA color value with an optional set of flags and reference color. Returns true " + "if the color was changed."); + m.def("ColorButton", &ImGui::ColorButton, py::arg("desc_id"), py::arg("col"), py::arg("flags") = 0, + py::arg("size") = ImVec2(0, 0), + "Displays a color square/button with the specified color, size, and flags. Returns true if the button was " + "pressed."); + m.def("SetColorEditOptions", &ImGui::SetColorEditOptions, py::arg("flags"), + "Sets the color edit options, typically called during application startup. Allows selecting a default format, " + "picker type, etc."); + m.def( + "TreeNode", + [](const char* label) { + const auto res_ = ImGui::TreeNode(label); + return res_; + }, + py::arg("label"), + "Creates a tree node with the specified label. Returns true if the node is open, in which case TreePop() should " + "be called to close it."); + m.def( + "TreeNodeEx", + [](const char* label, ImGuiTreeNodeFlags flags) { + const auto res_ = ImGui::TreeNodeEx(label, flags); + return res_; + }, + py::arg("label"), py::arg("flags") = 0, + "Creates an extended tree node with the specified label and flags. Returns true if the node is open."); + m.def( + "TreePush", [](const char* str_id) { ImGui::TreePush(str_id); }, py::arg("str_id"), + "Pushes a string into the tree node stack, increasing the indentation level."); + m.def("TreePop", &ImGui::TreePop, + "Pops the last element from the tree node stack, decreasing the indentation level."); + m.def("GetTreeNodeToLabelSpacing", &ImGui::GetTreeNodeToLabelSpacing, + "Returns the horizontal distance preceding the label when using TreeNode() or Bullet()."); + m.def( + "CollapsingHeader", + [](const char* label, ImGuiTreeNodeFlags flags) { + const auto res_ = ImGui::CollapsingHeader(label, flags); + return res_; + }, + py::arg("label"), py::arg("flags") = 0, + "Creates a collapsible header with the specified label and flags. Returns true if the header is open."); + m.def( + "CollapsingHeader", + [](const char* label, bool p_visible, ImGuiTreeNodeFlags flags) { + bool* p_visible_ = &p_visible; + const auto res_ = ImGui::CollapsingHeader(label, p_visible_, flags); + return std::make_tuple(res_, p_visible); + }, + py::arg("label"), py::arg("p_visible"), py::arg("flags") = 0, + "Creates a collapsible header with the specified label, visibility flag, and flags. Returns true if the header " + "is open."); + m.def("SetNextItemOpen", &ImGui::SetNextItemOpen, py::arg("is_open"), py::arg("cond") = 0, + "Sets the next TreeNode or CollapsingHeader open state."); + m.def( + "Selectable", + [](const char* label, bool selected, ImGuiSelectableFlags flags, const ImVec2& size) { + const auto res_ = ImGui::Selectable(label, selected, flags, size); + return res_; + }, + py::arg("label"), py::arg("selected") = false, py::arg("flags") = 0, py::arg("size") = ImVec2(0, 0), + "Creates a selectable item with the specified label, selection state, flags, and size. Returns true if the item " + "is clicked."); + m.def( + "Selectable", + [](const char* label, bool p_selected, ImGuiSelectableFlags flags, const ImVec2& size) { + bool* p_selected_ = &p_selected; + const auto res_ = ImGui::Selectable(label, p_selected_, flags, size); + return std::make_tuple(res_, p_selected); + }, + py::arg("label"), py::arg("p_selected"), py::arg("flags") = 0, py::arg("size") = ImVec2(0, 0), + "Creates a selectable item with the specified label, pointer to the selection state, flags, and size. Returns " + "true if the item is clicked."); + m.def("IsItemToggledSelection", &ImGui::IsItemToggledSelection, + "Checks if the selection state of the last item was toggled. Useful for retrieving per-item information before " + "reaching EndMultiSelect."); + m.def("BeginListBox", &ImGui::BeginListBox, py::arg("label"), py::arg("size") = ImVec2(0, 0), + "Opens a framed scrolling region for a list box with the specified label and size."); + m.def("EndListBox", &ImGui::EndListBox, + "Ends the list box opened by BeginListBox. Should be called only if BeginListBox returned true."); + m.def( + "ListBox", + [](const char* label, int current_item, const std::vector& items, int items_count, + int height_in_items) { + int* current_item_ = ¤t_item; + const auto items_ = convert_string_items(items); + const auto res_ = ImGui::ListBox(label, current_item_, items_.data(), items_count, height_in_items); + return std::make_tuple(res_, current_item); + }, + py::arg("label"), py::arg("current_item"), py::arg("items"), py::arg("items_count"), + py::arg("height_in_items") = -1, + "Displays a list box with the specified label, current item index, items array, item count, and optional height " + "in items. Returns true if the current item was changed."); + m.def( + "Value", [](const char* prefix, bool b) { ImGui::Value(prefix, b); }, py::arg("prefix"), py::arg("b"), + "Displays a boolean value with a prefix in the format \"prefix: value\"."); + m.def( + "Value", [](const char* prefix, int v) { ImGui::Value(prefix, v); }, py::arg("prefix"), py::arg("v"), + "Displays an integer value with a prefix in the format \"prefix: value\"."); + m.def( + "Value", + [](const char* prefix, float v, const std::optional& float_format) { + const char* float_format_ = float_format.has_value() ? float_format.value().c_str() : nullptr; + ImGui::Value(prefix, v, float_format_); + }, + py::arg("prefix"), py::arg("v"), py::arg("float_format") = std::nullopt, + "Displays a floating-point value with a prefix in the format \"prefix: value\". Optionally specify the format " + "for the float."); + m.def("BeginMenuBar", &ImGui::BeginMenuBar, + "Appends to the menu bar of the current window. Requires ImGuiWindowFlags_MenuBar flag to be set on the parent " + "window."); + m.def("EndMenuBar", &ImGui::EndMenuBar, "Ends the menu bar. Should be called only if BeginMenuBar() returned true."); + m.def("BeginMainMenuBar", &ImGui::BeginMainMenuBar, "Creates and appends to a full-screen menu bar."); + m.def("EndMainMenuBar", &ImGui::EndMainMenuBar, + "Ends the main menu bar. Should be called only if BeginMainMenuBar() returned true."); + m.def("BeginMenu", &ImGui::BeginMenu, py::arg("label"), py::arg("enabled") = true, + "Creates a sub-menu entry. Should call EndMenu() if this returns true."); + m.def("EndMenu", &ImGui::EndMenu, + "Ends the menu created by BeginMenu(). Should be called only if BeginMenu() returned true."); + m.def( + "MenuItem", + [](const char* label, const std::optional& shortcut, bool selected, bool enabled) { + const char* shortcut_ = shortcut.has_value() ? shortcut.value().c_str() : nullptr; + const auto res_ = ImGui::MenuItem(label, shortcut_, selected, enabled); + return res_; + }, + py::arg("label"), py::arg("shortcut") = std::nullopt, py::arg("selected") = false, py::arg("enabled") = true, + "Creates a menu item with an optional shortcut, selection state, and enabled state. Returns true when " + "activated."); + m.def( + "MenuItem", + [](const char* label, const char* shortcut, bool p_selected, bool enabled) { + bool* p_selected_ = &p_selected; + const auto res_ = ImGui::MenuItem(label, shortcut, p_selected_, enabled); + return std::make_tuple(res_, p_selected); + }, + py::arg("label"), py::arg("shortcut"), py::arg("p_selected"), py::arg("enabled") = true, + "Creates a menu item with an optional shortcut and enabled state, and toggles the selection state if p_selected " + "is not NULL. Returns true when activated."); + m.def("BeginTooltip", &ImGui::BeginTooltip, + "Begins a tooltip window. Should call EndTooltip() if this returns true."); + m.def("EndTooltip", &ImGui::EndTooltip, + "Ends the tooltip window. Should be called only if BeginTooltip() or BeginItemTooltip() returned true."); + m.def( + "SetTooltip", [](const char* text) { ImGui::SetTooltip("%s", text); }, py::arg("text"), + "Sets a text-only tooltip. Often used after a call to ImGui::IsItemHovered()."); + m.def("BeginItemTooltip", &ImGui::BeginItemTooltip, + "Begins a tooltip window if the preceding item was hovered. Should call EndTooltip() if this returns true."); + m.def( + "SetItemTooltip", [](const char* text) { ImGui::SetItemTooltip("%s", text); }, py::arg("text"), + "Sets a text-only tooltip if the preceding item was hovered."); + m.def("BeginPopup", &ImGui::BeginPopup, py::arg("str_id"), py::arg("flags") = 0, + "Begins a popup window with the specified ID and flags. Should call EndPopup() if this returns true."); + m.def( + "BeginPopupModal", + [](const char* name, std::optional open, ImGuiWindowFlags flags) { + bool* p_open = open.has_value() ? &open.value() : nullptr; + const auto res_ = ImGui::BeginPopupModal(name, p_open, flags); + return std::make_tuple(res_, open); + }, + py::arg("name"), py::arg("open") = std::nullopt, py::arg("flags") = 0, + "Begins a modal popup window with the specified name and flags. Should call EndPopup() if this returns true."); + m.def("EndPopup", &ImGui::EndPopup, + "Ends a popup window. Should be called only if BeginPopup() or BeginPopupModal() returned true."); + m.def( + "OpenPopup", [](const char* str_id, ImGuiPopupFlags popup_flags) { ImGui::OpenPopup(str_id, popup_flags); }, + py::arg("str_id"), py::arg("popup_flags") = 0, "Marks the popup as open. Should not be called every frame."); + m.def( + "OpenPopup", [](ImGuiID id, ImGuiPopupFlags popup_flags) { ImGui::OpenPopup(id, popup_flags); }, py::arg("id"), + py::arg("popup_flags") = 0, + "Marks the popup with the specified ID as open, facilitating calling from nested stacks."); + m.def( + "OpenPopupOnItemClick", + [](const std::optional& str_id, ImGuiPopupFlags popup_flags) { + const char* str_id_ = str_id.has_value() ? str_id.value().c_str() : nullptr; + ImGui::OpenPopupOnItemClick(str_id_, popup_flags); + }, + py::arg("str_id") = std::nullopt, py::arg("popup_flags") = 1, + "Helper to open a popup when clicked on the last item. Defaults to right mouse button click."); + m.def("CloseCurrentPopup", &ImGui::CloseCurrentPopup, "Manually closes the current popup."); + m.def( + "BeginPopupContextItem", + [](const std::optional& str_id, ImGuiPopupFlags popup_flags) { + const char* str_id_ = str_id.has_value() ? str_id.value().c_str() : nullptr; + const auto res_ = ImGui::BeginPopupContextItem(str_id_, popup_flags); + return res_; + }, + py::arg("str_id") = std::nullopt, py::arg("popup_flags") = 1, + "Opens and begins a popup when clicked on the last item. Returns true if the popup is open."); + m.def( + "BeginPopupContextWindow", + [](const std::optional& str_id, ImGuiPopupFlags popup_flags) { + const char* str_id_ = str_id.has_value() ? str_id.value().c_str() : nullptr; + const auto res_ = ImGui::BeginPopupContextWindow(str_id_, popup_flags); + return res_; + }, + py::arg("str_id") = std::nullopt, py::arg("popup_flags") = 1, + "Opens and begins a popup when clicked on the current window. Returns true if the popup is open."); + m.def( + "BeginPopupContextVoid", + [](const std::optional& str_id, ImGuiPopupFlags popup_flags) { + const char* str_id_ = str_id.has_value() ? str_id.value().c_str() : nullptr; + const auto res_ = ImGui::BeginPopupContextVoid(str_id_, popup_flags); + return res_; + }, + py::arg("str_id") = std::nullopt, py::arg("popup_flags") = 1, + "Opens and begins a popup when clicked in a void area (where there are no windows). Returns true if the popup is " + "open."); + m.def("IsPopupOpen", &ImGui::IsPopupOpen, py::arg("str_id"), py::arg("flags") = 0, + "Returns true if the popup with the specified ID is open."); + m.def("BeginTable", &ImGui::BeginTable, py::arg("str_id"), py::arg("columns"), py::arg("flags") = 0, + py::arg("outer_size") = ImVec2(0.0f, 0.0f), py::arg("inner_width") = 0.0f, + "Begins a table with the specified number of columns and options. Returns true if the table is successfully " + "created."); + m.def("EndTable", &ImGui::EndTable, + "Ends the table created by BeginTable(). Should be called only if BeginTable() returned true."); + m.def("TableNextColumn", &ImGui::TableNextColumn, + "Appends into the next column (or the first column of the next row if currently in the last column). Returns " + "true when the column is visible."); + m.def("TableSetColumnIndex", &ImGui::TableSetColumnIndex, py::arg("column_n"), + "Sets the current column index for the next item in the table."); + m.def( + "TableSetupColumn", &ImGui::TableSetupColumn, py::arg("label"), py::arg("flags") = 0, + py::arg("init_width_or_weight") = 0.0f, py::arg("user_id") = 0, + "Sets up a column in a table. You can provide a label, flags, initial width or weight, and an optional user ID."); + m.def("TableSetupScrollFreeze", &ImGui::TableSetupScrollFreeze, py::arg("cols"), py::arg("rows"), + "Freezes the specified number of columns and rows, keeping them visible when the table is scrolled."); + m.def("TableHeader", &ImGui::TableHeader, py::arg("label"), "Submits a single header cell manually, rarely used."); + m.def("TableHeadersRow", &ImGui::TableHeadersRow, + "Submits a row with header cells based on data provided to TableSetupColumn(). Also submits the context menu."); + m.def("TableAngledHeadersRow", &ImGui::TableAngledHeadersRow, + "Submits a row with angled headers for columns marked with the ImGuiTableColumnFlags_AngledHeader flag. This " + "must be the first row."); + m.def("TableGetColumnCount", &ImGui::TableGetColumnCount, "Returns the number of columns in the current table."); + m.def("TableGetColumnIndex", &ImGui::TableGetColumnIndex, "Returns the current column index."); + m.def("TableGetRowIndex", &ImGui::TableGetRowIndex, "Returns the current row index."); + m.def("TableGetColumnName", &ImGui::TableGetColumnName, py::arg("column_n") = -1, + "Returns the name of the column specified by column_n. Pass -1 to use the current column."); + m.def("TableGetColumnFlags", &ImGui::TableGetColumnFlags, py::arg("column_n") = -1, + "Returns the flags associated with the specified column, or the current column if column_n is -1."); + m.def("TableSetColumnEnabled", &ImGui::TableSetColumnEnabled, py::arg("column_n"), py::arg("v"), + "Changes the enabled/disabled state of a column. Set to false to hide the column."); + m.def("TableGetHoveredColumn", &ImGui::TableGetHoveredColumn, + "Returns the index of the hovered column, or -1 if no column is hovered."); + m.def("TableSetBgColor", &ImGui::TableSetBgColor, py::arg("target"), py::arg("color"), py::arg("column_n") = -1, + "Sets the background color for a cell, row, or column. See ImGuiTableBgTarget_ flags for details."); + m.def( + "Columns", + [](int count, const std::optional& id, bool border) { + const char* id_ = id.has_value() ? id.value().c_str() : nullptr; + ImGui::Columns(count, id_, border); + }, + py::arg("count") = 1, py::arg("id") = std::nullopt, py::arg("border") = true, + "Legacy columns API. Sets up a number of columns. Use Tables instead for new implementations."); + m.def("NextColumn", &ImGui::NextColumn, + "Moves to the next column in the current row, or to the first column of the next row if the current row is " + "finished."); + m.def("GetColumnIndex", &ImGui::GetColumnIndex, "Returns the current column index in the legacy Columns API."); + m.def("GetColumnWidth", &ImGui::GetColumnWidth, py::arg("column_index") = -1, + "Returns the width of the specified column in pixels, or the current column if column_index is -1."); + m.def("SetColumnWidth", &ImGui::SetColumnWidth, py::arg("column_index"), py::arg("width"), + "Sets the width of the specified column in pixels."); + m.def("GetColumnOffset", &ImGui::GetColumnOffset, py::arg("column_index") = -1, + "Gets the position of the column line in pixels from the left side of the content region."); + m.def("SetColumnOffset", &ImGui::SetColumnOffset, py::arg("column_index"), py::arg("offset_x"), + "Sets the position of the column line in pixels from the left side of the content region."); + m.def("GetColumnsCount", &ImGui::GetColumnsCount, "Returns the number of columns in the legacy Columns API."); + m.def("BeginTabBar", &ImGui::BeginTabBar, py::arg("str_id"), py::arg("flags") = 0, + "Begins a tab bar. Returns true if the tab bar is successfully created."); + m.def("EndTabBar", &ImGui::EndTabBar, + "Ends the tab bar created by BeginTabBar(). Should be called only if BeginTabBar() returned true."); + m.def( + "BeginTabItem", + [](const char* label, std::optional open, ImGuiTabItemFlags flags) { + bool* p_open = open.has_value() ? &open.value() : nullptr; + const auto res_ = ImGui::BeginTabItem(label, p_open, flags); + return std::make_tuple(res_, open); + }, + py::arg("label"), py::arg("open") = std::nullopt, py::arg("flags") = 0, + "Begins a tab item. Returns true if the tab is selected."); + m.def("EndTabItem", &ImGui::EndTabItem, + "Ends the tab item created by BeginTabItem(). Should be called only if BeginTabItem() returned true."); + m.def("TabItemButton", &ImGui::TabItemButton, py::arg("label"), py::arg("flags") = 0, + "Creates a tab that behaves like a button. Returns true when clicked."); + m.def("SetTabItemClosed", &ImGui::SetTabItemClosed, py::arg("tab_or_docked_window_label"), + "Notifies the TabBar or Docking system of a closed tab or window ahead of time. This is useful to reduce " + "visual flicker on reorderable tab bars."); + m.def("LogToTTY", &ImGui::LogToTTY, py::arg("auto_open_depth") = -1, + "Starts logging output to the terminal (stdout)."); + m.def( + "LogToFile", + [](int auto_open_depth, const std::optional& filename) { + const char* filename_ = filename.has_value() ? filename.value().c_str() : nullptr; + ImGui::LogToFile(auto_open_depth, filename_); + }, + py::arg("auto_open_depth") = -1, py::arg("filename") = std::nullopt, + "Starts logging output to a file. If filename is NULL, the log is written to 'imgui_log.txt'."); + m.def("LogToClipboard", &ImGui::LogToClipboard, py::arg("auto_open_depth") = -1, + "Starts logging output to the OS clipboard."); + m.def("LogFinish", &ImGui::LogFinish, "Stops logging and closes any file or clipboard output."); + m.def("LogButtons", &ImGui::LogButtons, "Helper function to display buttons for logging to tty, file, or clipboard."); + m.def( + "LogText", [](const char* text) { ImGui::LogText("%s", text); }, py::arg("text"), + "Logs formatted text directly to the current log output without displaying it on the screen."); + m.def("BeginDragDropSource", &ImGui::BeginDragDropSource, py::arg("flags") = 0, + "Starts a drag-and-drop source. If this returns true, you should call SetDragDropPayload() and " + "EndDragDropSource()."); + m.def( + "SetDragDropPayload", + [](const char* type, py::bytes& data, ImGuiCond cond) { + void* data_ = PyBytes_AsString(data.ptr()); + const auto data_size = PyBytes_Size(data.ptr()); + const auto res_ = ImGui::SetDragDropPayload(type, data_, data_size, cond); + return res_; + }, + py::arg("type"), py::arg("data"), py::arg("cond") = 0, + "Sets the payload data for the current drag-and-drop operation. The type is a user-defined string."); + m.def("EndDragDropSource", &ImGui::EndDragDropSource, + "Ends a drag-and-drop source operation. Should be called only if BeginDragDropSource() returns true."); + m.def("BeginDragDropTarget", &ImGui::BeginDragDropTarget, + "Marks an item as a possible drag-and-drop target. If this returns true, you can call AcceptDragDropPayload() " + "and EndDragDropTarget()."); + m.def( + "AcceptDragDropPayload", + [](const char* type, ImGuiDragDropFlags flags) { + const auto* payload = ImGui::AcceptDragDropPayload(type, flags); + return py::bytes(static_cast(payload->Data), payload->DataSize); + }, + py::arg("type"), py::arg("flags") = 0, + "Accepts the drag-and-drop payload if it matches the specified type. Returns the payload data if accepted."); + m.def("EndDragDropTarget", &ImGui::EndDragDropTarget, + "Ends a drag-and-drop target operation. Should be called only if BeginDragDropTarget() returns true."); + m.def( + "GetDragDropPayload", + []() { + const auto* payload = ImGui::GetDragDropPayload(); + return py::bytes(static_cast(payload->Data), payload->DataSize); + }, + "Peeks directly into the current drag-and-drop payload from anywhere. Returns NULL if drag-and-drop is " + "inactive."); + m.def("BeginDisabled", &ImGui::BeginDisabled, py::arg("disabled") = true, + "Disables user interactions and dims item visuals. Can be nested."); + m.def("EndDisabled", &ImGui::EndDisabled, "Ends the disabled section started by BeginDisabled()."); + m.def("PushClipRect", &ImGui::PushClipRect, py::arg("clip_rect_min"), py::arg("clip_rect_max"), + py::arg("intersect_with_current_clip_rect"), + "Pushes a clipping rectangle onto the stack. Mouse hovering is affected by this call."); + m.def("PopClipRect", &ImGui::PopClipRect, "Pops the last clipping rectangle from the stack."); + m.def("SetItemDefaultFocus", &ImGui::SetItemDefaultFocus, + "Sets the last item as the default focused item of a window."); + m.def("SetKeyboardFocusHere", &ImGui::SetKeyboardFocusHere, py::arg("offset") = 0, + "Focuses the keyboard on the next widget. Positive offset can be used to access sub-components, and -1 to " + "access the previous widget."); + m.def("SetNextItemAllowOverlap", &ImGui::SetNextItemAllowOverlap, "Allows the next item to overlap with others."); + m.def("IsItemHovered", &ImGui::IsItemHovered, py::arg("flags") = 0, + "Checks if the last item is hovered and usable. Can be customized with ImGuiHoveredFlags."); + m.def("IsItemActive", &ImGui::IsItemActive, + "Checks if the last item is active (e.g., button being held, text field being edited)."); + m.def("IsItemFocused", &ImGui::IsItemFocused, + "Checks if the last item is focused for keyboard or gamepad navigation."); + m.def("IsItemClicked", &ImGui::IsItemClicked, py::arg("mouse_button") = 0, + "Checks if the last item is hovered and clicked with the specified mouse button."); + m.def("IsItemVisible", &ImGui::IsItemVisible, + "Checks if the last item is visible (i.e., not clipped or scrolled out of view)."); + m.def("IsItemEdited", &ImGui::IsItemEdited, + "Checks if the last item modified its underlying value or was pressed during this frame."); + m.def("IsItemActivated", &ImGui::IsItemActivated, + "Checks if the last item was just made active (previously inactive)."); + m.def("IsItemDeactivated", &ImGui::IsItemDeactivated, + "Checks if the last item was just made inactive (previously active). Useful for Undo/Redo patterns."); + m.def("IsItemDeactivatedAfterEdit", &ImGui::IsItemDeactivatedAfterEdit, + "Checks if the last item was just made inactive and modified its value while active. Useful for Undo/Redo " + "patterns."); + m.def("IsItemToggledOpen", &ImGui::IsItemToggledOpen, + "Checks if the last item's open state was toggled (e.g., TreeNode())."); + m.def("IsAnyItemHovered", &ImGui::IsAnyItemHovered, "Checks if any item is currently hovered."); + m.def("IsAnyItemActive", &ImGui::IsAnyItemActive, "Checks if any item is currently active."); + m.def("IsAnyItemFocused", &ImGui::IsAnyItemFocused, "Checks if any item is currently focused."); + m.def("GetItemID", &ImGui::GetItemID, "Returns the ID of the last item."); + m.def("GetItemRectMin", &ImGui::GetItemRectMin, + "Returns the upper-left bounding rectangle of the last item in screen space."); + m.def("GetItemRectMax", &ImGui::GetItemRectMax, + "Returns the lower-right bounding rectangle of the last item in screen space."); + m.def("GetItemRectSize", &ImGui::GetItemRectSize, "Returns the size of the last item."); + m.def( + "IsRectVisible", + [](const ImVec2& size) { + const auto res_ = ImGui::IsRectVisible(size); + return res_; + }, + py::arg("size"), + "Checks if a rectangle (starting from the cursor position) of the given size is visible and not clipped."); + m.def( + "IsRectVisible", + [](const ImVec2& rect_min, const ImVec2& rect_max) { + const auto res_ = ImGui::IsRectVisible(rect_min, rect_max); + return res_; + }, + py::arg("rect_min"), py::arg("rect_max"), + "Checks if a rectangle defined by rect_min and rect_max is visible and not clipped."); + m.def("GetTime", &ImGui::GetTime, "Returns the global ImGui time, incremented by io.DeltaTime every frame."); + m.def("GetStyleColorName", &ImGui::GetStyleColorName, py::arg("idx"), + "Returns a string representing the enum value of a style color."); + m.def( + "ColorConvertRGBtoHSV", + [](const std::tuple& rgb) { + float out0, out1, out2; + ImGui::ColorConvertRGBtoHSV(std::get<0>(rgb), std::get<1>(rgb), std::get<2>(rgb), out0, out1, out2); + return std::make_tuple(out0, out1, out2); + }, + py::arg("rgb"), "Converts RGB color values to HSV."); + m.def( + "ColorConvertHSVtoRGB", + [](const std::tuple& hsv) { + float out0, out1, out2; + ImGui::ColorConvertHSVtoRGB(std::get<0>(hsv), std::get<1>(hsv), std::get<2>(hsv), out0, out1, out2); + return std::make_tuple(out0, out1, out2); + }, + py::arg("hsv"), "Converts HSV color values to RGB."); + m.def("IsKeyDown", &ImGui::IsKeyDown, py::arg("key"), "Checks if a key is being held down."); + m.def("IsKeyPressed", &ImGui::IsKeyPressed, py::arg("key"), py::arg("repeat") = true, + "Checks if a key was pressed (transitioned from not pressed to pressed). If repeat is true, considers " + "io.KeyRepeatDelay / KeyRepeatRate."); + m.def("IsKeyReleased", &ImGui::IsKeyReleased, py::arg("key"), + "Checks if a key was released (transitioned from pressed to not pressed)."); + m.def("IsKeyChordPressed", &ImGui::IsKeyChordPressed, py::arg("key_chord"), + "Checks if a key chord (combination of modifiers and a key) was pressed."); + m.def("GetKeyPressedAmount", &ImGui::GetKeyPressedAmount, py::arg("key"), py::arg("repeat_delay"), py::arg("rate"), + "Returns the number of times a key has been pressed considering the provided repeat rate and delay."); + m.def("GetKeyName", &ImGui::GetKeyName, py::arg("key"), "[DEBUG] Returns the English name of the key."); + m.def("SetNextFrameWantCaptureKeyboard", &ImGui::SetNextFrameWantCaptureKeyboard, py::arg("want_capture_keyboard"), + "Overrides the io.WantCaptureKeyboard flag for the next frame."); + m.def("Shortcut", &ImGui::Shortcut, py::arg("key_chord"), py::arg("flags") = 0, + "Submits a shortcut route, and returns true if the shortcut is currently active and routed."); + m.def("SetNextItemShortcut", &ImGui::SetNextItemShortcut, py::arg("key_chord"), py::arg("flags") = 0, + "Sets the shortcut for the next item."); + m.def("SetItemKeyOwner", &ImGui::SetItemKeyOwner, py::arg("key"), + "Sets the key owner to the last item ID if it is hovered or active."); + m.def("IsMouseDown", &ImGui::IsMouseDown, py::arg("button"), "Checks if a mouse button is being held down."); + m.def("IsMouseClicked", &ImGui::IsMouseClicked, py::arg("button"), py::arg("repeat") = false, + "Checks if a mouse button was clicked (transitioned from not pressed to pressed)."); + m.def("IsMouseReleased", &ImGui::IsMouseReleased, py::arg("button"), + "Checks if a mouse button was released (transitioned from pressed to not pressed)."); + m.def("IsMouseDoubleClicked", &ImGui::IsMouseDoubleClicked, py::arg("button"), + "Checks if a mouse button was double-clicked."); + m.def("GetMouseClickedCount", &ImGui::GetMouseClickedCount, py::arg("button"), + "Returns the number of successive clicks of a mouse button."); + m.def("IsMouseHoveringRect", &ImGui::IsMouseHoveringRect, py::arg("r_min"), py::arg("r_max"), py::arg("clip") = true, + "Checks if the mouse is hovering a given bounding rectangle in screen space."); + m.def( + "IsMousePosValid", + [](const std::optional& mouse_pos) { + const ImVec2* mouse_pos_ = mouse_pos.has_value() ? &mouse_pos.value() : nullptr; + const auto res_ = ImGui::IsMousePosValid(mouse_pos_); + return res_; + }, + py::arg("mouse_pos") = std::nullopt, "Checks if the mouse position is valid."); + m.def("IsAnyMouseDown", &ImGui::IsAnyMouseDown, "Checks if any mouse button is being held down."); + m.def("IsMouseDragging", &ImGui::IsMouseDragging, py::arg("button"), py::arg("lock_threshold") = -1.0f, + "Checks if the mouse is dragging (moving while holding a button down)."); + m.def("GetMouseDragDelta", &ImGui::GetMouseDragDelta, py::arg("button") = 0, py::arg("lock_threshold") = -1.0f, + "Returns the delta (change in position) from the initial click position while dragging."); + m.def("ResetMouseDragDelta", &ImGui::ResetMouseDragDelta, py::arg("button") = 0, + "Resets the mouse drag delta for the specified button."); + m.def("GetMouseCursor", &ImGui::GetMouseCursor, "Returns the current desired mouse cursor shape."); + m.def("SetMouseCursor", &ImGui::SetMouseCursor, py::arg("cursor_type"), "Sets the desired mouse cursor shape."); + m.def("SetNextFrameWantCaptureMouse", &ImGui::SetNextFrameWantCaptureMouse, py::arg("want_capture_mouse"), + "Overrides the io.WantCaptureMouse flag for the next frame."); + m.def("GetClipboardText", &ImGui::GetClipboardText, "Returns the text currently in the clipboard."); + m.def("LoadIniSettingsFromDisk", &ImGui::LoadIniSettingsFromDisk, py::arg("ini_filename"), + "Loads ini settings from the specified file."); + m.def("SaveIniSettingsToDisk", &ImGui::SaveIniSettingsToDisk, py::arg("ini_filename"), + "Saves ini settings to the specified file."); + m.def("DebugTextEncoding", &ImGui::DebugTextEncoding, py::arg("text"), "Debugs the text encoding."); + m.def("DebugFlashStyleColor", &ImGui::DebugFlashStyleColor, py::arg("idx"), "Debugs by flashing a style color."); + m.def("DebugStartItemPicker", &ImGui::DebugStartItemPicker, "Starts the item picker for debugging."); + m.def("DebugCheckVersionAndDataLayout", &ImGui::DebugCheckVersionAndDataLayout, py::arg("version_str"), + py::arg("sz_io"), py::arg("sz_style"), py::arg("sz_vec2"), py::arg("sz_vec4"), py::arg("sz_drawvert"), + py::arg("sz_drawidx"), "Checks the version and data layout for debugging."); } -void bind_imgui_methods(py::module& m) { - - // Main - m.def("GetIO", &ImGui::GetIO, py::return_value_policy::reference); - - // Windows - m.def( - "Begin", - [](const char* name, bool open, ImGuiWindowFlags flags) { - const auto clicked = ImGui::Begin(name, &open, flags); - return std::make_tuple(clicked, open); - }, - py::arg("name"), - py::arg("open"), - py::arg("flags") = 0); - m.def("End", []() { ImGui::End(); }); - - // Child Windows - m.def( - "BeginChild", - [](const char* str_id, const Vec2T& size, bool border, ImGuiWindowFlags flags) { - return ImGui::BeginChild(str_id, to_vec2(size), border, flags); - }, - py::arg("str_id"), - py::arg("size") = std::make_tuple(0.f, 0.f), - py::arg("border") = false, - py::arg("flags") = 0); - m.def( - "BeginChild", - [](ImGuiID id, const Vec2T& size, bool border, ImGuiWindowFlags flags) { - return ImGui::BeginChild(id, to_vec2(size), border, flags); - }, - py::arg("id"), - py::arg("size") = std::make_tuple(0.f, 0.f), - py::arg("border") = false, - py::arg("flags") = 0); - m.def("EndChild", []() { ImGui::EndChild(); }); - - // Windows Utilities - m.def("IsWindowAppearing", []() { return ImGui::IsWindowAppearing(); }); - m.def("IsWindowCollapsed", []() { return ImGui::IsWindowCollapsed(); }); - m.def( - "IsWindowFocused", - [](ImGuiFocusedFlags flags) { return ImGui::IsWindowFocused(flags); }, - py::arg("flags") = 0); - m.def( - "IsWindowHovered", - [](ImGuiFocusedFlags flags) { return ImGui::IsWindowHovered(flags); }, - py::arg("flags") = 0); - m.def("GetWindowPos", []() { return from_vec2(ImGui::GetWindowPos()); }); - m.def("GetWindowSize", []() { return from_vec2(ImGui::GetWindowSize()); }); - m.def("GetWindowWidth", []() { return ImGui::GetWindowWidth(); }); - m.def("GetWindowHeight", []() { return ImGui::GetWindowHeight(); }); - m.def( - "SetNextWindowPos", - [](const Vec2T& pos, ImGuiCond cond, const Vec2T& pivot) { - ImGui::SetNextWindowPos(to_vec2(pos), cond, to_vec2(pivot)); - }, - py::arg("pos"), - py::arg("cond") = 0, - py::arg("pivot") = std::make_tuple(0., 0.)); - m.def( - "SetNextWindowSize", - [](const Vec2T& size, ImGuiCond cond) { ImGui::SetNextWindowSize(to_vec2(size), cond); }, - py::arg("size"), - py::arg("cond") = 0); - m.def( - "SetNextWindowSizeConstraints", - [](const Vec2T& size_min, const Vec2T& size_max) { - ImGui::SetNextWindowSizeConstraints(to_vec2(size_min), to_vec2(size_max)); - }, - py::arg("size_min"), - py::arg("size_max")); - m.def( - "SetNextWindowContextSize", - [](const Vec2T& size) { ImGui::SetNextWindowContentSize(to_vec2(size)); }, - py::arg("size")); - m.def( - "SetNextWindowCollapsed", - [](bool collapsed, ImGuiCond cond) { ImGui::SetNextWindowCollapsed(collapsed, cond); }, - py::arg("collapsed"), - py::arg("cond") = 0); - m.def("SetNextWindowFocus", []() { ImGui::SetNextWindowFocus(); }); - m.def("SetNextWindowBgAlpha", [](float alpha) { ImGui::SetNextWindowBgAlpha(alpha); }); - m.def( - "SetWindowPos", - [](const Vec2T& pos, ImGuiCond cond) { ImGui::SetWindowPos(to_vec2(pos), cond); }, - py::arg("pos"), - py::arg("cond") = 0); - m.def( - "SetWindowSize", - [](const Vec2T& size, ImGuiCond cond) { ImGui::SetWindowSize(to_vec2(size), cond); }, - py::arg("size"), - py::arg("cond") = 0); - m.def( - "SetWindowCollapsed", - [](bool collapsed, ImGuiCond cond) { ImGui::SetWindowCollapsed(collapsed, cond); }, - py::arg("collapsed"), - py::arg("cond") = 0); - m.def("set_window_focus", []() { ImGui::SetWindowFocus(); }); - m.def( - "SetWindowFontScale", - [](float scale) { ImGui::SetWindowFontScale(scale); }, - py::arg("scale")); - m.def( - "SetWindowPos", - [](const char* name, const Vec2T& pos, ImGuiCond cond) { - ImGui::SetWindowPos(name, to_vec2(pos), cond); - }, - py::arg("name"), - py::arg("pos"), - py::arg("cond") = 0); - m.def( - "SetWindowSize", - [](const char* name, const Vec2T& size, ImGuiCond cond) { - ImGui::SetWindowSize(name, to_vec2(size), cond); - }, - py::arg("name"), - py::arg("size"), - py::arg("cond") = 0); - m.def( - "SetWindowCollapsed", - [](const char* name, bool collapsed, ImGuiCond cond) { - ImGui::SetWindowCollapsed(name, collapsed, cond); - }, - py::arg("name"), - py::arg("collapsed"), - py::arg("cond") = 0); - m.def( - "SetWindowFocus", [](const char* name) { ImGui::SetWindowFocus(name); }, py::arg("name")); - - // Content region - m.def("GetContentRegionMax", []() { - return from_vec2(ImGui::GetContentRegionMax()); }); - m.def("GetContentRegionAvail", []() { - return from_vec2(ImGui::GetContentRegionAvail()); }); - m.def("GetWindowContentRegionMin", []() { - return from_vec2(ImGui::GetWindowContentRegionMin()); }); - m.def("GetWindowContentRegionMax", []() { - return from_vec2(ImGui::GetWindowContentRegionMax()); }); - - // Windows Scrolling - m.def("GetScrollX", []() { return ImGui::GetScrollX(); }); - m.def("GetScrollY", []() { return ImGui::GetScrollY(); }); - m.def("GetScrollMaxX", []() { return ImGui::GetScrollMaxX(); }); - m.def("GetScrollMaxY", []() { return ImGui::GetScrollMaxY(); }); - m.def( - "SetScrollX", - [](float scroll_x) { ImGui::SetScrollX(scroll_x); }, - py::arg("scroll_x")); - m.def( - "SetScrollY", - [](float scroll_y) { ImGui::SetScrollY(scroll_y); }, - py::arg("scroll_y")); - m.def( - "SetScrollHereX", - [](float center_x_ratio) { ImGui::SetScrollHereX(center_x_ratio); }, - py::arg("center_x_ratio") = 0.5f); - m.def( - "SetScrollHereY", - [](float center_y_ratio) { ImGui::SetScrollHereY(center_y_ratio); }, - py::arg("center_y_ratio") = 0.5f); - m.def( - "SetScrollFromPosX", - [](float local_x, float center_x_ratio) { ImGui::SetScrollFromPosX(local_x, center_x_ratio); }, - py::arg("local_x"), - py::arg("center_x_ratio") = 0.5f); - m.def( - "SetScrollFromPosY", - [](float local_y, float center_y_ratio) { ImGui::SetScrollFromPosY(local_y, center_y_ratio); }, - py::arg("local_y"), - py::arg("center_y_ratio") = 0.5f); - - // Parameters stacks (shared) - IMGUI_API void PushFont(ImFont* font); // use NULL as a shortcut to push default font - IMGUI_API void PopFont(); - m.def( - "PushFont", - [](ImFont* font) { ImGui::PushFont(font); }, - py::arg("font")); - m.def( - "PopFont", - []() { ImGui::PopFont(); } - ); - m.def( - "PushStyleColor", - [](ImGuiCol idx, ImU32 col) { ImGui::PushStyleColor(idx, col); }, - py::arg("idx"), - py::arg("col")); - m.def( - "PushStyleColor", - [](ImGuiCol idx, const Vec4T& col) { ImGui::PushStyleColor(idx, to_vec4(col)); }, - py::arg("idx"), - py::arg("col")); - m.def( - "PopStyleColor", [](int count) { ImGui::PopStyleColor(count); }, py::arg("count") = 1); - m.def( - "PushStyleVar", - [](ImGuiCol idx, float val) { ImGui::PushStyleVar(idx, val); }, - py::arg("idx"), - py::arg("val")); - m.def( - "PushStyleVar", - [](ImGuiCol idx, const Vec2T& val) { ImGui::PushStyleVar(idx, to_vec2(val)); }, - py::arg("idx"), - py::arg("val")); - m.def( - "PopStyleVar", [](int count) { ImGui::PopStyleVar(count); }, py::arg("count") = 1); - m.def( - "GetStyleColorVec4", - [](ImGuiCol idx) { return from_vec4(ImGui::GetStyleColorVec4(idx)); }, - py::arg("idx")); - m.def("GetFontSize", []() { return ImGui::GetFontSize(); }); - m.def("GetFontTexUvWhitePixel", - []() { return from_vec2(ImGui::GetFontTexUvWhitePixel()); }); - m.def( - "GetColorU32", - [](ImGuiCol idx, float alpha_mul) { return ImGui::GetColorU32(idx, alpha_mul); }, - py::arg("idx"), - py::arg("alpha_mul") = 1.0f); - m.def( - "GetColorU32", [](const Vec4T& col) { return ImGui::GetColorU32(to_vec4(col)); }, py::arg("col")); - m.def( - "GetColorU32", [](ImU32 col) { return ImGui::GetColorU32(col); }, py::arg("col")); - - // Parameters stacks (current window) - m.def( - "PushItemWidth", - [](float item_width) { return ImGui::PushItemWidth(item_width); }, - py::arg("item_width")); - m.def("PopItemWidth", []() { ImGui::PopItemWidth(); }); - m.def( - "SetNextItemWidth", - [](float item_width) { return ImGui::SetNextItemWidth(item_width); }, - py::arg("item_width")); - m.def("CalcItemWidth", []() { return ImGui::CalcItemWidth(); }); - m.def( - "PushTextWrapPos", - [](float wrap_local_pos_x) { ImGui::PushTextWrapPos(wrap_local_pos_x); }, - py::arg("wrap_local_pos_x") = 0.0f); - m.def("PopTextWrapPos", []() { ImGui::PopTextWrapPos(); }); - m.def( - "PushAllowKeyboardFocus", - [](bool allow_keyboard_focus) { ImGui::PushAllowKeyboardFocus(allow_keyboard_focus); }, - py::arg("allow_keyboard_focus")); - m.def("PopAllowKeyboardFocus", []() { ImGui::PopAllowKeyboardFocus(); }); - m.def( - "PushButtonRepeat", - [](bool repeat) { ImGui::PushButtonRepeat(repeat); }, - py::arg("allow_keyboard_focus")); - m.def("PopButtonRepeat", []() { ImGui::PopButtonRepeat(); }); - - // Cursor / Layout - m.def("Separator", []() { ImGui::Separator(); }); - m.def( - "SameLine", - [](float offset_from_start_x, float spacing) { ImGui::SameLine(); }, - py::arg("offset_from_start_x") = 0.0f, - py::arg("offset") = -1.0f); - m.def("NewLine", []() { ImGui::NewLine(); }); - m.def("Spacing", []() { ImGui::Spacing(); }); - m.def("Dummy", [](const Vec2T& size) { ImGui::Dummy(to_vec2(size)); }); - m.def( - "Indent", [](float indent_w) { ImGui::Indent(indent_w); }, py::arg("indent_w") = 0.f); - m.def( - "Unindent", [](float indent_w) { ImGui::Unindent(indent_w); }, py::arg("indent_w") = 0.f); - m.def("BeginGroup", []() { ImGui::BeginGroup(); }); - m.def("EndGroup", []() { ImGui::EndGroup(); }); - m.def("GetCursorPos", []() { return from_vec2(ImGui::GetCursorPos()); }); - m.def("GetCursorPosX", []() { return ImGui::GetCursorPosX(); }); - m.def("GetCursorPosY", []() { return ImGui::GetCursorPosY(); }); - m.def( - "SetCursorPos", - [](const Vec2T& local_pos) { ImGui::SetCursorPos(to_vec2(local_pos)); }, - py::arg("local_pos")); - m.def( - "SetCursorPosX", - [](float local_x) { ImGui::SetCursorPosX(local_x); }, - py::arg("local_x")); - m.def( - "SetCursorPosY", - [](float local_y) { ImGui::SetCursorPosY(local_y); }, - py::arg("local_y")); - m.def("GetCursorStartPos", []() { return from_vec2(ImGui::GetCursorStartPos()); }); - m.def("GetCursorScreenPos", []() { return from_vec2(ImGui::GetCursorScreenPos()); }); - m.def( - "SetCursorScreenPos", - [](const Vec2T& pos) { ImGui::SetCursorScreenPos(to_vec2(pos)); }, - py::arg("pos")); - m.def("AlignTextToFramePadding", []() { ImGui::AlignTextToFramePadding(); }); - m.def("GetTextLineHeight", []() { return ImGui::GetTextLineHeight(); }); - m.def("GetTextLineHeightWithSpacing", []() { return ImGui::GetTextLineHeightWithSpacing(); }); - m.def("GetFrameHeight", []() { return ImGui::GetFrameHeight(); }); - m.def("GetFrameHeightWithSpacing", []() { return ImGui::GetFrameHeightWithSpacing(); }); - - // ID stack/scopes - m.def( - "PushID", [](const char* str_id) { ImGui::PushID(str_id); }, py::arg("str_id")); - m.def( - "PushID", [](int int_id) { ImGui::PushID(int_id); }, py::arg("int_id")); - m.def("PopID", []() { ImGui::PopID(); }); - m.def( - "GetID", [](const char* str_id) { return ImGui::GetID(str_id); }, py::arg("str_id")); - - // these are typos (bad capitalization). kept around to avoid needless breaking changes - m.def( - "PushId", [](const char* str_id) { ImGui::PushID(str_id); }, py::arg("str_id")); - m.def( - "PushId", [](int int_id) { ImGui::PushID(int_id); }, py::arg("int_id")); - m.def( - "GetId", [](const char* str_id) { return ImGui::GetID(str_id); }, py::arg("str_id")); - - // Widgets: Text - m.def( - "TextUnformatted", [](const char* text) { ImGui::TextUnformatted(text); }, py::arg("text")); - m.def( - "Text", [](const char* text) { ImGui::Text("%s", text); }, py::arg("text")); - m.def( - "TextColored", - [](const Vec4T& color, const char* text) { ImGui::TextColored(to_vec4(color), "%s", text); }, - py::arg("color"), - py::arg("text")); - m.def( - "TextDisabled", [](const char* text) { ImGui::TextDisabled("%s", text); }, py::arg("text")); - m.def( - "TextWrapped", [](const char* text) { ImGui::TextWrapped("%s", text); }, py::arg("text")); - m.def( - "LabelText", - [](const char* label, const char* text) { ImGui::LabelText(label, "%s", text); }, - py::arg("label"), - py::arg("text")); - m.def( - "BulletText", - [](const char* fmt) { ImGui::BulletText("%s", fmt); }, - py::arg("text")); - - // Widgets: Main - m.def( - "Button", - [](const char* label, const Vec2T& size) { return ImGui::Button(label, to_vec2(size)); }, - py::arg("label"), - py::arg("size") = std::make_tuple(0.f, 0.f)); - m.def( - "SmallButton", - [](const char* label) { return ImGui::SmallButton(label); }, - py::arg("label")); - m.def( - "InvisibleButton", - [](const char* str_id, const Vec2T& size) { - return ImGui::InvisibleButton(str_id, to_vec2(size)); - }, - py::arg("str_id"), - py::arg("size")); - m.def( - "ArrowButton", - [](const char* str_id, ImGuiDir dir) { return ImGui::ArrowButton(str_id, dir); }, - py::arg("str_id"), - py::arg("dir")); - m.def( - "Checkbox", - [](const char* label, bool v) { - const auto clicked = ImGui::Checkbox(label, &v); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v")); - m.def( - "CheckboxFlags", - [](const char* label, unsigned int flags, unsigned int flags_value) { - const auto clicked = ImGui::CheckboxFlags(label, &flags, flags_value); - return std::make_tuple(clicked, flags); - }, - py::arg("label"), - py::arg("flags"), - py::arg("flags_value")); - m.def( - "RadioButton", - [](const char* label, bool active) { return ImGui::RadioButton(label, active); }, - py::arg("label"), - py::arg("active")); - m.def( - "RadioButton", - [](const char* label, unsigned int v, unsigned int v_button) { - const auto clicked = ImGui::CheckboxFlags(label, &v, v_button); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("v_button")); - m.def( - "ProgressBar", - [](float fraction, const Vec2T& size_arg) { - ImGui::ProgressBar(fraction, to_vec2(size_arg)); - }, - py::arg("fraction"), - py::arg("size_arg") = std::make_tuple(-1.f, 0.f)); - m.def("Bullet", []() { ImGui::Bullet(); }); - - // Widgets: Combo Box - m.def( - "BeginCombo", - [](const char* label, const char* preview_value, ImGuiComboFlags flags) { - return ImGui::BeginCombo(label, preview_value, flags); - }, - py::arg("label"), - py::arg("preview_value"), - py::arg("flags") = 0); - m.def("EndCombo", []() { ImGui::EndCombo(); }); - m.def( - "Combo", - [](const char* label, - int current_item, - const std::vector& items, - int popup_max_height_in_items) { - const auto _items = convert_string_items(items); - const auto clicked = ImGui::Combo( - label, ¤t_item, _items.data(), _items.size(), popup_max_height_in_items); - return std::make_tuple(clicked, current_item); - }, - py::arg("label"), - py::arg("current_item"), - py::arg("items"), - py::arg("popup_max_height_in_items") = -1); - m.def( - "Combo", - [](const char* label, - int current_item, - const char* items_separated_by_zeros, - int popup_max_height_in_items) { - const auto clicked = ImGui::Combo( - label, ¤t_item, items_separated_by_zeros, popup_max_height_in_items); - return std::make_tuple(clicked, current_item); - }, - py::arg("label"), - py::arg("current_item"), - py::arg("items_separated_by_zeros"), - py::arg("popup_max_height_in_items") = -1); - - // Widgets: Drags - m.def( - "DragFloat", - [](const char* label, - float v, - float v_speed, - float v_min, - float v_max, - const char* format, - float power) { - auto clicked = ImGui::DragFloat(label, &v, v_speed, v_min, v_max, format, power); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("v_speed") = 1.0f, - py::arg("v_min"), - py::arg("v_max"), - py::arg("format") = "%.3f", - py::arg("power") = 1.0f); - m.def( - "DragFloat2", - [](const char* label, - std::array v, - float v_speed, - float v_min, - float v_max, - const char* format, - float power) { - auto clicked = - ImGui::DragFloat2(label, v.data(), v_speed, v_min, v_max, format, power); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("v_speed") = 1.0f, - py::arg("v_min"), - py::arg("v_max"), - py::arg("format") = "%.3f", - py::arg("power") = 1.0f); - m.def( - "DragFloat3", - [](const char* label, - std::array v, - float v_speed, - float v_min, - float v_max, - const char* format, - float power) { - auto clicked = - ImGui::DragFloat3(label, v.data(), v_speed, v_min, v_max, format, power); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("v_speed") = 1.0f, - py::arg("v_min"), - py::arg("v_max"), - py::arg("format") = "%.3f", - py::arg("power") = 1.0f); - m.def( - "DragFloat4", - [](const char* label, - std::array v, - float v_speed, - float v_min, - float v_max, - const char* format, - float power) { - auto clicked = - ImGui::DragFloat4(label, v.data(), v_speed, v_min, v_max, format, power); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("v_speed") = 1.0f, - py::arg("v_min"), - py::arg("v_max"), - py::arg("format") = "%.3f", - py::arg("power") = 1.0f); - m.def( - "DragFloatRange2", - [](const char* label, - std::array v_current_min, - std::array v_current_max, - float v_speed, - float v_min, - float v_max, - const char* format, - const char* format_max, - float power) { - auto clicked = ImGui::DragFloatRange2(label, - v_current_min.data(), - v_current_max.data(), - v_speed, - v_min, - v_max, - format, - format_max, - power); - return std::make_tuple(clicked, v_current_min, v_current_max); - }, - py::arg("label"), - py::arg("v_current_min"), - py::arg("v_current_max"), - py::arg("v_speed") = 1.0f, - py::arg("v_min"), - py::arg("v_max"), - py::arg("format") = "%.3f", - py::arg("format_max") = nullptr, - py::arg("power") = 1.0f); - - m.def( - "DragInt", - [](const char* label, int v, float v_speed, int v_min, int v_max, const char* format) { - auto clicked = ImGui::DragInt(label, &v, v_speed, v_min, v_max, format); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("v_speed") = 1.0f, - py::arg("v_min") = 0, - py::arg("v_max") = 0, - py::arg("format") = "%d"); - m.def( - "DragInt2", - [](const char* label, - std::array v, - float v_speed, - int v_min, - int v_max, - const char* format) { - auto clicked = ImGui::DragInt2(label, v.data(), v_speed, v_min, v_max, format); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("v_speed") = 1.0f, - py::arg("v_min") = 0, - py::arg("v_max") = 0, - py::arg("format") = "%d"); - m.def( - "DragInt3", - [](const char* label, - std::array v, - float v_speed, - int v_min, - int v_max, - const char* format) { - auto clicked = ImGui::DragInt3(label, v.data(), v_speed, v_min, v_max, format); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("v_speed") = 1.0f, - py::arg("v_min") = 0, - py::arg("v_max") = 0, - py::arg("format") = "%d"); - m.def( - "DragInt4", - [](const char* label, - std::array v, - float v_speed, - int v_min, - int v_max, - const char* format) { - auto clicked = ImGui::DragInt4(label, v.data(), v_speed, v_min, v_max, format); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("v_speed") = 1.0f, - py::arg("v_min") = 0, - py::arg("v_max") = 0, - py::arg("format") = "%d"); - m.def( - "DragIntRange2", - [](const char* label, - std::array v_current_min, - std::array v_current_max, - float v_speed, - int v_min, - int v_max, - const char* format, - const char* format_max) { - auto clicked = ImGui::DragIntRange2(label, - v_current_min.data(), - v_current_max.data(), - v_speed, - v_min, - v_max, - format, - format_max); - return std::make_tuple(clicked, v_current_min, v_current_max); - }, - py::arg("label"), - py::arg("v_current_min"), - py::arg("v_current_max"), - py::arg("v_speed") = 1.0f, - py::arg("v_min") = 0, - py::arg("v_max") = 0, - py::arg("format") = "%d", - py::arg("format_max") = nullptr); - - // Widgets: Sliders - m.def( - "SliderFloat", - [](const char* label, float v, float v_min, float v_max, const char* format, float power) { - auto clicked = ImGui::SliderFloat(label, &v, v_min, v_max, format, power); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("v_min"), - py::arg("v_max"), - py::arg("format") = "%.3f", - py::arg("power") = 1.0f); - m.def( - "SliderFloat2", - [](const char* label, - std::array v, - float v_min, - float v_max, - const char* format, - float power) { - auto clicked = ImGui::SliderFloat2(label, v.data(), v_min, v_max, format, power); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("v_min"), - py::arg("v_max"), - py::arg("format") = "%.3f", - py::arg("power") = 1.0f); - m.def( - "SliderFloat3", - [](const char* label, - std::array v, - float v_min, - float v_max, - const char* format, - float power) { - auto clicked = ImGui::SliderFloat3(label, v.data(), v_min, v_max, format, power); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("v_min"), - py::arg("v_max"), - py::arg("format") = "%.3f", - py::arg("power") = 1.0f); - m.def( - "SliderFloat4", - [](const char* label, - std::array v, - float v_min, - float v_max, - const char* format, - float power) { - auto clicked = ImGui::SliderFloat4(label, v.data(), v_min, v_max, format, power); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("v_min"), - py::arg("v_max"), - py::arg("format") = "%.3f", - py::arg("power") = 1.0f); - - m.def( - "SliderAngle", - [](const char* label, - float v_rad, - float v_degrees_min, - float v_degrees_max, - const char* format) { - auto clicked = ImGui::SliderAngle(label, &v_rad, v_degrees_min, v_degrees_max, format); - return std::make_tuple(clicked, v_rad); - }, - py::arg("label"), - py::arg("v_rad"), - py::arg("v_degrees_min") = -360.0f, - py::arg("v_degrees_max") = +360.0f, - py::arg("format") = "%.0f deg"); - - m.def( - "SliderInt", - [](const char* label, int v, int v_min, int v_max, const char* format) { - auto v_ = v; - auto clicked = ImGui::SliderInt(label, &v_, v_min, v_max, format); - return std::make_tuple(clicked, v_); - }, - py::arg("label"), - py::arg("v"), - py::arg("v_min") = 0, - py::arg("v_max") = 0, - py::arg("format") = "%d"); - m.def( - "SliderInt2", - [](const char* label, - const std::array& v, - int v_min, - int v_max, - const char* format) { - auto v_ = v; - auto clicked = ImGui::SliderInt2(label, v_.data(), v_min, v_max, format); - return std::make_tuple(clicked, v_); - }, - py::arg("label"), - py::arg("v"), - py::arg("v_min") = 0, - py::arg("v_max") = 0, - py::arg("format") = "%d"); - m.def( - "SliderInt3", - [](const char* label, - const std::array& v, - int v_min, - int v_max, - const char* format) { - auto v_ = v; - auto clicked = ImGui::SliderInt3(label, v_.data(), v_min, v_max, format); - return std::make_tuple(clicked, v_); - }, - py::arg("label"), - py::arg("v"), - py::arg("v_min") = 0, - py::arg("v_max") = 0, - py::arg("format") = "%d"); - m.def( - "SliderInt4", - [](const char* label, - const std::array& v, - int v_min, - int v_max, - const char* format) { - auto v_ = v; - auto clicked = ImGui::SliderInt4(label, v_.data(), v_min, v_max, format); - return std::make_tuple(clicked, v_); - }, - py::arg("label"), - py::arg("v"), - py::arg("v_min") = 0, - py::arg("v_max") = 0, - py::arg("format") = "%d"); - - // Widgets: Input with Keyboard - m.def( - "InputText", - [](const char* label, const std::string& buf, ImGuiInputTextFlags flags) { - IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); - flags |= ImGuiInputTextFlags_CallbackResize; - - auto buf_ = buf; - InputTextCallback_UserData cb_user_data; - cb_user_data.str = &buf_; - cb_user_data.chain_callback = nullptr; - cb_user_data.chain_callback_user_data = nullptr; - const auto clicked = ImGui::InputText(label, - (char*)buf_.c_str(), - buf_.capacity() + 1, - flags, - input_text_callback, - &cb_user_data); - return std::make_tuple(clicked, buf_); - }, - py::arg("label"), - py::arg("buf"), - py::arg("flags") = 0); - m.def( - "InputTextMultiline", - [](const char* label, - const std::string& buf, - const Vec2T& size, - ImGuiInputTextFlags flags) { - IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); - flags |= ImGuiInputTextFlags_CallbackResize; - - auto buf_ = buf; - InputTextCallback_UserData cb_user_data; - cb_user_data.str = &buf_; - cb_user_data.chain_callback = nullptr; - cb_user_data.chain_callback_user_data = nullptr; - const auto clicked = ImGui::InputTextMultiline(label, - (char*)buf_.c_str(), - buf_.capacity() + 1, - to_vec2(size), - flags, - input_text_callback, - &cb_user_data); - return std::make_tuple(clicked, buf_); - }, - py::arg("label"), - py::arg("buf"), - py::arg("size") = std::make_tuple(0.f, 0.f), - py::arg("flags") = 0); - m.def( - "InputTextWithHint", - [](const char* label, const char* hint, const std::string& buf, ImGuiInputTextFlags flags) { - IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0); - flags |= ImGuiInputTextFlags_CallbackResize; - - auto buf_ = buf; - InputTextCallback_UserData cb_user_data; - cb_user_data.str = &buf_; - cb_user_data.chain_callback = nullptr; - cb_user_data.chain_callback_user_data = nullptr; - const auto clicked = ImGui::InputTextWithHint(label, - hint, - (char*)buf_.c_str(), - buf_.capacity() + 1, - flags, - input_text_callback, - &cb_user_data); - return std::make_tuple(clicked, buf_); - }, - py::arg("label"), - py::arg("hint"), - py::arg("buf"), - py::arg("flags") = 0); - m.def( - "InputFloat", - [](const char* label, - float v, - float step, - float step_fast, - const char* format, - ImGuiInputTextFlags flags) { - const auto clicked = ImGui::InputFloat(label, &v, step, step_fast, format, flags); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("step") = 0.f, - py::arg("step_fast") = 0.f, - py::arg("format") = "%.3f", - py::arg("flags") = 0); - m.def( - "InputFloat2", - [](const char* label, - std::array v, - const char* format, - ImGuiInputTextFlags flags) { - const auto clicked = ImGui::InputFloat2(label, v.data(), format, flags); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("format") = "%.3f", - py::arg("flags") = 0); - m.def( - "InputFloat3", - [](const char* label, - std::array v, - const char* format, - ImGuiInputTextFlags flags) { - const auto clicked = ImGui::InputFloat3(label, v.data(), format, flags); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("format") = "%.3f", - py::arg("flags") = 0); - m.def( - "InputFloat4", - [](const char* label, - std::array v, - const char* format, - ImGuiInputTextFlags flags) { - const auto clicked = ImGui::InputFloat4(label, v.data(), format, flags); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("format") = "%.3f", - py::arg("flags") = 0); - m.def( - "InputInt", - [](const char* label, int v, float step, float step_fast, ImGuiInputTextFlags flags) { - const auto clicked = ImGui::InputInt(label, &v, step, step_fast, flags); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("step") = 0.f, - py::arg("step_fast") = 0.f, - py::arg("flags") = 0); - m.def( - "InputInt2", - [](const char* label, std::array v, ImGuiInputTextFlags flags) { - const auto clicked = ImGui::InputInt2(label, v.data(), flags); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("flags") = 0); - m.def( - "InputInt3", - [](const char* label, std::array v, ImGuiInputTextFlags flags) { - auto v_ = v; - const auto clicked = ImGui::InputInt3(label, v.data(), flags); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("flags") = 0); - m.def( - "InputInt4", - [](const char* label, std::array v, ImGuiInputTextFlags flags) { - const auto clicked = ImGui::InputInt4(label, v.data(), flags); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("flags") = 0); - m.def( - "InputDouble", - [](const char* label, - double v, - double step, - double step_fast, - const char* format, - ImGuiInputTextFlags flags) { - const auto clicked = ImGui::InputDouble(label, &v, step, step_fast, format, flags); - return std::make_tuple(clicked, v); - }, - py::arg("label"), - py::arg("v"), - py::arg("step") = 0.f, - py::arg("step_fast") = 0.f, - py::arg("format") = "%.6f", - py::arg("flags") = 0); - - // Widgets: Color Editor/Picker - m.def( - "ColorEdit3", - [](const char* label, const std::array& col, ImGuiColorEditFlags flags) { - auto col_ = col; - const auto clicked = ImGui::ColorEdit3(label, col_.data(), flags); - return std::make_tuple(clicked, col_); - }, - py::arg("label"), - py::arg("def"), - py::arg("flags") = 0); - m.def( - "ColorEdit4", - [](const char* label, const std::array& col, ImGuiColorEditFlags flags) { - auto col_ = col; - const auto clicked = ImGui::ColorEdit4(label, col_.data(), flags); - return std::make_tuple(clicked, col_); - }, - py::arg("label"), - py::arg("def"), - py::arg("flags") = 0); - m.def( - "ColorPicker3", - [](const char* label, const std::array& col, ImGuiColorEditFlags flags) { - auto col_ = col; - const auto clicked = ImGui::ColorPicker3(label, col_.data(), flags); - return std::make_tuple(clicked, col_); - }, - py::arg("label"), - py::arg("def"), - py::arg("flags") = 0); - m.def( - "ColorPicker4", - [](const char* label, const std::array& col, ImGuiColorEditFlags flags) { - auto col_ = col; - const auto clicked = ImGui::ColorPicker4(label, col_.data(), flags); - return std::make_tuple(clicked, col_); - }, - py::arg("label"), - py::arg("def"), - py::arg("flags") = 0); - m.def( - "ColorButton", - [](const char* label, const Vec4T& col, ImGuiColorEditFlags flags, const Vec2T& size) { - auto col_ = col; - const auto clicked = ImGui::ColorButton(label, to_vec4(col), flags, to_vec2(size)); - return std::make_tuple(clicked, col_); - }, - py::arg("label"), - py::arg("def"), - py::arg("flags") = 0, - py::arg("size") = std::make_tuple(0.f, 0.f)); - m.def( - "SetColorEditOptions", - [](ImGuiColorEditFlags flags) { ImGui::SetColorEditOptions(flags); }, - py::arg("flags")); - - // Widgets: Trees - m.def( - "TreeNode", [](const char* label) { return ImGui::TreeNode(label); }, py::arg("label")); - m.def( - "TreeNodeEx", - [](const char* label, ImGuiTreeNodeFlags flags) { return ImGui::TreeNodeEx(label, flags); }, - py::arg("label"), - py::arg("flags") = 0); - m.def( - "TreePush", [](const char* str_id) { ImGui::TreePush(str_id); }, py::arg("str_id")); - m.def("TreePop", []() { ImGui::TreePop(); }); - m.def("GetTreeNodeToLabelSpacing", []() { return ImGui::GetTreeNodeToLabelSpacing(); }); - m.def( - "CollapsingHeader", - [](const char* label, ImGuiTreeNodeFlags flags) { - return ImGui::CollapsingHeader(label, flags); - }, - py::arg("label"), - py::arg("flags") = 0); - m.def( - "CollapsingHeader", - [](const char* label, bool open, ImGuiTreeNodeFlags flags) { - const auto clicked = ImGui::CollapsingHeader(label, &open, flags); - return std::make_tuple(clicked, open); - }, - py::arg("label"), - py::arg("open"), - py::arg("flags") = 0); - m.def( - "SetNextItemOpen", - [](bool is_open, ImGuiCond cond) { ImGui::SetNextItemOpen(is_open, cond); }, - py::arg("is_open"), - py::arg("cond") = 0); - - // Widgets: Selectables - m.def( - "Selectable", - [](const char* label, bool selected, ImGuiSelectableFlags flags, const Vec2T& size) { - const auto clicked = ImGui::Selectable(label, &selected, flags, to_vec2(size)); - return std::make_tuple(clicked, selected); - }, - py::arg("label"), - py::arg("selected") = false, - py::arg("flags") = 0, - py::arg("size") = std::make_tuple(0.f, 0.f)); - - // Widgets: List Boxes - m.def( - "BeginListBox", - [](const char* label, - const Vec2T& size - ) { - return ImGui::BeginListBox(label, to_vec2(size)); - }, - py::arg("label"), - py::arg("size") = Vec2T(0,0)); - m.def( - "EndListBox", - []() { - ImGui::EndListBox(); - }); - m.def( - "ListBox", - [](const char* label, - int current_item, - const std::vector& items, - int height_in_items) { - const auto _items = convert_string_items(items); - const auto clicked = - ImGui::ListBox(label, ¤t_item, _items.data(), _items.size(), height_in_items); - return std::make_tuple(clicked, current_item); - }, - py::arg("label"), - py::arg("current_item"), - py::arg("items"), - py::arg("height_in_items") = -1); - - // Widgets: Data Plotting - m.def( - "PlotLines", - []( - const char *label, - const std::vector& values, - int values_offset, - const char *overlay_text, - float scale_min, - float scale_max, - const Vec2T& graph_size - ) { - ImGui::PlotLines(label, values.data(), values.size(), values_offset, overlay_text, scale_min, scale_max, to_vec2(graph_size)); - }, - py::arg("label"), - py::arg("values"), - py::arg("values_offset") = 0, - py::arg("overlay_text") = nullptr, - py::arg("scale_min") = FLT_MAX, - py::arg("scale_max") = FLT_MAX, - py::arg("graph_size") = std::make_tuple(0.f, 0.f) - ); - m.def( - "PlotHistogram", - []( - const char *label, - const std::vector& values, - int values_offset, - const char *overlay_text, - float scale_min, - float scale_max, - const Vec2T& graph_size - ) { - ImGui::PlotHistogram(label, values.data(), values.size(), values_offset, overlay_text, scale_min, scale_max, to_vec2(graph_size)); - }, - py::arg("label"), - py::arg("values"), - py::arg("values_offset") = 0, - py::arg("overlay_text") = nullptr, - py::arg("scale_min") = FLT_MAX, - py::arg("scale_max") = FLT_MAX, - py::arg("graph_size") = std::make_tuple(0.f, 0.f) - ); - - // Widgets: Value() Helpers. - m.def("Value", [](const char *prefix, bool b){ ImGui::Value(prefix, b); }, py::arg("prefix"), py::arg("b")); - m.def("Value", [](const char *prefix, int v){ ImGui::Value(prefix, v); }, py::arg("prefix"), py::arg("v")); - m.def( - "Value", - [](const char *prefix, float v, const char * float_format) { - ImGui::Value(prefix, v, float_format); - }, - py::arg("prefix"), - py::arg("b"), - py::arg("float_format") = nullptr - ); - - // Widgets: Menus - m.def("BeginMenuBar", []() { return ImGui::BeginMenuBar(); }); - m.def("EndMenuBar", []() { ImGui::EndMenuBar(); }); - m.def("BeginMainMenuBar", []() { return ImGui::BeginMainMenuBar(); }); - m.def("EndMainMenuBar", []() { return ImGui::EndMainMenuBar(); }); - m.def( - "BeginMenu", - [](const char* label, bool enabled) { return ImGui::BeginMenu(label, enabled); }, - py::arg("label"), - py::arg("enabled") = true); - m.def("EndMenu", []() { ImGui::EndMenu(); }); - m.def( - "MenuItem", - [](const char* label, const char* shortcut, bool selected, bool enabled) { - return ImGui::MenuItem(label, shortcut, selected, enabled); - }, - py::arg("label"), - py::arg("shortcut") = nullptr, - py::arg("selected") = false, - py::arg("enabled") = true); - - // Tooltips - m.def("BeginTooltip", []() { ImGui::BeginTooltip(); }); - m.def("EndTooltip", []() { ImGui::EndTooltip(); }); - m.def("SetTooltip", [](const char *value) { ImGui::SetTooltip("%s", value); }); - - // Popups, Modals - m.def( - "OpenPopup", [](const char* str_id) { ImGui::OpenPopup(str_id); }, py::arg("str_id")); - m.def( - "BeginPopup", - [](const char* str_id, ImGuiWindowFlags flags) { return ImGui::BeginPopup(str_id, flags); }, - py::arg("str_id"), - py::arg("flags") = 0); - m.def( - "BeginPopupContextItem", - [](const char* str_id, ImGuiPopupFlags popup_flags) { - return ImGui::BeginPopupContextItem(str_id, popup_flags); - }, - py::arg("str_id"), - py::arg("popup_flags") = 1); - m.def( - "BeginPopupContextWindow", - [](const char* str_id, ImGuiPopupFlags popup_flags) { - return ImGui::BeginPopupContextWindow(str_id, popup_flags); - }, - py::arg("str_id"), - py::arg("popup_flags") = 1); - m.def( - "BeginPopupContextVoid", - [](const char* str_id, ImGuiPopupFlags popup_flags) { - return ImGui::BeginPopupContextVoid(str_id, popup_flags); - }, - py::arg("str_id"), - py::arg("popup_flags") = 1); - m.def( - "BeginPopupModal", - [](const char* str_id, bool open, ImGuiWindowFlags flags) { - auto open_ = open; - return ImGui::BeginPopupModal(str_id, &open_, flags); - }, - py::arg("str_id"), - py::arg("open"), - py::arg("flags") = 0); - m.def("EndPopup", []() { ImGui::EndPopup(); }); - m.def( - "OpenPopupOnItemClick", - [](const char* str_id, ImGuiWindowFlags popup_flags) { - return ImGui::OpenPopupOnItemClick(str_id, popup_flags); - }, - py::arg("str_id"), - py::arg("popup_flags") = 1); - m.def( - "IsPopupOpen", - [](const char* str_id, ImGuiPopupFlags popup_flags) { return ImGui::IsPopupOpen(str_id, popup_flags); }, - py::arg("str_id"), - py::arg("flags") = 0); - m.def("CloseCurrentPopup", []() { ImGui::CloseCurrentPopup(); }); - - // Columns - m.def( - "Columns", - [](int count, const char *id, bool border) { - ImGui::Columns(count, id, border); - }, - py::arg("count") = 1, - py::arg("id") = nullptr, - py::arg("border") = true - ); - m.def("NextColumn", []() { ImGui::NextColumn(); }); - m.def("GetColumnIndex", []() { return ImGui::GetColumnIndex(); }); - m.def( - "GetColumnWidth", - [](int column_index) { - return ImGui::GetColumnWidth(column_index); - }, - py::arg("column_index") = -1 - ); - m.def( - "SetColumnWidth", - [](int column_index, float width) { - ImGui::SetColumnWidth(column_index, width); - }, - py::arg("column_index"), - py::arg("width") - ); - m.def( - "GetColumnOffset", - [](int column_index) { - return ImGui::GetColumnOffset(column_index); - }, - py::arg("column_index") = -1 - ); - m.def( - "SetColumnOffset", - [](int column_index, float width) { - ImGui::SetColumnOffset(column_index, width); - }, - py::arg("column_index"), - py::arg("offset_x") - ); - m.def("GetColumnsCount", []() { return ImGui::GetColumnsCount(); }); - - // Tab Bars, Tabs - m.def( - "BeginTabBar", - [](const char *str_id, ImGuiTabBarFlags flags) { - return ImGui::BeginTabBar(str_id, flags); - }, - py::arg("str_id"), - py::arg("flags") = 0 - ); - m.def("EndTabBar", []() { ImGui::EndTabBar(); }); - m.def( - "BeginTabItem", - [](const char *str, bool open, ImGuiTabBarFlags flags) { - const auto clicked = ImGui::BeginTabItem(str, &open, flags); - return std::make_tuple(clicked, open); - }, - py::arg("str"), - py::arg("open"), - py::arg("flags") = 0 - ); - m.def("EndTabItem", []() { ImGui::EndTabItem(); }); - m.def( - "SetTabItemClosed", - [](const char *tab_or_docked_window_label) { - ImGui::SetTabItemClosed(tab_or_docked_window_label); - }, - py::arg("tab_or_docked_window_label") - ); - - // Logging/Capture - m.def( - "LogToTTY", - [](int auto_open_depth) { - ImGui::LogToTTY(auto_open_depth); - }, - py::arg("auto_open_depth") = -1 - ); - m.def( - "LogToFile", - [](int auto_open_depth, const char *filename) { - ImGui::LogToFile(auto_open_depth, filename); - }, - py::arg("auto_open_depth") = -1, - py::arg("filename") = nullptr - ); - m.def( - "LogToClipboard", - [](int auto_open_depth) { - ImGui::LogToClipboard(auto_open_depth); - }, - py::arg("auto_open_depth") = -1 - ); - m.def("LogFinish", []() { ImGui::LogFinish(); }); - m.def("LogButtons", []() { ImGui::LogButtons(); }); - - // Disabling - m.def("BeginDisabled", - [](bool disable) { - return ImGui::BeginDisabled(disable); - }, py::arg("disable")); - m.def("EndDisabled", []() { ImGui::EndDisabled(); }); - - // Clipping - m.def( - "PushClipRect", - []( - const Vec2T& clip_rect_min, - const Vec2T& clip_rect_max, - bool intersect_with_current_clip_rect - ) { - ImGui::PushClipRect(to_vec2(clip_rect_min), to_vec2(clip_rect_max), intersect_with_current_clip_rect); - }, - py::arg("clip_rect_min"), - py::arg("clip_rect_max"), - py::arg("intersect_with_current_clip_rect") - ); - m.def("PopClipRect", []() { ImGui::PopClipRect(); }); - - // Focus, Activation - m.def("SetItemDefaultFocus", []() { ImGui::SetItemDefaultFocus(); }); - m.def( - "SetKeyboardFocusHere", - [](int offset) { ImGui::SetKeyboardFocusHere(offset); }, - py::arg("offset") - ); - - // Item/Widgets Utilities - m.def( - "IsItemHovered", - [](ImGuiHoveredFlags flags) { return ImGui::IsItemHovered(flags); }, - py::arg("flags") = 0); - m.def("IsItemActive", []() { return ImGui::IsItemActive(); }); - m.def("IsItemFocused", []() { return ImGui::IsItemFocused(); }); - m.def( - "IsItemClicked", - [](ImGuiMouseButton mouse_button) { return ImGui::IsItemClicked(mouse_button); }, - py::arg("mouse_button") = 0); - m.def("IsItemVisible", []() { return ImGui::IsItemVisible(); }); - m.def("IsItemEdited", []() { return ImGui::IsItemEdited(); }); - m.def("IsItemActivated", []() { return ImGui::IsItemActivated(); }); - m.def("IsItemDeactivated", []() { return ImGui::IsItemDeactivated(); }); - m.def("IsItemDeactivatedAfterEdit", []() { return ImGui::IsItemDeactivatedAfterEdit(); }); - m.def("IsItemToggledOpen", []() { return ImGui::IsItemToggledOpen(); }); - m.def("IsAnyItemHovered", []() { return ImGui::IsAnyItemHovered(); }); - m.def("IsAnyItemActive", []() { return ImGui::IsAnyItemActive(); }); - m.def("IsAnyItemFocused", []() { return ImGui::IsAnyItemFocused(); }); - m.def("GetItemRectMin", []() { return from_vec2(ImGui::GetItemRectMin()); }); - m.def("GetItemRectMax", []() { return from_vec2(ImGui::GetItemRectMax()); }); - m.def("GetItemRectSize", []() { return from_vec2(ImGui::GetItemRectSize()); }); - m.def("SetItemAllowOverlap", []() { ImGui::SetItemAllowOverlap(); }); - - // Miscellaneous Utilities - m.def( - "IsRectVisible", - [](const Vec2T& size) { - return ImGui::IsRectVisible(to_vec2(size)); - }, - py::arg("size") - ); - m.def( - "IsRectVisible", - [](const Vec2T& rect_min, const Vec2T& rect_max) { - return ImGui::IsRectVisible(to_vec2(rect_min), to_vec2(rect_max)); - }, - py::arg("rect_min"), - py::arg("rect_max") - ); - m.def("GetTime", []() { return ImGui::GetTime(); }); - m.def("GetFrameCount", []() { return ImGui::GetFrameCount(); }); - m.def("GetStyleColorName", [](ImGuiCol idx) { return ImGui::GetStyleColorName(idx); }); - m.def( - "BeginChildFrame", - [](ImGuiID id, const Vec2T& size, ImGuiWindowFlags flags) { - return ImGui::BeginChildFrame(id, to_vec2(size), flags); - }, - py::arg("id"), - py::arg("size"), - py::arg("flags") = 0 - ); - m.def("EndChildFrame", []() { ImGui::EndChildFrame(); }); - - // Text Utilities - m.def( - "CalcTextSize", - [](const char *text, const char *text_end, bool hide_text_after_double_hash, float wrap_width) { - return from_vec2(ImGui::CalcTextSize(text, text_end, hide_text_after_double_hash, wrap_width)); - }, - py::arg("text"), - py::arg("text_end") = nullptr, - py::arg("hide_text_after_double_hash") = false, - py::arg("wrap_width") = -1.f - ); - - // Utilities: Mouse - m.def("IsMouseDown", [](ImGuiMouseButton button) { return ImGui::IsMouseDown(button); }, py::arg("button")); - m.def( - "IsMouseClicked", - [](ImGuiMouseButton button, bool repeat) { return ImGui::IsMouseClicked(button, repeat); }, - py::arg("button"), - py::arg("repeat") = false - ); - m.def("IsMouseReleased", [](ImGuiMouseButton button) { return ImGui::IsMouseReleased(button); }, py::arg("button")); - m.def("IsMouseDoubleClicked", [](ImGuiMouseButton button) { return ImGui::IsMouseDoubleClicked(button); }, py::arg("button")); - m.def( - "IsMouseHoveringRect", - [](const Vec2T& r_min, const Vec2T& r_max, bool clip) { - return ImGui::IsMouseHoveringRect(to_vec2(r_min), to_vec2(r_max), clip); - }, - py::arg("r_min"), - py::arg("r_max"), - py::arg("clip") = true - ); - m.def("IsAnyMouseDown", []() { return ImGui::IsAnyMouseDown(); }); - m.def("GetMousePos", []() { return from_vec2(ImGui::GetMousePos()); }); - m.def("GetMousePosOnOpeningCurrentPopup", []() { return from_vec2(ImGui::GetMousePosOnOpeningCurrentPopup()); }); - m.def( - "IsMouseDragging", - [](ImGuiMouseButton button, float lock_threshold) { return ImGui::IsMouseDragging(button, lock_threshold); }, - py::arg("button"), - py::arg("lock_threshold") = -1.f - ); - m.def("ResetMouseDragDelta", [](ImGuiMouseButton button) { ImGui::ResetMouseDragDelta(button); }, py::arg("button")); - m.def("GetMouseCursor", []() { return ImGui::GetMouseCursor(); }); - m.def("SetMouseCursor", [](ImGuiMouseCursor cursor_type) { ImGui::SetMouseCursor(cursor_type); }, py::arg("cursor_type")); - m.def("CaptureMouseFromApp", [](bool want_capture_mouse_value) { ImGui::CaptureMouseFromApp(want_capture_mouse_value); }, py::arg("want_capture_mouse_value")); - - // Inputs Utilities: Keyboard - m.def("GetKeyIndex", [](ImGuiKey imgui_key) { return ImGui::GetKeyIndex(imgui_key); }, py::arg("imgui_key")); - m.def("IsKeyDown", [](ImGuiKey user_key_index) { return ImGui::IsKeyDown(user_key_index); }, py::arg("user_key_index")); - m.def("IsKeyPressed", [](ImGuiKey user_key_index, bool repeat) { return ImGui::IsKeyPressed(user_key_index, repeat); }, py::arg("user_key_index"), py::arg("repeat")=true); - m.def("IsKeyReleased", [](ImGuiKey user_key_index) { return ImGui::IsKeyReleased(user_key_index); }, py::arg("user_key_index")); - m.def( - "GetKeyPressedAmount", - [](ImGuiKey key_index, float repeat_delay, float rate) { - return ImGui::GetKeyPressedAmount(key_index, repeat_delay, rate); - }, - py::arg("key_index"), - py::arg("repeat_delay"), - py::arg("rate") - ); - m.def( - "CaptureKeyboardFromApp", - [](bool want_capture_keyboard_value) { - ImGui::CaptureKeyboardFromApp(want_capture_keyboard_value); - }, - py::arg("want_capture_keyboard_value") = true - ); - - // Clipboard Utilities - m.def("GetClipboardText", []() { return ImGui::GetClipboardText(); }); - m.def("SetClipboardText", [](const char *text) { ImGui::SetClipboardText(text); }, py::arg("text")); - - // Settings/.Ini Utilities - m.def("LoadIniSettingsFromDisk", [](const char *ini_filename) { ImGui::LoadIniSettingsFromDisk(ini_filename); }, py::arg("ini_filename")); - m.def("LoadIniSettingsFromMemory", [](const char *ini_data) { ImGui::LoadIniSettingsFromMemory(ini_data); }, py::arg("ini_data")); - m.def("SaveIniSettingsToDisk", [](const char *ini_filename) { ImGui::SaveIniSettingsToDisk(ini_filename); }, py::arg("ini_filename")); - m.def("SaveIniSettingsToMemory", []() { return ImGui::SaveIniSettingsToMemory(); }); - - // Draw Commands - m.def( - "AddLine", - [](const Vec2T& p1, const Vec2T& p2, ImU32 col, float thickness) { - ImGui::GetWindowDrawList()->AddRect(to_vec2(p1), to_vec2(p2), col, thickness); - }, - py::arg("p_min"), - py::arg("p_max"), - py::arg("col"), - py::arg("thickness") = 1.0f - ); - m.def( - "AddRect", - [](const Vec2T& p_min, const Vec2T& p_max, ImU32 col, float rounding, ImDrawFlags flags, float thickness) { - ImGui::GetWindowDrawList()->AddRect(to_vec2(p_min), to_vec2(p_max), col, rounding, flags, thickness); - }, - py::arg("p_min"), - py::arg("p_max"), - py::arg("col"), - py::arg("rounding") = 0.0f, - py::arg("flags") = 0, - py::arg("thickness") = 1.0f - ); - m.def( - "AddRectFilled", - [](const Vec2T& p_min, const Vec2T& p_max, ImU32 col, float rounding, ImDrawFlags flags) { - ImGui::GetWindowDrawList()->AddRectFilled(to_vec2(p_min), to_vec2(p_max), col, rounding, flags); - }, - py::arg("p_min"), - py::arg("p_max"), - py::arg("col"), - py::arg("rounding") = 0.0f, - py::arg("flags") = 0 - ); - m.def( - "AddRectFilledMultiColor", - [](const Vec2T& p_min, const Vec2T& p_max, ImU32 col_upr_left, ImU32 col_upr_right, ImU32 col_bot_right, ImU32 col_bot_left) { - ImGui::GetWindowDrawList()->AddRectFilledMultiColor(to_vec2(p_min), to_vec2(p_max), col_upr_left, col_upr_right, col_bot_right, col_bot_left); - }, - py::arg("p_min"), - py::arg("p_max"), - py::arg("col_upr_left"), - py::arg("col_upr_right"), - py::arg("col_bot_right"), - py::arg("col_bot_left") - ); - m.def( - "AddQuad", - [](const Vec2T& p1, const Vec2T& p2, const Vec2T& p3, const Vec2T& p4, ImU32 col, float thickness) { - ImGui::GetWindowDrawList()->AddQuad(to_vec2(p1), to_vec2(p2), to_vec2(p3), to_vec2(p4), col, thickness); - }, - py::arg("p1"), - py::arg("p2"), - py::arg("p3"), - py::arg("p4"), - py::arg("col"), - py::arg("thickness") = 1.0f - ); - m.def( - "AddQuadFilled", - [](const Vec2T& p1, const Vec2T& p2, const Vec2T& p3, const Vec2T& p4, ImU32 col) { - ImGui::GetWindowDrawList()->AddQuadFilled(to_vec2(p1), to_vec2(p2), to_vec2(p3), to_vec2(p4), col); - }, - py::arg("p1"), - py::arg("p2"), - py::arg("p3"), - py::arg("p4"), - py::arg("col") - ); - m.def( - "AddTriangle", - [](const Vec2T& p1, const Vec2T& p2, const Vec2T& p3, ImU32 col, float thickness) { - ImGui::GetWindowDrawList()->AddTriangle(to_vec2(p1), to_vec2(p2), to_vec2(p3), col, thickness); - }, - py::arg("p1"), - py::arg("p2"), - py::arg("p3"), - py::arg("col"), - py::arg("thickness") = 1.0f - ); - m.def( - "AddTriangleFilled", - [](const Vec2T& p1, const Vec2T& p2, const Vec2T& p3, ImU32 col) { - ImGui::GetWindowDrawList()->AddTriangleFilled(to_vec2(p1), to_vec2(p2), to_vec2(p3), col); - }, - py::arg("p1"), - py::arg("p2"), - py::arg("p3"), - py::arg("col") - ); - m.def( - "AddCircle", - [](const Vec2T& center, const float radius, ImU32 col, int num_segments, float thickness) { - ImGui::GetWindowDrawList()->AddCircle(to_vec2(center), radius, col, num_segments, thickness); - }, - py::arg("center"), - py::arg("radius"), - py::arg("col"), - py::arg("num_segments") = 0, - py::arg("thickness") = 1.0f - ); - m.def( - "AddCircleFilled", - [](const Vec2T& center, const float radius, ImU32 col, int num_segments) { - ImGui::GetWindowDrawList()->AddCircleFilled(to_vec2(center), radius, col, num_segments); - }, - py::arg("center"), - py::arg("radius"), - py::arg("col"), - py::arg("num_segments") = 0 - ); - m.def( - "AddNgon", - [](const Vec2T& center, const float radius, ImU32 col, int num_segments, float thickness) { - ImGui::GetWindowDrawList()->AddNgon(to_vec2(center), radius, col, num_segments, thickness); - }, - py::arg("center"), - py::arg("radius"), - py::arg("col"), - py::arg("num_segments") = 0, - py::arg("thickness") = 1.0f - ); - m.def( - "AddNgonFilled", - [](const Vec2T& center, const float radius, ImU32 col, int num_segments) { - ImGui::GetWindowDrawList()->AddNgonFilled(to_vec2(center), radius, col, num_segments); - }, - py::arg("center"), - py::arg("radius"), - py::arg("col"), - py::arg("num_segments") = 0 - ); - m.def( - "AddText", - [](const Vec2T& pos, ImU32 col, const char* text_begin, const char* text_end) { - ImGui::GetWindowDrawList()->AddText(to_vec2(pos), col, text_begin, text_end); - }, - py::arg("pos"), - py::arg("col"), - py::arg("text_begin"), - py::arg("text_end") = nullptr - ); - m.def( - "AddText", - [](const ImFont* font, float font_size, const Vec2T& pos, ImU32 col, const char* text_begin, const char* text_end, float wrap_width) { - ImGui::GetWindowDrawList()->AddText(font, font_size, to_vec2(pos), col, text_begin, text_end, wrap_width); - }, - py::arg("font"), - py::arg("font_size"), - py::arg("pos"), - py::arg("col"), - py::arg("text_begin"), - py::arg("text_end") = nullptr, - py::arg("wrap_width") = 0.0f - ); - m.def( - "AddPolyline", - [](const std::vector& points, int num_points, ImU32 col, ImDrawFlags flags, float thickness) { - std::vector points_vec2(points.size()); - for (int i = 0; i < points.size(); i++) { - points_vec2[i] = to_vec2(points[i]); - } - ImGui::GetWindowDrawList()->AddPolyline(points_vec2.data(), num_points, col, flags, thickness); - }, - py::arg("points"), - py::arg("num_points"), - py::arg("col"), - py::arg("flags"), - py::arg("thickness") - ); - m.def( - "AddConvexPolyFilled", - [](const std::vector& points, int num_points, ImU32 col) { - std::vector points_vec2(points.size()); - for (int i = 0; i < points.size(); i++) { - points_vec2[i] = to_vec2(points[i]); - } - ImGui::GetWindowDrawList()->AddConvexPolyFilled(points_vec2.data(), num_points, col); - }, - py::arg("points"), - py::arg("num_points"), - py::arg("col") - ); - m.def( - "AddBezierCubic", - [](const Vec2T& p1, const Vec2T& p2, const Vec2T& p3, const Vec2T& p4, ImU32 col, float thickness, int num_segments = 0) { - ImGui::GetWindowDrawList()->AddBezierCubic(to_vec2(p1), to_vec2(p2), to_vec2(p3), to_vec2(p4), col, thickness, num_segments); - }, - py::arg("p1"), - py::arg("p2"), - py::arg("p3"), - py::arg("p4"), - py::arg("col"), - py::arg("thickness"), - py::arg("num_segments") = 0 - ); - m.def( - "AddBezierQuadratic", - [](const Vec2T& p1, const Vec2T& p2, const Vec2T& p3, ImU32 col, float thickness, int num_segments = 0) { - ImGui::GetWindowDrawList()->AddBezierQuadratic(to_vec2(p1), to_vec2(p2), to_vec2(p3), col, thickness, num_segments); - }, - py::arg("p1"), - py::arg("p2"), - py::arg("p3"), - py::arg("col"), - py::arg("thickness"), - py::arg("num_segments") = 0 - ); - +void bind_imgui_enums(py::module& m) { + py::enum_(m, "ImGuiMultiSelectFlags") + .value("ImGuiMultiSelectFlags_None", ImGuiMultiSelectFlags_::ImGuiMultiSelectFlags_None) + .value("ImGuiMultiSelectFlags_SingleSelect", ImGuiMultiSelectFlags_::ImGuiMultiSelectFlags_SingleSelect) + .value("ImGuiMultiSelectFlags_NoSelectAll", ImGuiMultiSelectFlags_::ImGuiMultiSelectFlags_NoSelectAll) + .value("ImGuiMultiSelectFlags_NoRangeSelect", ImGuiMultiSelectFlags_::ImGuiMultiSelectFlags_NoRangeSelect) + .value("ImGuiMultiSelectFlags_NoAutoSelect", ImGuiMultiSelectFlags_::ImGuiMultiSelectFlags_NoAutoSelect) + .value("ImGuiMultiSelectFlags_NoAutoClear", ImGuiMultiSelectFlags_::ImGuiMultiSelectFlags_NoAutoClear) + .value("ImGuiMultiSelectFlags_NoAutoClearOnReselect", + ImGuiMultiSelectFlags_::ImGuiMultiSelectFlags_NoAutoClearOnReselect) + .value("ImGuiMultiSelectFlags_BoxSelect1d", ImGuiMultiSelectFlags_::ImGuiMultiSelectFlags_BoxSelect1d) + .value("ImGuiMultiSelectFlags_BoxSelect2d", ImGuiMultiSelectFlags_::ImGuiMultiSelectFlags_BoxSelect2d) + .value("ImGuiMultiSelectFlags_BoxSelectNoScroll", ImGuiMultiSelectFlags_::ImGuiMultiSelectFlags_BoxSelectNoScroll) + .value("ImGuiMultiSelectFlags_ClearOnEscape", ImGuiMultiSelectFlags_::ImGuiMultiSelectFlags_ClearOnEscape) + .value("ImGuiMultiSelectFlags_ClearOnClickVoid", ImGuiMultiSelectFlags_::ImGuiMultiSelectFlags_ClearOnClickVoid) + .value("ImGuiMultiSelectFlags_ScopeWindow", ImGuiMultiSelectFlags_::ImGuiMultiSelectFlags_ScopeWindow) + .value("ImGuiMultiSelectFlags_ScopeRect", ImGuiMultiSelectFlags_::ImGuiMultiSelectFlags_ScopeRect) + .value("ImGuiMultiSelectFlags_SelectOnClick", ImGuiMultiSelectFlags_::ImGuiMultiSelectFlags_SelectOnClick) + .value("ImGuiMultiSelectFlags_SelectOnClickRelease", + ImGuiMultiSelectFlags_::ImGuiMultiSelectFlags_SelectOnClickRelease) + .value("ImGuiMultiSelectFlags_NavWrapX", ImGuiMultiSelectFlags_::ImGuiMultiSelectFlags_NavWrapX) + .export_values(); + + + py::enum_(m, "ImGuiWindowFlags", py::arithmetic()) + .value("ImGuiWindowFlags_None", ImGuiWindowFlags_::ImGuiWindowFlags_None) + .value("ImGuiWindowFlags_NoTitleBar", ImGuiWindowFlags_::ImGuiWindowFlags_NoTitleBar) + .value("ImGuiWindowFlags_NoResize", ImGuiWindowFlags_::ImGuiWindowFlags_NoResize) + .value("ImGuiWindowFlags_NoMove", ImGuiWindowFlags_::ImGuiWindowFlags_NoMove) + .value("ImGuiWindowFlags_NoScrollbar", ImGuiWindowFlags_::ImGuiWindowFlags_NoScrollbar) + .value("ImGuiWindowFlags_NoScrollWithMouse", ImGuiWindowFlags_::ImGuiWindowFlags_NoScrollWithMouse) + .value("ImGuiWindowFlags_NoCollapse", ImGuiWindowFlags_::ImGuiWindowFlags_NoCollapse) + .value("ImGuiWindowFlags_AlwaysAutoResize", ImGuiWindowFlags_::ImGuiWindowFlags_AlwaysAutoResize) + .value("ImGuiWindowFlags_NoBackground", ImGuiWindowFlags_::ImGuiWindowFlags_NoBackground) + .value("ImGuiWindowFlags_NoSavedSettings", ImGuiWindowFlags_::ImGuiWindowFlags_NoSavedSettings) + .value("ImGuiWindowFlags_NoMouseInputs", ImGuiWindowFlags_::ImGuiWindowFlags_NoMouseInputs) + .value("ImGuiWindowFlags_MenuBar", ImGuiWindowFlags_::ImGuiWindowFlags_MenuBar) + .value("ImGuiWindowFlags_HorizontalScrollbar", ImGuiWindowFlags_::ImGuiWindowFlags_HorizontalScrollbar) + .value("ImGuiWindowFlags_NoFocusOnAppearing", ImGuiWindowFlags_::ImGuiWindowFlags_NoFocusOnAppearing) + .value("ImGuiWindowFlags_NoBringToFrontOnFocus", ImGuiWindowFlags_::ImGuiWindowFlags_NoBringToFrontOnFocus) + .value("ImGuiWindowFlags_AlwaysVerticalScrollbar", ImGuiWindowFlags_::ImGuiWindowFlags_AlwaysVerticalScrollbar) + .value("ImGuiWindowFlags_AlwaysHorizontalScrollbar", + ImGuiWindowFlags_::ImGuiWindowFlags_AlwaysHorizontalScrollbar) + .value("ImGuiWindowFlags_NoNavInputs", ImGuiWindowFlags_::ImGuiWindowFlags_NoNavInputs) + .value("ImGuiWindowFlags_NoNavFocus", ImGuiWindowFlags_::ImGuiWindowFlags_NoNavFocus) + .value("ImGuiWindowFlags_UnsavedDocument", ImGuiWindowFlags_::ImGuiWindowFlags_UnsavedDocument) + .value("ImGuiWindowFlags_NoNav", ImGuiWindowFlags_::ImGuiWindowFlags_NoNav) + .value("ImGuiWindowFlags_NoDecoration", ImGuiWindowFlags_::ImGuiWindowFlags_NoDecoration) + .value("ImGuiWindowFlags_NoInputs", ImGuiWindowFlags_::ImGuiWindowFlags_NoInputs) + .value("ImGuiWindowFlags_ChildWindow", ImGuiWindowFlags_::ImGuiWindowFlags_ChildWindow) + .value("ImGuiWindowFlags_Tooltip", ImGuiWindowFlags_::ImGuiWindowFlags_Tooltip) + .value("ImGuiWindowFlags_Popup", ImGuiWindowFlags_::ImGuiWindowFlags_Popup) + .value("ImGuiWindowFlags_Modal", ImGuiWindowFlags_::ImGuiWindowFlags_Modal) + .value("ImGuiWindowFlags_ChildMenu", ImGuiWindowFlags_::ImGuiWindowFlags_ChildMenu) + .value("ImGuiWindowFlags_AlwaysUseWindowPadding", ImGuiWindowFlags_::ImGuiWindowFlags_AlwaysUseWindowPadding) + .value("ImGuiWindowFlags_NavFlattened", ImGuiWindowFlags_::ImGuiWindowFlags_NavFlattened) + .export_values(); + + + py::enum_(m, "ImGuiChildFlags", py::arithmetic()) + .value("ImGuiChildFlags_None", ImGuiChildFlags_::ImGuiChildFlags_None) + .value("ImGuiChildFlags_Border", ImGuiChildFlags_::ImGuiChildFlags_Border) + .value("ImGuiChildFlags_AlwaysUseWindowPadding", ImGuiChildFlags_::ImGuiChildFlags_AlwaysUseWindowPadding) + .value("ImGuiChildFlags_ResizeX", ImGuiChildFlags_::ImGuiChildFlags_ResizeX) + .value("ImGuiChildFlags_ResizeY", ImGuiChildFlags_::ImGuiChildFlags_ResizeY) + .value("ImGuiChildFlags_AutoResizeX", ImGuiChildFlags_::ImGuiChildFlags_AutoResizeX) + .value("ImGuiChildFlags_AutoResizeY", ImGuiChildFlags_::ImGuiChildFlags_AutoResizeY) + .value("ImGuiChildFlags_AlwaysAutoResize", ImGuiChildFlags_::ImGuiChildFlags_AlwaysAutoResize) + .value("ImGuiChildFlags_FrameStyle", ImGuiChildFlags_::ImGuiChildFlags_FrameStyle) + .value("ImGuiChildFlags_NavFlattened", ImGuiChildFlags_::ImGuiChildFlags_NavFlattened) + .export_values(); + + + py::enum_(m, "ImGuiItemFlags", py::arithmetic()) + .value("ImGuiItemFlags_None", ImGuiItemFlags_::ImGuiItemFlags_None) + .value("ImGuiItemFlags_NoTabStop", ImGuiItemFlags_::ImGuiItemFlags_NoTabStop) + .value("ImGuiItemFlags_NoNav", ImGuiItemFlags_::ImGuiItemFlags_NoNav) + .value("ImGuiItemFlags_NoNavDefaultFocus", ImGuiItemFlags_::ImGuiItemFlags_NoNavDefaultFocus) + .value("ImGuiItemFlags_ButtonRepeat", ImGuiItemFlags_::ImGuiItemFlags_ButtonRepeat) + .value("ImGuiItemFlags_AutoClosePopups", ImGuiItemFlags_::ImGuiItemFlags_AutoClosePopups) + .export_values(); + + + py::enum_(m, "ImGuiInputTextFlags", py::arithmetic()) + .value("ImGuiInputTextFlags_None", ImGuiInputTextFlags_::ImGuiInputTextFlags_None) + .value("ImGuiInputTextFlags_CharsDecimal", ImGuiInputTextFlags_::ImGuiInputTextFlags_CharsDecimal) + .value("ImGuiInputTextFlags_CharsHexadecimal", ImGuiInputTextFlags_::ImGuiInputTextFlags_CharsHexadecimal) + .value("ImGuiInputTextFlags_CharsScientific", ImGuiInputTextFlags_::ImGuiInputTextFlags_CharsScientific) + .value("ImGuiInputTextFlags_CharsUppercase", ImGuiInputTextFlags_::ImGuiInputTextFlags_CharsUppercase) + .value("ImGuiInputTextFlags_CharsNoBlank", ImGuiInputTextFlags_::ImGuiInputTextFlags_CharsNoBlank) + .value("ImGuiInputTextFlags_AllowTabInput", ImGuiInputTextFlags_::ImGuiInputTextFlags_AllowTabInput) + .value("ImGuiInputTextFlags_EnterReturnsTrue", ImGuiInputTextFlags_::ImGuiInputTextFlags_EnterReturnsTrue) + .value("ImGuiInputTextFlags_EscapeClearsAll", ImGuiInputTextFlags_::ImGuiInputTextFlags_EscapeClearsAll) + .value("ImGuiInputTextFlags_CtrlEnterForNewLine", ImGuiInputTextFlags_::ImGuiInputTextFlags_CtrlEnterForNewLine) + .value("ImGuiInputTextFlags_ReadOnly", ImGuiInputTextFlags_::ImGuiInputTextFlags_ReadOnly) + .value("ImGuiInputTextFlags_Password", ImGuiInputTextFlags_::ImGuiInputTextFlags_Password) + .value("ImGuiInputTextFlags_AlwaysOverwrite", ImGuiInputTextFlags_::ImGuiInputTextFlags_AlwaysOverwrite) + .value("ImGuiInputTextFlags_AutoSelectAll", ImGuiInputTextFlags_::ImGuiInputTextFlags_AutoSelectAll) + .value("ImGuiInputTextFlags_ParseEmptyRefVal", ImGuiInputTextFlags_::ImGuiInputTextFlags_ParseEmptyRefVal) + .value("ImGuiInputTextFlags_DisplayEmptyRefVal", ImGuiInputTextFlags_::ImGuiInputTextFlags_DisplayEmptyRefVal) + .value("ImGuiInputTextFlags_NoHorizontalScroll", ImGuiInputTextFlags_::ImGuiInputTextFlags_NoHorizontalScroll) + .value("ImGuiInputTextFlags_NoUndoRedo", ImGuiInputTextFlags_::ImGuiInputTextFlags_NoUndoRedo) + .value("ImGuiInputTextFlags_CallbackCompletion", ImGuiInputTextFlags_::ImGuiInputTextFlags_CallbackCompletion) + .value("ImGuiInputTextFlags_CallbackHistory", ImGuiInputTextFlags_::ImGuiInputTextFlags_CallbackHistory) + .value("ImGuiInputTextFlags_CallbackAlways", ImGuiInputTextFlags_::ImGuiInputTextFlags_CallbackAlways) + .value("ImGuiInputTextFlags_CallbackCharFilter", ImGuiInputTextFlags_::ImGuiInputTextFlags_CallbackCharFilter) + .value("ImGuiInputTextFlags_CallbackResize", ImGuiInputTextFlags_::ImGuiInputTextFlags_CallbackResize) + .value("ImGuiInputTextFlags_CallbackEdit", ImGuiInputTextFlags_::ImGuiInputTextFlags_CallbackEdit) + .export_values(); + + + py::enum_(m, "ImGuiTreeNodeFlags", py::arithmetic()) + .value("ImGuiTreeNodeFlags_None", ImGuiTreeNodeFlags_::ImGuiTreeNodeFlags_None) + .value("ImGuiTreeNodeFlags_Selected", ImGuiTreeNodeFlags_::ImGuiTreeNodeFlags_Selected) + .value("ImGuiTreeNodeFlags_Framed", ImGuiTreeNodeFlags_::ImGuiTreeNodeFlags_Framed) + .value("ImGuiTreeNodeFlags_AllowOverlap", ImGuiTreeNodeFlags_::ImGuiTreeNodeFlags_AllowOverlap) + .value("ImGuiTreeNodeFlags_NoTreePushOnOpen", ImGuiTreeNodeFlags_::ImGuiTreeNodeFlags_NoTreePushOnOpen) + .value("ImGuiTreeNodeFlags_NoAutoOpenOnLog", ImGuiTreeNodeFlags_::ImGuiTreeNodeFlags_NoAutoOpenOnLog) + .value("ImGuiTreeNodeFlags_DefaultOpen", ImGuiTreeNodeFlags_::ImGuiTreeNodeFlags_DefaultOpen) + .value("ImGuiTreeNodeFlags_OpenOnDoubleClick", ImGuiTreeNodeFlags_::ImGuiTreeNodeFlags_OpenOnDoubleClick) + .value("ImGuiTreeNodeFlags_OpenOnArrow", ImGuiTreeNodeFlags_::ImGuiTreeNodeFlags_OpenOnArrow) + .value("ImGuiTreeNodeFlags_Leaf", ImGuiTreeNodeFlags_::ImGuiTreeNodeFlags_Leaf) + .value("ImGuiTreeNodeFlags_Bullet", ImGuiTreeNodeFlags_::ImGuiTreeNodeFlags_Bullet) + .value("ImGuiTreeNodeFlags_FramePadding", ImGuiTreeNodeFlags_::ImGuiTreeNodeFlags_FramePadding) + .value("ImGuiTreeNodeFlags_SpanAvailWidth", ImGuiTreeNodeFlags_::ImGuiTreeNodeFlags_SpanAvailWidth) + .value("ImGuiTreeNodeFlags_SpanFullWidth", ImGuiTreeNodeFlags_::ImGuiTreeNodeFlags_SpanFullWidth) + .value("ImGuiTreeNodeFlags_SpanTextWidth", ImGuiTreeNodeFlags_::ImGuiTreeNodeFlags_SpanTextWidth) + .value("ImGuiTreeNodeFlags_SpanAllColumns", ImGuiTreeNodeFlags_::ImGuiTreeNodeFlags_SpanAllColumns) + .value("ImGuiTreeNodeFlags_NavLeftJumpsBackHere", ImGuiTreeNodeFlags_::ImGuiTreeNodeFlags_NavLeftJumpsBackHere) + .value("ImGuiTreeNodeFlags_CollapsingHeader", ImGuiTreeNodeFlags_::ImGuiTreeNodeFlags_CollapsingHeader) + .value("ImGuiTreeNodeFlags_AllowItemOverlap", ImGuiTreeNodeFlags_::ImGuiTreeNodeFlags_AllowItemOverlap) + .export_values(); + + + py::enum_(m, "ImGuiPopupFlags", py::arithmetic()) + .value("ImGuiPopupFlags_None", ImGuiPopupFlags_::ImGuiPopupFlags_None) + .value("ImGuiPopupFlags_MouseButtonLeft", ImGuiPopupFlags_::ImGuiPopupFlags_MouseButtonLeft) + .value("ImGuiPopupFlags_MouseButtonRight", ImGuiPopupFlags_::ImGuiPopupFlags_MouseButtonRight) + .value("ImGuiPopupFlags_MouseButtonMiddle", ImGuiPopupFlags_::ImGuiPopupFlags_MouseButtonMiddle) + .value("ImGuiPopupFlags_MouseButtonMask_", ImGuiPopupFlags_::ImGuiPopupFlags_MouseButtonMask_) + .value("ImGuiPopupFlags_MouseButtonDefault_", ImGuiPopupFlags_::ImGuiPopupFlags_MouseButtonDefault_) + .value("ImGuiPopupFlags_NoReopen", ImGuiPopupFlags_::ImGuiPopupFlags_NoReopen) + .value("ImGuiPopupFlags_NoOpenOverExistingPopup", ImGuiPopupFlags_::ImGuiPopupFlags_NoOpenOverExistingPopup) + .value("ImGuiPopupFlags_NoOpenOverItems", ImGuiPopupFlags_::ImGuiPopupFlags_NoOpenOverItems) + .value("ImGuiPopupFlags_AnyPopupId", ImGuiPopupFlags_::ImGuiPopupFlags_AnyPopupId) + .value("ImGuiPopupFlags_AnyPopupLevel", ImGuiPopupFlags_::ImGuiPopupFlags_AnyPopupLevel) + .value("ImGuiPopupFlags_AnyPopup", ImGuiPopupFlags_::ImGuiPopupFlags_AnyPopup) + .export_values(); + + + py::enum_(m, "ImGuiSelectableFlags", py::arithmetic()) + .value("ImGuiSelectableFlags_None", ImGuiSelectableFlags_::ImGuiSelectableFlags_None) + .value("ImGuiSelectableFlags_NoAutoClosePopups", ImGuiSelectableFlags_::ImGuiSelectableFlags_NoAutoClosePopups) + .value("ImGuiSelectableFlags_SpanAllColumns", ImGuiSelectableFlags_::ImGuiSelectableFlags_SpanAllColumns) + .value("ImGuiSelectableFlags_AllowDoubleClick", ImGuiSelectableFlags_::ImGuiSelectableFlags_AllowDoubleClick) + .value("ImGuiSelectableFlags_Disabled", ImGuiSelectableFlags_::ImGuiSelectableFlags_Disabled) + .value("ImGuiSelectableFlags_AllowOverlap", ImGuiSelectableFlags_::ImGuiSelectableFlags_AllowOverlap) + .value("ImGuiSelectableFlags_Highlight", ImGuiSelectableFlags_::ImGuiSelectableFlags_Highlight) + .value("ImGuiSelectableFlags_DontClosePopups", ImGuiSelectableFlags_::ImGuiSelectableFlags_DontClosePopups) + .value("ImGuiSelectableFlags_AllowItemOverlap", ImGuiSelectableFlags_::ImGuiSelectableFlags_AllowItemOverlap) + .export_values(); + + + py::enum_(m, "ImGuiComboFlags", py::arithmetic()) + .value("ImGuiComboFlags_None", ImGuiComboFlags_::ImGuiComboFlags_None) + .value("ImGuiComboFlags_PopupAlignLeft", ImGuiComboFlags_::ImGuiComboFlags_PopupAlignLeft) + .value("ImGuiComboFlags_HeightSmall", ImGuiComboFlags_::ImGuiComboFlags_HeightSmall) + .value("ImGuiComboFlags_HeightRegular", ImGuiComboFlags_::ImGuiComboFlags_HeightRegular) + .value("ImGuiComboFlags_HeightLarge", ImGuiComboFlags_::ImGuiComboFlags_HeightLarge) + .value("ImGuiComboFlags_HeightLargest", ImGuiComboFlags_::ImGuiComboFlags_HeightLargest) + .value("ImGuiComboFlags_NoArrowButton", ImGuiComboFlags_::ImGuiComboFlags_NoArrowButton) + .value("ImGuiComboFlags_NoPreview", ImGuiComboFlags_::ImGuiComboFlags_NoPreview) + .value("ImGuiComboFlags_WidthFitPreview", ImGuiComboFlags_::ImGuiComboFlags_WidthFitPreview) + .value("ImGuiComboFlags_HeightMask_", ImGuiComboFlags_::ImGuiComboFlags_HeightMask_) + .export_values(); + + + py::enum_(m, "ImGuiTabBarFlags", py::arithmetic()) + .value("ImGuiTabBarFlags_None", ImGuiTabBarFlags_::ImGuiTabBarFlags_None) + .value("ImGuiTabBarFlags_Reorderable", ImGuiTabBarFlags_::ImGuiTabBarFlags_Reorderable) + .value("ImGuiTabBarFlags_AutoSelectNewTabs", ImGuiTabBarFlags_::ImGuiTabBarFlags_AutoSelectNewTabs) + .value("ImGuiTabBarFlags_TabListPopupButton", ImGuiTabBarFlags_::ImGuiTabBarFlags_TabListPopupButton) + .value("ImGuiTabBarFlags_NoCloseWithMiddleMouseButton", + ImGuiTabBarFlags_::ImGuiTabBarFlags_NoCloseWithMiddleMouseButton) + .value("ImGuiTabBarFlags_NoTabListScrollingButtons", + ImGuiTabBarFlags_::ImGuiTabBarFlags_NoTabListScrollingButtons) + .value("ImGuiTabBarFlags_NoTooltip", ImGuiTabBarFlags_::ImGuiTabBarFlags_NoTooltip) + .value("ImGuiTabBarFlags_DrawSelectedOverline", ImGuiTabBarFlags_::ImGuiTabBarFlags_DrawSelectedOverline) + .value("ImGuiTabBarFlags_FittingPolicyResizeDown", ImGuiTabBarFlags_::ImGuiTabBarFlags_FittingPolicyResizeDown) + .value("ImGuiTabBarFlags_FittingPolicyScroll", ImGuiTabBarFlags_::ImGuiTabBarFlags_FittingPolicyScroll) + .value("ImGuiTabBarFlags_FittingPolicyMask_", ImGuiTabBarFlags_::ImGuiTabBarFlags_FittingPolicyMask_) + .value("ImGuiTabBarFlags_FittingPolicyDefault_", ImGuiTabBarFlags_::ImGuiTabBarFlags_FittingPolicyDefault_) + .export_values(); + + + py::enum_(m, "ImGuiTabItemFlags", py::arithmetic()) + .value("ImGuiTabItemFlags_None", ImGuiTabItemFlags_::ImGuiTabItemFlags_None) + .value("ImGuiTabItemFlags_UnsavedDocument", ImGuiTabItemFlags_::ImGuiTabItemFlags_UnsavedDocument) + .value("ImGuiTabItemFlags_SetSelected", ImGuiTabItemFlags_::ImGuiTabItemFlags_SetSelected) + .value("ImGuiTabItemFlags_NoCloseWithMiddleMouseButton", + ImGuiTabItemFlags_::ImGuiTabItemFlags_NoCloseWithMiddleMouseButton) + .value("ImGuiTabItemFlags_NoPushId", ImGuiTabItemFlags_::ImGuiTabItemFlags_NoPushId) + .value("ImGuiTabItemFlags_NoTooltip", ImGuiTabItemFlags_::ImGuiTabItemFlags_NoTooltip) + .value("ImGuiTabItemFlags_NoReorder", ImGuiTabItemFlags_::ImGuiTabItemFlags_NoReorder) + .value("ImGuiTabItemFlags_Leading", ImGuiTabItemFlags_::ImGuiTabItemFlags_Leading) + .value("ImGuiTabItemFlags_Trailing", ImGuiTabItemFlags_::ImGuiTabItemFlags_Trailing) + .value("ImGuiTabItemFlags_NoAssumedClosure", ImGuiTabItemFlags_::ImGuiTabItemFlags_NoAssumedClosure) + .export_values(); + + + py::enum_(m, "ImGuiFocusedFlags", py::arithmetic()) + .value("ImGuiFocusedFlags_None", ImGuiFocusedFlags_::ImGuiFocusedFlags_None) + .value("ImGuiFocusedFlags_ChildWindows", ImGuiFocusedFlags_::ImGuiFocusedFlags_ChildWindows) + .value("ImGuiFocusedFlags_RootWindow", ImGuiFocusedFlags_::ImGuiFocusedFlags_RootWindow) + .value("ImGuiFocusedFlags_AnyWindow", ImGuiFocusedFlags_::ImGuiFocusedFlags_AnyWindow) + .value("ImGuiFocusedFlags_NoPopupHierarchy", ImGuiFocusedFlags_::ImGuiFocusedFlags_NoPopupHierarchy) + .value("ImGuiFocusedFlags_RootAndChildWindows", ImGuiFocusedFlags_::ImGuiFocusedFlags_RootAndChildWindows) + .export_values(); + + + py::enum_(m, "ImGuiHoveredFlags", py::arithmetic()) + .value("ImGuiHoveredFlags_None", ImGuiHoveredFlags_::ImGuiHoveredFlags_None) + .value("ImGuiHoveredFlags_ChildWindows", ImGuiHoveredFlags_::ImGuiHoveredFlags_ChildWindows) + .value("ImGuiHoveredFlags_RootWindow", ImGuiHoveredFlags_::ImGuiHoveredFlags_RootWindow) + .value("ImGuiHoveredFlags_AnyWindow", ImGuiHoveredFlags_::ImGuiHoveredFlags_AnyWindow) + .value("ImGuiHoveredFlags_NoPopupHierarchy", ImGuiHoveredFlags_::ImGuiHoveredFlags_NoPopupHierarchy) + .value("ImGuiHoveredFlags_AllowWhenBlockedByPopup", ImGuiHoveredFlags_::ImGuiHoveredFlags_AllowWhenBlockedByPopup) + .value("ImGuiHoveredFlags_AllowWhenBlockedByActiveItem", + ImGuiHoveredFlags_::ImGuiHoveredFlags_AllowWhenBlockedByActiveItem) + .value("ImGuiHoveredFlags_AllowWhenOverlappedByItem", + ImGuiHoveredFlags_::ImGuiHoveredFlags_AllowWhenOverlappedByItem) + .value("ImGuiHoveredFlags_AllowWhenOverlappedByWindow", + ImGuiHoveredFlags_::ImGuiHoveredFlags_AllowWhenOverlappedByWindow) + .value("ImGuiHoveredFlags_AllowWhenDisabled", ImGuiHoveredFlags_::ImGuiHoveredFlags_AllowWhenDisabled) + .value("ImGuiHoveredFlags_NoNavOverride", ImGuiHoveredFlags_::ImGuiHoveredFlags_NoNavOverride) + .value("ImGuiHoveredFlags_AllowWhenOverlapped", ImGuiHoveredFlags_::ImGuiHoveredFlags_AllowWhenOverlapped) + .value("ImGuiHoveredFlags_RectOnly", ImGuiHoveredFlags_::ImGuiHoveredFlags_RectOnly) + .value("ImGuiHoveredFlags_RootAndChildWindows", ImGuiHoveredFlags_::ImGuiHoveredFlags_RootAndChildWindows) + .value("ImGuiHoveredFlags_ForTooltip", ImGuiHoveredFlags_::ImGuiHoveredFlags_ForTooltip) + .value("ImGuiHoveredFlags_Stationary", ImGuiHoveredFlags_::ImGuiHoveredFlags_Stationary) + .value("ImGuiHoveredFlags_DelayNone", ImGuiHoveredFlags_::ImGuiHoveredFlags_DelayNone) + .value("ImGuiHoveredFlags_DelayShort", ImGuiHoveredFlags_::ImGuiHoveredFlags_DelayShort) + .value("ImGuiHoveredFlags_DelayNormal", ImGuiHoveredFlags_::ImGuiHoveredFlags_DelayNormal) + .value("ImGuiHoveredFlags_NoSharedDelay", ImGuiHoveredFlags_::ImGuiHoveredFlags_NoSharedDelay) + .export_values(); + + + py::enum_(m, "ImGuiDragDropFlags", py::arithmetic()) + .value("ImGuiDragDropFlags_None", ImGuiDragDropFlags_::ImGuiDragDropFlags_None) + .value("ImGuiDragDropFlags_SourceNoPreviewTooltip", + ImGuiDragDropFlags_::ImGuiDragDropFlags_SourceNoPreviewTooltip) + .value("ImGuiDragDropFlags_SourceNoDisableHover", ImGuiDragDropFlags_::ImGuiDragDropFlags_SourceNoDisableHover) + .value("ImGuiDragDropFlags_SourceNoHoldToOpenOthers", + ImGuiDragDropFlags_::ImGuiDragDropFlags_SourceNoHoldToOpenOthers) + .value("ImGuiDragDropFlags_SourceAllowNullID", ImGuiDragDropFlags_::ImGuiDragDropFlags_SourceAllowNullID) + .value("ImGuiDragDropFlags_SourceExtern", ImGuiDragDropFlags_::ImGuiDragDropFlags_SourceExtern) + .value("ImGuiDragDropFlags_PayloadAutoExpire", ImGuiDragDropFlags_::ImGuiDragDropFlags_PayloadAutoExpire) + .value("ImGuiDragDropFlags_PayloadNoCrossContext", ImGuiDragDropFlags_::ImGuiDragDropFlags_PayloadNoCrossContext) + .value("ImGuiDragDropFlags_PayloadNoCrossProcess", ImGuiDragDropFlags_::ImGuiDragDropFlags_PayloadNoCrossProcess) + .value("ImGuiDragDropFlags_AcceptBeforeDelivery", ImGuiDragDropFlags_::ImGuiDragDropFlags_AcceptBeforeDelivery) + .value("ImGuiDragDropFlags_AcceptNoDrawDefaultRect", + ImGuiDragDropFlags_::ImGuiDragDropFlags_AcceptNoDrawDefaultRect) + .value("ImGuiDragDropFlags_AcceptNoPreviewTooltip", + ImGuiDragDropFlags_::ImGuiDragDropFlags_AcceptNoPreviewTooltip) + .value("ImGuiDragDropFlags_AcceptPeekOnly", ImGuiDragDropFlags_::ImGuiDragDropFlags_AcceptPeekOnly) + .export_values(); + + + py::enum_(m, "ImGuiDataType") + .value("ImGuiDataType_S8", ImGuiDataType_::ImGuiDataType_S8) + .value("ImGuiDataType_U8", ImGuiDataType_::ImGuiDataType_U8) + .value("ImGuiDataType_S16", ImGuiDataType_::ImGuiDataType_S16) + .value("ImGuiDataType_U16", ImGuiDataType_::ImGuiDataType_U16) + .value("ImGuiDataType_S32", ImGuiDataType_::ImGuiDataType_S32) + .value("ImGuiDataType_U32", ImGuiDataType_::ImGuiDataType_U32) + .value("ImGuiDataType_S64", ImGuiDataType_::ImGuiDataType_S64) + .value("ImGuiDataType_U64", ImGuiDataType_::ImGuiDataType_U64) + .value("ImGuiDataType_Float", ImGuiDataType_::ImGuiDataType_Float) + .value("ImGuiDataType_Double", ImGuiDataType_::ImGuiDataType_Double) + .value("ImGuiDataType_Bool", ImGuiDataType_::ImGuiDataType_Bool) + .value("ImGuiDataType_COUNT", ImGuiDataType_::ImGuiDataType_COUNT) + .export_values(); + + + py::enum_(m, "ImGuiDir") + .value("ImGuiDir_None", ImGuiDir::ImGuiDir_None) + .value("ImGuiDir_Left", ImGuiDir::ImGuiDir_Left) + .value("ImGuiDir_Right", ImGuiDir::ImGuiDir_Right) + .value("ImGuiDir_Up", ImGuiDir::ImGuiDir_Up) + .value("ImGuiDir_Down", ImGuiDir::ImGuiDir_Down) + .value("ImGuiDir_COUNT", ImGuiDir::ImGuiDir_COUNT) + .export_values(); + + + py::enum_(m, "ImGuiSortDirection") + .value("ImGuiSortDirection_None", ImGuiSortDirection::ImGuiSortDirection_None) + .value("ImGuiSortDirection_Ascending", ImGuiSortDirection::ImGuiSortDirection_Ascending) + .value("ImGuiSortDirection_Descending", ImGuiSortDirection::ImGuiSortDirection_Descending) + .export_values(); + + + py::enum_(m, "ImGuiKey") + .value("ImGuiKey_None", ImGuiKey::ImGuiKey_None) + .value("ImGuiKey_Tab", ImGuiKey::ImGuiKey_Tab) + .value("ImGuiKey_LeftArrow", ImGuiKey::ImGuiKey_LeftArrow) + .value("ImGuiKey_RightArrow", ImGuiKey::ImGuiKey_RightArrow) + .value("ImGuiKey_UpArrow", ImGuiKey::ImGuiKey_UpArrow) + .value("ImGuiKey_DownArrow", ImGuiKey::ImGuiKey_DownArrow) + .value("ImGuiKey_PageUp", ImGuiKey::ImGuiKey_PageUp) + .value("ImGuiKey_PageDown", ImGuiKey::ImGuiKey_PageDown) + .value("ImGuiKey_Home", ImGuiKey::ImGuiKey_Home) + .value("ImGuiKey_End", ImGuiKey::ImGuiKey_End) + .value("ImGuiKey_Insert", ImGuiKey::ImGuiKey_Insert) + .value("ImGuiKey_Delete", ImGuiKey::ImGuiKey_Delete) + .value("ImGuiKey_Backspace", ImGuiKey::ImGuiKey_Backspace) + .value("ImGuiKey_Space", ImGuiKey::ImGuiKey_Space) + .value("ImGuiKey_Enter", ImGuiKey::ImGuiKey_Enter) + .value("ImGuiKey_Escape", ImGuiKey::ImGuiKey_Escape) + .value("ImGuiKey_LeftCtrl", ImGuiKey::ImGuiKey_LeftCtrl) + .value("ImGuiKey_LeftShift", ImGuiKey::ImGuiKey_LeftShift) + .value("ImGuiKey_LeftAlt", ImGuiKey::ImGuiKey_LeftAlt) + .value("ImGuiKey_LeftSuper", ImGuiKey::ImGuiKey_LeftSuper) + .value("ImGuiKey_RightCtrl", ImGuiKey::ImGuiKey_RightCtrl) + .value("ImGuiKey_RightShift", ImGuiKey::ImGuiKey_RightShift) + .value("ImGuiKey_RightAlt", ImGuiKey::ImGuiKey_RightAlt) + .value("ImGuiKey_RightSuper", ImGuiKey::ImGuiKey_RightSuper) + .value("ImGuiKey_Menu", ImGuiKey::ImGuiKey_Menu) + .value("ImGuiKey_0", ImGuiKey::ImGuiKey_0) + .value("ImGuiKey_1", ImGuiKey::ImGuiKey_1) + .value("ImGuiKey_2", ImGuiKey::ImGuiKey_2) + .value("ImGuiKey_3", ImGuiKey::ImGuiKey_3) + .value("ImGuiKey_4", ImGuiKey::ImGuiKey_4) + .value("ImGuiKey_5", ImGuiKey::ImGuiKey_5) + .value("ImGuiKey_6", ImGuiKey::ImGuiKey_6) + .value("ImGuiKey_7", ImGuiKey::ImGuiKey_7) + .value("ImGuiKey_8", ImGuiKey::ImGuiKey_8) + .value("ImGuiKey_9", ImGuiKey::ImGuiKey_9) + .value("ImGuiKey_A", ImGuiKey::ImGuiKey_A) + .value("ImGuiKey_B", ImGuiKey::ImGuiKey_B) + .value("ImGuiKey_C", ImGuiKey::ImGuiKey_C) + .value("ImGuiKey_D", ImGuiKey::ImGuiKey_D) + .value("ImGuiKey_E", ImGuiKey::ImGuiKey_E) + .value("ImGuiKey_F", ImGuiKey::ImGuiKey_F) + .value("ImGuiKey_G", ImGuiKey::ImGuiKey_G) + .value("ImGuiKey_H", ImGuiKey::ImGuiKey_H) + .value("ImGuiKey_I", ImGuiKey::ImGuiKey_I) + .value("ImGuiKey_J", ImGuiKey::ImGuiKey_J) + .value("ImGuiKey_K", ImGuiKey::ImGuiKey_K) + .value("ImGuiKey_L", ImGuiKey::ImGuiKey_L) + .value("ImGuiKey_M", ImGuiKey::ImGuiKey_M) + .value("ImGuiKey_N", ImGuiKey::ImGuiKey_N) + .value("ImGuiKey_O", ImGuiKey::ImGuiKey_O) + .value("ImGuiKey_P", ImGuiKey::ImGuiKey_P) + .value("ImGuiKey_Q", ImGuiKey::ImGuiKey_Q) + .value("ImGuiKey_R", ImGuiKey::ImGuiKey_R) + .value("ImGuiKey_S", ImGuiKey::ImGuiKey_S) + .value("ImGuiKey_T", ImGuiKey::ImGuiKey_T) + .value("ImGuiKey_U", ImGuiKey::ImGuiKey_U) + .value("ImGuiKey_V", ImGuiKey::ImGuiKey_V) + .value("ImGuiKey_W", ImGuiKey::ImGuiKey_W) + .value("ImGuiKey_X", ImGuiKey::ImGuiKey_X) + .value("ImGuiKey_Y", ImGuiKey::ImGuiKey_Y) + .value("ImGuiKey_Z", ImGuiKey::ImGuiKey_Z) + .value("ImGuiKey_F1", ImGuiKey::ImGuiKey_F1) + .value("ImGuiKey_F2", ImGuiKey::ImGuiKey_F2) + .value("ImGuiKey_F3", ImGuiKey::ImGuiKey_F3) + .value("ImGuiKey_F4", ImGuiKey::ImGuiKey_F4) + .value("ImGuiKey_F5", ImGuiKey::ImGuiKey_F5) + .value("ImGuiKey_F6", ImGuiKey::ImGuiKey_F6) + .value("ImGuiKey_F7", ImGuiKey::ImGuiKey_F7) + .value("ImGuiKey_F8", ImGuiKey::ImGuiKey_F8) + .value("ImGuiKey_F9", ImGuiKey::ImGuiKey_F9) + .value("ImGuiKey_F10", ImGuiKey::ImGuiKey_F10) + .value("ImGuiKey_F11", ImGuiKey::ImGuiKey_F11) + .value("ImGuiKey_F12", ImGuiKey::ImGuiKey_F12) + .value("ImGuiKey_F13", ImGuiKey::ImGuiKey_F13) + .value("ImGuiKey_F14", ImGuiKey::ImGuiKey_F14) + .value("ImGuiKey_F15", ImGuiKey::ImGuiKey_F15) + .value("ImGuiKey_F16", ImGuiKey::ImGuiKey_F16) + .value("ImGuiKey_F17", ImGuiKey::ImGuiKey_F17) + .value("ImGuiKey_F18", ImGuiKey::ImGuiKey_F18) + .value("ImGuiKey_F19", ImGuiKey::ImGuiKey_F19) + .value("ImGuiKey_F20", ImGuiKey::ImGuiKey_F20) + .value("ImGuiKey_F21", ImGuiKey::ImGuiKey_F21) + .value("ImGuiKey_F22", ImGuiKey::ImGuiKey_F22) + .value("ImGuiKey_F23", ImGuiKey::ImGuiKey_F23) + .value("ImGuiKey_F24", ImGuiKey::ImGuiKey_F24) + .value("ImGuiKey_Apostrophe", ImGuiKey::ImGuiKey_Apostrophe) + .value("ImGuiKey_Comma", ImGuiKey::ImGuiKey_Comma) + .value("ImGuiKey_Minus", ImGuiKey::ImGuiKey_Minus) + .value("ImGuiKey_Period", ImGuiKey::ImGuiKey_Period) + .value("ImGuiKey_Slash", ImGuiKey::ImGuiKey_Slash) + .value("ImGuiKey_Semicolon", ImGuiKey::ImGuiKey_Semicolon) + .value("ImGuiKey_Equal", ImGuiKey::ImGuiKey_Equal) + .value("ImGuiKey_LeftBracket", ImGuiKey::ImGuiKey_LeftBracket) + .value("ImGuiKey_Backslash", ImGuiKey::ImGuiKey_Backslash) + .value("ImGuiKey_RightBracket", ImGuiKey::ImGuiKey_RightBracket) + .value("ImGuiKey_GraveAccent", ImGuiKey::ImGuiKey_GraveAccent) + .value("ImGuiKey_CapsLock", ImGuiKey::ImGuiKey_CapsLock) + .value("ImGuiKey_ScrollLock", ImGuiKey::ImGuiKey_ScrollLock) + .value("ImGuiKey_NumLock", ImGuiKey::ImGuiKey_NumLock) + .value("ImGuiKey_PrintScreen", ImGuiKey::ImGuiKey_PrintScreen) + .value("ImGuiKey_Pause", ImGuiKey::ImGuiKey_Pause) + .value("ImGuiKey_Keypad0", ImGuiKey::ImGuiKey_Keypad0) + .value("ImGuiKey_Keypad1", ImGuiKey::ImGuiKey_Keypad1) + .value("ImGuiKey_Keypad2", ImGuiKey::ImGuiKey_Keypad2) + .value("ImGuiKey_Keypad3", ImGuiKey::ImGuiKey_Keypad3) + .value("ImGuiKey_Keypad4", ImGuiKey::ImGuiKey_Keypad4) + .value("ImGuiKey_Keypad5", ImGuiKey::ImGuiKey_Keypad5) + .value("ImGuiKey_Keypad6", ImGuiKey::ImGuiKey_Keypad6) + .value("ImGuiKey_Keypad7", ImGuiKey::ImGuiKey_Keypad7) + .value("ImGuiKey_Keypad8", ImGuiKey::ImGuiKey_Keypad8) + .value("ImGuiKey_Keypad9", ImGuiKey::ImGuiKey_Keypad9) + .value("ImGuiKey_KeypadDecimal", ImGuiKey::ImGuiKey_KeypadDecimal) + .value("ImGuiKey_KeypadDivide", ImGuiKey::ImGuiKey_KeypadDivide) + .value("ImGuiKey_KeypadMultiply", ImGuiKey::ImGuiKey_KeypadMultiply) + .value("ImGuiKey_KeypadSubtract", ImGuiKey::ImGuiKey_KeypadSubtract) + .value("ImGuiKey_KeypadAdd", ImGuiKey::ImGuiKey_KeypadAdd) + .value("ImGuiKey_KeypadEnter", ImGuiKey::ImGuiKey_KeypadEnter) + .value("ImGuiKey_KeypadEqual", ImGuiKey::ImGuiKey_KeypadEqual) + .value("ImGuiKey_AppBack", ImGuiKey::ImGuiKey_AppBack) + .value("ImGuiKey_AppForward", ImGuiKey::ImGuiKey_AppForward) + .value("ImGuiKey_GamepadStart", ImGuiKey::ImGuiKey_GamepadStart) + .value("ImGuiKey_GamepadBack", ImGuiKey::ImGuiKey_GamepadBack) + .value("ImGuiKey_GamepadFaceLeft", ImGuiKey::ImGuiKey_GamepadFaceLeft) + .value("ImGuiKey_GamepadFaceRight", ImGuiKey::ImGuiKey_GamepadFaceRight) + .value("ImGuiKey_GamepadFaceUp", ImGuiKey::ImGuiKey_GamepadFaceUp) + .value("ImGuiKey_GamepadFaceDown", ImGuiKey::ImGuiKey_GamepadFaceDown) + .value("ImGuiKey_GamepadDpadLeft", ImGuiKey::ImGuiKey_GamepadDpadLeft) + .value("ImGuiKey_GamepadDpadRight", ImGuiKey::ImGuiKey_GamepadDpadRight) + .value("ImGuiKey_GamepadDpadUp", ImGuiKey::ImGuiKey_GamepadDpadUp) + .value("ImGuiKey_GamepadDpadDown", ImGuiKey::ImGuiKey_GamepadDpadDown) + .value("ImGuiKey_GamepadL1", ImGuiKey::ImGuiKey_GamepadL1) + .value("ImGuiKey_GamepadR1", ImGuiKey::ImGuiKey_GamepadR1) + .value("ImGuiKey_GamepadL2", ImGuiKey::ImGuiKey_GamepadL2) + .value("ImGuiKey_GamepadR2", ImGuiKey::ImGuiKey_GamepadR2) + .value("ImGuiKey_GamepadL3", ImGuiKey::ImGuiKey_GamepadL3) + .value("ImGuiKey_GamepadR3", ImGuiKey::ImGuiKey_GamepadR3) + .value("ImGuiKey_GamepadLStickLeft", ImGuiKey::ImGuiKey_GamepadLStickLeft) + .value("ImGuiKey_GamepadLStickRight", ImGuiKey::ImGuiKey_GamepadLStickRight) + .value("ImGuiKey_GamepadLStickUp", ImGuiKey::ImGuiKey_GamepadLStickUp) + .value("ImGuiKey_GamepadLStickDown", ImGuiKey::ImGuiKey_GamepadLStickDown) + .value("ImGuiKey_GamepadRStickLeft", ImGuiKey::ImGuiKey_GamepadRStickLeft) + .value("ImGuiKey_GamepadRStickRight", ImGuiKey::ImGuiKey_GamepadRStickRight) + .value("ImGuiKey_GamepadRStickUp", ImGuiKey::ImGuiKey_GamepadRStickUp) + .value("ImGuiKey_GamepadRStickDown", ImGuiKey::ImGuiKey_GamepadRStickDown) + .value("ImGuiKey_MouseLeft", ImGuiKey::ImGuiKey_MouseLeft) + .value("ImGuiKey_MouseRight", ImGuiKey::ImGuiKey_MouseRight) + .value("ImGuiKey_MouseMiddle", ImGuiKey::ImGuiKey_MouseMiddle) + .value("ImGuiKey_MouseX1", ImGuiKey::ImGuiKey_MouseX1) + .value("ImGuiKey_MouseX2", ImGuiKey::ImGuiKey_MouseX2) + .value("ImGuiKey_MouseWheelX", ImGuiKey::ImGuiKey_MouseWheelX) + .value("ImGuiKey_MouseWheelY", ImGuiKey::ImGuiKey_MouseWheelY) + .value("ImGuiKey_ReservedForModCtrl", ImGuiKey::ImGuiKey_ReservedForModCtrl) + .value("ImGuiKey_ReservedForModShift", ImGuiKey::ImGuiKey_ReservedForModShift) + .value("ImGuiKey_ReservedForModAlt", ImGuiKey::ImGuiKey_ReservedForModAlt) + .value("ImGuiKey_ReservedForModSuper", ImGuiKey::ImGuiKey_ReservedForModSuper) + .value("ImGuiKey_COUNT", ImGuiKey::ImGuiKey_COUNT) + .value("ImGuiMod_None", ImGuiKey::ImGuiMod_None) + .value("ImGuiMod_Ctrl", ImGuiKey::ImGuiMod_Ctrl) + .value("ImGuiMod_Shift", ImGuiKey::ImGuiMod_Shift) + .value("ImGuiMod_Alt", ImGuiKey::ImGuiMod_Alt) + .value("ImGuiMod_Super", ImGuiKey::ImGuiMod_Super) + .value("ImGuiMod_Mask_", ImGuiKey::ImGuiMod_Mask_) + .value("ImGuiKey_NamedKey_BEGIN", ImGuiKey::ImGuiKey_NamedKey_BEGIN) + .value("ImGuiKey_NamedKey_END", ImGuiKey::ImGuiKey_NamedKey_END) + .value("ImGuiKey_NamedKey_COUNT", ImGuiKey::ImGuiKey_NamedKey_COUNT) + .value("ImGuiKey_KeysData_SIZE", ImGuiKey::ImGuiKey_KeysData_SIZE) + .value("ImGuiKey_KeysData_OFFSET", ImGuiKey::ImGuiKey_KeysData_OFFSET) + .export_values(); + + + py::enum_(m, "ImGuiInputFlags", py::arithmetic()) + .value("ImGuiInputFlags_None", ImGuiInputFlags_::ImGuiInputFlags_None) + .value("ImGuiInputFlags_Repeat", ImGuiInputFlags_::ImGuiInputFlags_Repeat) + .value("ImGuiInputFlags_RouteActive", ImGuiInputFlags_::ImGuiInputFlags_RouteActive) + .value("ImGuiInputFlags_RouteFocused", ImGuiInputFlags_::ImGuiInputFlags_RouteFocused) + .value("ImGuiInputFlags_RouteGlobal", ImGuiInputFlags_::ImGuiInputFlags_RouteGlobal) + .value("ImGuiInputFlags_RouteAlways", ImGuiInputFlags_::ImGuiInputFlags_RouteAlways) + .value("ImGuiInputFlags_RouteOverFocused", ImGuiInputFlags_::ImGuiInputFlags_RouteOverFocused) + .value("ImGuiInputFlags_RouteOverActive", ImGuiInputFlags_::ImGuiInputFlags_RouteOverActive) + .value("ImGuiInputFlags_RouteUnlessBgFocused", ImGuiInputFlags_::ImGuiInputFlags_RouteUnlessBgFocused) + .value("ImGuiInputFlags_RouteFromRootWindow", ImGuiInputFlags_::ImGuiInputFlags_RouteFromRootWindow) + .value("ImGuiInputFlags_Tooltip", ImGuiInputFlags_::ImGuiInputFlags_Tooltip) + .export_values(); + + + py::enum_(m, "ImGuiConfigFlags", py::arithmetic()) + .value("ImGuiConfigFlags_None", ImGuiConfigFlags_::ImGuiConfigFlags_None) + .value("ImGuiConfigFlags_NavEnableKeyboard", ImGuiConfigFlags_::ImGuiConfigFlags_NavEnableKeyboard) + .value("ImGuiConfigFlags_NavEnableGamepad", ImGuiConfigFlags_::ImGuiConfigFlags_NavEnableGamepad) + .value("ImGuiConfigFlags_NavEnableSetMousePos", ImGuiConfigFlags_::ImGuiConfigFlags_NavEnableSetMousePos) + .value("ImGuiConfigFlags_NavNoCaptureKeyboard", ImGuiConfigFlags_::ImGuiConfigFlags_NavNoCaptureKeyboard) + .value("ImGuiConfigFlags_NoMouse", ImGuiConfigFlags_::ImGuiConfigFlags_NoMouse) + .value("ImGuiConfigFlags_NoMouseCursorChange", ImGuiConfigFlags_::ImGuiConfigFlags_NoMouseCursorChange) + .value("ImGuiConfigFlags_NoKeyboard", ImGuiConfigFlags_::ImGuiConfigFlags_NoKeyboard) + .value("ImGuiConfigFlags_IsSRGB", ImGuiConfigFlags_::ImGuiConfigFlags_IsSRGB) + .value("ImGuiConfigFlags_IsTouchScreen", ImGuiConfigFlags_::ImGuiConfigFlags_IsTouchScreen) + .export_values(); + + + py::enum_(m, "ImGuiBackendFlags", py::arithmetic()) + .value("ImGuiBackendFlags_None", ImGuiBackendFlags_::ImGuiBackendFlags_None) + .value("ImGuiBackendFlags_HasGamepad", ImGuiBackendFlags_::ImGuiBackendFlags_HasGamepad) + .value("ImGuiBackendFlags_HasMouseCursors", ImGuiBackendFlags_::ImGuiBackendFlags_HasMouseCursors) + .value("ImGuiBackendFlags_HasSetMousePos", ImGuiBackendFlags_::ImGuiBackendFlags_HasSetMousePos) + .value("ImGuiBackendFlags_RendererHasVtxOffset", ImGuiBackendFlags_::ImGuiBackendFlags_RendererHasVtxOffset) + .export_values(); + + + py::enum_(m, "ImGuiCol") + .value("ImGuiCol_Text", ImGuiCol_::ImGuiCol_Text) + .value("ImGuiCol_TextDisabled", ImGuiCol_::ImGuiCol_TextDisabled) + .value("ImGuiCol_WindowBg", ImGuiCol_::ImGuiCol_WindowBg) + .value("ImGuiCol_ChildBg", ImGuiCol_::ImGuiCol_ChildBg) + .value("ImGuiCol_PopupBg", ImGuiCol_::ImGuiCol_PopupBg) + .value("ImGuiCol_Border", ImGuiCol_::ImGuiCol_Border) + .value("ImGuiCol_BorderShadow", ImGuiCol_::ImGuiCol_BorderShadow) + .value("ImGuiCol_FrameBg", ImGuiCol_::ImGuiCol_FrameBg) + .value("ImGuiCol_FrameBgHovered", ImGuiCol_::ImGuiCol_FrameBgHovered) + .value("ImGuiCol_FrameBgActive", ImGuiCol_::ImGuiCol_FrameBgActive) + .value("ImGuiCol_TitleBg", ImGuiCol_::ImGuiCol_TitleBg) + .value("ImGuiCol_TitleBgActive", ImGuiCol_::ImGuiCol_TitleBgActive) + .value("ImGuiCol_TitleBgCollapsed", ImGuiCol_::ImGuiCol_TitleBgCollapsed) + .value("ImGuiCol_MenuBarBg", ImGuiCol_::ImGuiCol_MenuBarBg) + .value("ImGuiCol_ScrollbarBg", ImGuiCol_::ImGuiCol_ScrollbarBg) + .value("ImGuiCol_ScrollbarGrab", ImGuiCol_::ImGuiCol_ScrollbarGrab) + .value("ImGuiCol_ScrollbarGrabHovered", ImGuiCol_::ImGuiCol_ScrollbarGrabHovered) + .value("ImGuiCol_ScrollbarGrabActive", ImGuiCol_::ImGuiCol_ScrollbarGrabActive) + .value("ImGuiCol_CheckMark", ImGuiCol_::ImGuiCol_CheckMark) + .value("ImGuiCol_SliderGrab", ImGuiCol_::ImGuiCol_SliderGrab) + .value("ImGuiCol_SliderGrabActive", ImGuiCol_::ImGuiCol_SliderGrabActive) + .value("ImGuiCol_Button", ImGuiCol_::ImGuiCol_Button) + .value("ImGuiCol_ButtonHovered", ImGuiCol_::ImGuiCol_ButtonHovered) + .value("ImGuiCol_ButtonActive", ImGuiCol_::ImGuiCol_ButtonActive) + .value("ImGuiCol_Header", ImGuiCol_::ImGuiCol_Header) + .value("ImGuiCol_HeaderHovered", ImGuiCol_::ImGuiCol_HeaderHovered) + .value("ImGuiCol_HeaderActive", ImGuiCol_::ImGuiCol_HeaderActive) + .value("ImGuiCol_Separator", ImGuiCol_::ImGuiCol_Separator) + .value("ImGuiCol_SeparatorHovered", ImGuiCol_::ImGuiCol_SeparatorHovered) + .value("ImGuiCol_SeparatorActive", ImGuiCol_::ImGuiCol_SeparatorActive) + .value("ImGuiCol_ResizeGrip", ImGuiCol_::ImGuiCol_ResizeGrip) + .value("ImGuiCol_ResizeGripHovered", ImGuiCol_::ImGuiCol_ResizeGripHovered) + .value("ImGuiCol_ResizeGripActive", ImGuiCol_::ImGuiCol_ResizeGripActive) + .value("ImGuiCol_TabHovered", ImGuiCol_::ImGuiCol_TabHovered) + .value("ImGuiCol_Tab", ImGuiCol_::ImGuiCol_Tab) + .value("ImGuiCol_TabSelected", ImGuiCol_::ImGuiCol_TabSelected) + .value("ImGuiCol_TabSelectedOverline", ImGuiCol_::ImGuiCol_TabSelectedOverline) + .value("ImGuiCol_TabDimmed", ImGuiCol_::ImGuiCol_TabDimmed) + .value("ImGuiCol_TabDimmedSelected", ImGuiCol_::ImGuiCol_TabDimmedSelected) + .value("ImGuiCol_TabDimmedSelectedOverline", ImGuiCol_::ImGuiCol_TabDimmedSelectedOverline) + .value("ImGuiCol_PlotLines", ImGuiCol_::ImGuiCol_PlotLines) + .value("ImGuiCol_PlotLinesHovered", ImGuiCol_::ImGuiCol_PlotLinesHovered) + .value("ImGuiCol_PlotHistogram", ImGuiCol_::ImGuiCol_PlotHistogram) + .value("ImGuiCol_PlotHistogramHovered", ImGuiCol_::ImGuiCol_PlotHistogramHovered) + .value("ImGuiCol_TableHeaderBg", ImGuiCol_::ImGuiCol_TableHeaderBg) + .value("ImGuiCol_TableBorderStrong", ImGuiCol_::ImGuiCol_TableBorderStrong) + .value("ImGuiCol_TableBorderLight", ImGuiCol_::ImGuiCol_TableBorderLight) + .value("ImGuiCol_TableRowBg", ImGuiCol_::ImGuiCol_TableRowBg) + .value("ImGuiCol_TableRowBgAlt", ImGuiCol_::ImGuiCol_TableRowBgAlt) + .value("ImGuiCol_TextLink", ImGuiCol_::ImGuiCol_TextLink) + .value("ImGuiCol_TextSelectedBg", ImGuiCol_::ImGuiCol_TextSelectedBg) + .value("ImGuiCol_DragDropTarget", ImGuiCol_::ImGuiCol_DragDropTarget) + .value("ImGuiCol_NavHighlight", ImGuiCol_::ImGuiCol_NavHighlight) + .value("ImGuiCol_NavWindowingHighlight", ImGuiCol_::ImGuiCol_NavWindowingHighlight) + .value("ImGuiCol_NavWindowingDimBg", ImGuiCol_::ImGuiCol_NavWindowingDimBg) + .value("ImGuiCol_ModalWindowDimBg", ImGuiCol_::ImGuiCol_ModalWindowDimBg) + .export_values(); + + + py::enum_(m, "ImGuiStyleVar") + .value("ImGuiStyleVar_Alpha", ImGuiStyleVar_::ImGuiStyleVar_Alpha) + .value("ImGuiStyleVar_DisabledAlpha", ImGuiStyleVar_::ImGuiStyleVar_DisabledAlpha) + .value("ImGuiStyleVar_WindowPadding", ImGuiStyleVar_::ImGuiStyleVar_WindowPadding) + .value("ImGuiStyleVar_WindowRounding", ImGuiStyleVar_::ImGuiStyleVar_WindowRounding) + .value("ImGuiStyleVar_WindowBorderSize", ImGuiStyleVar_::ImGuiStyleVar_WindowBorderSize) + .value("ImGuiStyleVar_WindowMinSize", ImGuiStyleVar_::ImGuiStyleVar_WindowMinSize) + .value("ImGuiStyleVar_WindowTitleAlign", ImGuiStyleVar_::ImGuiStyleVar_WindowTitleAlign) + .value("ImGuiStyleVar_ChildRounding", ImGuiStyleVar_::ImGuiStyleVar_ChildRounding) + .value("ImGuiStyleVar_ChildBorderSize", ImGuiStyleVar_::ImGuiStyleVar_ChildBorderSize) + .value("ImGuiStyleVar_PopupRounding", ImGuiStyleVar_::ImGuiStyleVar_PopupRounding) + .value("ImGuiStyleVar_PopupBorderSize", ImGuiStyleVar_::ImGuiStyleVar_PopupBorderSize) + .value("ImGuiStyleVar_FramePadding", ImGuiStyleVar_::ImGuiStyleVar_FramePadding) + .value("ImGuiStyleVar_FrameRounding", ImGuiStyleVar_::ImGuiStyleVar_FrameRounding) + .value("ImGuiStyleVar_FrameBorderSize", ImGuiStyleVar_::ImGuiStyleVar_FrameBorderSize) + .value("ImGuiStyleVar_ItemSpacing", ImGuiStyleVar_::ImGuiStyleVar_ItemSpacing) + .value("ImGuiStyleVar_ItemInnerSpacing", ImGuiStyleVar_::ImGuiStyleVar_ItemInnerSpacing) + .value("ImGuiStyleVar_IndentSpacing", ImGuiStyleVar_::ImGuiStyleVar_IndentSpacing) + .value("ImGuiStyleVar_CellPadding", ImGuiStyleVar_::ImGuiStyleVar_CellPadding) + .value("ImGuiStyleVar_ScrollbarSize", ImGuiStyleVar_::ImGuiStyleVar_ScrollbarSize) + .value("ImGuiStyleVar_ScrollbarRounding", ImGuiStyleVar_::ImGuiStyleVar_ScrollbarRounding) + .value("ImGuiStyleVar_GrabMinSize", ImGuiStyleVar_::ImGuiStyleVar_GrabMinSize) + .value("ImGuiStyleVar_GrabRounding", ImGuiStyleVar_::ImGuiStyleVar_GrabRounding) + .value("ImGuiStyleVar_TabRounding", ImGuiStyleVar_::ImGuiStyleVar_TabRounding) + .value("ImGuiStyleVar_TabBorderSize", ImGuiStyleVar_::ImGuiStyleVar_TabBorderSize) + .value("ImGuiStyleVar_TabBarBorderSize", ImGuiStyleVar_::ImGuiStyleVar_TabBarBorderSize) + .value("ImGuiStyleVar_TabBarOverlineSize", ImGuiStyleVar_::ImGuiStyleVar_TabBarOverlineSize) + .value("ImGuiStyleVar_TableAngledHeadersAngle", ImGuiStyleVar_::ImGuiStyleVar_TableAngledHeadersAngle) + .value("ImGuiStyleVar_TableAngledHeadersTextAlign", ImGuiStyleVar_::ImGuiStyleVar_TableAngledHeadersTextAlign) + .value("ImGuiStyleVar_ButtonTextAlign", ImGuiStyleVar_::ImGuiStyleVar_ButtonTextAlign) + .value("ImGuiStyleVar_SelectableTextAlign", ImGuiStyleVar_::ImGuiStyleVar_SelectableTextAlign) + .value("ImGuiStyleVar_SeparatorTextBorderSize", ImGuiStyleVar_::ImGuiStyleVar_SeparatorTextBorderSize) + .value("ImGuiStyleVar_SeparatorTextAlign", ImGuiStyleVar_::ImGuiStyleVar_SeparatorTextAlign) + .value("ImGuiStyleVar_SeparatorTextPadding", ImGuiStyleVar_::ImGuiStyleVar_SeparatorTextPadding) + .export_values(); + + + py::enum_(m, "ImGuiButtonFlags", py::arithmetic()) + .value("ImGuiButtonFlags_None", ImGuiButtonFlags_::ImGuiButtonFlags_None) + .value("ImGuiButtonFlags_MouseButtonLeft", ImGuiButtonFlags_::ImGuiButtonFlags_MouseButtonLeft) + .value("ImGuiButtonFlags_MouseButtonRight", ImGuiButtonFlags_::ImGuiButtonFlags_MouseButtonRight) + .value("ImGuiButtonFlags_MouseButtonMiddle", ImGuiButtonFlags_::ImGuiButtonFlags_MouseButtonMiddle) + .export_values(); + + + py::enum_(m, "ImGuiColorEditFlags", py::arithmetic()) + .value("ImGuiColorEditFlags_None", ImGuiColorEditFlags_::ImGuiColorEditFlags_None) + .value("ImGuiColorEditFlags_NoAlpha", ImGuiColorEditFlags_::ImGuiColorEditFlags_NoAlpha) + .value("ImGuiColorEditFlags_NoPicker", ImGuiColorEditFlags_::ImGuiColorEditFlags_NoPicker) + .value("ImGuiColorEditFlags_NoOptions", ImGuiColorEditFlags_::ImGuiColorEditFlags_NoOptions) + .value("ImGuiColorEditFlags_NoSmallPreview", ImGuiColorEditFlags_::ImGuiColorEditFlags_NoSmallPreview) + .value("ImGuiColorEditFlags_NoInputs", ImGuiColorEditFlags_::ImGuiColorEditFlags_NoInputs) + .value("ImGuiColorEditFlags_NoTooltip", ImGuiColorEditFlags_::ImGuiColorEditFlags_NoTooltip) + .value("ImGuiColorEditFlags_NoLabel", ImGuiColorEditFlags_::ImGuiColorEditFlags_NoLabel) + .value("ImGuiColorEditFlags_NoSidePreview", ImGuiColorEditFlags_::ImGuiColorEditFlags_NoSidePreview) + .value("ImGuiColorEditFlags_NoDragDrop", ImGuiColorEditFlags_::ImGuiColorEditFlags_NoDragDrop) + .value("ImGuiColorEditFlags_NoBorder", ImGuiColorEditFlags_::ImGuiColorEditFlags_NoBorder) + .value("ImGuiColorEditFlags_AlphaBar", ImGuiColorEditFlags_::ImGuiColorEditFlags_AlphaBar) + .value("ImGuiColorEditFlags_AlphaPreview", ImGuiColorEditFlags_::ImGuiColorEditFlags_AlphaPreview) + .value("ImGuiColorEditFlags_AlphaPreviewHalf", ImGuiColorEditFlags_::ImGuiColorEditFlags_AlphaPreviewHalf) + .value("ImGuiColorEditFlags_HDR", ImGuiColorEditFlags_::ImGuiColorEditFlags_HDR) + .value("ImGuiColorEditFlags_DisplayRGB", ImGuiColorEditFlags_::ImGuiColorEditFlags_DisplayRGB) + .value("ImGuiColorEditFlags_DisplayHSV", ImGuiColorEditFlags_::ImGuiColorEditFlags_DisplayHSV) + .value("ImGuiColorEditFlags_DisplayHex", ImGuiColorEditFlags_::ImGuiColorEditFlags_DisplayHex) + .value("ImGuiColorEditFlags_Uint8", ImGuiColorEditFlags_::ImGuiColorEditFlags_Uint8) + .value("ImGuiColorEditFlags_Float", ImGuiColorEditFlags_::ImGuiColorEditFlags_Float) + .value("ImGuiColorEditFlags_PickerHueBar", ImGuiColorEditFlags_::ImGuiColorEditFlags_PickerHueBar) + .value("ImGuiColorEditFlags_PickerHueWheel", ImGuiColorEditFlags_::ImGuiColorEditFlags_PickerHueWheel) + .value("ImGuiColorEditFlags_InputRGB", ImGuiColorEditFlags_::ImGuiColorEditFlags_InputRGB) + .value("ImGuiColorEditFlags_InputHSV", ImGuiColorEditFlags_::ImGuiColorEditFlags_InputHSV) + .export_values(); + + + py::enum_(m, "ImGuiSliderFlags", py::arithmetic()) + .value("ImGuiSliderFlags_None", ImGuiSliderFlags_::ImGuiSliderFlags_None) + .value("ImGuiSliderFlags_AlwaysClamp", ImGuiSliderFlags_::ImGuiSliderFlags_AlwaysClamp) + .value("ImGuiSliderFlags_Logarithmic", ImGuiSliderFlags_::ImGuiSliderFlags_Logarithmic) + .value("ImGuiSliderFlags_NoRoundToFormat", ImGuiSliderFlags_::ImGuiSliderFlags_NoRoundToFormat) + .value("ImGuiSliderFlags_NoInput", ImGuiSliderFlags_::ImGuiSliderFlags_NoInput) + .value("ImGuiSliderFlags_WrapAround", ImGuiSliderFlags_::ImGuiSliderFlags_WrapAround) + .export_values(); + + + py::enum_(m, "ImGuiMouseButton") + .value("ImGuiMouseButton_Left", ImGuiMouseButton_::ImGuiMouseButton_Left) + .value("ImGuiMouseButton_Right", ImGuiMouseButton_::ImGuiMouseButton_Right) + .value("ImGuiMouseButton_Middle", ImGuiMouseButton_::ImGuiMouseButton_Middle) + .value("ImGuiMouseButton_COUNT", ImGuiMouseButton_::ImGuiMouseButton_COUNT) + .export_values(); + + + py::enum_(m, "ImGuiMouseCursor") + .value("ImGuiMouseCursor_None", ImGuiMouseCursor_::ImGuiMouseCursor_None) + .value("ImGuiMouseCursor_Arrow", ImGuiMouseCursor_::ImGuiMouseCursor_Arrow) + .value("ImGuiMouseCursor_TextInput", ImGuiMouseCursor_::ImGuiMouseCursor_TextInput) + .value("ImGuiMouseCursor_ResizeAll", ImGuiMouseCursor_::ImGuiMouseCursor_ResizeAll) + .value("ImGuiMouseCursor_ResizeNS", ImGuiMouseCursor_::ImGuiMouseCursor_ResizeNS) + .value("ImGuiMouseCursor_ResizeEW", ImGuiMouseCursor_::ImGuiMouseCursor_ResizeEW) + .value("ImGuiMouseCursor_ResizeNESW", ImGuiMouseCursor_::ImGuiMouseCursor_ResizeNESW) + .value("ImGuiMouseCursor_ResizeNWSE", ImGuiMouseCursor_::ImGuiMouseCursor_ResizeNWSE) + .value("ImGuiMouseCursor_Hand", ImGuiMouseCursor_::ImGuiMouseCursor_Hand) + .value("ImGuiMouseCursor_NotAllowed", ImGuiMouseCursor_::ImGuiMouseCursor_NotAllowed) + .value("ImGuiMouseCursor_COUNT", ImGuiMouseCursor_::ImGuiMouseCursor_COUNT) + .export_values(); + + + py::enum_(m, "ImGuiMouseSource") + .value("ImGuiMouseSource_Mouse", ImGuiMouseSource::ImGuiMouseSource_Mouse) + .value("ImGuiMouseSource_TouchScreen", ImGuiMouseSource::ImGuiMouseSource_TouchScreen) + .value("ImGuiMouseSource_Pen", ImGuiMouseSource::ImGuiMouseSource_Pen) + .value("ImGuiMouseSource_COUNT", ImGuiMouseSource::ImGuiMouseSource_COUNT) + .export_values(); + + + py::enum_(m, "ImGuiCond") + .value("ImGuiCond_None", ImGuiCond_::ImGuiCond_None) + .value("ImGuiCond_Always", ImGuiCond_::ImGuiCond_Always) + .value("ImGuiCond_Once", ImGuiCond_::ImGuiCond_Once) + .value("ImGuiCond_FirstUseEver", ImGuiCond_::ImGuiCond_FirstUseEver) + .value("ImGuiCond_Appearing", ImGuiCond_::ImGuiCond_Appearing) + .export_values(); + + + py::enum_(m, "ImGuiTableFlags", py::arithmetic()) + .value("ImGuiTableFlags_None", ImGuiTableFlags_::ImGuiTableFlags_None) + .value("ImGuiTableFlags_Resizable", ImGuiTableFlags_::ImGuiTableFlags_Resizable) + .value("ImGuiTableFlags_Reorderable", ImGuiTableFlags_::ImGuiTableFlags_Reorderable) + .value("ImGuiTableFlags_Hideable", ImGuiTableFlags_::ImGuiTableFlags_Hideable) + .value("ImGuiTableFlags_Sortable", ImGuiTableFlags_::ImGuiTableFlags_Sortable) + .value("ImGuiTableFlags_NoSavedSettings", ImGuiTableFlags_::ImGuiTableFlags_NoSavedSettings) + .value("ImGuiTableFlags_ContextMenuInBody", ImGuiTableFlags_::ImGuiTableFlags_ContextMenuInBody) + .value("ImGuiTableFlags_RowBg", ImGuiTableFlags_::ImGuiTableFlags_RowBg) + .value("ImGuiTableFlags_BordersInnerH", ImGuiTableFlags_::ImGuiTableFlags_BordersInnerH) + .value("ImGuiTableFlags_BordersOuterH", ImGuiTableFlags_::ImGuiTableFlags_BordersOuterH) + .value("ImGuiTableFlags_BordersInnerV", ImGuiTableFlags_::ImGuiTableFlags_BordersInnerV) + .value("ImGuiTableFlags_BordersOuterV", ImGuiTableFlags_::ImGuiTableFlags_BordersOuterV) + .value("ImGuiTableFlags_BordersH", ImGuiTableFlags_::ImGuiTableFlags_BordersH) + .value("ImGuiTableFlags_BordersV", ImGuiTableFlags_::ImGuiTableFlags_BordersV) + .value("ImGuiTableFlags_BordersInner", ImGuiTableFlags_::ImGuiTableFlags_BordersInner) + .value("ImGuiTableFlags_BordersOuter", ImGuiTableFlags_::ImGuiTableFlags_BordersOuter) + .value("ImGuiTableFlags_Borders", ImGuiTableFlags_::ImGuiTableFlags_Borders) + .value("ImGuiTableFlags_NoBordersInBody", ImGuiTableFlags_::ImGuiTableFlags_NoBordersInBody) + .value("ImGuiTableFlags_NoBordersInBodyUntilResize", ImGuiTableFlags_::ImGuiTableFlags_NoBordersInBodyUntilResize) + .value("ImGuiTableFlags_SizingFixedFit", ImGuiTableFlags_::ImGuiTableFlags_SizingFixedFit) + .value("ImGuiTableFlags_SizingFixedSame", ImGuiTableFlags_::ImGuiTableFlags_SizingFixedSame) + .value("ImGuiTableFlags_SizingStretchProp", ImGuiTableFlags_::ImGuiTableFlags_SizingStretchProp) + .value("ImGuiTableFlags_SizingStretchSame", ImGuiTableFlags_::ImGuiTableFlags_SizingStretchSame) + .value("ImGuiTableFlags_NoHostExtendX", ImGuiTableFlags_::ImGuiTableFlags_NoHostExtendX) + .value("ImGuiTableFlags_NoHostExtendY", ImGuiTableFlags_::ImGuiTableFlags_NoHostExtendY) + .value("ImGuiTableFlags_NoKeepColumnsVisible", ImGuiTableFlags_::ImGuiTableFlags_NoKeepColumnsVisible) + .value("ImGuiTableFlags_PreciseWidths", ImGuiTableFlags_::ImGuiTableFlags_PreciseWidths) + .value("ImGuiTableFlags_NoClip", ImGuiTableFlags_::ImGuiTableFlags_NoClip) + .value("ImGuiTableFlags_PadOuterX", ImGuiTableFlags_::ImGuiTableFlags_PadOuterX) + .value("ImGuiTableFlags_NoPadOuterX", ImGuiTableFlags_::ImGuiTableFlags_NoPadOuterX) + .value("ImGuiTableFlags_NoPadInnerX", ImGuiTableFlags_::ImGuiTableFlags_NoPadInnerX) + .value("ImGuiTableFlags_ScrollX", ImGuiTableFlags_::ImGuiTableFlags_ScrollX) + .value("ImGuiTableFlags_ScrollY", ImGuiTableFlags_::ImGuiTableFlags_ScrollY) + .value("ImGuiTableFlags_SortMulti", ImGuiTableFlags_::ImGuiTableFlags_SortMulti) + .value("ImGuiTableFlags_SortTristate", ImGuiTableFlags_::ImGuiTableFlags_SortTristate) + .value("ImGuiTableFlags_HighlightHoveredColumn", ImGuiTableFlags_::ImGuiTableFlags_HighlightHoveredColumn) + .value("ImGuiTableFlags_SizingMask_", ImGuiTableFlags_::ImGuiTableFlags_SizingMask_) + .export_values(); + + + py::enum_(m, "ImGuiTableColumnFlags", py::arithmetic()) + .value("ImGuiTableColumnFlags_None", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_None) + .value("ImGuiTableColumnFlags_Disabled", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_Disabled) + .value("ImGuiTableColumnFlags_DefaultHide", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_DefaultHide) + .value("ImGuiTableColumnFlags_DefaultSort", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_DefaultSort) + .value("ImGuiTableColumnFlags_WidthStretch", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_WidthStretch) + .value("ImGuiTableColumnFlags_WidthFixed", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_WidthFixed) + .value("ImGuiTableColumnFlags_NoResize", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_NoResize) + .value("ImGuiTableColumnFlags_NoReorder", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_NoReorder) + .value("ImGuiTableColumnFlags_NoHide", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_NoHide) + .value("ImGuiTableColumnFlags_NoClip", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_NoClip) + .value("ImGuiTableColumnFlags_NoSort", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_NoSort) + .value("ImGuiTableColumnFlags_NoSortAscending", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_NoSortAscending) + .value("ImGuiTableColumnFlags_NoSortDescending", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_NoSortDescending) + .value("ImGuiTableColumnFlags_NoHeaderLabel", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_NoHeaderLabel) + .value("ImGuiTableColumnFlags_NoHeaderWidth", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_NoHeaderWidth) + .value("ImGuiTableColumnFlags_PreferSortAscending", + ImGuiTableColumnFlags_::ImGuiTableColumnFlags_PreferSortAscending) + .value("ImGuiTableColumnFlags_PreferSortDescending", + ImGuiTableColumnFlags_::ImGuiTableColumnFlags_PreferSortDescending) + .value("ImGuiTableColumnFlags_IndentEnable", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_IndentEnable) + .value("ImGuiTableColumnFlags_IndentDisable", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_IndentDisable) + .value("ImGuiTableColumnFlags_AngledHeader", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_AngledHeader) + .value("ImGuiTableColumnFlags_IsEnabled", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_IsEnabled) + .value("ImGuiTableColumnFlags_IsVisible", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_IsVisible) + .value("ImGuiTableColumnFlags_IsSorted", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_IsSorted) + .value("ImGuiTableColumnFlags_IsHovered", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_IsHovered) + .value("ImGuiTableColumnFlags_WidthMask_", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_WidthMask_) + .value("ImGuiTableColumnFlags_IndentMask_", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_IndentMask_) + .value("ImGuiTableColumnFlags_StatusMask_", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_StatusMask_) + .value("ImGuiTableColumnFlags_NoDirectResize_", ImGuiTableColumnFlags_::ImGuiTableColumnFlags_NoDirectResize_) + .export_values(); + + + py::enum_(m, "ImGuiTableRowFlags", py::arithmetic()) + .value("ImGuiTableRowFlags_None", ImGuiTableRowFlags_::ImGuiTableRowFlags_None) + .value("ImGuiTableRowFlags_Headers", ImGuiTableRowFlags_::ImGuiTableRowFlags_Headers) + .export_values(); + + + py::enum_(m, "ImGuiTableBgTarget") + .value("ImGuiTableBgTarget_None", ImGuiTableBgTarget_::ImGuiTableBgTarget_None) + .value("ImGuiTableBgTarget_RowBg0", ImGuiTableBgTarget_::ImGuiTableBgTarget_RowBg0) + .value("ImGuiTableBgTarget_RowBg1", ImGuiTableBgTarget_::ImGuiTableBgTarget_RowBg1) + .value("ImGuiTableBgTarget_CellBg", ImGuiTableBgTarget_::ImGuiTableBgTarget_CellBg) + .export_values(); } -// clang-format on - -void bind_imgui_enums(py::module& m) { - py::enum_(m, "ImGuiKey"); - - m.attr("ImGuiWindowFlags_None") = static_cast(ImGuiWindowFlags_None); - m.attr("ImGuiWindowFlags_NoTitleBar") = static_cast(ImGuiWindowFlags_NoTitleBar); - m.attr("ImGuiWindowFlags_NoResize") = static_cast(ImGuiWindowFlags_NoResize); - m.attr("ImGuiWindowFlags_NoMove") = static_cast(ImGuiWindowFlags_NoMove); - m.attr("ImGuiWindowFlags_NoScrollbar") = static_cast(ImGuiWindowFlags_NoScrollbar); - m.attr("ImGuiWindowFlags_NoScrollWithMouse") = static_cast(ImGuiWindowFlags_NoScrollWithMouse); - m.attr("ImGuiWindowFlags_NoCollapse") = static_cast(ImGuiWindowFlags_NoCollapse); - m.attr("ImGuiWindowFlags_AlwaysAutoResize") = static_cast(ImGuiWindowFlags_AlwaysAutoResize); - m.attr("ImGuiWindowFlags_NoBackground") = static_cast(ImGuiWindowFlags_NoBackground); - m.attr("ImGuiWindowFlags_NoSavedSettings") = static_cast(ImGuiWindowFlags_NoSavedSettings); - m.attr("ImGuiWindowFlags_NoMouseInputs") = static_cast(ImGuiWindowFlags_NoMouseInputs); - m.attr("ImGuiWindowFlags_MenuBar") = static_cast(ImGuiWindowFlags_MenuBar); - m.attr("ImGuiWindowFlags_HorizontalScrollbar") = static_cast(ImGuiWindowFlags_HorizontalScrollbar); - m.attr("ImGuiWindowFlags_NoFocusOnAppearing") = static_cast(ImGuiWindowFlags_NoFocusOnAppearing); - m.attr("ImGuiWindowFlags_NoBringToFrontOnFocus") = static_cast(ImGuiWindowFlags_NoBringToFrontOnFocus); - m.attr("ImGuiWindowFlags_AlwaysVerticalScrollbar") = static_cast(ImGuiWindowFlags_AlwaysVerticalScrollbar); - m.attr("ImGuiWindowFlags_AlwaysHorizontalScrollbar") = static_cast(ImGuiWindowFlags_AlwaysHorizontalScrollbar); - m.attr("ImGuiWindowFlags_AlwaysUseWindowPadding") = static_cast(ImGuiWindowFlags_AlwaysUseWindowPadding); - m.attr("ImGuiWindowFlags_NoNavInputs") = static_cast(ImGuiWindowFlags_NoNavInputs); - m.attr("ImGuiWindowFlags_NoNavFocus") = static_cast(ImGuiWindowFlags_NoNavFocus); - m.attr("ImGuiWindowFlags_UnsavedDocument") = static_cast(ImGuiWindowFlags_UnsavedDocument); - m.attr("ImGuiWindowFlags_NoNav") = static_cast(ImGuiWindowFlags_NoNav); - m.attr("ImGuiWindowFlags_NoDecoration") = static_cast(ImGuiWindowFlags_NoDecoration); - m.attr("ImGuiWindowFlags_NoInputs") = static_cast(ImGuiWindowFlags_NoInputs); - m.attr("ImGuiWindowFlags_NavFlattened") = static_cast(ImGuiWindowFlags_NavFlattened); - m.attr("ImGuiWindowFlags_ChildWindow") = static_cast(ImGuiWindowFlags_ChildWindow); - m.attr("ImGuiWindowFlags_Tooltip") = static_cast(ImGuiWindowFlags_Tooltip); - m.attr("ImGuiWindowFlags_Popup") = static_cast(ImGuiWindowFlags_Popup); - m.attr("ImGuiWindowFlags_Modal") = static_cast(ImGuiWindowFlags_Modal); - m.attr("ImGuiWindowFlags_ChildMenu") = static_cast(ImGuiWindowFlags_ChildMenu); - - m.attr("ImGuiInputTextFlags_None") = static_cast(ImGuiInputTextFlags_None); - m.attr("ImGuiInputTextFlags_CharsDecimal") = static_cast(ImGuiInputTextFlags_CharsDecimal); - m.attr("ImGuiInputTextFlags_CharsHexadecimal") = static_cast(ImGuiInputTextFlags_CharsHexadecimal); - m.attr("ImGuiInputTextFlags_CharsUppercase") = static_cast(ImGuiInputTextFlags_CharsUppercase); - m.attr("ImGuiInputTextFlags_CharsNoBlank") = static_cast(ImGuiInputTextFlags_CharsNoBlank); - m.attr("ImGuiInputTextFlags_AutoSelectAll") = static_cast(ImGuiInputTextFlags_AutoSelectAll); - m.attr("ImGuiInputTextFlags_EnterReturnsTrue") = static_cast(ImGuiInputTextFlags_EnterReturnsTrue); - m.attr("ImGuiInputTextFlags_CallbackCompletion") = static_cast(ImGuiInputTextFlags_CallbackCompletion); - m.attr("ImGuiInputTextFlags_CallbackHistory") = static_cast(ImGuiInputTextFlags_CallbackHistory); - m.attr("ImGuiInputTextFlags_CallbackAlways") = static_cast(ImGuiInputTextFlags_CallbackAlways); - m.attr("ImGuiInputTextFlags_CallbackCharFilter") = static_cast(ImGuiInputTextFlags_CallbackCharFilter); - m.attr("ImGuiInputTextFlags_AllowTabInput") = static_cast(ImGuiInputTextFlags_AllowTabInput); - m.attr("ImGuiInputTextFlags_CtrlEnterForNewLine") = static_cast(ImGuiInputTextFlags_CtrlEnterForNewLine); - m.attr("ImGuiInputTextFlags_NoHorizontalScroll") = static_cast(ImGuiInputTextFlags_NoHorizontalScroll); - m.attr("ImGuiInputTextFlags_AlwaysOverwrite") = static_cast(ImGuiInputTextFlags_AlwaysOverwrite); - m.attr("ImGuiInputTextFlags_ReadOnly") = static_cast(ImGuiInputTextFlags_ReadOnly); - m.attr("ImGuiInputTextFlags_Password") = static_cast(ImGuiInputTextFlags_Password); - m.attr("ImGuiInputTextFlags_NoUndoRedo") = static_cast(ImGuiInputTextFlags_NoUndoRedo); - m.attr("ImGuiInputTextFlags_CharsScientific") = static_cast(ImGuiInputTextFlags_CharsScientific); - m.attr("ImGuiInputTextFlags_CallbackResize") = static_cast(ImGuiInputTextFlags_CallbackResize); - - m.attr("ImGuiTreeNodeFlags_None") = static_cast(ImGuiTreeNodeFlags_None); - m.attr("ImGuiTreeNodeFlags_Selected") = static_cast(ImGuiTreeNodeFlags_Selected); - m.attr("ImGuiTreeNodeFlags_Framed") = static_cast(ImGuiTreeNodeFlags_Framed); - m.attr("ImGuiTreeNodeFlags_AllowItemOverlap") = static_cast(ImGuiTreeNodeFlags_AllowItemOverlap); - m.attr("ImGuiTreeNodeFlags_NoTreePushOnOpen") = static_cast(ImGuiTreeNodeFlags_NoTreePushOnOpen); - m.attr("ImGuiTreeNodeFlags_NoAutoOpenOnLog") = static_cast(ImGuiTreeNodeFlags_NoAutoOpenOnLog); - m.attr("ImGuiTreeNodeFlags_DefaultOpen") = static_cast(ImGuiTreeNodeFlags_DefaultOpen); - m.attr("ImGuiTreeNodeFlags_OpenOnDoubleClick") = static_cast(ImGuiTreeNodeFlags_OpenOnDoubleClick); - m.attr("ImGuiTreeNodeFlags_OpenOnArrow") = static_cast(ImGuiTreeNodeFlags_OpenOnArrow); - m.attr("ImGuiTreeNodeFlags_Leaf") = static_cast(ImGuiTreeNodeFlags_Leaf); - m.attr("ImGuiTreeNodeFlags_Bullet") = static_cast(ImGuiTreeNodeFlags_Bullet); - m.attr("ImGuiTreeNodeFlags_FramePadding") = static_cast(ImGuiTreeNodeFlags_FramePadding); - m.attr("ImGuiTreeNodeFlags_SpanAvailWidth") = static_cast(ImGuiTreeNodeFlags_SpanAvailWidth); - m.attr("ImGuiTreeNodeFlags_SpanFullWidth") = static_cast(ImGuiTreeNodeFlags_SpanFullWidth); - m.attr("ImGuiTreeNodeFlags_NavLeftJumpsBackHere") = static_cast(ImGuiTreeNodeFlags_NavLeftJumpsBackHere); - m.attr("ImGuiTreeNodeFlags_CollapsingHeader") = static_cast(ImGuiTreeNodeFlags_CollapsingHeader); - - m.attr("ImGuiSelectableFlags_None") = static_cast(ImGuiSelectableFlags_None); - m.attr("ImGuiSelectableFlags_DontClosePopups") = static_cast(ImGuiSelectableFlags_DontClosePopups); - m.attr("ImGuiSelectableFlags_SpanAllColumns") = static_cast(ImGuiSelectableFlags_SpanAllColumns); - m.attr("ImGuiSelectableFlags_AllowDoubleClick") = static_cast(ImGuiSelectableFlags_AllowDoubleClick); - m.attr("ImGuiSelectableFlags_Disabled") = static_cast(ImGuiSelectableFlags_Disabled); - m.attr("ImGuiSelectableFlags_AllowItemOverlap") = static_cast(ImGuiSelectableFlags_AllowItemOverlap); - - m.attr("ImGuiComboFlags_None") = static_cast(ImGuiComboFlags_None); - m.attr("ImGuiComboFlags_PopupAlignLeft") = static_cast(ImGuiComboFlags_PopupAlignLeft); - m.attr("ImGuiComboFlags_HeightSmall") = static_cast(ImGuiComboFlags_HeightSmall); - m.attr("ImGuiComboFlags_HeightRegular") = static_cast(ImGuiComboFlags_HeightRegular); - m.attr("ImGuiComboFlags_HeightLarge") = static_cast(ImGuiComboFlags_HeightLarge); - m.attr("ImGuiComboFlags_HeightLargest") = static_cast(ImGuiComboFlags_HeightLargest); - m.attr("ImGuiComboFlags_NoArrowButton") = static_cast(ImGuiComboFlags_NoArrowButton); - m.attr("ImGuiComboFlags_NoPreview") = static_cast(ImGuiComboFlags_NoPreview); - m.attr("ImGuiComboFlags_HeightMask_") = static_cast(ImGuiComboFlags_HeightMask_); - - m.attr("ImGuiTabBarFlags_None") = static_cast(ImGuiTabBarFlags_None); - m.attr("ImGuiTabBarFlags_Reorderable") = static_cast(ImGuiTabBarFlags_Reorderable); - m.attr("ImGuiTabBarFlags_AutoSelectNewTabs") = static_cast(ImGuiTabBarFlags_AutoSelectNewTabs); - m.attr("ImGuiTabBarFlags_TabListPopupButton") = static_cast(ImGuiTabBarFlags_TabListPopupButton); - m.attr("ImGuiTabBarFlags_NoCloseWithMiddleMouseButton") = - static_cast(ImGuiTabBarFlags_NoCloseWithMiddleMouseButton); - m.attr("ImGuiTabBarFlags_NoTabListScrollingButtons") = static_cast(ImGuiTabBarFlags_NoTabListScrollingButtons); - m.attr("ImGuiTabBarFlags_NoTooltip") = static_cast(ImGuiTabBarFlags_NoTooltip); - m.attr("ImGuiTabBarFlags_FittingPolicyResizeDown") = static_cast(ImGuiTabBarFlags_FittingPolicyResizeDown); - m.attr("ImGuiTabBarFlags_FittingPolicyScroll") = static_cast(ImGuiTabBarFlags_FittingPolicyScroll); - m.attr("ImGuiTabBarFlags_FittingPolicyMask_") = static_cast(ImGuiTabBarFlags_FittingPolicyMask_); - m.attr("ImGuiTabBarFlags_FittingPolicyDefault_") = static_cast(ImGuiTabBarFlags_FittingPolicyDefault_); - - m.attr("ImGuiTabItemFlags_None") = static_cast(ImGuiTabItemFlags_None); - m.attr("ImGuiTabItemFlags_UnsavedDocument") = static_cast(ImGuiTabItemFlags_UnsavedDocument); - m.attr("ImGuiTabItemFlags_SetSelected") = static_cast(ImGuiTabItemFlags_SetSelected); - m.attr("ImGuiTabItemFlags_NoCloseWithMiddleMouseButton") = - static_cast(ImGuiTabItemFlags_NoCloseWithMiddleMouseButton); - m.attr("ImGuiTabItemFlags_NoPushId") = static_cast(ImGuiTabItemFlags_NoPushId); - - m.attr("ImGuiFocusedFlags_None") = static_cast(ImGuiFocusedFlags_None); - m.attr("ImGuiFocusedFlags_ChildWindows") = static_cast(ImGuiFocusedFlags_ChildWindows); - m.attr("ImGuiFocusedFlags_RootWindow") = static_cast(ImGuiFocusedFlags_RootWindow); - m.attr("ImGuiFocusedFlags_AnyWindow") = static_cast(ImGuiFocusedFlags_AnyWindow); - m.attr("ImGuiFocusedFlags_RootAndChildWindows") = static_cast(ImGuiFocusedFlags_RootAndChildWindows); - - m.attr("ImGuiHoveredFlags_None") = static_cast(ImGuiHoveredFlags_None); - m.attr("ImGuiHoveredFlags_ChildWindows") = static_cast(ImGuiHoveredFlags_ChildWindows); - m.attr("ImGuiHoveredFlags_RootWindow") = static_cast(ImGuiHoveredFlags_RootWindow); - m.attr("ImGuiHoveredFlags_AnyWindow") = static_cast(ImGuiHoveredFlags_AnyWindow); - m.attr("ImGuiHoveredFlags_AllowWhenBlockedByPopup") = static_cast(ImGuiHoveredFlags_AllowWhenBlockedByPopup); - m.attr("ImGuiHoveredFlags_AllowWhenBlockedByActiveItem") = - static_cast(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem); - m.attr("ImGuiHoveredFlags_AllowWhenOverlapped") = static_cast(ImGuiHoveredFlags_AllowWhenOverlapped); - m.attr("ImGuiHoveredFlags_AllowWhenDisabled") = static_cast(ImGuiHoveredFlags_AllowWhenDisabled); - m.attr("ImGuiHoveredFlags_RectOnly") = static_cast(ImGuiHoveredFlags_RectOnly); - m.attr("ImGuiHoveredFlags_RootAndChildWindows") = static_cast(ImGuiHoveredFlags_RootAndChildWindows); - - m.attr("ImGuiDragDropFlags_None") = static_cast(ImGuiDragDropFlags_None); - m.attr("ImGuiDragDropFlags_SourceNoPreviewTooltip") = static_cast(ImGuiDragDropFlags_SourceNoPreviewTooltip); - m.attr("ImGuiDragDropFlags_SourceNoDisableHover") = static_cast(ImGuiDragDropFlags_SourceNoDisableHover); - m.attr("ImGuiDragDropFlags_SourceNoHoldToOpenOthers") = static_cast(ImGuiDragDropFlags_SourceNoHoldToOpenOthers); - m.attr("ImGuiDragDropFlags_SourceAllowNullID") = static_cast(ImGuiDragDropFlags_SourceAllowNullID); - m.attr("ImGuiDragDropFlags_SourceExtern") = static_cast(ImGuiDragDropFlags_SourceExtern); - m.attr("ImGuiDragDropFlags_SourceAutoExpirePayload") = static_cast(ImGuiDragDropFlags_SourceAutoExpirePayload); - m.attr("ImGuiDragDropFlags_AcceptBeforeDelivery") = static_cast(ImGuiDragDropFlags_AcceptBeforeDelivery); - m.attr("ImGuiDragDropFlags_AcceptNoDrawDefaultRect") = static_cast(ImGuiDragDropFlags_AcceptNoDrawDefaultRect); - m.attr("ImGuiDragDropFlags_AcceptNoPreviewTooltip") = static_cast(ImGuiDragDropFlags_AcceptNoPreviewTooltip); - m.attr("ImGuiDragDropFlags_AcceptPeekOnly") = static_cast(ImGuiDragDropFlags_AcceptPeekOnly); - - m.attr("ImGuiDataType_S8") = static_cast(ImGuiDataType_S8); - m.attr("ImGuiDataType_U8") = static_cast(ImGuiDataType_U8); - m.attr("ImGuiDataType_S16") = static_cast(ImGuiDataType_S16); - m.attr("ImGuiDataType_U16") = static_cast(ImGuiDataType_U16); - m.attr("ImGuiDataType_S32") = static_cast(ImGuiDataType_S32); - m.attr("ImGuiDataType_U32") = static_cast(ImGuiDataType_U32); - m.attr("ImGuiDataType_S64") = static_cast(ImGuiDataType_S64); - m.attr("ImGuiDataType_U64") = static_cast(ImGuiDataType_U64); - m.attr("ImGuiDataType_Float") = static_cast(ImGuiDataType_Float); - m.attr("ImGuiDataType_Double") = static_cast(ImGuiDataType_Double); - m.attr("ImGuiDataType_COUNT") = static_cast(ImGuiDataType_COUNT); - - m.attr("ImGuiDir_None") = static_cast(ImGuiDir_None); - m.attr("ImGuiDir_Left") = static_cast(ImGuiDir_Left); - m.attr("ImGuiDir_Right") = static_cast(ImGuiDir_Right); - m.attr("ImGuiDir_Up") = static_cast(ImGuiDir_Up); - m.attr("ImGuiDir_Down") = static_cast(ImGuiDir_Down); - m.attr("ImGuiDir_COUNT") = static_cast(ImGuiDir_COUNT); - - m.attr("ImGuiKey_Tab") = static_cast(ImGuiKey_Tab); - m.attr("ImGuiKey_None") = static_cast(ImGuiKey_None); - m.attr("ImGuiKey_Tab") = static_cast(ImGuiKey_Tab); - m.attr("ImGuiKey_LeftArrow") = static_cast(ImGuiKey_LeftArrow); - m.attr("ImGuiKey_RightArrow") = static_cast(ImGuiKey_RightArrow); - m.attr("ImGuiKey_UpArrow") = static_cast(ImGuiKey_UpArrow); - m.attr("ImGuiKey_DownArrow") = static_cast(ImGuiKey_DownArrow); - m.attr("ImGuiKey_PageUp") = static_cast(ImGuiKey_PageUp); - m.attr("ImGuiKey_PageDown") = static_cast(ImGuiKey_PageDown); - m.attr("ImGuiKey_Home") = static_cast(ImGuiKey_Home); - m.attr("ImGuiKey_End") = static_cast(ImGuiKey_End); - m.attr("ImGuiKey_Insert") = static_cast(ImGuiKey_Insert); - m.attr("ImGuiKey_Delete") = static_cast(ImGuiKey_Delete); - m.attr("ImGuiKey_Backspace") = static_cast(ImGuiKey_Backspace); - m.attr("ImGuiKey_Space") = static_cast(ImGuiKey_Space); - m.attr("ImGuiKey_Enter") = static_cast(ImGuiKey_Enter); - m.attr("ImGuiKey_Escape") = static_cast(ImGuiKey_Escape); - m.attr("ImGuiKey_LeftCtrl") = static_cast(ImGuiKey_LeftCtrl); - m.attr("ImGuiKey_LeftShift") = static_cast(ImGuiKey_LeftShift); - m.attr("ImGuiKey_LeftAlt") = static_cast(ImGuiKey_LeftAlt); - m.attr("ImGuiKey_LeftSuper") = static_cast(ImGuiKey_LeftSuper); - m.attr("ImGuiKey_RightCtrl") = static_cast(ImGuiKey_RightCtrl); - m.attr("ImGuiKey_RightShift") = static_cast(ImGuiKey_RightShift); - m.attr("ImGuiKey_RightAlt") = static_cast(ImGuiKey_RightAlt); - m.attr("ImGuiKey_RightSuper") = static_cast(ImGuiKey_RightSuper); - m.attr("ImGuiKey_Menu") = static_cast(ImGuiKey_Menu); - m.attr("ImGuiKey_0") = static_cast(ImGuiKey_0); - m.attr("ImGuiKey_1") = static_cast(ImGuiKey_1); - m.attr("ImGuiKey_2") = static_cast(ImGuiKey_2); - m.attr("ImGuiKey_3") = static_cast(ImGuiKey_3); - m.attr("ImGuiKey_4") = static_cast(ImGuiKey_4); - m.attr("ImGuiKey_5") = static_cast(ImGuiKey_5); - m.attr("ImGuiKey_6") = static_cast(ImGuiKey_6); - m.attr("ImGuiKey_7") = static_cast(ImGuiKey_7); - m.attr("ImGuiKey_8") = static_cast(ImGuiKey_8); - m.attr("ImGuiKey_9") = static_cast(ImGuiKey_9); - m.attr("ImGuiKey_A") = static_cast(ImGuiKey_A); - m.attr("ImGuiKey_B") = static_cast(ImGuiKey_B); - m.attr("ImGuiKey_C") = static_cast(ImGuiKey_C); - m.attr("ImGuiKey_D") = static_cast(ImGuiKey_D); - m.attr("ImGuiKey_E") = static_cast(ImGuiKey_E); - m.attr("ImGuiKey_F") = static_cast(ImGuiKey_F); - m.attr("ImGuiKey_G") = static_cast(ImGuiKey_G); - m.attr("ImGuiKey_H") = static_cast(ImGuiKey_H); - m.attr("ImGuiKey_I") = static_cast(ImGuiKey_I); - m.attr("ImGuiKey_J") = static_cast(ImGuiKey_J); - m.attr("ImGuiKey_K") = static_cast(ImGuiKey_K); - m.attr("ImGuiKey_L") = static_cast(ImGuiKey_L); - m.attr("ImGuiKey_M") = static_cast(ImGuiKey_M); - m.attr("ImGuiKey_N") = static_cast(ImGuiKey_N); - m.attr("ImGuiKey_O") = static_cast(ImGuiKey_O); - m.attr("ImGuiKey_P") = static_cast(ImGuiKey_P); - m.attr("ImGuiKey_Q") = static_cast(ImGuiKey_Q); - m.attr("ImGuiKey_R") = static_cast(ImGuiKey_R); - m.attr("ImGuiKey_S") = static_cast(ImGuiKey_S); - m.attr("ImGuiKey_T") = static_cast(ImGuiKey_T); - m.attr("ImGuiKey_U") = static_cast(ImGuiKey_U); - m.attr("ImGuiKey_V") = static_cast(ImGuiKey_V); - m.attr("ImGuiKey_W") = static_cast(ImGuiKey_W); - m.attr("ImGuiKey_X") = static_cast(ImGuiKey_X); - m.attr("ImGuiKey_Y") = static_cast(ImGuiKey_Y); - m.attr("ImGuiKey_Z") = static_cast(ImGuiKey_Z); - m.attr("ImGuiKey_F1") = static_cast(ImGuiKey_F1); - m.attr("ImGuiKey_F2") = static_cast(ImGuiKey_F2); - m.attr("ImGuiKey_F3") = static_cast(ImGuiKey_F3); - m.attr("ImGuiKey_F4") = static_cast(ImGuiKey_F4); - m.attr("ImGuiKey_F5") = static_cast(ImGuiKey_F5); - m.attr("ImGuiKey_F6") = static_cast(ImGuiKey_F6); - m.attr("ImGuiKey_F7") = static_cast(ImGuiKey_F7); - m.attr("ImGuiKey_F8") = static_cast(ImGuiKey_F8); - m.attr("ImGuiKey_F9") = static_cast(ImGuiKey_F9); - m.attr("ImGuiKey_F10") = static_cast(ImGuiKey_F10); - m.attr("ImGuiKey_F11") = static_cast(ImGuiKey_F11); - m.attr("ImGuiKey_F12") = static_cast(ImGuiKey_F12); - m.attr("ImGuiKey_F13") = static_cast(ImGuiKey_F13); - m.attr("ImGuiKey_F14") = static_cast(ImGuiKey_F14); - m.attr("ImGuiKey_F15") = static_cast(ImGuiKey_F15); - m.attr("ImGuiKey_F16") = static_cast(ImGuiKey_F16); - m.attr("ImGuiKey_F17") = static_cast(ImGuiKey_F17); - m.attr("ImGuiKey_F18") = static_cast(ImGuiKey_F18); - m.attr("ImGuiKey_F19") = static_cast(ImGuiKey_F19); - m.attr("ImGuiKey_F20") = static_cast(ImGuiKey_F20); - m.attr("ImGuiKey_F21") = static_cast(ImGuiKey_F21); - m.attr("ImGuiKey_F22") = static_cast(ImGuiKey_F22); - m.attr("ImGuiKey_F23") = static_cast(ImGuiKey_F23); - m.attr("ImGuiKey_F24") = static_cast(ImGuiKey_F24); - m.attr("ImGuiKey_Apostrophe") = static_cast(ImGuiKey_Apostrophe); - m.attr("ImGuiKey_Comma") = static_cast(ImGuiKey_Comma); - m.attr("ImGuiKey_Minus") = static_cast(ImGuiKey_Minus); - m.attr("ImGuiKey_Period") = static_cast(ImGuiKey_Period); - m.attr("ImGuiKey_Slash") = static_cast(ImGuiKey_Slash); - m.attr("ImGuiKey_Semicolon") = static_cast(ImGuiKey_Semicolon); - m.attr("ImGuiKey_Equal") = static_cast(ImGuiKey_Equal); - m.attr("ImGuiKey_LeftBracket") = static_cast(ImGuiKey_LeftBracket); - m.attr("ImGuiKey_Backslash") = static_cast(ImGuiKey_Backslash); - m.attr("ImGuiKey_RightBracket") = static_cast(ImGuiKey_RightBracket); - m.attr("ImGuiKey_GraveAccent") = static_cast(ImGuiKey_GraveAccent); - m.attr("ImGuiKey_CapsLock") = static_cast(ImGuiKey_CapsLock); - m.attr("ImGuiKey_ScrollLock") = static_cast(ImGuiKey_ScrollLock); - m.attr("ImGuiKey_NumLock") = static_cast(ImGuiKey_NumLock); - m.attr("ImGuiKey_PrImGuiKeyScreen") = static_cast(ImGuiKey_PrintScreen); - m.attr("ImGuiKey_Pause") = static_cast(ImGuiKey_Pause); - m.attr("ImGuiKey_Keypad0") = static_cast(ImGuiKey_Keypad0); - m.attr("ImGuiKey_Keypad1") = static_cast(ImGuiKey_Keypad1); - m.attr("ImGuiKey_Keypad2") = static_cast(ImGuiKey_Keypad2); - m.attr("ImGuiKey_Keypad3") = static_cast(ImGuiKey_Keypad3); - m.attr("ImGuiKey_Keypad4") = static_cast(ImGuiKey_Keypad4); - m.attr("ImGuiKey_Keypad5") = static_cast(ImGuiKey_Keypad5); - m.attr("ImGuiKey_Keypad6") = static_cast(ImGuiKey_Keypad6); - m.attr("ImGuiKey_Keypad7") = static_cast(ImGuiKey_Keypad7); - m.attr("ImGuiKey_Keypad8") = static_cast(ImGuiKey_Keypad8); - m.attr("ImGuiKey_Keypad9") = static_cast(ImGuiKey_Keypad9); - m.attr("ImGuiKey_KeypadDecimal") = static_cast(ImGuiKey_KeypadDecimal); - m.attr("ImGuiKey_KeypadDivide") = static_cast(ImGuiKey_KeypadDivide); - m.attr("ImGuiKey_KeypadMultiply") = static_cast(ImGuiKey_KeypadMultiply); - m.attr("ImGuiKey_KeypadSubtract") = static_cast(ImGuiKey_KeypadSubtract); - m.attr("ImGuiKey_KeypadAdd") = static_cast(ImGuiKey_KeypadAdd); - m.attr("ImGuiKey_KeypadEnter") = static_cast(ImGuiKey_KeypadEnter); - m.attr("ImGuiKey_KeypadEqual") = static_cast(ImGuiKey_KeypadEqual); - m.attr("ImGuiKey_AppBack") = static_cast(ImGuiKey_AppBack); - m.attr("ImGuiKey_AppForward") = static_cast(ImGuiKey_AppForward); - m.attr("ImGuiKey_GamepadStart") = static_cast(ImGuiKey_GamepadStart); - m.attr("ImGuiKey_GamepadBack") = static_cast(ImGuiKey_GamepadBack); - m.attr("ImGuiKey_GamepadFaceUp") = static_cast(ImGuiKey_GamepadFaceUp); - m.attr("ImGuiKey_GamepadFaceDown") = static_cast(ImGuiKey_GamepadFaceDown); - m.attr("ImGuiKey_GamepadFaceLeft") = static_cast(ImGuiKey_GamepadFaceLeft); - m.attr("ImGuiKey_GamepadFaceRight") = static_cast(ImGuiKey_GamepadFaceRight); - m.attr("ImGuiKey_GamepadDpadUp") = static_cast(ImGuiKey_GamepadDpadUp); - m.attr("ImGuiKey_GamepadDpadDown") = static_cast(ImGuiKey_GamepadDpadDown); - m.attr("ImGuiKey_GamepadDpadLeft") = static_cast(ImGuiKey_GamepadDpadLeft); - m.attr("ImGuiKey_GamepadDpadRight") = static_cast(ImGuiKey_GamepadDpadRight); - m.attr("ImGuiKey_GamepadL1") = static_cast(ImGuiKey_GamepadL1); - m.attr("ImGuiKey_GamepadR1") = static_cast(ImGuiKey_GamepadR1); - m.attr("ImGuiKey_GamepadL2") = static_cast(ImGuiKey_GamepadL2); - m.attr("ImGuiKey_GamepadR2") = static_cast(ImGuiKey_GamepadR2); - m.attr("ImGuiKey_GamepadL3") = static_cast(ImGuiKey_GamepadL3); - m.attr("ImGuiKey_GamepadR3") = static_cast(ImGuiKey_GamepadR3); - m.attr("ImGuiKey_GamepadLStickUp") = static_cast(ImGuiKey_GamepadLStickUp); - m.attr("ImGuiKey_GamepadLStickDown") = static_cast(ImGuiKey_GamepadLStickDown); - m.attr("ImGuiKey_GamepadLStickLeft") = static_cast(ImGuiKey_GamepadLStickLeft); - m.attr("ImGuiKey_GamepadLStickRight") = static_cast(ImGuiKey_GamepadLStickRight); - m.attr("ImGuiKey_GamepadRStickUp") = static_cast(ImGuiKey_GamepadRStickUp); - m.attr("ImGuiKey_GamepadRStickDown") = static_cast(ImGuiKey_GamepadRStickDown); - m.attr("ImGuiKey_GamepadRStickLeft") = static_cast(ImGuiKey_GamepadRStickLeft); - m.attr("ImGuiKey_GamepadRStickRight") = static_cast(ImGuiKey_GamepadRStickRight); - m.attr("ImGuiKey_ModCtrl") = static_cast(ImGuiKey_ModCtrl); - m.attr("ImGuiKey_ModShift") = static_cast(ImGuiKey_ModShift); - m.attr("ImGuiKey_ModAlt") = static_cast(ImGuiKey_ModAlt); - m.attr("ImGuiKey_ModSuper") = static_cast(ImGuiKey_ModSuper); - - m.attr("ImGuiModFlags_None") = static_cast(ImGuiModFlags_None); - m.attr("ImGuiModFlags_Ctrl") = static_cast(ImGuiModFlags_Ctrl); - m.attr("ImGuiModFlags_Shift") = static_cast(ImGuiModFlags_Shift); - m.attr("ImGuiModFlags_Alt") = static_cast(ImGuiModFlags_Alt); - m.attr("ImGuiModFlags_Super") = static_cast(ImGuiModFlags_Super); - - m.attr("ImGuiNavInput_Activate") = static_cast(ImGuiNavInput_Activate); - m.attr("ImGuiNavInput_Cancel") = static_cast(ImGuiNavInput_Cancel); - m.attr("ImGuiNavInput_Input") = static_cast(ImGuiNavInput_Input); - m.attr("ImGuiNavInput_Menu") = static_cast(ImGuiNavInput_Menu); - m.attr("ImGuiNavInput_DpadLeft") = static_cast(ImGuiNavInput_DpadLeft); - m.attr("ImGuiNavInput_DpadRight") = static_cast(ImGuiNavInput_DpadRight); - m.attr("ImGuiNavInput_DpadUp") = static_cast(ImGuiNavInput_DpadUp); - m.attr("ImGuiNavInput_DpadDown") = static_cast(ImGuiNavInput_DpadDown); - m.attr("ImGuiNavInput_LStickLeft") = static_cast(ImGuiNavInput_LStickLeft); - m.attr("ImGuiNavInput_LStickRight") = static_cast(ImGuiNavInput_LStickRight); - m.attr("ImGuiNavInput_LStickUp") = static_cast(ImGuiNavInput_LStickUp); - m.attr("ImGuiNavInput_LStickDown") = static_cast(ImGuiNavInput_LStickDown); - m.attr("ImGuiNavInput_FocusPrev") = static_cast(ImGuiNavInput_FocusPrev); - m.attr("ImGuiNavInput_FocusNext") = static_cast(ImGuiNavInput_FocusNext); - m.attr("ImGuiNavInput_TweakSlow") = static_cast(ImGuiNavInput_TweakSlow); - m.attr("ImGuiNavInput_TweakFast") = static_cast(ImGuiNavInput_TweakFast); - - m.attr("ImGuiConfigFlags_None") = static_cast(ImGuiConfigFlags_None); - m.attr("ImGuiConfigFlags_NavEnableKeyboard") = static_cast(ImGuiConfigFlags_NavEnableKeyboard); - m.attr("ImGuiConfigFlags_NavEnableGamepad") = static_cast(ImGuiConfigFlags_NavEnableGamepad); - m.attr("ImGuiConfigFlags_NavEnableSetMousePos") = static_cast(ImGuiConfigFlags_NavEnableSetMousePos); - m.attr("ImGuiConfigFlags_NavNoCaptureKeyboard") = static_cast(ImGuiConfigFlags_NavNoCaptureKeyboard); - m.attr("ImGuiConfigFlags_NoMouse") = static_cast(ImGuiConfigFlags_NoMouse); - m.attr("ImGuiConfigFlags_NoMouseCursorChange") = static_cast(ImGuiConfigFlags_NoMouseCursorChange); - m.attr("ImGuiConfigFlags_IsSRGB") = static_cast(ImGuiConfigFlags_IsSRGB); - m.attr("ImGuiConfigFlags_IsTouchScreen") = static_cast(ImGuiConfigFlags_IsTouchScreen); - - m.attr("ImGuiBackendFlags_None") = static_cast(ImGuiBackendFlags_None); - m.attr("ImGuiBackendFlags_HasGamepad") = static_cast(ImGuiBackendFlags_HasGamepad); - m.attr("ImGuiBackendFlags_HasMouseCursors") = static_cast(ImGuiBackendFlags_HasMouseCursors); - m.attr("ImGuiBackendFlags_HasSetMousePos") = static_cast(ImGuiBackendFlags_HasSetMousePos); - m.attr("ImGuiBackendFlags_RendererHasVtxOffset") = static_cast(ImGuiBackendFlags_RendererHasVtxOffset); - - m.attr("ImGuiCol_Text") = static_cast(ImGuiCol_Text); - m.attr("ImGuiCol_TextDisabled") = static_cast(ImGuiCol_TextDisabled); - m.attr("ImGuiCol_WindowBg") = static_cast(ImGuiCol_WindowBg); - m.attr("ImGuiCol_ChildBg") = static_cast(ImGuiCol_ChildBg); - m.attr("ImGuiCol_PopupBg") = static_cast(ImGuiCol_PopupBg); - m.attr("ImGuiCol_Border") = static_cast(ImGuiCol_Border); - m.attr("ImGuiCol_BorderShadow") = static_cast(ImGuiCol_BorderShadow); - m.attr("ImGuiCol_FrameBg") = static_cast(ImGuiCol_FrameBg); - m.attr("ImGuiCol_FrameBgHovered") = static_cast(ImGuiCol_FrameBgHovered); - m.attr("ImGuiCol_FrameBgActive") = static_cast(ImGuiCol_FrameBgActive); - m.attr("ImGuiCol_TitleBg") = static_cast(ImGuiCol_TitleBg); - m.attr("ImGuiCol_TitleBgActive") = static_cast(ImGuiCol_TitleBgActive); - m.attr("ImGuiCol_TitleBgCollapsed") = static_cast(ImGuiCol_TitleBgCollapsed); - m.attr("ImGuiCol_MenuBarBg") = static_cast(ImGuiCol_MenuBarBg); - m.attr("ImGuiCol_ScrollbarBg") = static_cast(ImGuiCol_ScrollbarBg); - m.attr("ImGuiCol_ScrollbarGrab") = static_cast(ImGuiCol_ScrollbarGrab); - m.attr("ImGuiCol_ScrollbarGrabHovered") = static_cast(ImGuiCol_ScrollbarGrabHovered); - m.attr("ImGuiCol_ScrollbarGrabActive") = static_cast(ImGuiCol_ScrollbarGrabActive); - m.attr("ImGuiCol_CheckMark") = static_cast(ImGuiCol_CheckMark); - m.attr("ImGuiCol_SliderGrab") = static_cast(ImGuiCol_SliderGrab); - m.attr("ImGuiCol_SliderGrabActive") = static_cast(ImGuiCol_SliderGrabActive); - m.attr("ImGuiCol_Button") = static_cast(ImGuiCol_Button); - m.attr("ImGuiCol_ButtonHovered") = static_cast(ImGuiCol_ButtonHovered); - m.attr("ImGuiCol_ButtonActive") = static_cast(ImGuiCol_ButtonActive); - m.attr("ImGuiCol_Header") = static_cast(ImGuiCol_Header); - m.attr("ImGuiCol_HeaderHovered") = static_cast(ImGuiCol_HeaderHovered); - m.attr("ImGuiCol_HeaderActive") = static_cast(ImGuiCol_HeaderActive); - m.attr("ImGuiCol_Separator") = static_cast(ImGuiCol_Separator); - m.attr("ImGuiCol_SeparatorHovered") = static_cast(ImGuiCol_SeparatorHovered); - m.attr("ImGuiCol_SeparatorActive") = static_cast(ImGuiCol_SeparatorActive); - m.attr("ImGuiCol_ResizeGrip") = static_cast(ImGuiCol_ResizeGrip); - m.attr("ImGuiCol_ResizeGripHovered") = static_cast(ImGuiCol_ResizeGripHovered); - m.attr("ImGuiCol_ResizeGripActive") = static_cast(ImGuiCol_ResizeGripActive); - m.attr("ImGuiCol_Tab") = static_cast(ImGuiCol_Tab); - m.attr("ImGuiCol_TabHovered") = static_cast(ImGuiCol_TabHovered); - m.attr("ImGuiCol_TabActive") = static_cast(ImGuiCol_TabActive); - m.attr("ImGuiCol_TabUnfocused") = static_cast(ImGuiCol_TabUnfocused); - m.attr("ImGuiCol_TabUnfocusedActive") = static_cast(ImGuiCol_TabUnfocusedActive); - m.attr("ImGuiCol_PlotLines") = static_cast(ImGuiCol_PlotLines); - m.attr("ImGuiCol_PlotLinesHovered") = static_cast(ImGuiCol_PlotLinesHovered); - m.attr("ImGuiCol_PlotHistogram") = static_cast(ImGuiCol_PlotHistogram); - m.attr("ImGuiCol_PlotHistogramHovered") = static_cast(ImGuiCol_PlotHistogramHovered); - m.attr("ImGuiCol_TextSelectedBg") = static_cast(ImGuiCol_TextSelectedBg); - m.attr("ImGuiCol_DragDropTarget") = static_cast(ImGuiCol_DragDropTarget); - m.attr("ImGuiCol_NavHighlight") = static_cast(ImGuiCol_NavHighlight); - m.attr("ImGuiCol_NavWindowingHighlight") = static_cast(ImGuiCol_NavWindowingHighlight); - m.attr("ImGuiCol_NavWindowingDimBg") = static_cast(ImGuiCol_NavWindowingDimBg); - m.attr("ImGuiCol_ModalWindowDimBg") = static_cast(ImGuiCol_ModalWindowDimBg); - m.attr("ImGuiCol_COUNT") = static_cast(ImGuiCol_COUNT); - - m.attr("ImGuiStyleVar_Alpha") = static_cast(ImGuiStyleVar_Alpha); - m.attr("ImGuiStyleVar_WindowPadding") = static_cast(ImGuiStyleVar_WindowPadding); - m.attr("ImGuiStyleVar_WindowRounding") = static_cast(ImGuiStyleVar_WindowRounding); - m.attr("ImGuiStyleVar_WindowBorderSize") = static_cast(ImGuiStyleVar_WindowBorderSize); - m.attr("ImGuiStyleVar_WindowMinSize") = static_cast(ImGuiStyleVar_WindowMinSize); - m.attr("ImGuiStyleVar_WindowTitleAlign") = static_cast(ImGuiStyleVar_WindowTitleAlign); - m.attr("ImGuiStyleVar_ChildRounding") = static_cast(ImGuiStyleVar_ChildRounding); - m.attr("ImGuiStyleVar_ChildBorderSize") = static_cast(ImGuiStyleVar_ChildBorderSize); - m.attr("ImGuiStyleVar_PopupRounding") = static_cast(ImGuiStyleVar_PopupRounding); - m.attr("ImGuiStyleVar_PopupBorderSize") = static_cast(ImGuiStyleVar_PopupBorderSize); - m.attr("ImGuiStyleVar_FramePadding") = static_cast(ImGuiStyleVar_FramePadding); - m.attr("ImGuiStyleVar_FrameRounding") = static_cast(ImGuiStyleVar_FrameRounding); - m.attr("ImGuiStyleVar_FrameBorderSize") = static_cast(ImGuiStyleVar_FrameBorderSize); - m.attr("ImGuiStyleVar_ItemSpacing") = static_cast(ImGuiStyleVar_ItemSpacing); - m.attr("ImGuiStyleVar_ItemInnerSpacing") = static_cast(ImGuiStyleVar_ItemInnerSpacing); - m.attr("ImGuiStyleVar_IndentSpacing") = static_cast(ImGuiStyleVar_IndentSpacing); - m.attr("ImGuiStyleVar_ScrollbarSize") = static_cast(ImGuiStyleVar_ScrollbarSize); - m.attr("ImGuiStyleVar_ScrollbarRounding") = static_cast(ImGuiStyleVar_ScrollbarRounding); - m.attr("ImGuiStyleVar_GrabMinSize") = static_cast(ImGuiStyleVar_GrabMinSize); - m.attr("ImGuiStyleVar_GrabRounding") = static_cast(ImGuiStyleVar_GrabRounding); - m.attr("ImGuiStyleVar_TabRounding") = static_cast(ImGuiStyleVar_TabRounding); - m.attr("ImGuiStyleVar_ButtonTextAlign") = static_cast(ImGuiStyleVar_ButtonTextAlign); - m.attr("ImGuiStyleVar_SelectableTextAlign") = static_cast(ImGuiStyleVar_SelectableTextAlign); - m.attr("ImGuiStyleVar_COUNT") = static_cast(ImGuiStyleVar_COUNT); - - m.attr("ImGuiColorEditFlags_None") = static_cast(ImGuiColorEditFlags_None); - m.attr("ImGuiColorEditFlags_NoAlpha") = static_cast(ImGuiColorEditFlags_NoAlpha); - m.attr("ImGuiColorEditFlags_NoPicker") = static_cast(ImGuiColorEditFlags_NoPicker); - m.attr("ImGuiColorEditFlags_NoOptions") = static_cast(ImGuiColorEditFlags_NoOptions); - m.attr("ImGuiColorEditFlags_NoSmallPreview") = static_cast(ImGuiColorEditFlags_NoSmallPreview); - m.attr("ImGuiColorEditFlags_NoInputs") = static_cast(ImGuiColorEditFlags_NoInputs); - m.attr("ImGuiColorEditFlags_NoTooltip") = static_cast(ImGuiColorEditFlags_NoTooltip); - m.attr("ImGuiColorEditFlags_NoLabel") = static_cast(ImGuiColorEditFlags_NoLabel); - m.attr("ImGuiColorEditFlags_NoSidePreview") = static_cast(ImGuiColorEditFlags_NoSidePreview); - m.attr("ImGuiColorEditFlags_NoDragDrop") = static_cast(ImGuiColorEditFlags_NoDragDrop); - m.attr("ImGuiColorEditFlags_NoBorder") = static_cast(ImGuiColorEditFlags_NoBorder); - m.attr("ImGuiColorEditFlags_AlphaBar") = static_cast(ImGuiColorEditFlags_AlphaBar); - m.attr("ImGuiColorEditFlags_AlphaPreview") = static_cast(ImGuiColorEditFlags_AlphaPreview); - m.attr("ImGuiColorEditFlags_AlphaPreviewHalf") = static_cast(ImGuiColorEditFlags_AlphaPreviewHalf); - m.attr("ImGuiColorEditFlags_HDR") = static_cast(ImGuiColorEditFlags_HDR); - m.attr("ImGuiColorEditFlags_DisplayRGB") = static_cast(ImGuiColorEditFlags_DisplayRGB); - m.attr("ImGuiColorEditFlags_DisplayHSV") = static_cast(ImGuiColorEditFlags_DisplayHSV); - m.attr("ImGuiColorEditFlags_DisplayHex") = static_cast(ImGuiColorEditFlags_DisplayHex); - m.attr("ImGuiColorEditFlags_Uint8") = static_cast(ImGuiColorEditFlags_Uint8); - m.attr("ImGuiColorEditFlags_Float") = static_cast(ImGuiColorEditFlags_Float); - m.attr("ImGuiColorEditFlags_PickerHueBar") = static_cast(ImGuiColorEditFlags_PickerHueBar); - m.attr("ImGuiColorEditFlags_PickerHueWheel") = static_cast(ImGuiColorEditFlags_PickerHueWheel); - m.attr("ImGuiColorEditFlags_InputRGB") = static_cast(ImGuiColorEditFlags_InputRGB); - m.attr("ImGuiColorEditFlags_InputHSV") = static_cast(ImGuiColorEditFlags_InputHSV); - - m.attr("ImGuiMouseButton_Left") = static_cast(ImGuiMouseButton_Left); - m.attr("ImGuiMouseButton_Right") = static_cast(ImGuiMouseButton_Right); - m.attr("ImGuiMouseButton_Middle") = static_cast(ImGuiMouseButton_Middle); - m.attr("ImGuiMouseButton_COUNT") = static_cast(ImGuiMouseButton_COUNT); - - m.attr("ImGuiMouseCursor_None") = static_cast(ImGuiMouseCursor_None); - m.attr("ImGuiMouseCursor_Arrow") = static_cast(ImGuiMouseCursor_Arrow); - m.attr("ImGuiMouseCursor_TextInput") = static_cast(ImGuiMouseCursor_TextInput); - m.attr("ImGuiMouseCursor_ResizeAll") = static_cast(ImGuiMouseCursor_ResizeAll); - m.attr("ImGuiMouseCursor_ResizeNS") = static_cast(ImGuiMouseCursor_ResizeNS); - m.attr("ImGuiMouseCursor_ResizeEW") = static_cast(ImGuiMouseCursor_ResizeEW); - m.attr("ImGuiMouseCursor_ResizeNESW") = static_cast(ImGuiMouseCursor_ResizeNESW); - m.attr("ImGuiMouseCursor_ResizeNWSE") = static_cast(ImGuiMouseCursor_ResizeNWSE); - m.attr("ImGuiMouseCursor_Hand") = static_cast(ImGuiMouseCursor_Hand); - m.attr("ImGuiMouseCursor_NotAllowed") = static_cast(ImGuiMouseCursor_NotAllowed); - m.attr("ImGuiMouseCursor_COUNT") = static_cast(ImGuiMouseCursor_COUNT); - - m.attr("ImGuiCond_Always") = static_cast(ImGuiCond_Always); - m.attr("ImGuiCond_Once") = static_cast(ImGuiCond_Once); - m.attr("ImGuiCond_FirstUseEver") = static_cast(ImGuiCond_FirstUseEver); - m.attr("ImGuiCond_Appearing") = static_cast(ImGuiCond_Appearing); +void bind_imgui(py::module& m) { + auto mod_imgui = m.def_submodule("imgui", "ImGui bindings"); + bind_imgui_funcs(mod_imgui); + bind_imgui_enums(mod_imgui); } diff --git a/src/cpp/imgui_utils.h b/src/cpp/imgui_utils.h new file mode 100644 index 0000000..a5c99e2 --- /dev/null +++ b/src/cpp/imgui_utils.h @@ -0,0 +1,101 @@ +#pragma once + +#include "imgui.h" + +#include +#include + + +std::vector convert_string_items(const std::vector& items) { + auto _items = std::vector(); + _items.reserve(items.size()); + for (const auto& item : items) { + _items.push_back(item.data()); + } + return _items; +} + +namespace PYBIND11_NAMESPACE { +namespace detail { + +static bool set_value(float& v, PyObject* obj) { + if (PyLong_Check(obj)) { + v = static_cast(PyLong_AsLong(obj)); + return true; + } else if (PyFloat_Check(obj)) { + v = static_cast(PyFloat_AsDouble(obj)); + return true; + } + return false; +} + + +template <> +struct type_caster { +public: + PYBIND11_TYPE_CASTER(ImVec2, const_name("ImVec2")); + + bool load(handle src, bool) { + PyObject* obj = src.ptr(); + if (!PyTuple_Check(obj)) { + return false; + } + if (PyTuple_Size(obj) != 2) { + return false; + } + + PyObject* item0 = PyTuple_GetItem(obj, 0); + PyObject* item1 = PyTuple_GetItem(obj, 1); + if (!(set_value(value.x, item0) && set_value(value.y, item1))) { + return false; + } + return !PyErr_Occurred(); + } + + static handle cast(ImVec2 src, return_value_policy /* policy */, handle /* parent */) { + PyObject* dst = PyTuple_New(2); + PyTuple_SetItem(dst, 0, PyFloat_FromDouble(src.x)); + PyTuple_SetItem(dst, 1, PyFloat_FromDouble(src.y)); + return dst; + } +}; + + +template <> +struct type_caster { +public: + PYBIND11_TYPE_CASTER(ImVec4, const_name("ImVec4")); + + bool load(handle src, bool) { + PyObject* obj = src.ptr(); + if (!PyTuple_Check(obj)) { + return false; + } + if (PyTuple_Size(obj) != 4) { + return false; + } + + PyObject* item0 = PyTuple_GetItem(obj, 0); + PyObject* item1 = PyTuple_GetItem(obj, 1); + PyObject* item2 = PyTuple_GetItem(obj, 2); + PyObject* item3 = PyTuple_GetItem(obj, 3); + if (!(set_value(value.x, item0) && set_value(value.y, item1) && set_value(value.z, item2) && + set_value(value.w, item3))) { + return false; + } + return !PyErr_Occurred(); + } + + static handle cast(ImVec4 src, return_value_policy /* policy */, handle /* parent */) { + PyObject* dst = PyTuple_New(4); + PyTuple_SetItem(dst, 0, PyFloat_FromDouble(src.x)); + PyTuple_SetItem(dst, 1, PyFloat_FromDouble(src.y)); + PyTuple_SetItem(dst, 2, PyFloat_FromDouble(src.z)); + PyTuple_SetItem(dst, 3, PyFloat_FromDouble(src.w)); + return dst; + } +}; + + +} // namespace detail +} // namespace PYBIND11_NAMESPACE diff --git a/src/polyscope_bindings/imgui.pyi b/src/polyscope_bindings/imgui.pyi index e582eed..f255fe2 100644 --- a/src/polyscope_bindings/imgui.pyi +++ b/src/polyscope_bindings/imgui.pyi @@ -1,271 +1,884 @@ from typing import List, NewType, Optional, Tuple, Union, overload -import numpy as np +from enum import Enum -# Basic Types -ImU32 = NewType("ImU32", int) -ImVec2 = Tuple[float, float] -ImVec4 = Tuple[float, float, float, float] - -# Enum Types -ImGuiCol = NewType("ImGuiCol", int) -ImGuiColorEditFlags = NewType("ImGuiColorEditFlags", int) -ImGuiComboFlags = NewType("ImGuiComboFlags", int) -ImGuiCond = NewType("ImGuiCond", int) -ImGuiDataType = NewType("ImGuiDataType", int) -ImGuiDir = NewType("ImGuiDir", int) -ImGuiFocusedFlags = NewType("ImGuiFocusedFlags", int) -ImGuiHoveredFlags = NewType("ImGuiHoveredFlags", int) ImGuiID = NewType("ImGuiID", int) -ImGuiInputTextFlags = NewType("ImGuiInputTextFlags", int) -ImGuiKey = NewType("ImGuiKey", int) -ImGuiMouseButton = NewType("ImGuiMouseButton", int) -ImGuiMouseCursor = NewType("ImGuiMouseCursor", int) -ImGuiSelectableFlags = NewType("ImGuiSelectableFlags", int) -ImGuiStyleVar = NewType("ImGuiStyleVar", int) -ImGuiTabBarFlags = NewType("ImGuiTabBarFlags", int) -ImGuiTabItemFlags = NewType("ImGuiTabItemFlags", int) -ImGuiTreeNodeFlags = NewType("ImGuiTreeNodeFlags", int) -ImGuiWindowFlags = NewType("ImGuiWindowFlags", int) - -# Draw Types -ImDrawFlags = NewType("ImDrawFlags", int) -ImDrawListFlags = NewType("ImDrawListFlags", int) - -# Windows - - +ImGuiKeyChord = NewType("ImGuiKeyChord", int) + +class ImGuiMultiSelectFlags(Enum): + ImGuiMultiSelectFlags_None = 0 + ImGuiMultiSelectFlags_SingleSelect = 1 + ImGuiMultiSelectFlags_NoSelectAll = 2 + ImGuiMultiSelectFlags_NoRangeSelect = 4 + ImGuiMultiSelectFlags_NoAutoSelect = 8 + ImGuiMultiSelectFlags_NoAutoClear = 16 + ImGuiMultiSelectFlags_NoAutoClearOnReselect = 32 + ImGuiMultiSelectFlags_BoxSelect1d = 64 + ImGuiMultiSelectFlags_BoxSelect2d = 128 + ImGuiMultiSelectFlags_BoxSelectNoScroll = 256 + ImGuiMultiSelectFlags_ClearOnEscape = 512 + ImGuiMultiSelectFlags_ClearOnClickVoid = 1024 + ImGuiMultiSelectFlags_ScopeWindow = 2048 + ImGuiMultiSelectFlags_ScopeRect = 4096 + ImGuiMultiSelectFlags_SelectOnClick = 8192 + ImGuiMultiSelectFlags_SelectOnClickRelease = 16384 + ImGuiMultiSelectFlags_NavWrapX = 65536 + +class ImGuiWindowFlags(Enum): + ImGuiWindowFlags_None = 0 + ImGuiWindowFlags_NoTitleBar = 1 << 0 + ImGuiWindowFlags_NoResize = 1 << 1 + ImGuiWindowFlags_NoMove = 1 << 2 + ImGuiWindowFlags_NoScrollbar = 1 << 3 + ImGuiWindowFlags_NoScrollWithMouse = 1 << 4 + ImGuiWindowFlags_NoCollapse = 1 << 5 + ImGuiWindowFlags_AlwaysAutoResize = 1 << 6 + ImGuiWindowFlags_NoBackground = 1 << 7 + ImGuiWindowFlags_NoSavedSettings = 1 << 8 + ImGuiWindowFlags_NoMouseInputs = 1 << 9 + ImGuiWindowFlags_MenuBar = 1 << 10 + ImGuiWindowFlags_HorizontalScrollbar = 1 << 11 + ImGuiWindowFlags_NoFocusOnAppearing = 1 << 12 + ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13 + ImGuiWindowFlags_AlwaysVerticalScrollbar = 1 << 14 + ImGuiWindowFlags_AlwaysHorizontalScrollbar = 1 << 15 + ImGuiWindowFlags_NoNavInputs = 1 << 16 + ImGuiWindowFlags_NoNavFocus = 1 << 17 + ImGuiWindowFlags_UnsavedDocument = 1 << 18 + ImGuiWindowFlags_NoNav = ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus + ImGuiWindowFlags_NoDecoration = ( + ImGuiWindowFlags_NoTitleBar + | ImGuiWindowFlags_NoResize + | ImGuiWindowFlags_NoScrollbar + | ImGuiWindowFlags_NoCollapse + ) + ImGuiWindowFlags_NoInputs = ( + ImGuiWindowFlags_NoMouseInputs + | ImGuiWindowFlags_NoNavInputs + | ImGuiWindowFlags_NoNavFocus + ) + ImGuiWindowFlags_ChildWindow = 1 << 24 + ImGuiWindowFlags_Tooltip = 1 << 25 + ImGuiWindowFlags_Popup = 1 << 26 + ImGuiWindowFlags_Modal = 1 << 27 + ImGuiWindowFlags_ChildMenu = 1 << 28 + ImGuiWindowFlags_AlwaysUseWindowPadding = 1 << 30 + ImGuiWindowFlags_NavFlattened = 1 << 31 + +class ImGuiChildFlags(Enum): + ImGuiChildFlags_None = 0 + ImGuiChildFlags_Border = 1 << 0 + ImGuiChildFlags_AlwaysUseWindowPadding = 1 << 1 + ImGuiChildFlags_ResizeX = 1 << 2 + ImGuiChildFlags_ResizeY = 1 << 3 + ImGuiChildFlags_AutoResizeX = 1 << 4 + ImGuiChildFlags_AutoResizeY = 1 << 5 + ImGuiChildFlags_AlwaysAutoResize = 1 << 6 + ImGuiChildFlags_FrameStyle = 1 << 7 + ImGuiChildFlags_NavFlattened = 1 << 8 + +class ImGuiItemFlags(Enum): + ImGuiItemFlags_None = 0 + ImGuiItemFlags_NoTabStop = 1 << 0 + ImGuiItemFlags_NoNav = 1 << 1 + ImGuiItemFlags_NoNavDefaultFocus = 1 << 2 + ImGuiItemFlags_ButtonRepeat = 1 << 3 + ImGuiItemFlags_AutoClosePopups = 1 << 4 + +class ImGuiInputTextFlags(Enum): + ImGuiInputTextFlags_None = 0 + ImGuiInputTextFlags_CharsDecimal = 1 << 0 + ImGuiInputTextFlags_CharsHexadecimal = 1 << 1 + ImGuiInputTextFlags_CharsScientific = 1 << 2 + ImGuiInputTextFlags_CharsUppercase = 1 << 3 + ImGuiInputTextFlags_CharsNoBlank = 1 << 4 + ImGuiInputTextFlags_AllowTabInput = 1 << 5 + ImGuiInputTextFlags_EnterReturnsTrue = 1 << 6 + ImGuiInputTextFlags_EscapeClearsAll = 1 << 7 + ImGuiInputTextFlags_CtrlEnterForNewLine = 1 << 8 + ImGuiInputTextFlags_ReadOnly = 1 << 9 + ImGuiInputTextFlags_Password = 1 << 10 + ImGuiInputTextFlags_AlwaysOverwrite = 1 << 11 + ImGuiInputTextFlags_AutoSelectAll = 1 << 12 + ImGuiInputTextFlags_ParseEmptyRefVal = 1 << 13 + ImGuiInputTextFlags_DisplayEmptyRefVal = 1 << 14 + ImGuiInputTextFlags_NoHorizontalScroll = 1 << 15 + ImGuiInputTextFlags_NoUndoRedo = 1 << 16 + ImGuiInputTextFlags_CallbackCompletion = 1 << 17 + ImGuiInputTextFlags_CallbackHistory = 1 << 18 + ImGuiInputTextFlags_CallbackAlways = 1 << 19 + ImGuiInputTextFlags_CallbackCharFilter = 1 << 20 + ImGuiInputTextFlags_CallbackResize = 1 << 21 + ImGuiInputTextFlags_CallbackEdit = 1 << 22 + +class ImGuiTreeNodeFlags(Enum): + ImGuiTreeNodeFlags_None = 0 + ImGuiTreeNodeFlags_Selected = 1 << 0 + ImGuiTreeNodeFlags_Framed = 1 << 1 + ImGuiTreeNodeFlags_AllowOverlap = 1 << 2 + ImGuiTreeNodeFlags_NoTreePushOnOpen = 1 << 3 + ImGuiTreeNodeFlags_NoAutoOpenOnLog = 1 << 4 + ImGuiTreeNodeFlags_DefaultOpen = 1 << 5 + ImGuiTreeNodeFlags_OpenOnDoubleClick = 1 << 6 + ImGuiTreeNodeFlags_OpenOnArrow = 1 << 7 + ImGuiTreeNodeFlags_Leaf = 1 << 8 + ImGuiTreeNodeFlags_Bullet = 1 << 9 + ImGuiTreeNodeFlags_FramePadding = 1 << 10 + ImGuiTreeNodeFlags_SpanAvailWidth = 1 << 11 + ImGuiTreeNodeFlags_SpanFullWidth = 1 << 12 + ImGuiTreeNodeFlags_SpanTextWidth = 1 << 13 + ImGuiTreeNodeFlags_SpanAllColumns = 1 << 14 + ImGuiTreeNodeFlags_NavLeftJumpsBackHere = 1 << 15 + ImGuiTreeNodeFlags_CollapsingHeader = ( + ImGuiTreeNodeFlags_Framed + | ImGuiTreeNodeFlags_NoTreePushOnOpen + | ImGuiTreeNodeFlags_NoAutoOpenOnLog + ) + ImGuiTreeNodeFlags_AllowItemOverlap = ImGuiTreeNodeFlags_AllowOverlap + +class ImGuiPopupFlags(Enum): + ImGuiPopupFlags_None = 0 + ImGuiPopupFlags_MouseButtonLeft = 0 + ImGuiPopupFlags_MouseButtonRight = 1 + ImGuiPopupFlags_MouseButtonMiddle = 2 + ImGuiPopupFlags_MouseButtonMask_ = 0x1F + ImGuiPopupFlags_MouseButtonDefault_ = 1 + ImGuiPopupFlags_NoReopen = 1 << 5 + ImGuiPopupFlags_NoOpenOverExistingPopup = 1 << 7 + ImGuiPopupFlags_NoOpenOverItems = 1 << 8 + ImGuiPopupFlags_AnyPopupId = 1 << 10 + ImGuiPopupFlags_AnyPopupLevel = 1 << 11 + ImGuiPopupFlags_AnyPopup = ( + ImGuiPopupFlags_AnyPopupId | ImGuiPopupFlags_AnyPopupLevel + ) + +class ImGuiSelectableFlags(Enum): + ImGuiSelectableFlags_None = 0 + ImGuiSelectableFlags_NoAutoClosePopups = 1 << 0 + ImGuiSelectableFlags_SpanAllColumns = 1 << 1 + ImGuiSelectableFlags_AllowDoubleClick = 1 << 2 + ImGuiSelectableFlags_Disabled = 1 << 3 + ImGuiSelectableFlags_AllowOverlap = 1 << 4 + ImGuiSelectableFlags_Highlight = 1 << 5 + ImGuiSelectableFlags_DontClosePopups = ImGuiSelectableFlags_NoAutoClosePopups + ImGuiSelectableFlags_AllowItemOverlap = ImGuiSelectableFlags_AllowOverlap + +class ImGuiComboFlags(Enum): + ImGuiComboFlags_None = 0 + ImGuiComboFlags_PopupAlignLeft = 1 << 0 + ImGuiComboFlags_HeightSmall = 1 << 1 + ImGuiComboFlags_HeightRegular = 1 << 2 + ImGuiComboFlags_HeightLarge = 1 << 3 + ImGuiComboFlags_HeightLargest = 1 << 4 + ImGuiComboFlags_NoArrowButton = 1 << 5 + ImGuiComboFlags_NoPreview = 1 << 6 + ImGuiComboFlags_WidthFitPreview = 1 << 7 + ImGuiComboFlags_HeightMask_ = ( + ImGuiComboFlags_HeightSmall + | ImGuiComboFlags_HeightRegular + | ImGuiComboFlags_HeightLarge + | ImGuiComboFlags_HeightLargest + ) + +class ImGuiTabBarFlags(Enum): + ImGuiTabBarFlags_None = 0 + ImGuiTabBarFlags_Reorderable = 1 << 0 + ImGuiTabBarFlags_AutoSelectNewTabs = 1 << 1 + ImGuiTabBarFlags_TabListPopupButton = 1 << 2 + ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 1 << 3 + ImGuiTabBarFlags_NoTabListScrollingButtons = 1 << 4 + ImGuiTabBarFlags_NoTooltip = 1 << 5 + ImGuiTabBarFlags_DrawSelectedOverline = 1 << 6 + ImGuiTabBarFlags_FittingPolicyResizeDown = 1 << 7 + ImGuiTabBarFlags_FittingPolicyScroll = 1 << 8 + ImGuiTabBarFlags_FittingPolicyMask_ = ( + ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll + ) + ImGuiTabBarFlags_FittingPolicyDefault_ = ImGuiTabBarFlags_FittingPolicyResizeDown + +class ImGuiTabItemFlags(Enum): + ImGuiTabItemFlags_None = 0 + ImGuiTabItemFlags_UnsavedDocument = 1 << 0 + ImGuiTabItemFlags_SetSelected = 1 << 1 + ImGuiTabItemFlags_NoCloseWithMiddleMouseButton = 1 << 2 + ImGuiTabItemFlags_NoPushId = 1 << 3 + ImGuiTabItemFlags_NoTooltip = 1 << 4 + ImGuiTabItemFlags_NoReorder = 1 << 5 + ImGuiTabItemFlags_Leading = 1 << 6 + ImGuiTabItemFlags_Trailing = 1 << 7 + ImGuiTabItemFlags_NoAssumedClosure = 1 << 8 + +class ImGuiFocusedFlags(Enum): + ImGuiFocusedFlags_None = 0 + ImGuiFocusedFlags_ChildWindows = 1 << 0 + ImGuiFocusedFlags_RootWindow = 1 << 1 + ImGuiFocusedFlags_AnyWindow = 1 << 2 + ImGuiFocusedFlags_NoPopupHierarchy = 1 << 3 + ImGuiFocusedFlags_RootAndChildWindows = ( + ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows + ) + +class ImGuiHoveredFlags(Enum): + ImGuiHoveredFlags_None = 0 + ImGuiHoveredFlags_ChildWindows = 1 << 0 + ImGuiHoveredFlags_RootWindow = 1 << 1 + ImGuiHoveredFlags_AnyWindow = 1 << 2 + ImGuiHoveredFlags_NoPopupHierarchy = 1 << 3 + ImGuiHoveredFlags_AllowWhenBlockedByPopup = 1 << 5 + ImGuiHoveredFlags_AllowWhenBlockedByActiveItem = 1 << 7 + ImGuiHoveredFlags_AllowWhenOverlappedByItem = 1 << 8 + ImGuiHoveredFlags_AllowWhenOverlappedByWindow = 1 << 9 + ImGuiHoveredFlags_AllowWhenDisabled = 1 << 10 + ImGuiHoveredFlags_NoNavOverride = 1 << 11 + ImGuiHoveredFlags_AllowWhenOverlapped = ( + ImGuiHoveredFlags_AllowWhenOverlappedByItem + | ImGuiHoveredFlags_AllowWhenOverlappedByWindow + ) + ImGuiHoveredFlags_RectOnly = ( + ImGuiHoveredFlags_AllowWhenBlockedByPopup + | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem + | ImGuiHoveredFlags_AllowWhenOverlapped + ) + ImGuiHoveredFlags_RootAndChildWindows = ( + ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows + ) + ImGuiHoveredFlags_ForTooltip = 1 << 12 + ImGuiHoveredFlags_Stationary = 1 << 13 + ImGuiHoveredFlags_DelayNone = 1 << 14 + ImGuiHoveredFlags_DelayShort = 1 << 15 + ImGuiHoveredFlags_DelayNormal = 1 << 16 + ImGuiHoveredFlags_NoSharedDelay = 1 << 17 + +class ImGuiDragDropFlags(Enum): + ImGuiDragDropFlags_None = 0 + ImGuiDragDropFlags_SourceNoPreviewTooltip = 1 << 0 + ImGuiDragDropFlags_SourceNoDisableHover = 1 << 1 + ImGuiDragDropFlags_SourceNoHoldToOpenOthers = 1 << 2 + ImGuiDragDropFlags_SourceAllowNullID = 1 << 3 + ImGuiDragDropFlags_SourceExtern = 1 << 4 + ImGuiDragDropFlags_PayloadAutoExpire = 1 << 5 + ImGuiDragDropFlags_PayloadNoCrossContext = 1 << 6 + ImGuiDragDropFlags_PayloadNoCrossProcess = 1 << 7 + ImGuiDragDropFlags_AcceptBeforeDelivery = 1 << 10 + ImGuiDragDropFlags_AcceptNoDrawDefaultRect = 1 << 11 + ImGuiDragDropFlags_AcceptNoPreviewTooltip = 1 << 12 + ImGuiDragDropFlags_AcceptPeekOnly = ( + ImGuiDragDropFlags_AcceptBeforeDelivery + | ImGuiDragDropFlags_AcceptNoDrawDefaultRect + ) + +class ImGuiDataType(Enum): + ImGuiDataType_S8 = 0 + ImGuiDataType_U8 = 1 + ImGuiDataType_S16 = 2 + ImGuiDataType_U16 = 3 + ImGuiDataType_S32 = 4 + ImGuiDataType_U32 = 5 + ImGuiDataType_S64 = 6 + ImGuiDataType_U64 = 7 + ImGuiDataType_Float = 8 + ImGuiDataType_Double = 9 + ImGuiDataType_Bool = 10 + ImGuiDataType_COUNT = 11 + +class ImGuiDir(Enum): + ImGuiDir_None = -1 + ImGuiDir_Left = 0 + ImGuiDir_Right = 1 + ImGuiDir_Up = 2 + ImGuiDir_Down = 3 + ImGuiDir_COUNT = 0 + +class ImGuiSortDirection(Enum): + ImGuiSortDirection_None = 0 + ImGuiSortDirection_Ascending = 1 + ImGuiSortDirection_Descending = 2 + +class ImGuiKey(Enum): + ImGuiKey_None = 0 + ImGuiKey_Tab = 512 + ImGuiKey_LeftArrow = 0 + ImGuiKey_RightArrow = 1 + ImGuiKey_UpArrow = 2 + ImGuiKey_DownArrow = 3 + ImGuiKey_PageUp = 4 + ImGuiKey_PageDown = 5 + ImGuiKey_Home = 6 + ImGuiKey_End = 7 + ImGuiKey_Insert = 8 + ImGuiKey_Delete = 9 + ImGuiKey_Backspace = 10 + ImGuiKey_Space = 11 + ImGuiKey_Enter = 12 + ImGuiKey_Escape = 13 + ImGuiKey_LeftCtrl = 14 + ImGuiKey_LeftShift = 15 + ImGuiKey_LeftAlt = 16 + ImGuiKey_LeftSuper = 17 + ImGuiKey_RightCtrl = 18 + ImGuiKey_RightShift = 19 + ImGuiKey_RightAlt = 20 + ImGuiKey_RightSuper = 21 + ImGuiKey_Menu = 22 + ImGuiKey_0 = 23 + ImGuiKey_1 = 24 + ImGuiKey_2 = 25 + ImGuiKey_3 = 26 + ImGuiKey_4 = 27 + ImGuiKey_5 = 28 + ImGuiKey_6 = 29 + ImGuiKey_7 = 30 + ImGuiKey_8 = 31 + ImGuiKey_9 = 32 + ImGuiKey_A = 33 + ImGuiKey_B = 34 + ImGuiKey_C = 35 + ImGuiKey_D = 36 + ImGuiKey_E = 37 + ImGuiKey_F = 38 + ImGuiKey_G = 39 + ImGuiKey_H = 40 + ImGuiKey_I = 41 + ImGuiKey_J = 42 + ImGuiKey_K = 43 + ImGuiKey_L = 44 + ImGuiKey_M = 45 + ImGuiKey_N = 46 + ImGuiKey_O = 47 + ImGuiKey_P = 48 + ImGuiKey_Q = 49 + ImGuiKey_R = 50 + ImGuiKey_S = 51 + ImGuiKey_T = 52 + ImGuiKey_U = 53 + ImGuiKey_V = 54 + ImGuiKey_W = 55 + ImGuiKey_X = 56 + ImGuiKey_Y = 57 + ImGuiKey_Z = 58 + ImGuiKey_F1 = 59 + ImGuiKey_F2 = 60 + ImGuiKey_F3 = 61 + ImGuiKey_F4 = 62 + ImGuiKey_F5 = 63 + ImGuiKey_F6 = 64 + ImGuiKey_F7 = 65 + ImGuiKey_F8 = 66 + ImGuiKey_F9 = 67 + ImGuiKey_F10 = 68 + ImGuiKey_F11 = 69 + ImGuiKey_F12 = 70 + ImGuiKey_F13 = 71 + ImGuiKey_F14 = 72 + ImGuiKey_F15 = 73 + ImGuiKey_F16 = 74 + ImGuiKey_F17 = 75 + ImGuiKey_F18 = 76 + ImGuiKey_F19 = 77 + ImGuiKey_F20 = 78 + ImGuiKey_F21 = 79 + ImGuiKey_F22 = 80 + ImGuiKey_F23 = 81 + ImGuiKey_F24 = 82 + ImGuiKey_Apostrophe = 83 + ImGuiKey_Comma = 84 + ImGuiKey_Minus = 85 + ImGuiKey_Period = 86 + ImGuiKey_Slash = 87 + ImGuiKey_Semicolon = 88 + ImGuiKey_Equal = 89 + ImGuiKey_LeftBracket = 90 + ImGuiKey_Backslash = 91 + ImGuiKey_RightBracket = 92 + ImGuiKey_GraveAccent = 93 + ImGuiKey_CapsLock = 94 + ImGuiKey_ScrollLock = 95 + ImGuiKey_NumLock = 96 + ImGuiKey_PrintScreen = 97 + ImGuiKey_Pause = 98 + ImGuiKey_Keypad0 = 99 + ImGuiKey_Keypad1 = 100 + ImGuiKey_Keypad2 = 101 + ImGuiKey_Keypad3 = 102 + ImGuiKey_Keypad4 = 103 + ImGuiKey_Keypad5 = 104 + ImGuiKey_Keypad6 = 105 + ImGuiKey_Keypad7 = 106 + ImGuiKey_Keypad8 = 107 + ImGuiKey_Keypad9 = 108 + ImGuiKey_KeypadDecimal = 109 + ImGuiKey_KeypadDivide = 110 + ImGuiKey_KeypadMultiply = 111 + ImGuiKey_KeypadSubtract = 112 + ImGuiKey_KeypadAdd = 113 + ImGuiKey_KeypadEnter = 114 + ImGuiKey_KeypadEqual = 115 + ImGuiKey_AppBack = 116 + ImGuiKey_AppForward = 117 + ImGuiKey_GamepadStart = 118 + ImGuiKey_GamepadBack = 119 + ImGuiKey_GamepadFaceLeft = 120 + ImGuiKey_GamepadFaceRight = 121 + ImGuiKey_GamepadFaceUp = 122 + ImGuiKey_GamepadFaceDown = 123 + ImGuiKey_GamepadDpadLeft = 124 + ImGuiKey_GamepadDpadRight = 125 + ImGuiKey_GamepadDpadUp = 126 + ImGuiKey_GamepadDpadDown = 127 + ImGuiKey_GamepadL1 = 128 + ImGuiKey_GamepadR1 = 129 + ImGuiKey_GamepadL2 = 130 + ImGuiKey_GamepadR2 = 131 + ImGuiKey_GamepadL3 = 132 + ImGuiKey_GamepadR3 = 133 + ImGuiKey_GamepadLStickLeft = 134 + ImGuiKey_GamepadLStickRight = 135 + ImGuiKey_GamepadLStickUp = 136 + ImGuiKey_GamepadLStickDown = 137 + ImGuiKey_GamepadRStickLeft = 138 + ImGuiKey_GamepadRStickRight = 139 + ImGuiKey_GamepadRStickUp = 140 + ImGuiKey_GamepadRStickDown = 141 + ImGuiKey_MouseLeft = 142 + ImGuiKey_MouseRight = 143 + ImGuiKey_MouseMiddle = 144 + ImGuiKey_MouseX1 = 145 + ImGuiKey_MouseX2 = 146 + ImGuiKey_MouseWheelX = 147 + ImGuiKey_MouseWheelY = 148 + ImGuiKey_ReservedForModCtrl = 149 + ImGuiKey_ReservedForModShift = 150 + ImGuiKey_ReservedForModAlt = 151 + ImGuiKey_ReservedForModSuper = 152 + ImGuiKey_COUNT = 153 + ImGuiMod_None = 154 + ImGuiMod_Ctrl = 155 + ImGuiMod_Shift = 156 + ImGuiMod_Alt = 157 + ImGuiMod_Super = 158 + ImGuiMod_Mask_ = 159 + ImGuiKey_NamedKey_BEGIN = 160 + ImGuiKey_NamedKey_END = 161 + ImGuiKey_NamedKey_COUNT = 162 + ImGuiKey_KeysData_SIZE = 163 + ImGuiKey_KeysData_OFFSET = 164 + +class ImGuiInputFlags(Enum): + ImGuiInputFlags_None = 0 + ImGuiInputFlags_Repeat = 1 + ImGuiInputFlags_RouteActive = 1024 + ImGuiInputFlags_RouteFocused = 2048 + ImGuiInputFlags_RouteGlobal = 4096 + ImGuiInputFlags_RouteAlways = 8192 + ImGuiInputFlags_RouteOverFocused = 16384 + ImGuiInputFlags_RouteOverActive = 32768 + ImGuiInputFlags_RouteUnlessBgFocused = 65536 + ImGuiInputFlags_RouteFromRootWindow = 131072 + ImGuiInputFlags_Tooltip = 262144 + +class ImGuiConfigFlags(Enum): + ImGuiConfigFlags_None = 0 + ImGuiConfigFlags_NavEnableKeyboard = 1 + ImGuiConfigFlags_NavEnableGamepad = 2 + ImGuiConfigFlags_NavEnableSetMousePos = 4 + ImGuiConfigFlags_NavNoCaptureKeyboard = 8 + ImGuiConfigFlags_NoMouse = 16 + ImGuiConfigFlags_NoMouseCursorChange = 32 + ImGuiConfigFlags_NoKeyboard = 64 + ImGuiConfigFlags_IsSRGB = 1048576 + ImGuiConfigFlags_IsTouchScreen = 2097152 + +class ImGuiBackendFlags(Enum): + ImGuiBackendFlags_None = 0 + ImGuiBackendFlags_HasGamepad = 1 + ImGuiBackendFlags_HasMouseCursors = 2 + ImGuiBackendFlags_HasSetMousePos = 4 + ImGuiBackendFlags_RendererHasVtxOffset = 8 + +class ImGuiCol(Enum): + ImGuiCol_Text = 0 + ImGuiCol_TextDisabled = 1 + ImGuiCol_WindowBg = 2 + ImGuiCol_ChildBg = 3 + ImGuiCol_PopupBg = 4 + ImGuiCol_Border = 5 + ImGuiCol_BorderShadow = 6 + ImGuiCol_FrameBg = 7 + ImGuiCol_FrameBgHovered = 8 + ImGuiCol_FrameBgActive = 9 + ImGuiCol_TitleBg = 10 + ImGuiCol_TitleBgActive = 11 + ImGuiCol_TitleBgCollapsed = 12 + ImGuiCol_MenuBarBg = 13 + ImGuiCol_ScrollbarBg = 14 + ImGuiCol_ScrollbarGrab = 15 + ImGuiCol_ScrollbarGrabHovered = 16 + ImGuiCol_ScrollbarGrabActive = 17 + ImGuiCol_CheckMark = 18 + ImGuiCol_SliderGrab = 19 + ImGuiCol_SliderGrabActive = 20 + ImGuiCol_Button = 21 + ImGuiCol_ButtonHovered = 22 + ImGuiCol_ButtonActive = 23 + ImGuiCol_Header = 24 + ImGuiCol_HeaderHovered = 25 + ImGuiCol_HeaderActive = 26 + ImGuiCol_Separator = 27 + ImGuiCol_SeparatorHovered = 28 + ImGuiCol_SeparatorActive = 29 + ImGuiCol_ResizeGrip = 30 + ImGuiCol_ResizeGripHovered = 31 + ImGuiCol_ResizeGripActive = 32 + ImGuiCol_TabHovered = 33 + ImGuiCol_Tab = 34 + ImGuiCol_TabSelected = 35 + ImGuiCol_TabSelectedOverline = 36 + ImGuiCol_TabDimmed = 37 + ImGuiCol_TabDimmedSelected = 38 + ImGuiCol_TabDimmedSelectedOverline = 39 + ImGuiCol_PlotLines = 40 + ImGuiCol_PlotLinesHovered = 41 + ImGuiCol_PlotHistogram = 42 + ImGuiCol_PlotHistogramHovered = 43 + ImGuiCol_TableHeaderBg = 44 + ImGuiCol_TableBorderStrong = 45 + ImGuiCol_TableBorderLight = 46 + ImGuiCol_TableRowBg = 47 + ImGuiCol_TableRowBgAlt = 48 + ImGuiCol_TextLink = 49 + ImGuiCol_TextSelectedBg = 50 + ImGuiCol_DragDropTarget = 51 + ImGuiCol_NavHighlight = 52 + ImGuiCol_NavWindowingHighlight = 53 + ImGuiCol_NavWindowingDimBg = 54 + ImGuiCol_ModalWindowDimBg = 55 + +class ImGuiStyleVar(Enum): + ImGuiStyleVar_Alpha = 0 + ImGuiStyleVar_DisabledAlpha = 1 + ImGuiStyleVar_WindowPadding = 2 + ImGuiStyleVar_WindowRounding = 3 + ImGuiStyleVar_WindowBorderSize = 4 + ImGuiStyleVar_WindowMinSize = 5 + ImGuiStyleVar_WindowTitleAlign = 6 + ImGuiStyleVar_ChildRounding = 7 + ImGuiStyleVar_ChildBorderSize = 8 + ImGuiStyleVar_PopupRounding = 9 + ImGuiStyleVar_PopupBorderSize = 10 + ImGuiStyleVar_FramePadding = 11 + ImGuiStyleVar_FrameRounding = 12 + ImGuiStyleVar_FrameBorderSize = 13 + ImGuiStyleVar_ItemSpacing = 14 + ImGuiStyleVar_ItemInnerSpacing = 15 + ImGuiStyleVar_IndentSpacing = 16 + ImGuiStyleVar_CellPadding = 17 + ImGuiStyleVar_ScrollbarSize = 18 + ImGuiStyleVar_ScrollbarRounding = 19 + ImGuiStyleVar_GrabMinSize = 20 + ImGuiStyleVar_GrabRounding = 21 + ImGuiStyleVar_TabRounding = 22 + ImGuiStyleVar_TabBorderSize = 23 + ImGuiStyleVar_TabBarBorderSize = 24 + ImGuiStyleVar_TabBarOverlineSize = 25 + ImGuiStyleVar_TableAngledHeadersAngle = 26 + ImGuiStyleVar_TableAngledHeadersTextAlign = 27 + ImGuiStyleVar_ButtonTextAlign = 28 + ImGuiStyleVar_SelectableTextAlign = 29 + ImGuiStyleVar_SeparatorTextBorderSize = 30 + ImGuiStyleVar_SeparatorTextAlign = 31 + ImGuiStyleVar_SeparatorTextPadding = 32 + +class ImGuiButtonFlags(Enum): + ImGuiButtonFlags_None = 0 + ImGuiButtonFlags_MouseButtonLeft = 1 + ImGuiButtonFlags_MouseButtonRight = 2 + ImGuiButtonFlags_MouseButtonMiddle = 4 + +class ImGuiColorEditFlags(Enum): + ImGuiColorEditFlags_None = 0 + ImGuiColorEditFlags_NoAlpha = 2 + ImGuiColorEditFlags_NoPicker = 4 + ImGuiColorEditFlags_NoOptions = 8 + ImGuiColorEditFlags_NoSmallPreview = 16 + ImGuiColorEditFlags_NoInputs = 32 + ImGuiColorEditFlags_NoTooltip = 64 + ImGuiColorEditFlags_NoLabel = 128 + ImGuiColorEditFlags_NoSidePreview = 256 + ImGuiColorEditFlags_NoDragDrop = 512 + ImGuiColorEditFlags_NoBorder = 1024 + ImGuiColorEditFlags_AlphaBar = 65536 + ImGuiColorEditFlags_AlphaPreview = 131072 + ImGuiColorEditFlags_AlphaPreviewHalf = 262144 + ImGuiColorEditFlags_HDR = 524288 + ImGuiColorEditFlags_DisplayRGB = 1048576 + ImGuiColorEditFlags_DisplayHSV = 2097152 + ImGuiColorEditFlags_DisplayHex = 4194304 + ImGuiColorEditFlags_Uint8 = 8388608 + ImGuiColorEditFlags_Float = 16777216 + ImGuiColorEditFlags_PickerHueBar = 33554432 + ImGuiColorEditFlags_PickerHueWheel = 67108864 + ImGuiColorEditFlags_InputRGB = 134217728 + ImGuiColorEditFlags_InputHSV = 268435456 + +class ImGuiSliderFlags(Enum): + ImGuiSliderFlags_None = 0 + ImGuiSliderFlags_AlwaysClamp = 16 + ImGuiSliderFlags_Logarithmic = 32 + ImGuiSliderFlags_NoRoundToFormat = 64 + ImGuiSliderFlags_NoInput = 128 + ImGuiSliderFlags_WrapAround = 256 + +class ImGuiMouseButton(Enum): + ImGuiMouseButton_Left = 0 + ImGuiMouseButton_Right = 1 + ImGuiMouseButton_Middle = 2 + ImGuiMouseButton_COUNT = 5 + +class ImGuiMouseCursor(Enum): + ImGuiMouseCursor_None = -1 + ImGuiMouseCursor_Arrow = 0 + ImGuiMouseCursor_TextInput = 1 + ImGuiMouseCursor_ResizeAll = 2 + ImGuiMouseCursor_ResizeNS = 3 + ImGuiMouseCursor_ResizeEW = 4 + ImGuiMouseCursor_ResizeNESW = 5 + ImGuiMouseCursor_ResizeNWSE = 6 + ImGuiMouseCursor_Hand = 7 + ImGuiMouseCursor_NotAllowed = 8 + ImGuiMouseCursor_COUNT = 9 + +class ImGuiMouseSource(Enum): + ImGuiMouseSource_Mouse = 0 + ImGuiMouseSource_TouchScreen = 1 + ImGuiMouseSource_Pen = 2 + ImGuiMouseSource_COUNT = 3 + +class ImGuiCond(Enum): + ImGuiCond_None = 0 + ImGuiCond_Always = 1 + ImGuiCond_Once = 2 + ImGuiCond_FirstUseEver = 4 + ImGuiCond_Appearing = 8 + +class ImGuiTableFlags(Enum): + ImGuiTableFlags_None = 0 + ImGuiTableFlags_Resizable = 1 + ImGuiTableFlags_Reorderable = 2 + ImGuiTableFlags_Hideable = 4 + ImGuiTableFlags_Sortable = 8 + ImGuiTableFlags_NoSavedSettings = 16 + ImGuiTableFlags_ContextMenuInBody = 32 + ImGuiTableFlags_RowBg = 64 + ImGuiTableFlags_BordersInnerH = 128 + ImGuiTableFlags_BordersOuterH = 256 + ImGuiTableFlags_BordersInnerV = 512 + ImGuiTableFlags_BordersOuterV = 1024 + ImGuiTableFlags_BordersH = 1280 + ImGuiTableFlags_BordersV = 1536 + ImGuiTableFlags_BordersInner = 640 + ImGuiTableFlags_BordersOuter = 1280 + ImGuiTableFlags_Borders = 1920 + ImGuiTableFlags_NoBordersInBody = 2048 + ImGuiTableFlags_NoBordersInBodyUntilResize = 4096 + ImGuiTableFlags_SizingFixedFit = 8192 + ImGuiTableFlags_SizingFixedSame = 16384 + ImGuiTableFlags_SizingStretchProp = 24576 + ImGuiTableFlags_SizingStretchSame = 32768 + ImGuiTableFlags_NoHostExtendX = 65536 + ImGuiTableFlags_NoHostExtendY = 131072 + ImGuiTableFlags_NoKeepColumnsVisible = 262144 + ImGuiTableFlags_PreciseWidths = 524288 + ImGuiTableFlags_NoClip = 1048576 + ImGuiTableFlags_PadOuterX = 2097152 + ImGuiTableFlags_NoPadOuterX = 4194304 + ImGuiTableFlags_NoPadInnerX = 8388608 + ImGuiTableFlags_ScrollX = 16777216 + ImGuiTableFlags_ScrollY = 33554432 + ImGuiTableFlags_SortMulti = 67108864 + ImGuiTableFlags_SortTristate = 134217728 + ImGuiTableFlags_HighlightHoveredColumn = 268435456 + ImGuiTableFlags_SizingMask_ = 61440 + +class ImGuiTableColumnFlags(Enum): + ImGuiTableColumnFlags_None = 0 + ImGuiTableColumnFlags_Disabled = 1 + ImGuiTableColumnFlags_DefaultHide = 2 + ImGuiTableColumnFlags_DefaultSort = 4 + ImGuiTableColumnFlags_WidthStretch = 8 + ImGuiTableColumnFlags_WidthFixed = 16 + ImGuiTableColumnFlags_NoResize = 32 + ImGuiTableColumnFlags_NoReorder = 64 + ImGuiTableColumnFlags_NoHide = 128 + ImGuiTableColumnFlags_NoClip = 256 + ImGuiTableColumnFlags_NoSort = 512 + ImGuiTableColumnFlags_NoSortAscending = 1024 + ImGuiTableColumnFlags_NoSortDescending = 2048 + ImGuiTableColumnFlags_NoHeaderLabel = 4096 + ImGuiTableColumnFlags_NoHeaderWidth = 8192 + ImGuiTableColumnFlags_PreferSortAscending = 16384 + ImGuiTableColumnFlags_PreferSortDescending = 32768 + ImGuiTableColumnFlags_IndentEnable = 65536 + ImGuiTableColumnFlags_IndentDisable = 131072 + ImGuiTableColumnFlags_AngledHeader = 262144 + ImGuiTableColumnFlags_IsEnabled = 16777216 + ImGuiTableColumnFlags_IsVisible = 33554432 + ImGuiTableColumnFlags_IsSorted = 67108864 + ImGuiTableColumnFlags_IsHovered = 134217728 + ImGuiTableColumnFlags_WidthMask_ = 24 + ImGuiTableColumnFlags_IndentMask_ = 196608 + ImGuiTableColumnFlags_StatusMask_ = 251658240 + ImGuiTableColumnFlags_NoDirectResize_ = 1073741824 + +class ImGuiTableRowFlags(Enum): + ImGuiTableRowFlags_None = 0 + ImGuiTableRowFlags_Headers = 1 + +class ImGuiTableBgTarget(Enum): + ImGuiTableBgTarget_None = 0 + ImGuiTableBgTarget_RowBg0 = 1 + ImGuiTableBgTarget_RowBg1 = 2 + ImGuiTableBgTarget_CellBg = 3 + +def NewFrame() -> None: ... +def EndFrame() -> None: ... +def Render() -> None: ... +def ShowDemoWindow(open: Optional[bool] = None) -> Optional[bool]: ... +def ShowMetricsWindow(open: Optional[bool] = None) -> Optional[bool]: ... +def ShowStyleEditor() -> None: ... +def ShowUserGuide() -> None: ... +def GetVersion() -> str: ... +def StyleColorsDark() -> None: ... +def StyleColorsLight() -> None: ... +def StyleColorsClassic() -> None: ... def Begin( - name: str, open: Optional[bool] = None, flags: ImGuiWindowFlags = ImGuiWindowFlags(0) -) -> bool: ... + name: str, open: Optional[bool] = None, flags: ImGuiWindowFlags = 0 +) -> Tuple[bool, Optional[bool]]: ... def End() -> None: ... - -# Child Windows - - def BeginChild( - id: Union[str, ImGuiID], - size: ImVec2 = (0, 0), - border: bool = False, - flags: ImGuiWindowFlags = ImGuiWindowFlags(0), + str_id: str, + size: Tuple[float, float] = (0, 0), + child_flags: ImGuiChildFlags = 0, + window_flags: ImGuiWindowFlags = 0, ) -> bool: ... -def Endchild() -> None: ... - -# Windows Utilities - - +def EndChild() -> None: ... def IsWindowAppearing() -> bool: ... def IsWindowCollapsed() -> bool: ... - - -def IsWindowFocused( - flags: ImGuiFocusedFlags = ImGuiFocusedFlags(0)) -> bool: ... - - -def IsWindowHovered( - flags: ImGuiFocusedFlags = ImGuiFocusedFlags(0)) -> bool: ... - - -def GetWindowPos() -> ImVec2: ... -def GetWindowSize() -> ImVec2: ... -def GetWindowWidth() -> float: ... -def GetWindowHeight() -> float: ... - - +def IsWindowFocused(flags: ImGuiFocusedFlags = 0) -> bool: ... +def IsWindowHovered(flags: ImGuiHoveredFlags = 0) -> bool: ... +def GetWindowPos() -> Tuple[float, float]: ... +def GetWindowSize() -> Tuple[float, float]: ... def SetNextWindowPos( - pos: ImVec2, cone: ImGuiCond = ImGuiCond(0), pivot: ImVec2 = (0, 0) + pos: Tuple[float, float], cond: ImGuiCond = 0, pivot: Tuple[float, float] = (0, 0) ) -> None: ... - - -def SetNextWindowSize( - size: ImVec2, cond: ImGuiCond = ImGuiCond(0)) -> None: ... -def SetNextWindowSizeConstraints( - size_min: ImVec2, size_max: ImVec2) -> None: ... - - -def SetNextWindowContentSize(size: ImVec2) -> None: ... -def SetNextWindowCollapsed( - collapsed: bool, cond: ImGuiCond = ImGuiCond(0)) -> None: ... - - +def SetNextWindowSize(size: Tuple[float, float], cond: ImGuiCond = 0) -> None: ... +def SetNextWindowContentSize(size: Tuple[float, float]) -> None: ... +def SetNextWindowCollapsed(collapsed: bool, cond: ImGuiCond = 0) -> None: ... def SetNextWindowFocus() -> None: ... +def SetNextWindowScroll(scroll: Tuple[float, float]) -> None: ... def SetNextWindowBgAlpha(alpha: float) -> None: ... -@overload -def SetWindowPos(pos: ImVec2, cond: ImGuiCond = ImGuiCond(0)) -> None: ... - - -@overload -def SetWindowPos(name: str, pos: ImVec2, - cond: ImGuiCond = ImGuiCond(0)) -> None: ... - - -@overload -def SetWindowSize(size: ImVec2, cond: ImGuiCond = ImGuiCond(0)) -> None: ... - - -@overload -def SetWindowSize(name: str, size: ImVec2, - cond: ImGuiCond = ImGuiCond(0)) -> None: ... - - -@overload -def SetWindowCollapsed( - collapsed: bool, cond: ImGuiCond = ImGuiCond(0)) -> None: ... - - -@overload -def SetWindowCollapsed(name: str, collapsed: bool, - cond: ImGuiCond = ImGuiCond(0)) -> None: ... - - -def SetWindowFontScale(scale: float) -> None: ... - - -def SetWindowFocus( - name: Optional[str] = None, +def SetWindowPos(pos: Tuple[float, float], cond: ImGuiCond = 0) -> None: ... +def SetWindowSize(size: Tuple[float, float], cond: ImGuiCond = 0) -> None: ... +def SetWindowCollapsed(collapsed: bool, cond: ImGuiCond = 0) -> None: ... +def SetWindowFocus() -> None: ... +def SetWindowPos(name: str, pos: Tuple[float, float], cond: ImGuiCond = 0) -> None: ... +def SetWindowSize( + name: str, size: Tuple[float, float], cond: ImGuiCond = 0 ) -> None: ... - -# Content region - - -def GetContentRegionMax() -> ImVec2: ... -def GetContentRegionAvail() -> ImVec2: ... -def GetWindowContentRegionMin() -> ImVec2: ... -def GetWindowContentRegionMax() -> ImVec2: ... -def GetWindowContentRegionWidth() -> float: ... - -# Windows Scrolling - - +def SetWindowCollapsed(name: str, collapsed: bool, cond: ImGuiCond = 0) -> None: ... +def SetWindowFocus(name: str) -> None: ... def GetScrollX() -> float: ... def GetScrollY() -> float: ... -def GetScrollMaxX() -> float: ... -def GetScrollMaxY() -> float: ... def SetScrollX(scroll_x: float) -> None: ... def SetScrollY(scroll_y: float) -> None: ... +def GetScrollMaxX() -> float: ... +def GetScrollMaxY() -> float: ... def SetScrollHereX(center_x_ratio: float = 0.5) -> None: ... def SetScrollHereY(center_y_ratio: float = 0.5) -> None: ... def SetScrollFromPosX(local_x: float, center_x_ratio: float = 0.5) -> None: ... def SetScrollFromPosY(local_y: float, center_y_ratio: float = 0.5) -> None: ... - -# Parameters stacks (shared) - - -def PushStyleColor(idx: ImGuiCol, col: Union[ImU32, ImVec4]) -> None: ... +def PushStyleColor(idx: ImGuiCol, col: int) -> None: ... +def PushStyleColor(idx: ImGuiCol, col: Tuple[float, float, float, float]) -> None: ... def PopStyleColor(count: int = 1) -> None: ... -def PushStyleVar(idx: ImGuiStyleVar, val: Union[float, ImVec2]) -> None: ... +def PushStyleVar(idx: ImGuiStyleVar, val: float) -> None: ... +def PushStyleVar(idx: ImGuiStyleVar, val: Tuple[float, float]) -> None: ... def PopStyleVar(count: int = 1) -> None: ... -def GetStyleColorVec4(idx: ImGuiCol) -> ImVec4: ... -def GetFontSize() -> float: ... -def GetFontTexUvWhitePixel() -> ImVec2: ... -@overload -def GetColorU32(idx: ImGuiCol, alpha_mul: float = 1.0) -> ImU32: ... -@overload -def GetColorU32(col: ImVec4) -> ImU32: ... -@overload -def GetColorU32(col: ImU32) -> ImU32: ... - -# Parameters stacks (current window) - - -def PushItemWidth(item_width) -> float: ... +def PushItemFlag(option: ImGuiItemFlags, enabled: bool) -> None: ... +def PopItemFlag() -> None: ... +def PushItemWidth(item_width: float) -> None: ... def PopItemWidth() -> None: ... -def SetNextItemWidth(item_width) -> float: ... +def SetNextItemWidth(item_width: float) -> None: ... def CalcItemWidth() -> float: ... def PushTextWrapPos(wrap_local_pos_x: float = 0.0) -> None: ... def PopTextWrapPos() -> None: ... -def PushAllowKeyboardFocus(allow_keyboard_focus: bool) -> None: ... -def PopAllowKeyboardFocus() -> None: ... -def PushButtonRepeat(repeat: bool) -> None: ... -def PopButtonRepeat() -> None: ... - -# Cursor / Layout - - +def GetFontSize() -> float: ... +def GetFontTexUvWhitePixel() -> Tuple[float, float]: ... +def GetColorU32(idx: ImGuiCol, alpha_mul: float = 1.0) -> int: ... +def GetColorU32(col: Tuple[float, float, float, float]) -> int: ... +def GetColorU32(col: int, alpha_mul: float = 1.0) -> int: ... +def GetStyleColorVec4(idx: ImGuiCol) -> Tuple[float, float, float, float]: ... +def GetCursorScreenPos() -> Tuple[float, float]: ... +def SetCursorScreenPos(pos: Tuple[float, float]) -> None: ... +def GetContentRegionAvail() -> Tuple[float, float]: ... +def GetCursorPos() -> Tuple[float, float]: ... +def GetCursorPosX() -> float: ... +def GetCursorPosY() -> float: ... +def SetCursorPos(local_pos: Tuple[float, float]) -> None: ... +def SetCursorPosX(local_x: float) -> None: ... +def SetCursorPosY(local_y: float) -> None: ... +def GetCursorStartPos() -> Tuple[float, float]: ... def Separator() -> None: ... -def SameLine(offset_from_start_x: float = 0.0, - spacing: float = -1.0) -> None: ... - - +def SameLine(offset_from_start_x: float = 0.0, spacing: float = -1.0) -> None: ... def NewLine() -> None: ... -def Spacing() -> None: ... -def Dummy(size: ImVec2) -> None: ... -def Indent(intent_w: float = 0.0) -> None: ... -def Unindent(intent_w: float = 0.0) -> None: ... +def Dummy(size: Tuple[float, float]) -> None: ... +def Unindent(indent_w: float = 0.0) -> None: ... def BeginGroup() -> None: ... def EndGroup() -> None: ... -def GetCursorPos() -> ImVec2: ... -def GetCursorPosX() -> float: ... -def SetCursorPos(local_pos: ImVec2) -> None: ... -def SetCursorPosX(locol_x: float) -> None: ... -def SetCursorPosY(locol_y: float) -> None: ... -def GetCursorStartPos() -> ImVec2: ... -def GetCursorScreenPos() -> ImVec2: ... -def SetCursorScreenPos(pos: ImVec2) -> None: ... def AlignTextToFramePadding() -> None: ... def GetTextLineHeight() -> float: ... def GetTextLineHeightWithSpacing() -> float: ... def GetFrameHeight() -> float: ... def GetFrameHeightWithSpacing() -> float: ... - -# ID stack/scopes - - -def PushID(str_id: Union[str, int]) -> None: ... -def PopID() -> None: ... +def PushID(str_id: str) -> None: ... +def PushID(str_id_begin: str, str_id_end: str) -> None: ... +def PushID(int_id: int) -> None: ... def GetID(str_id: str) -> ImGuiID: ... - -# Widgets: Text - - -def TextUnformatted(text: str) -> None: ... +def GetID(str_id_begin: str, str_id_end: str) -> ImGuiID: ... +def GetID(int_id: int) -> ImGuiID: ... def Text(text: str) -> None: ... -def TextColored(col: ImVec4, text: str) -> None: ... +def TextColored(col: Tuple[float, float, float, float], text: str) -> None: ... def TextDisabled(text: str) -> None: ... def TextWrapped(text: str) -> None: ... def LabelText(label: str, text: str) -> None: ... def BulletText(text: str) -> None: ... - -# Widgets: Main - - -def Button(label: str, size: ImVec2 = (0, 0)) -> bool: ... +def SeparatorText(label: str) -> None: ... +def Button(label: str, size: Tuple[float, float] = (0, 0)) -> bool: ... def SmallButton(label: str) -> bool: ... -def InvisibleButton(str_id: str, size: ImVec2) -> bool: ... +def InvisibleButton( + str_id: str, size: Tuple[float, float], flags: ImGuiButtonFlags = 0 +) -> bool: ... def ArrowButton(str_id: str, dir: ImGuiDir) -> bool: ... def Checkbox(label: str, v: bool) -> Tuple[bool, bool]: ... -def CheckboxFlags(label: str, flags: int, - flags_value: int) -> Tuple[bool, int]: ... - - -@overload +def CheckboxFlags(label: str, flags: int, flags_value: int) -> Tuple[bool, int]: ... def RadioButton(label: str, active: bool) -> bool: ... -@overload def RadioButton(label: str, v: int, v_button: int) -> Tuple[bool, int]: ... - - -def ProgressBar(fraction: float, size_arg: ImVec2 = (-1, 0)) -> None: ... +def ProgressBar( + fraction: float, + size_arg: Tuple[float, float] = (-1.175494e-38, 0), + overlay: Optional[str] = None, +) -> None: ... def Bullet() -> None: ... - -# Widgets: Combo Box - - -def BeginCombo(label: str, preview_value: str, - flags: ImGuiComboFlags = ImGuiComboFlags(0)) -> bool: ... - - +def TextLink(label: str) -> bool: ... +def TextLinkOpenURL(label: str, url: Optional[str] = None) -> None: ... +def BeginCombo(label: str, preview_value: str, flags: ImGuiComboFlags = 0) -> bool: ... def EndCombo() -> None: ... - - +def Combo( + label: str, current_item: int, items: List[str], popup_max_height_in_items: int = -1 +) -> Tuple[bool, int]: ... def Combo( label: str, current_item: int, - items: Union[str, List[str]], + items_separated_by_zeros: str, popup_max_height_in_items: int = -1, ) -> Tuple[bool, int]: ... - -# Widgets: Drags - - def DragFloat( label: str, v: float, @@ -273,56 +886,46 @@ def DragFloat( v_min: float = 0.0, v_max: float = 0.0, format: str = "%.3f", - power: float = 1.0, + flags: ImGuiSliderFlags = 0, ) -> Tuple[bool, float]: ... - - def DragFloat2( label: str, - v: List[float], + v: Tuple[float, float], v_speed: float = 1.0, v_min: float = 0.0, v_max: float = 0.0, format: str = "%.3f", - power: float = 1.0, -) -> Tuple[bool, List[float]]: ... - - + flags: ImGuiSliderFlags = 0, +) -> Tuple[bool, Tuple[float, float]]: ... def DragFloat3( label: str, - v: List[float], + v: Tuple[float, float, float], v_speed: float = 1.0, v_min: float = 0.0, v_max: float = 0.0, format: str = "%.3f", - power: float = 1.0, -) -> Tuple[bool, List[float]]: ... - - + flags: ImGuiSliderFlags = 0, +) -> Tuple[bool, Tuple[float, float, float]]: ... def DragFloat4( label: str, - v: List[float], + v: Tuple[float, float, float, float], v_speed: float = 1.0, v_min: float = 0.0, v_max: float = 0.0, format: str = "%.3f", - power: float = 1.0, -) -> Tuple[bool, List[float]]: ... - - + flags: ImGuiSliderFlags = 0, +) -> Tuple[bool, Tuple[float, float, float, float]]: ... def DragFloatRange2( label: str, - v_current_min: List[float], - v_current_max: List[float], + v_current_min: float, + v_current_max: float, v_speed: float = 1.0, v_min: float = 0.0, v_max: float = 0.0, format: str = "%.3f", format_max: Optional[str] = None, - power: float = 1.0, -) -> Tuple[bool, List[float], List[float]]: ... - - + flags: ImGuiSliderFlags = 0, +) -> Tuple[bool, float, float]: ... def DragInt( label: str, v: int, @@ -330,404 +933,327 @@ def DragInt( v_min: int = 0, v_max: int = 0, format: str = "%d", -) -> Tuple[bool, float]: ... - - + flags: ImGuiSliderFlags = 0, +) -> Tuple[bool, int]: ... def DragInt2( label: str, - v: List[int], + v: Tuple[int, int], v_speed: float = 1.0, v_min: int = 0, v_max: int = 0, format: str = "%d", -) -> Tuple[bool, List[float]]: ... - - + flags: ImGuiSliderFlags = 0, +) -> Tuple[bool, Tuple[int, int]]: ... def DragInt3( label: str, - v: List[int], + v: Tuple[int, int, int], v_speed: float = 1.0, v_min: int = 0, v_max: int = 0, format: str = "%d", -) -> Tuple[bool, List[float]]: ... - - + flags: ImGuiSliderFlags = 0, +) -> Tuple[bool, Tuple[int, int, int]]: ... def DragInt4( label: str, - v: List[int], + v: Tuple[int, int, int, int], v_speed: float = 1.0, v_min: int = 0, v_max: int = 0, format: str = "%d", -) -> Tuple[bool, List[float]]: ... - - + flags: ImGuiSliderFlags = 0, +) -> Tuple[bool, Tuple[int, int, int, int]]: ... def DragIntRange2( label: str, - v_current_min: List[int], - v_current_max: List[int], + v_current_min: int, + v_current_max: int, v_speed: float = 1.0, v_min: int = 0, v_max: int = 0, format: str = "%d", format_max: Optional[str] = None, -) -> Tuple[bool, List[int], List[int]]: ... - -# Widgets: Sliders - - + flags: ImGuiSliderFlags = 0, +) -> Tuple[bool, int, int]: ... def SliderFloat( label: str, v: float, - v_speed: float = 1.0, - v_min: float = 0.0, - v_max: float = 0.0, + v_min: float, + v_max: float, format: str = "%.3f", - power: float = 1.0, + flags: ImGuiSliderFlags = 0, ) -> Tuple[bool, float]: ... - - def SliderFloat2( label: str, - v: List[float], - v_speed: float = 1.0, - v_min: float = 0.0, - v_max: float = 0.0, + v: Tuple[float, float], + v_min: float, + v_max: float, format: str = "%.3f", - power: float = 1.0, -) -> Tuple[bool, List[float]]: ... - - + flags: ImGuiSliderFlags = 0, +) -> Tuple[bool, Tuple[float, float]]: ... def SliderFloat3( label: str, - v: List[float], - v_speed: float = 1.0, - v_min: float = 0.0, - v_max: float = 0.0, + v: Tuple[float, float, float], + v_min: float, + v_max: float, format: str = "%.3f", - power: float = 1.0, -) -> Tuple[bool, List[float]]: ... - - + flags: ImGuiSliderFlags = 0, +) -> Tuple[bool, Tuple[float, float, float]]: ... def SliderFloat4( label: str, - v: List[float], - v_speed: float = 1.0, - v_min: float = 0.0, - v_max: float = 0.0, + v: Tuple[float, float, float, float], + v_min: float, + v_max: float, format: str = "%.3f", - power: float = 1.0, -) -> Tuple[bool, List[float]]: ... - - + flags: ImGuiSliderFlags = 0, +) -> Tuple[bool, Tuple[float, float, float, float]]: ... def SliderAngle( - label: str, v_rad: int, v_degrees_min: float, v_degrees_max: float, format: str + label: str, + v_rad: float, + v_degrees_min: float = -360.0, + v_degrees_max: float = +360.0, + format: str = "%.0f deg", + flags: ImGuiSliderFlags = 0, ) -> Tuple[bool, float]: ... - - def SliderInt( label: str, v: int, - v_speed: float = 1.0, - v_min: int = 0, - v_max: int = 0, + v_min: int, + v_max: int, format: str = "%d", -) -> Tuple[bool, float]: ... - - + flags: ImGuiSliderFlags = 0, +) -> Tuple[bool, int]: ... def SliderInt2( label: str, - v: List[int], - v_speed: float = 1.0, - v_min: int = 0, - v_max: int = 0, + v: Tuple[int, int], + v_min: int, + v_max: int, format: str = "%d", -) -> Tuple[bool, List[float]]: ... - - + flags: ImGuiSliderFlags = 0, +) -> Tuple[bool, Tuple[int, int]]: ... def SliderInt3( label: str, - v: List[int], - v_speed: float = 1.0, - v_min: int = 0, - v_max: int = 0, + v: Tuple[int, int, int], + v_min: int, + v_max: int, format: str = "%d", -) -> Tuple[bool, List[float]]: ... - - + flags: ImGuiSliderFlags = 0, +) -> Tuple[bool, Tuple[int, int, int]]: ... def SliderInt4( label: str, - v: List[int], - v_speed: float = 1.0, - v_min: int = 0, - v_max: int = 0, + v: Tuple[int, int, int, int], + v_min: int, + v_max: int, format: str = "%d", -) -> Tuple[bool, List[float]]: ... - -# Widgets: Input with Keyboard - - + flags: ImGuiSliderFlags = 0, +) -> Tuple[bool, Tuple[int, int, int, int]]: ... +def VSliderFloat( + label: str, + size: Tuple[float, float], + v: float, + v_min: float, + v_max: float, + format: str = "%.3f", + flags: ImGuiSliderFlags = 0, +) -> Tuple[bool, float]: ... +def VSliderInt( + label: str, + size: Tuple[float, float], + v: int, + v_min: int, + v_max: int, + format: str = "%d", + flags: ImGuiSliderFlags = 0, +) -> Tuple[bool, int]: ... def InputText( - label: str, buf: str, flags: ImGuiInputTextFlags = ImGuiInputTextFlags(0) + label: str, str: str, flags: ImGuiInputTextFlags = 0 ) -> Tuple[bool, str]: ... - - def InputTextMultiline( - label: str, buf: str, size: ImVec2 = (0.0, 0.0), flags: ImGuiInputTextFlags = ImGuiInputTextFlags(0) -) -> Tuple[bool, ImVec2]: ... - - + label: str, + str: str, + size: Tuple[float, float] = (0, 0), + flags: ImGuiInputTextFlags = 0, +) -> Tuple[bool, str]: ... def InputTextWithHint( - label: str, hint: str, buf: str, flags: ImGuiInputTextFlags = ImGuiInputTextFlags(0) -) -> Tuple[bool, ImVec2]: ... - - + label: str, hint: str, str: str, flags: ImGuiInputTextFlags = 0 +) -> Tuple[bool, str]: ... def InputFloat( label: str, v: float, step: float = 0.0, step_fast: float = 0.0, format: str = "%.3f", - flags: ImGuiInputTextFlags = ImGuiInputTextFlags(0), + flags: ImGuiInputTextFlags = 0, ) -> Tuple[bool, float]: ... - - def InputFloat2( label: str, - v: List[float], + v: Tuple[float, float], format: str = "%.3f", - flags: ImGuiInputTextFlags = ImGuiInputTextFlags(0), -) -> Tuple[bool, List[float]]: ... - - + flags: ImGuiInputTextFlags = 0, +) -> Tuple[bool, Tuple[float, float]]: ... def InputFloat3( label: str, - v: List[float], + v: Tuple[float, float, float], format: str = "%.3f", - flags: ImGuiInputTextFlags = ImGuiInputTextFlags(0), -) -> Tuple[bool, List[float]]: ... - - + flags: ImGuiInputTextFlags = 0, +) -> Tuple[bool, Tuple[float, float, float]]: ... def InputFloat4( label: str, - v: List[float], + v: Tuple[float, float, float, float], format: str = "%.3f", - flags: ImGuiInputTextFlags = ImGuiInputTextFlags(0), -) -> Tuple[bool, List[float]]: ... - - + flags: ImGuiInputTextFlags = 0, +) -> Tuple[bool, Tuple[float, float, float, float]]: ... def InputInt( label: str, v: int, step: int = 1, step_fast: int = 100, - flags: ImGuiInputTextFlags = ImGuiInputTextFlags(0), -) -> Tuple[bool, float]: ... - - + flags: ImGuiInputTextFlags = 0, +) -> Tuple[bool, int]: ... def InputInt2( - label: str, - v: List[int], - flags: ImGuiInputTextFlags = ImGuiInputTextFlags(0), -) -> Tuple[bool, List[int]]: ... - - + label: str, v: Tuple[int, int], flags: ImGuiInputTextFlags = 0 +) -> Tuple[bool, Tuple[int, int]]: ... def InputInt3( - label: str, - v: List[int], - flags: ImGuiInputTextFlags = ImGuiInputTextFlags(0), -) -> Tuple[bool, List[int]]: ... - - + label: str, v: Tuple[int, int, int], flags: ImGuiInputTextFlags = 0 +) -> Tuple[bool, Tuple[int, int, int]]: ... def InputInt4( - label: str, - v: List[int], - flags: ImGuiInputTextFlags = ImGuiInputTextFlags(0), -) -> Tuple[bool, List[int]]: ... - - + label: str, v: Tuple[int, int, int, int], flags: ImGuiInputTextFlags = 0 +) -> Tuple[bool, Tuple[int, int, int, int]]: ... def InputDouble( label: str, v: float, step: float = 0.0, step_fast: float = 0.0, format: str = "%.6f", - flags: ImGuiInputTextFlags = ImGuiInputTextFlags(0), + flags: ImGuiInputTextFlags = 0, ) -> Tuple[bool, float]: ... - -# Widgets: Color Editor/Picker - - def ColorEdit3( - label: str, col: List[float], flags: ImGuiColorEditFlags = ImGuiColorEditFlags(0) -) -> Tuple[bool, List[float]]: ... - - + label: str, col: Tuple[float, float, float], flags: ImGuiColorEditFlags = 0 +) -> Tuple[bool, Tuple[float, float, float]]: ... def ColorEdit4( - label: str, col: List[float], flags: ImGuiColorEditFlags = ImGuiColorEditFlags(0) -) -> Tuple[bool, List[float]]: ... - - + label: str, col: Tuple[float, float, float, float], flags: ImGuiColorEditFlags = 0 +) -> Tuple[bool, Tuple[float, float, float, float]]: ... def ColorPicker3( - label: str, col: List[float], flags: ImGuiColorEditFlags = ImGuiColorEditFlags(0) -) -> Tuple[bool, List[float]]: ... - - + label: str, col: Tuple[float, float, float], flags: ImGuiColorEditFlags = 0 +) -> Tuple[bool, Tuple[float, float, float]]: ... def ColorPicker4( label: str, - col: List[float], - flags: ImGuiColorEditFlags = ImGuiColorEditFlags(0), - ref_col: Optional[List[float]] = None, -) -> Tuple[bool, List[float]]: ... - - + col: Tuple[float, float, float, float], + flags: ImGuiColorEditFlags = 0, + ref_col: Optional[Tuple[float, float, float, float]] = None, +) -> Tuple[bool, Tuple[float, float, float, float]]: ... def ColorButton( - desc_id: str, col: ImVec4, flags: ImGuiColorEditFlags = ImGuiColorEditFlags(0), size: ImVec2 = (0, 0) + desc_id: str, + col: Tuple[float, float, float, float], + flags: ImGuiColorEditFlags = 0, + size: Tuple[float, float] = (0, 0), ) -> bool: ... def SetColorEditOptions(flags: ImGuiColorEditFlags) -> None: ... - -# Widgets: Trees - - def TreeNode(label: str) -> bool: ... -def TreeNodeEx( - label: str, flags: ImGuiTreeNodeFlags = ImGuiTreeNodeFlags(0)) -> bool: ... - - +def TreeNodeEx(label: str, flags: ImGuiTreeNodeFlags = 0) -> bool: ... def TreePush(str_id: str) -> None: ... def TreePop() -> None: ... def GetTreeNodeToLabelSpacing() -> float: ... - - -@overload +def CollapsingHeader(label: str, flags: ImGuiTreeNodeFlags = 0) -> bool: ... def CollapsingHeader( - label: str, flags: ImGuiTreeNodeFlags = ImGuiTreeNodeFlags(0)) -> bool: ... - - -@overload -def CollapsingHeader( - label: str, open: bool, flags: ImGuiTreeNodeFlags = ImGuiTreeNodeFlags(0) + label: str, p_visible: bool, flags: ImGuiTreeNodeFlags = 0 ) -> Tuple[bool, bool]: ... - -# Widgets: Selectables - - +def SetNextItemOpen(is_open: bool, cond: ImGuiCond = 0) -> None: ... def Selectable( label: str, selected: bool = False, - flags: ImGuiSelectableFlags = ImGuiSelectableFlags(0), - size: ImVec2 = (0, 0), + flags: ImGuiSelectableFlags = 0, + size: Tuple[float, float] = (0, 0), +) -> bool: ... +def Selectable( + label: str, + p_selected: bool, + flags: ImGuiSelectableFlags = 0, + size: Tuple[float, float] = (0, 0), ) -> Tuple[bool, bool]: ... - -# Widgets: List Boxes - - +def IsItemToggledSelection() -> bool: ... +def BeginListBox(label: str, size: Tuple[float, float] = (0, 0)) -> bool: ... +def EndListBox() -> None: ... def ListBox( - label: str, current_item: int, items: List[str], height_in_items: int = -1 -) -> Tuple[bool, int]: ... -def ListBoxHeader(label: str, size: ImVec2 = (0, 0)) -> bool: ... -def ListBoxFooter() -> None: ... - -# Widgets: Data Plotting - - -def PlotLines( label: str, - values: List[float], - values_offset: int = 0, - overlay_text: Optional[str] = None, - scale_min: float = np.finfo(np.float32).max, - scale_max: float = np.finfo(np.float32).max, - graph_size: ImVec2 = (0, 0), -) -> None: ... - - -def PlotHistogram( - label: str, - values: List[float], - values_offset: int = 0, - overlay_text: Optional[str] = None, - scale_min: float = np.finfo(np.float32).max, - scale_max: float = np.finfo(np.float32).max, - graph_size: ImVec2 = (0, 0), -) -> None: ... - -# Widgets: Value() Helpers. - - -def Value( - prefix: str, v: Union[bool, int, float], float_format: Optional[str] = None -) -> None: ... - -# Widgets: Menus - - + current_item: int, + items: List[str], + items_count: int, + height_in_items: int = -1, +) -> Tuple[bool, int]: ... +def Value(prefix: str, b: bool) -> None: ... +def Value(prefix: str, v: int) -> None: ... +def Value(prefix: str, v: float, float_format: Optional[str] = None) -> None: ... def BeginMenuBar() -> bool: ... def EndMenuBar() -> None: ... def BeginMainMenuBar() -> bool: ... def EndMainMenuBar() -> None: ... def BeginMenu(label: str, enabled: bool = True) -> bool: ... def EndMenu() -> None: ... - - def MenuItem( - label: str, shortcut: Optional[str], selected: bool = False, enabled: bool = False + label: str, + shortcut: Optional[str] = None, + selected: bool = False, + enabled: bool = True, +) -> bool: ... +def MenuItem( + label: str, shortcut: str, p_selected: bool, enabled: bool = True ) -> Tuple[bool, bool]: ... - -# Tooltips - - -def BeginTooltip() -> None: ... +def BeginTooltip() -> bool: ... def EndTooltip() -> None: ... -def SetTooltip(value: str) -> None: ... - -# Popups, Modals - - -def OpenPopup(str_id: str) -> None: ... - - -def BeginPopUp( - str_id: str, flags: ImGuiWindowFlags = ImGuiWindowFlags(0)) -> bool: ... - - +def SetTooltip(text: str) -> None: ... +def BeginItemTooltip() -> bool: ... +def SetItemTooltip(text: str) -> None: ... +def BeginPopup(str_id: str, flags: ImGuiWindowFlags = 0) -> bool: ... +def BeginPopupModal( + name: str, open: Optional[bool] = None, flags: ImGuiWindowFlags = 0 +) -> Tuple[bool, Optional[bool]]: ... +def EndPopup() -> None: ... +def OpenPopup(str_id: str, popup_flags: ImGuiPopupFlags = 0) -> None: ... +def OpenPopup(id: ImGuiID, popup_flags: ImGuiPopupFlags = 0) -> None: ... +def OpenPopupOnItemClick( + str_id: Optional[str] = None, popup_flags: ImGuiPopupFlags = 1 +) -> None: ... +def CloseCurrentPopup() -> None: ... def BeginPopupContextItem( - str_id: Optional[str], mouse_button: ImGuiMouseButton = ImGuiMouseButton(1) + str_id: Optional[str] = None, popup_flags: ImGuiPopupFlags = 1 ) -> bool: ... - - def BeginPopupContextWindow( - str_id: Optional[str], - mouse_button: ImGuiMouseButton = ImGuiMouseButton(1), - also_over_items: bool = True, + str_id: Optional[str] = None, popup_flags: ImGuiPopupFlags = 1 ) -> bool: ... - - def BeginPopupContextVoid( - str_id: Optional[str], mouse_button: ImGuiMouseButton = ImGuiMouseButton(1) + str_id: Optional[str] = None, popup_flags: ImGuiPopupFlags = 1 ) -> bool: ... - - -def BeginPopupModal( - name: str, open: bool, flags: ImGuiWindowFlags = ImGuiWindowFlags(0) -) -> Tuple[bool, bool]: ... -def EndPopup() -> None: ... - - -def OpenPopupOnItemClick( - str_id: Optional[str], mouse_button: ImGuiMouseButton = ImGuiMouseButton(1) +def IsPopupOpen(str_id: str, flags: ImGuiPopupFlags = 0) -> bool: ... +def BeginTable( + str_id: str, + columns: int, + flags: ImGuiTableFlags = 0, + outer_size: Tuple[float, float] = (0.0, 0.0), + inner_width: float = 0.0, ) -> bool: ... -def IsPopupOpen(str_id: str) -> bool: ... -def CloseCurrentPopup() -> None: ... - -# Columns - - -def Columns(count: int = 1, id: Optional[str] - = None, border: bool = True) -> None: ... - - +def EndTable() -> None: ... +def TableNextColumn() -> bool: ... +def TableSetColumnIndex(column_n: int) -> bool: ... +def TableSetupColumn( + label: str, + flags: ImGuiTableColumnFlags = 0, + init_width_or_weight: float = 0.0, + user_id: ImGuiID = 0, +) -> None: ... +def TableSetupScrollFreeze(cols: int, rows: int) -> None: ... +def TableHeader(label: str) -> None: ... +def TableHeadersRow() -> None: ... +def TableAngledHeadersRow() -> None: ... +def TableGetColumnCount() -> int: ... +def TableGetColumnIndex() -> int: ... +def TableGetRowIndex() -> int: ... +def TableGetColumnName(column_n: int = -1) -> str: ... +def TableGetColumnFlags(column_n: int = -1) -> ImGuiTableColumnFlags: ... +def TableSetColumnEnabled(column_n: int, v: bool) -> None: ... +def TableGetHoveredColumn() -> int: ... +def TableSetBgColor( + target: ImGuiTableBgTarget, color: int, column_n: int = -1 +) -> None: ... +def Columns(count: int = 1, id: Optional[str] = None, border: bool = True) -> None: ... def NextColumn() -> None: ... def GetColumnIndex() -> int: ... def GetColumnWidth(column_index: int = -1) -> float: ... @@ -735,59 +1261,42 @@ def SetColumnWidth(column_index: int, width: float) -> None: ... def GetColumnOffset(column_index: int = -1) -> float: ... def SetColumnOffset(column_index: int, offset_x: float) -> None: ... def GetColumnsCount() -> int: ... - -# Tab Bars, Tabs - - -def BeginTabBar( - str_id: str, flags: ImGuiTabBarFlags = ImGuiTabBarFlags(0)) -> bool: ... - - +def BeginTabBar(str_id: str, flags: ImGuiTabBarFlags = 0) -> bool: ... def EndTabBar() -> None: ... - - def BeginTabItem( - label: str, open: bool, flags: ImGuiTabItemFlags = ImGuiTabItemFlags(0) -) -> Tuple[bool, bool]: ... + label: str, open: Optional[bool] = None, flags: ImGuiTabItemFlags = 0 +) -> Tuple[bool, Optional[bool]]: ... def EndTabItem() -> None: ... +def TabItemButton(label: str, flags: ImGuiTabItemFlags = 0) -> bool: ... def SetTabItemClosed(tab_or_docked_window_label: str) -> None: ... - -# Logging/Capture - - def LogToTTY(auto_open_depth: int = -1) -> None: ... -def LogToFile(auto_open_depth: int = -1, - filename: Optional[str] = None) -> None: ... - - +def LogToFile(auto_open_depth: int = -1, filename: Optional[str] = None) -> None: ... def LogToClipboard(auto_open_depth: int = -1) -> None: ... def LogFinish() -> None: ... def LogButtons() -> None: ... - -# Clipping - - +def LogText(text: str) -> None: ... +def BeginDragDropSource(flags: ImGuiDragDropFlags = 0) -> bool: ... +def SetDragDropPayload(type: str, data: bytes, cond: ImGuiCond = 0) -> bool: ... +def EndDragDropSource() -> None: ... +def BeginDragDropTarget() -> bool: ... +def AcceptDragDropPayload(type: str, flags: ImGuiDragDropFlags = 0) -> bytes: ... +def EndDragDropTarget() -> None: ... +def GetDragDropPayload() -> bytes: ... +def BeginDisabled(disabled: bool = True) -> None: ... +def EndDisabled() -> None: ... def PushClipRect( - clip_rect_min: ImVec2, clip_rect_max: ImVec2, intersect_with_current_clip_rect: bool + clip_rect_min: Tuple[float, float], + clip_rect_max: Tuple[float, float], + intersect_with_current_clip_rect: bool, ) -> None: ... def PopClipRect() -> None: ... - -# Focus, Activation - - def SetItemDefaultFocus() -> None: ... def SetKeyboardFocusHere(offset: int = 0) -> None: ... - -# Item/Widgets Utilities - - -def IsItemHovered(flags: ImGuiHoveredFlags = ImGuiHoveredFlags(0)) -> bool: ... +def SetNextItemAllowOverlap() -> None: ... +def IsItemHovered(flags: ImGuiHoveredFlags = 0) -> bool: ... def IsItemActive() -> bool: ... def IsItemFocused() -> bool: ... -def IsItemClicked( - mouse_button: ImGuiMouseButton = ImGuiMouseButton(0)) -> bool: ... - - +def IsItemClicked(mouse_button: ImGuiMouseButton = 0) -> bool: ... def IsItemVisible() -> bool: ... def IsItemEdited() -> bool: ... def IsItemActivated() -> bool: ... @@ -797,446 +1306,64 @@ def IsItemToggledOpen() -> bool: ... def IsAnyItemHovered() -> bool: ... def IsAnyItemActive() -> bool: ... def IsAnyItemFocused() -> bool: ... -def GetItemRectMin() -> ImVec2: ... -def GetItemRectMax() -> ImVec2: ... -def GetItemRectSize() -> ImVec2: ... -def SetItemAllowOverlap() -> None: ... - -# Miscellaneous Utilities - - -@overload -def IsRectVisible(size: ImVec2) -> bool: ... -@overload -def IsRectVisible(rect_min: ImVec2, rect_max: ImVec2) -> bool: ... - +def GetItemID() -> ImGuiID: ... +def GetItemRectMin() -> Tuple[float, float]: ... +def GetItemRectMax() -> Tuple[float, float]: ... +def GetItemRectSize() -> Tuple[float, float]: ... +def IsRectVisible(size: Tuple[float, float]) -> bool: ... +def IsRectVisible( + rect_min: Tuple[float, float], rect_max: Tuple[float, float] +) -> bool: ... def GetTime() -> float: ... -def GetFrameCount() -> int: ... def GetStyleColorName(idx: ImGuiCol) -> str: ... - - -def CalcListClipping( - items_count: int, items_height: float) -> Tuple[int, int]: ... -def BeginChildFrame(id: ImGuiID, size: ImVec2, - flags: ImGuiWindowFlags = ImGuiWindowFlags(0)) -> bool: ... - - -def EndChildFrame() -> None: ... - -# Text Utilities - - -def CalcTextSize( - text: str, - text_end: Optional[str] = None, - hide_text_after_double_hash: bool = False, - wrap_width: float = -1.0, -) -> ImVec2: ... - -# Inputs Utilities: Keyboard - - -def GetKeyIndex(imgui_key: ImGuiKey) -> int: ... -def IsKeyDown(user_key_index: int) -> bool: ... -def IsKeyPressed(user_key_index: int, repeat: bool = True) -> bool: ... -def IsKeyReleased(user_key_index: int) -> bool: ... - - -def GetKeyPressedAmount( - key_index: int, repeat_delay: float, rate: float) -> int: ... -def CaptureKeyboardFromApp( - want_capture_keyboard_value: bool = True) -> None: ... - -# Inputs Utilities: Mouse - - +def ColorConvertRGBtoHSV( + rgb: Tuple[float, float, float] +) -> Tuple[float, float, float]: ... +def ColorConvertHSVtoRGB( + hsv: Tuple[float, float, float] +) -> Tuple[float, float, float]: ... +def IsKeyDown(key: ImGuiKey) -> bool: ... +def IsKeyPressed(key: ImGuiKey, repeat: bool = True) -> bool: ... +def IsKeyReleased(key: ImGuiKey) -> bool: ... +def IsKeyChordPressed(key_chord: ImGuiKeyChord) -> bool: ... +def GetKeyPressedAmount(key: ImGuiKey, repeat_delay: float, rate: float) -> int: ... +def GetKeyName(key: ImGuiKey) -> str: ... +def SetNextFrameWantCaptureKeyboard(want_capture_keyboard: bool) -> None: ... +def Shortcut(key_chord: ImGuiKeyChord, flags: ImGuiInputFlags = 0) -> bool: ... +def SetNextItemShortcut( + key_chord: ImGuiKeyChord, flags: ImGuiInputFlags = 0 +) -> None: ... +def SetItemKeyOwner(key: ImGuiKey) -> None: ... def IsMouseDown(button: ImGuiMouseButton) -> bool: ... def IsMouseClicked(button: ImGuiMouseButton, repeat: bool = False) -> bool: ... def IsMouseReleased(button: ImGuiMouseButton) -> bool: ... def IsMouseDoubleClicked(button: ImGuiMouseButton) -> bool: ... -def IsMouseHoveringRect(r_min: ImVec2, r_max: ImVec2, - clip: bool = True) -> bool: ... - - -def IsMousePosValid(mouse_pos: Optional[ImVec2]) -> bool: ... +def GetMouseClickedCount(button: ImGuiMouseButton) -> int: ... +def IsMouseHoveringRect( + r_min: Tuple[float, float], r_max: Tuple[float, float], clip: bool = True +) -> bool: ... +def IsMousePosValid(mouse_pos: Optional[Tuple[float, float]] = None) -> bool: ... def IsAnyMouseDown() -> bool: ... -def GetMousePos() -> ImVec2: ... -def GetMousePosOnOpeningCurrentPopup() -> ImVec2: ... - - -def IsMouseDragging(button: ImGuiMouseButton, - lock_threshold: float = -1.0) -> bool: ... - - +def IsMouseDragging(button: ImGuiMouseButton, lock_threshold: float = -1.0) -> bool: ... def GetMouseDragDelta( - button: ImGuiMouseButton, lock_threshold: float = -1.0 -) -> bool: ... -def ResetMouseDragDelta(button: ImGuiMouseButton) -> None: ... + button: ImGuiMouseButton = 0, lock_threshold: float = -1.0 +) -> Tuple[float, float]: ... +def ResetMouseDragDelta(button: ImGuiMouseButton = 0) -> None: ... def GetMouseCursor() -> ImGuiMouseCursor: ... def SetMouseCursor(cursor_type: ImGuiMouseCursor) -> None: ... -def CaptureMouseFromApp(want_capture_mouse_value: bool = True) -> None: ... - -# Clipboard Utilities - - +def SetNextFrameWantCaptureMouse(want_capture_mouse: bool) -> None: ... def GetClipboardText() -> str: ... -def SetClipboardText(text: str) -> None: ... - -# Settings/.Ini Utilities - - def LoadIniSettingsFromDisk(ini_filename: str) -> None: ... -def LoadIniSettingsFromMemory(ini_data: str) -> None: ... def SaveIniSettingsToDisk(ini_filename: str) -> None: ... -def SaveIniSettingsToMemory() -> str: ... - - -# Draw Commands - -def AddLine(p1: ImVec2, p2: ImVec2, col: ImU32, thickness: float = 1.) -> None: ... -def AddRect(p_min: ImVec2, p_max: ImVec2, col: ImU32, rounding: float = 0., flags: ImDrawFlags = 0, thickness: float = 1.) -> None: ... -def AddRectFilled(p_min: ImVec2, p_max: ImVec2, col: ImU32, rounding: float = 0., flags: ImDrawFlags = 0) -> None: ... -def AddAddRectFilledMultiColor(p_min: ImVec2, p_max: ImVec2, col_upr_left: ImU32, col_upr_right: ImU32, col_bot_right: ImU32, col_bot_left: ImU32) -> None: ... -def AddQuad(p1: ImVec2, p2: ImVec2, p3: ImVec2, p4: ImVec2, col: ImU32, thickness: float = 1.) -> None: ... -def AddQuadFilled(p1: ImVec2, p2: ImVec2, p3: ImVec2, p4: ImVec2, col: ImU32) -> None: ... -def AddTriangle(p1: ImVec2, p2: ImVec2, p3: ImVec2, col: ImU32, thickness: float = 1.) -> None: ... -def AddTriangleFilled(p1: ImVec2, p2: ImVec2, p3: ImVec2, col: ImU32) -> None: ... -def AddCircle(center: ImVec2, radius: float, col: ImU32, num_segments: int = 0, thickness: float = 1.) -> None: ... -def AddCircleFilled(center: ImVec2, radius: float, col: ImU32, num_segments: int = 0) -> None: ... -def AddNgon(center: ImVec2, radius: float, col: ImU32, num_segments: int, thickness: float = 1.) -> None: ... -def AddNgonFilled(center: ImVec2, radius: float, col: ImU32, num_segments: int) -> None: ... -def AddText(pos: ImVec2, col: ImU32, text: str, text_end: Optional[str] = None) -> None: ... -def AddPolyline(points: List[ImVec2], num_points: int, col: ImU32, flags: ImDrawFlags, thickness) -> None: ... -def AddConvexPolyFilled(points: List[ImVec2], num_points: int, col: ImU32) -> None: ... -def AddBezierCubic(p1: ImVec2, p2: ImVec2, p3: ImVec2, p4: ImVec2, col: ImU32, thickness: float, num_segments: int = 0) -> None: ... -def AddBezierQuadratic(p1: ImVec2, p2: ImVec2, p3: ImVec2, col: ImU32, thickness: float, num_segments: int = 0) -> None: ... - - -ImGuiWindowFlags_None: int -ImGuiWindowFlags_NoTitleBar: int -ImGuiWindowFlags_NoResize: int -ImGuiWindowFlags_NoMove: int -ImGuiWindowFlags_NoScrollbar: int -ImGuiWindowFlags_NoScrollWithMouse: int -ImGuiWindowFlags_NoCollapse: int -ImGuiWindowFlags_AlwaysAutoResize: int -ImGuiWindowFlags_NoBackground: int -ImGuiWindowFlags_NoSavedSettings: int -ImGuiWindowFlags_NoMouseInputs: int -ImGuiWindowFlags_MenuBar: int -ImGuiWindowFlags_HorizontalScrollbar: int -ImGuiWindowFlags_NoFocusOnAppearing: int -ImGuiWindowFlags_NoBringToFrontOnFocus: int -ImGuiWindowFlags_AlwaysVerticalScrollbar: int -ImGuiWindowFlags_AlwaysHorizontalScrollbar: int -ImGuiWindowFlags_AlwaysUseWindowPadding: int -ImGuiWindowFlags_NoNavInputs: int -ImGuiWindowFlags_NoNavFocus: int -ImGuiWindowFlags_UnsavedDocument: int -ImGuiWindowFlags_NoNav: int -ImGuiWindowFlags_NoDecoration: int -ImGuiWindowFlags_NoInputs: int -ImGuiWindowFlags_NavFlattened: int -ImGuiWindowFlags_ChildWindow: int -ImGuiWindowFlags_Tooltip: int -ImGuiWindowFlags_Popup: int -ImGuiWindowFlags_Modal: int -ImGuiWindowFlags_ChildMenu: int -ImGuiInputTextFlags_None: int -ImGuiInputTextFlags_CharsDecimal: int -ImGuiInputTextFlags_CharsHexadecimal: int -ImGuiInputTextFlags_CharsUppercase: int -ImGuiInputTextFlags_CharsNoBlank: int -ImGuiInputTextFlags_AutoSelectAll: int -ImGuiInputTextFlags_EnterReturnsTrue: int -ImGuiInputTextFlags_CallbackCompletion: int -ImGuiInputTextFlags_CallbackHistory: int -ImGuiInputTextFlags_CallbackAlways: int -ImGuiInputTextFlags_CallbackCharFilter: int -ImGuiInputTextFlags_AllowTabInput: int -ImGuiInputTextFlags_CtrlEnterForNewLine: int -ImGuiInputTextFlags_NoHorizontalScroll: int -ImGuiInputTextFlags_AlwaysInsertMode: int -ImGuiInputTextFlags_ReadOnly: int -ImGuiInputTextFlags_Password: int -ImGuiInputTextFlags_NoUndoRedo: int -ImGuiInputTextFlags_CharsScientific: int -ImGuiInputTextFlags_CallbackResize: int -ImGuiInputTextFlags_Multiline: int -ImGuiInputTextFlags_NoMarkEdited: int -ImGuiTreeNodeFlags_None: int -ImGuiTreeNodeFlags_Selected: int -ImGuiTreeNodeFlags_Framed: int -ImGuiTreeNodeFlags_AllowItemOverlap: int -ImGuiTreeNodeFlags_NoTreePushOnOpen: int -ImGuiTreeNodeFlags_NoAutoOpenOnLog: int -ImGuiTreeNodeFlags_DefaultOpen: int -ImGuiTreeNodeFlags_OpenOnDoubleClick: int -ImGuiTreeNodeFlags_OpenOnArrow: int -ImGuiTreeNodeFlags_Leaf: int -ImGuiTreeNodeFlags_Bullet: int -ImGuiTreeNodeFlags_FramePadding: int -ImGuiTreeNodeFlags_SpanAvailWidth: int -ImGuiTreeNodeFlags_SpanFullWidth: int -ImGuiTreeNodeFlags_NavLeftJumpsBackHere: int -ImGuiTreeNodeFlags_CollapsingHeader: int -ImGuiSelectableFlags_None: int -ImGuiSelectableFlags_DontClosePopups: int -ImGuiSelectableFlags_SpanAllColumns: int -ImGuiSelectableFlags_AllowDoubleClick: int -ImGuiSelectableFlags_Disabled: int -ImGuiSelectableFlags_AllowItemOverlap: int -ImGuiComboFlags_None: int -ImGuiComboFlags_PopupAlignLeft: int -ImGuiComboFlags_HeightSmall: int -ImGuiComboFlags_HeightRegular: int -ImGuiComboFlags_HeightLarge: int -ImGuiComboFlags_HeightLargest: int -ImGuiComboFlags_NoArrowButton: int -ImGuiComboFlags_NoPreview: int -ImGuiComboFlags_HeightMask_: int -ImGuiTabBarFlags_None: int -ImGuiTabBarFlags_Reorderable: int -ImGuiTabBarFlags_AutoSelectNewTabs: int -ImGuiTabBarFlags_TabListPopupButton: int -ImGuiTabBarFlags_NoCloseWithMiddleMouseButton: int -ImGuiTabBarFlags_NoTabListScrollingButtons: int -ImGuiTabBarFlags_NoTooltip: int -ImGuiTabBarFlags_FittingPolicyResizeDown: int -ImGuiTabBarFlags_FittingPolicyScroll: int -ImGuiTabBarFlags_FittingPolicyMask_: int -ImGuiTabBarFlags_FittingPolicyDefault_: int -ImGuiTabItemFlags_None: int -ImGuiTabItemFlags_UnsavedDocument: int -ImGuiTabItemFlags_SetSelected: int -ImGuiTabItemFlags_NoCloseWithMiddleMouseButton: int -ImGuiTabItemFlags_NoPushId: int -ImGuiFocusedFlags_None: int -ImGuiFocusedFlags_ChildWindows: int -ImGuiFocusedFlags_RootWindow: int -ImGuiFocusedFlags_AnyWindow: int -ImGuiFocusedFlags_RootAndChildWindows: int -ImGuiHoveredFlags_None: int -ImGuiHoveredFlags_ChildWindows: int -ImGuiHoveredFlags_RootWindow: int -ImGuiHoveredFlags_AnyWindow: int -ImGuiHoveredFlags_AllowWhenBlockedByPopup: int -ImGuiHoveredFlags_AllowWhenBlockedByActiveItem: int -ImGuiHoveredFlags_AllowWhenOverlapped: int -ImGuiHoveredFlags_AllowWhenDisabled: int -ImGuiHoveredFlags_RectOnly: int -ImGuiHoveredFlags_RootAndChildWindows: int -ImGuiDragDropFlags_None: int -ImGuiDragDropFlags_SourceNoPreviewTooltip: int -ImGuiDragDropFlags_SourceNoDisableHover: int -ImGuiDragDropFlags_SourceNoHoldToOpenOthers: int -ImGuiDragDropFlags_SourceAllowNullID: int -ImGuiDragDropFlags_SourceExtern: int -ImGuiDragDropFlags_SourceAutoExpirePayload: int -ImGuiDragDropFlags_AcceptBeforeDelivery: int -ImGuiDragDropFlags_AcceptNoDrawDefaultRect: int -ImGuiDragDropFlags_AcceptNoPreviewTooltip: int -ImGuiDragDropFlags_AcceptPeekOnly: int -ImGuiDataType_S8: int -ImGuiDataType_U8: int -ImGuiDataType_S16: int -ImGuiDataType_U16: int -ImGuiDataType_S32: int -ImGuiDataType_U32: int -ImGuiDataType_S64: int -ImGuiDataType_U64: int -ImGuiDataType_Float: int -ImGuiDataType_Double: int -ImGuiDataType_COUN: int -ImGuiDir_None: int -ImGuiDir_Left: int -ImGuiDir_Right: int -ImGuiDir_Up: int -ImGuiDir_Down: int -ImGuiDir_COUNT: int -ImGuiKey_Tab: int -ImGuiKey_LeftArrow: int -ImGuiKey_RightArrow: int -ImGuiKey_UpArrow: int -ImGuiKey_DownArrow: int -ImGuiKey_PageUp: int -ImGuiKey_PageDown: int -ImGuiKey_Home: int -ImGuiKey_End: int -ImGuiKey_Insert: int -ImGuiKey_Delete: int -ImGuiKey_Backspace: int -ImGuiKey_Space: int -ImGuiKey_Enter: int -ImGuiKey_Escape: int -ImGuiKey_KeyPadEnter: int -ImGuiKey_A: int -ImGuiKey_C: int -ImGuiKey_V: int -ImGuiKey_X: int -ImGuiKey_Y: int -ImGuiKey_Z: int -ImGuiKey_COUNT: int -ImGuiKeyModFlags_None: int -ImGuiKeyModFlags_Ctrl: int -ImGuiKeyModFlags_Shift: int -ImGuiKeyModFlags_Alt: int -ImGuiKeyModFlags_Super: int -ImGuiNavInput_Activate: int -ImGuiNavInput_Cancel: int -ImGuiNavInput_Input: int -ImGuiNavInput_Menu: int -ImGuiNavInput_DpadLeft: int -ImGuiNavInput_DpadRight: int -ImGuiNavInput_DpadUp: int -ImGuiNavInput_DpadDown: int -ImGuiNavInput_LStickLeft: int -ImGuiNavInput_LStickRight: int -ImGuiNavInput_LStickUp: int -ImGuiNavInput_LStickDown: int -ImGuiNavInput_FocusPrev: int -ImGuiNavInput_FocusNext: int -ImGuiNavInput_TweakSlow: int -ImGuiNavInput_TweakFast: int -ImGuiNavInput_KeyMenu_: int -ImGuiNavInput_KeyLeft_: int -ImGuiNavInput_KeyRight_: int -ImGuiNavInput_KeyUp_: int -ImGuiNavInput_KeyDown_: int -ImGuiNavInput_COUNT: int -ImGuiNavInput_InternalStart_: int -ImGuiConfigFlags_None: int -ImGuiConfigFlags_NavEnableKeyboard: int -ImGuiConfigFlags_NavEnableGamepad: int -ImGuiConfigFlags_NavEnableSetMousePos: int -ImGuiConfigFlags_NavNoCaptureKeyboard: int -ImGuiConfigFlags_NoMouse: int -ImGuiConfigFlags_NoMouseCursorChange: int -ImGuiConfigFlags_IsSRGB: int -ImGuiConfigFlags_IsTouchScreen: int -ImGuiBackendFlags_None: int -ImGuiBackendFlags_HasGamepad: int -ImGuiBackendFlags_HasMouseCursors: int -ImGuiBackendFlags_HasSetMousePos: int -ImGuiBackendFlags_RendererHasVtxOffset: int -ImGuiCol_Text: int -ImGuiCol_TextDisabled: int -ImGuiCol_WindowBg: int -ImGuiCol_ChildBg: int -ImGuiCol_PopupBg: int -ImGuiCol_Border: int -ImGuiCol_BorderShadow: int -ImGuiCol_FrameBg: int -ImGuiCol_FrameBgHovered: int -ImGuiCol_FrameBgActive: int -ImGuiCol_TitleBg: int -ImGuiCol_TitleBgActive: int -ImGuiCol_TitleBgCollapsed: int -ImGuiCol_MenuBarBg: int -ImGuiCol_ScrollbarBg: int -ImGuiCol_ScrollbarGrab: int -ImGuiCol_ScrollbarGrabHovered: int -ImGuiCol_ScrollbarGrabActive: int -ImGuiCol_CheckMark: int -ImGuiCol_SliderGrab: int -ImGuiCol_SliderGrabActive: int -ImGuiCol_Button: int -ImGuiCol_ButtonHovered: int -ImGuiCol_ButtonActive: int -ImGuiCol_Header: int -ImGuiCol_HeaderHovered: int -ImGuiCol_HeaderActive: int -ImGuiCol_Separator: int -ImGuiCol_SeparatorHovered: int -ImGuiCol_SeparatorActive: int -ImGuiCol_ResizeGrip: int -ImGuiCol_ResizeGripHovered: int -ImGuiCol_ResizeGripActive: int -ImGuiCol_Tab: int -ImGuiCol_TabHovered: int -ImGuiCol_TabActive: int -ImGuiCol_TabUnfocused: int -ImGuiCol_TabUnfocusedActive: int -ImGuiCol_PlotLines: int -ImGuiCol_PlotLinesHovered: int -ImGuiCol_PlotHistogram: int -ImGuiCol_PlotHistogramHovered: int -ImGuiCol_TextSelectedBg: int -ImGuiCol_DragDropTarget: int -ImGuiCol_NavHighlight: int -ImGuiCol_NavWindowingHighlight: int -ImGuiCol_NavWindowingDimBg: int -ImGuiCol_ModalWindowDimBg: int -ImGuiCol_COUNT: int -ImGuiStyleVar_Alpha: int -ImGuiStyleVar_WindowPadding: int -ImGuiStyleVar_WindowRounding: int -ImGuiStyleVar_WindowBorderSize: int -ImGuiStyleVar_WindowMinSize: int -ImGuiStyleVar_WindowTitleAlign: int -ImGuiStyleVar_ChildRounding: int -ImGuiStyleVar_ChildBorderSize: int -ImGuiStyleVar_PopupRounding: int -ImGuiStyleVar_PopupBorderSize: int -ImGuiStyleVar_FramePadding: int -ImGuiStyleVar_FrameRounding: int -ImGuiStyleVar_FrameBorderSize: int -ImGuiStyleVar_ItemSpacing: int -ImGuiStyleVar_ItemInnerSpacing: int -ImGuiStyleVar_IndentSpacing: int -ImGuiStyleVar_ScrollbarSize: int -ImGuiStyleVar_ScrollbarRounding: int -ImGuiStyleVar_GrabMinSize: int -ImGuiStyleVar_GrabRounding: int -ImGuiStyleVar_TabRounding: int -ImGuiStyleVar_ButtonTextAlign: int -ImGuiStyleVar_SelectableTextAlign: int -ImGuiStyleVar_COUNT: int -ImGuiColorEditFlags_None: int -ImGuiColorEditFlags_NoAlpha: int -ImGuiColorEditFlags_NoPicker: int -ImGuiColorEditFlags_NoOptions: int -ImGuiColorEditFlags_NoSmallPreview: int -ImGuiColorEditFlags_NoInputs: int -ImGuiColorEditFlags_NoTooltip: int -ImGuiColorEditFlags_NoLabel: int -ImGuiColorEditFlags_NoSidePreview: int -ImGuiColorEditFlags_NoDragDrop: int -ImGuiColorEditFlags_NoBorder: int -ImGuiColorEditFlags_AlphaBar: int -ImGuiColorEditFlags_AlphaPreview: int -ImGuiColorEditFlags_AlphaPreviewHalf: int -ImGuiColorEditFlags_HDR: int -ImGuiColorEditFlags_DisplayRGB: int -ImGuiColorEditFlags_DisplayHSV: int -ImGuiColorEditFlags_DisplayHex: int -ImGuiColorEditFlags_Uint8: int -ImGuiColorEditFlags_Float: int -ImGuiColorEditFlags_PickerHueBar: int -ImGuiColorEditFlags_PickerHueWheel: int -ImGuiColorEditFlags_InputRGB: int -ImGuiColorEditFlags_InputHSV: int -ImGuiColorEditFlags__OptionsDefault: int -ImGuiColorEditFlags__DisplayMask: int -ImGuiColorEditFlags__DataTypeMask: int -ImGuiColorEditFlags__PickerMask: int -ImGuiColorEditFlags__InputMask: int -ImGuiMouseButton_Left: int -ImGuiMouseButton_Right: int -ImGuiMouseButton_Middle: int -ImGuiMouseButton_COUNT: int -ImGuiMouseCursor_None: int -ImGuiMouseCursor_Arrow: int -ImGuiMouseCursor_TextInput: int -ImGuiMouseCursor_ResizeAll: int -ImGuiMouseCursor_ResizeNS: int -ImGuiMouseCursor_ResizeEW: int -ImGuiMouseCursor_ResizeNESW: int -ImGuiMouseCursor_ResizeNWSE: int -ImGuiMouseCursor_Hand: int -ImGuiMouseCursor_NotAllowed: int -ImGuiMouseCursor_COUNT: int -ImGuiCond_Always: int -ImGuiCond_Once: int -ImGuiCond_FirstUseEver: int -ImGuiCond_Appearing: int +def DebugTextEncoding(text: str) -> None: ... +def DebugFlashStyleColor(idx: ImGuiCol) -> None: ... +def DebugStartItemPicker() -> None: ... +def DebugCheckVersionAndDataLayout( + version_str: str, + sz_io: int, + sz_style: int, + sz_vec2: int, + sz_vec4: int, + sz_drawvert: int, + sz_drawidx: int, +) -> bool: ...