// Minimal stand-in for Dear ImGui 1.91 docking (declarations only) #pragma once #include #define IMGUI_VERSION_NUM 19100 #ifndef STUB_NO_DOCK #define IMGUI_HAS_DOCK 1 #endif #define IM_ARRAYSIZE(_ARR) ((int)(sizeof(_ARR) / sizeof(*(_ARR)))) #define IM_COL32(R, G, B, A) (((unsigned)(A) << 24) | ((unsigned)(B) << 16) | ((unsigned)(G) << 8) | ((unsigned)(R))) typedef unsigned int ImGuiID; typedef unsigned int ImU32; typedef int ImGuiCol, ImGuiCond, ImGuiDir, ImGuiKey, ImGuiMouseButton, ImGuiStyleVar, ImGuiButtonFlags, ImGuiColorEditFlags, ImGuiConfigFlags, ImGuiInputTextFlags, ImGuiSelectableFlags, ImGuiTreeNodeFlags, ImGuiWindowFlags, ImGuiChildFlags, ImGuiDockNodeFlags, ImGuiComboFlags, ImGuiHoveredFlags, ImGuiSliderFlags, ImGuiPopupFlags, ImGuiTabBarFlags, ImGuiTabItemFlags; struct ImGuiInputTextCallbackData; typedef int (*ImGuiInputTextCallback)(ImGuiInputTextCallbackData *data); struct ImVec2 { float x, y; constexpr ImVec2() : x(0), y(0) {} constexpr ImVec2(float _x, float _y) : x(_x), y(_y) {} }; struct ImVec4 { float x, y, z, w; constexpr ImVec4() : x(0), y(0), z(0), w(0) {} constexpr ImVec4(float _x, float _y, float _z, float _w) : x(_x), y(_y), z(_z), w(_w) {} }; enum { ImGuiCol_Text, ImGuiCol_TextDisabled, ImGuiCol_WindowBg, ImGuiCol_ChildBg, ImGuiCol_PopupBg, ImGuiCol_Border, ImGuiCol_BorderShadow, ImGuiCol_FrameBg, ImGuiCol_FrameBgHovered, ImGuiCol_FrameBgActive, ImGuiCol_TitleBg, ImGuiCol_TitleBgActive, ImGuiCol_TitleBgCollapsed, ImGuiCol_MenuBarBg, ImGuiCol_ScrollbarBg, ImGuiCol_ScrollbarGrab, ImGuiCol_CheckMark, ImGuiCol_SliderGrab, ImGuiCol_SliderGrabActive, ImGuiCol_Button, ImGuiCol_ButtonHovered, ImGuiCol_ButtonActive, ImGuiCol_Header, ImGuiCol_HeaderHovered, ImGuiCol_HeaderActive, ImGuiCol_Separator, ImGuiCol_ResizeGrip, ImGuiCol_ResizeGripHovered, ImGuiCol_Tab, ImGuiCol_TabHovered, ImGuiCol_TabSelected, ImGuiCol_DockingPreview, ImGuiCol_COUNT }; enum { ImGuiStyleVar_WindowPadding, ImGuiStyleVar_WindowRounding, ImGuiStyleVar_WindowBorderSize }; enum { ImGuiWindowFlags_None = 0, ImGuiWindowFlags_NoTitleBar = 1, ImGuiWindowFlags_NoResize = 2, ImGuiWindowFlags_NoMove = 4, ImGuiWindowFlags_NoScrollbar = 8, ImGuiWindowFlags_NoScrollWithMouse = 16, ImGuiWindowFlags_NoCollapse = 32, ImGuiWindowFlags_AlwaysAutoResize = 64, ImGuiWindowFlags_MenuBar = 1 << 10, ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13, ImGuiWindowFlags_NoNavFocus = 1 << 19, ImGuiWindowFlags_NoDocking = 1 << 21 }; enum { ImGuiCond_Appearing = 8, ImGuiCond_FirstUseEver = 4 }; enum { ImGuiDir_Left = 0, ImGuiDir_Right = 1, ImGuiDir_Up = 2, ImGuiDir_Down = 3 }; enum { ImGuiDockNodeFlags_None = 0 }; enum { ImGuiConfigFlags_DockingEnable = 1 << 7 }; enum { ImGuiMouseButton_Left = 0, ImGuiMouseButton_Right = 1, ImGuiMouseButton_Middle = 2 }; enum { ImGuiButtonFlags_MouseButtonLeft = 1, ImGuiButtonFlags_MouseButtonRight = 2, ImGuiButtonFlags_MouseButtonMiddle = 4 }; enum { ImGuiColorEditFlags_NoInputs = 1, ImGuiColorEditFlags_NoTooltip = 2, ImGuiColorEditFlags_NoPicker = 4, ImGuiColorEditFlags_PickerHueWheel = 8 }; enum { ImGuiInputTextFlags_EnterReturnsTrue = 32 }; enum { ImGuiSelectableFlags_AllowDoubleClick = 4 }; enum { ImGuiTreeNodeFlags_DefaultOpen = 32 }; enum { ImGuiKey_None = 0, ImGuiKey_Tab = 512, ImGuiKey_Delete, ImGuiKey_Enter, ImGuiKey_Escape, ImGuiKey_LeftBracket, ImGuiKey_RightBracket, ImGuiKey_1, ImGuiKey_2, ImGuiKey_3, ImGuiKey_4, ImGuiKey_A, ImGuiKey_D, ImGuiKey_E, ImGuiKey_F, ImGuiKey_G, ImGuiKey_H, ImGuiKey_N, ImGuiKey_O, ImGuiKey_Q, ImGuiKey_S, ImGuiKey_T, ImGuiKey_W, ImGuiKey_Y, ImGuiKey_Z, ImGuiKey_F1, ImGuiKey_F9 }; struct ImGuiIO { ImGuiConfigFlags ConfigFlags; const char *IniFilename; bool ConfigWindowsMoveFromTitleBarOnly; float DeltaTime; ImVec2 MousePos, MouseDelta; float MouseWheel; bool MouseDown[5]; bool KeyCtrl, KeyShift, KeyAlt, KeySuper; bool WantTextInput; }; struct ImGuiStyle { float WindowRounding, ChildRounding, FrameRounding, PopupRounding, ScrollbarRounding, GrabRounding, TabRounding, WindowBorderSize, FrameBorderSize, ScrollbarSize; ImVec2 WindowPadding, FramePadding, ItemSpacing; ImVec4 Colors[ImGuiCol_COUNT]; }; struct ImGuiViewport { ImVec2 WorkPos, WorkSize; }; struct ImDrawList { void AddText(const ImVec2 &pos, ImU32 col, const char *text_begin, const char *text_end = nullptr); }; struct ImGuiTextFilter { bool Draw(const char *label = "Filter (inc,-exc)", float width = 0.0f); bool PassFilter(const char *text, const char *text_end = nullptr) const; bool IsActive() const; }; struct ImGuiListClipper { int DisplayStart, DisplayEnd; void Begin(int items_count, float items_height = -1.0f); bool Step(); }; namespace ImGui { ImGuiIO &GetIO(); ImGuiStyle &GetStyle(); ImGuiViewport *GetMainViewport(); bool Begin(const char *name, bool *p_open = nullptr, ImGuiWindowFlags flags = 0); void End(); bool BeginChild(const char *str_id, const ImVec2 &size = ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0); void EndChild(); void SetNextWindowPos(const ImVec2 &pos, ImGuiCond cond = 0, const ImVec2 &pivot = ImVec2(0, 0)); void SetNextWindowSize(const ImVec2 &size, ImGuiCond cond = 0); ImVec2 GetContentRegionAvail(); ImDrawList *GetWindowDrawList(); float GetWindowWidth(); float GetScrollY(); float GetScrollMaxY(); void SetScrollHereY(float center_y_ratio = 0.5f); void PushStyleColor(ImGuiCol idx, ImU32 col); void PushStyleColor(ImGuiCol idx, const ImVec4 &col); void PopStyleColor(int count = 1); void PushStyleVar(ImGuiStyleVar idx, float val); void PushStyleVar(ImGuiStyleVar idx, const ImVec2 &val); void PopStyleVar(int count = 1); const ImVec4 &GetStyleColorVec4(ImGuiCol idx); void SetNextItemWidth(float item_width); void Separator(); void SameLine(float offset_from_start_x = 0.0f, float spacing = -1.0f); void Spacing(); void BeginGroup(); void EndGroup(); void SetCursorPos(const ImVec2 &local_pos); void SetCursorScreenPos(const ImVec2 &pos); float GetFrameHeightWithSpacing(); void Text(const char *fmt, ...); void TextColored(const ImVec4 &col, const char *fmt, ...); void TextDisabled(const char *fmt, ...); void TextWrapped(const char *fmt, ...); void TextUnformatted(const char *text, const char *text_end = nullptr); void BulletText(const char *fmt, ...); void SeparatorText(const char *label); bool Button(const char *label, const ImVec2 &size = ImVec2(0, 0)); bool SmallButton(const char *label); bool InvisibleButton(const char *str_id, const ImVec2 &size, ImGuiButtonFlags flags = 0); bool Checkbox(const char *label, bool *v); bool Combo(const char *label, int *current_item, const char *const items[], int items_count, int popup_max_height_in_items = -1); bool Combo(const char *label, int *current_item, const char *items_separated_by_zeros, int popup_max_height_in_items = -1); bool DragFloat(const char *label, float *v, float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char *format = "%.3f", ImGuiSliderFlags flags = 0); bool DragFloat2(const char *label, float v[2], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char *format = "%.3f", ImGuiSliderFlags flags = 0); bool DragFloat3(const char *label, float v[3], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char *format = "%.3f", ImGuiSliderFlags flags = 0); bool DragInt(const char *label, int *v, float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char *format = "%d", ImGuiSliderFlags flags = 0); bool SliderInt(const char *label, int *v, int v_min, int v_max, const char *format = "%d", ImGuiSliderFlags flags = 0); bool InputInt(const char *label, int *v, int step = 1, int step_fast = 100, ImGuiInputTextFlags flags = 0); bool ColorEdit3(const char *label, float col[3], ImGuiColorEditFlags flags = 0); bool ColorButton(const char *desc_id, const ImVec4 &col, ImGuiColorEditFlags flags = 0, const ImVec2 &size = ImVec2(0, 0)); bool BeginCombo(const char *label, const char *preview_value, ImGuiComboFlags flags = 0); void EndCombo(); bool Selectable(const char *label, bool selected = false, ImGuiSelectableFlags flags = 0, const ImVec2 &size = ImVec2(0, 0)); bool CollapsingHeader(const char *label, ImGuiTreeNodeFlags flags = 0); bool TreeNode(const char *label); void TreePop(); bool BeginMenuBar(); void EndMenuBar(); bool BeginMenu(const char *label, bool enabled = true); void EndMenu(); bool MenuItem(const char *label, const char *shortcut = nullptr, bool selected = false, bool enabled = true); bool MenuItem(const char *label, const char *shortcut, bool *p_selected, bool enabled = true); void SetTooltip(const char *fmt, ...); bool BeginPopupModal(const char *name, bool *p_open = nullptr, ImGuiWindowFlags flags = 0); void EndPopup(); void OpenPopup(const char *str_id, ImGuiPopupFlags popup_flags = 0); void CloseCurrentPopup(); bool BeginPopupContextItem(const char *str_id = nullptr, ImGuiPopupFlags popup_flags = 1); bool BeginTabBar(const char *str_id, ImGuiTabBarFlags flags = 0); void EndTabBar(); bool BeginTabItem(const char *label, bool *p_open = nullptr, ImGuiTabItemFlags flags = 0); void EndTabItem(); void PushID(const char *str_id); void PushID(const char *str_id_begin, const char *str_id_end); void PushID(const void *ptr_id); void PushID(int int_id); void PopID(); ImGuiID GetID(const char *str_id); bool IsItemHovered(ImGuiHoveredFlags flags = 0); bool IsItemActive(); bool IsAnyItemActive(); ImVec2 GetItemRectMin(); bool IsKeyDown(ImGuiKey key); bool IsKeyPressed(ImGuiKey key, bool repeat = true); bool IsMouseDown(ImGuiMouseButton button); bool IsMouseClicked(ImGuiMouseButton button, bool repeat = false); bool IsMouseReleased(ImGuiMouseButton button); bool IsMouseDoubleClicked(ImGuiMouseButton button); void ShowDemoWindow(bool *p_open = nullptr); ImGuiID DockSpace(ImGuiID dockspace_id, const ImVec2 &size = ImVec2(0, 0), ImGuiDockNodeFlags flags = 0, const void *window_class = nullptr); }