Lines Matching defs:ImGui

4 // Call and read ImGui::ShowDemoWindow() in imgui_demo.cpp for demo code.
5 // Newcomers, read 'Programmer guide' below for notes on how to setup Dear ImGui in your codebase.
18 // Note that 'ImGui::' being a namespace, you can add functions into the namespace from your own source files, without
33 - How to update to a newer version of Dear ImGui.
34 - Getting started with integrating Dear ImGui in your code/engine.
49 - How can I use the drawing facilities without an ImGui window? (using ImDrawList API)
50 - How can I use Dear ImGui on a platform that doesn't have a mouse or a keyboard? (input share, remoting, gamepad)
51 - I integrated Dear ImGui in my engine and the text or lines are blurry..
52 - I integrated Dear ImGui in my engine and some elements are clipping or disappearing when I move windows around..
110 - Click upper right corner to close a window, available when 'bool* p_open' is passed to ImGui::Begin().
138 - Call and read ImGui::ShowDemoWindow() for demo code demonstrating most features.
140 - Dear ImGui is an implementation of the IMGUI paradigm (immediate-mode graphical user interface, a term coined by Casey Muratori).
142 - Dear ImGui is a "single pass" rasterizing implementation of the IMGUI paradigm, aimed at ease of use and high-performances.
149 - C++: this is a very C-ish codebase: we don't rely on C++11, we don't include any C++ headers, and ImGui:: is a namespace.
168 - Add the Dear ImGui source files to your projects or using your preferred build system.
171 - When using Dear ImGui, your programming IDE is your friend: follow the declaration of variables, functions and types to find comments about them.
172 - Dear ImGui never touches or knows about your GPU state. The only function that knows about GPU is the draw function that you provide.
174 phases of your own application. All rendering informatioe are stored into command-lists that you will retrieve after calling ImGui::Render().
182 ImGui::CreateContext();
183 ImGuiIO& io = ImGui::GetIO();
198 ImGui::NewFrame();
201 ImGui::Text("Hello, world!");
204 ImGui::Render();
205 ImGui_ImplDX11_RenderDrawData(ImGui::GetDrawData());
212 ImGui::DestroyContext();
218 ImGui::CreateContext();
219 ImGuiIO& io = ImGui::GetIO();
248 // Call NewFrame(), after this point you can use ImGui::* functions anytime
250 ImGui::NewFrame();
253 ImGui::Text("Hello, world!");
254 MyGameUpdate(); // may use any ImGui functions, e.g. ImGui::Begin("My window"); ImGui::Text("Hello, world!"); ImGui::End();
255 MyGameRender(); // may use any ImGui functions as well!
259 ImGui::EndFrame();
260 ImGui::Render();
261 ImDrawData* draw_data = ImGui::GetDrawData();
267 ImGui::DestroyContext();
280 const ImDrawVert* vtx_buffer = cmd_list->VtxBuffer.Data; // vertex buffer generated by ImGui
281 const ImDrawIdx* idx_buffer = cmd_list->IdxBuffer.Data; // index buffer generated by ImGui
317 They tell you if Dear ImGui intends to use your inputs. When a flag is set you want to hide the corresponding inputs
386 - 2018/07/22 (1.63) - changed ImGui::GetTime() return value from float to double to avoid accumulating floating point imprecisions over time.
405 - 2018/02/16 (1.60) - obsoleted the io.RenderDrawListsFn callback, you can call your graphics engine render function after ImGui::Render(). Use ImGui::GetDrawData() to retrieve the ImDrawData* to display.
407 - YOU NOW NEED TO CALL ImGui::CreateContext() AT THE BEGINNING OF YOUR APP, AND CALL ImGui::DestroyContext() AT THE END.
427 - 2017/11/18 (1.53) - Style, Begin: removed ImGuiWindowFlags_ShowBorders window flag. Borders are now fully set up in the ImGuiStyle structure (see e.g. style.FrameBorderSize, style.WindowBorderSize). Use ImGui::ShowStyleEditor() to look them up.
475 - 2016/04/26 (1.49) - changed ImDrawList::PushClipRect(ImVec4 rect) to ImDrawList::PushClipRect(Imvec2 min,ImVec2 max,bool intersect_with_current_clip_rect=false). Note that higher-level ImGui::PushClipRect() is preferable because it will clip at logic/widget level, whereas ImDrawList::PushClipRect() only affect your renderer.
511 - 2015/05/11 (1.40) - changed BeginPopup() API, takes a string identifier instead of a bool. ImGui needs to manage the open/closed state of popups. Call OpenPopup() to actually set the "open" state of a popup. BeginPopup() returns true if the popup is opened.
530 font init: { const void* png_data; unsigned int png_size; ImGui::GetDefaultFontData(NULL, NULL, &png_data, &png_size); <..Upload texture to GPU..>; }
536 (1.30) - removed ImGui::IsItemFocused() in favor of ImGui::IsItemActive() which handles all widgets
554 A: You can read the 'io.WantCaptureMouse', 'io.WantCaptureKeyboard' and 'io.WantTextInput' flags from the ImGuiIO structure (e.g. if (ImGui::GetIO().WantCaptureMouse) { ... } )
562 Those flags are updated by ImGui::NewFrame(). Preferably read the flags after calling NewFrame() if you can afford it, but reading them before is also
566 were targeted for Dear ImGui, e.g. with an array of bool, and filter out the corresponding key-ups.)
570 - You may use functions such as ImGui::Image(), ImGui::ImageButton() or lower-level ImDrawList::AddImage() to emit draw calls that will use your own textures.
572 - Loading image files from the disk and turning them into a texture is not within the scope of Dear ImGui (for a good reason).
576 - Dear ImGui's job is to create "meshes", defined in a renderer-agnostic format made of draw commands and vertices.
582 Dear ImGui doesn't know or understand what you are storing in ImTextureID, it merely pass ImTextureID values until they reach your rendering function.
605 ImGui::Image((void*)texture, ImVec2(texture->Width, texture->Height));
607 The renderer function called after ImGui::Render() will receive that same value that the user code passed:
613 Once you understand this design you will understand that loading image files and turning them into displayable textures is not within the scope of Dear ImGui.
636 ImGui::Image((void*)(intptr_t)my_opengl_texture, ImVec2(my_image_width, my_image_height));
652 Finally, you may call ImGui::ShowMetricsWindow() to explore/visualize/understand how the ImDrawList are generated.
658 Dear ImGui internally need to uniquely identify UI elements.
772 This way you'll be able to use your own types everywhere, e.g. passsing glm::vec2 to ImGui functions instead of ImVec2.
776 ImGuiIO& io = ImGui::GetIO();
799 ImGuiIO& io = ImGui::GetIO();
805 // use ImGui::PushFont()/ImGui::PopFont() to change the font at runtime
854 - To use ImGui::InputText() with a std::string or any resizable string class, see misc/cpp/imgui_stdlib.h.
859 You may write your own one-liner wrappers to facilitate user code (tip: add new functions in ImGui:: namespace from your code).
860 - Dear ImGui applications often need to make intensive use of strings. It is expected that many of the strings you will pass
872 Q: How can I use the drawing facilities without an ImGui window? (using ImDrawList API)
876 - You can call ImGui::GetOverlayDrawList() and use this draw list to display contents over every other imgui windows.
877 - You can create your own ImDrawList instance. You'll need to initialize them ImGui::GetDrawListSharedData(), or create
881 A: - You can control Dear ImGui with a gamepad. Read about navigation in "Using gamepad/keyboard navigation controls".
889 - You may also use a third party solution such as Remote ImGui (https://github.com/JordiRos/remoteimgui) which sends
890 the vertices to render over the local network, allowing you to use Dear ImGui even on a screen-less machine.
895 Q: I integrated Dear ImGui in my engine and the text or lines are blurry..
899 Q: I integrated Dear ImGui in my engine and some elements are clipping or disappearing when I move windows around..
901 Rectangles provided by ImGui are defined as (x1=left,y1=top,x2=right,y2=bottom) and NOT as (x1,y1,width,height).
904 A: - If you are experienced with Dear ImGui and C++, look at the github issues, look at the Wiki, read docs/TODO.txt
919 - tip: call and read the ShowDemoWindow() code in imgui_demo.cpp for more example of how to use ImGui!
957 #pragma clang diagnostic ignored "-Wexit-time-destructors" // warning : declaration requires an exit-time destructor // exit-time destruction order is undefined. if MemFree() leads to users code that has been disabled before exit it might cause problems. ImGui coding style welcomes static/globals.
1014 namespace ImGui
1042 // Current context pointer. Implicitly used by all Dear ImGui functions. Always assumed to be != NULL.
1043 // ImGui::CreateContext() will automatically set this pointer if it is NULL. Change to a different context by calling ImGui::SetCurrentContext().
1047 // 2) Important: Dear ImGui functions are not thread-safe because of this pointer.
1055 // - If you need a finite number of contexts, you may compile and use multiple instances of the ImGui code from different namespace.
1081 Alpha = 1.0f; // Global alpha applies to everything in ImGui
1115 ImGui::StyleColorsDark(this);
1307 void* buf = ImGui::MemAlloc(len + 1);
1317 ImGui::MemFree(dst);
1318 dst = (char*)ImGui::MemAlloc(src_size);
1527 // Memory allocated with ImGui::MemAlloc(), must be freed by user using ImGui::MemFree()
1546 void* file_data = ImGui::MemAlloc(file_size + padding_bytes);
1555 ImGui::MemFree(file_data);
1756 ImVec4 ImGui::ColorConvertU32ToFloat4(ImU32 in)
1766 ImU32 ImGui::ColorConvertFloat4ToU32(const ImVec4& in)
1778 void ImGui::ColorConvertRGBtoHSV(float r, float g, float b, float& out_h, float& out_s, float& out_v)
1800 void ImGui::ColorConvertHSVtoRGB(float h, float s, float v, float& out_r, float& out_g, float& out_b)
1827 ImU32 ImGui::GetColorU32(ImGuiCol idx, float alpha_mul)
1835 ImU32 ImGui::GetColorU32(const ImVec4& col)
1843 const ImVec4& ImGui::GetStyleColorVec4(ImGuiCol idx)
1849 ImU32 ImGui::GetColorU32(ImU32 col)
2030 ImGui::PushItemWidth(width);
2031 bool value_changed = ImGui::InputText(label, InputBuf, IM_ARRAYSIZE(InputBuf));
2033 ImGui::PopItemWidth();
2191 ImGui::SetCursorPosY(pos_y);
2192 ImGuiWindow* window = ImGui::GetCurrentWindow();
2204 StartPosY = ImGui::GetCursorPosY();
2211 ImGui::CalcListClipping(ItemsCount, ItemsHeight, &DisplayStart, &DisplayEnd); // calculate how many to clip/display
2222 // In theory here we should assert that ImGui::GetCursorPosY() == StartPosY + DisplayEnd * ItemsHeight, but it feels saner to just seek at the end and not assert/crash the user.
2231 if (ItemsCount == 0 || ImGui::GetCurrentWindowRead()->SkipItems)
2240 StartPosY = ImGui::GetCursorPosY();
2247 float items_height = ImGui::GetCursorPosY() - StartPosY;
2269 // Also see imgui_draw.cpp for some more which have been reworked to not rely on ImGui:: state.
2272 const char* ImGui::FindRenderedTextEnd(const char* text, const char* text_end)
2283 // Internal ImGui functions to render text
2285 void ImGui::RenderText(ImVec2 pos, const char* text, const char* text_end, bool hide_text_after_hash)
2311 void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width)
2329 void ImGui::RenderTextClippedEx(ImDrawList* draw_list, const ImVec2& pos_min, const ImVec2& pos_max, const char* text, const char* text_display_end, const ImVec2* text_size_if_known, const ImVec2& align, const ImRect* clip_rect)
2357 void ImGui::RenderTextClipped(const ImVec2& pos_min, const ImVec2& pos_max, const char* text, const char* text_end, const ImVec2* text_size_if_known, const ImVec2& align, const ImRect* clip_rect)
2373 void ImGui::RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool border, float rounding)
2386 void ImGui::RenderFrameBorder(ImVec2 p_min, ImVec2 p_max, float rounding)
2399 void ImGui::RenderArrow(ImVec2 p_min, ImGuiDir dir, float scale)
2433 void ImGui::RenderBullet(ImVec2 pos)
2440 void ImGui::RenderCheckMark(ImVec2 pos, ImU32 col, float sz)
2458 void ImGui::RenderNavHighlight(const ImRect& bb, ImGuiID id, ImGuiNavHighlightFlags flags)
2570 ImGui::KeepAliveID(id);
2578 ImGui::KeepAliveID(id);
2600 ImGui::KeepAliveID(id);
2612 void ImGui::SetNavID(ImGuiID id, int nav_layer)
2621 void ImGui::SetNavIDWithRectRel(ImGuiID id, int nav_layer, const ImRect& rect_rel)
2631 void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window)
2659 void ImGui::SetFocusID(ImGuiID id, ImGuiWindow* window)
2681 void ImGui::ClearActiveID()
2686 void ImGui::SetHoveredID(ImGuiID id)
2695 ImGuiID ImGui::GetHoveredID()
2701 void ImGui::KeepAliveID(ImGuiID id)
2710 void ImGui::MarkItemEdited(ImGuiID id)
2743 void ImGui::ItemSize(const ImVec2& size, float text_offset_y)
2770 void ImGui::ItemSize(const ImRect& bb, float text_offset_y)
2778 bool ImGui::ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb_arg)
2821 bool ImGui::IsItemHovered(ImGuiHoveredFlags flags)
2862 bool ImGui::ItemHoverable(const ImRect& bb, ImGuiID id)
2884 bool ImGui::IsClippedEx(const ImRect& bb, ImGuiID id, bool clip_even_when_logged)
2895 bool ImGui::FocusableItemRegister(ImGuiWindow* window, ImGuiID id, bool tab_stop)
2920 void ImGui::FocusableItemUnregister(ImGuiWindow* window)
2926 ImVec2 ImGui::CalcItemSize(ImVec2 size, float default_x, float default_y)
2939 float ImGui::CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x)
2953 void* ImGui::MemAlloc(size_t size)
2960 void ImGui::MemFree(void* ptr)
2968 const char* ImGui::GetClipboardText()
2973 void ImGui::SetClipboardText(const char* text)
2979 const char* ImGui::GetVersion()
2984 // Internal state access - if you want to share ImGui state between modules (e.g. DLL) or allocate it yourself
2986 ImGuiContext* ImGui::GetCurrentContext()
2991 void ImGui::SetCurrentContext(ImGuiContext* ctx)
3002 bool ImGui::DebugCheckVersionAndDataLayout(const char* version, size_t sz_io, size_t sz_style, size_t sz_vec2, size_t sz_vec4, size_t sz_vert)
3014 void ImGui::SetAllocatorFunctions(void* (*alloc_func)(size_t sz, void* user_data), void (*free_func)(void* ptr, void* user_data), void* user_data)
3021 ImGuiContext* ImGui::CreateContext(ImFontAtlas* shared_font_atlas)
3030 void ImGui::DestroyContext(ImGuiContext* ctx)
3040 ImGuiIO& ImGui::GetIO()
3042 IM_ASSERT(GImGui != NULL && "No current context. Did you call ImGui::CreateContext() or ImGui::SetCurrentContext()?");
3046 ImGuiStyle& ImGui::GetStyle()
3048 IM_ASSERT(GImGui != NULL && "No current context. Did you call ImGui::CreateContext() or ImGui::SetCurrentContext()?");
3053 ImDrawData* ImGui::GetDrawData()
3059 double ImGui::GetTime()
3064 int ImGui::GetFrameCount()
3075 ImDrawList* ImGui::GetOverlayDrawList()
3080 ImDrawListSharedData* ImGui::GetDrawListSharedData()
3085 void ImGui::StartMouseMovingWindow(ImGuiWindow* window)
3105 void ImGui::UpdateMouseMovingWindowNewFrame()
3144 void ImGui::UpdateMouseMovingWindowEndFrame()
3199 static void ImGui::UpdateMouseInputs()
3253 void ImGui::UpdateMouseWheel()
3299 void ImGui::UpdateHoveredWindowAndCaptureFlags()
3333 // If mouse was first clicked outside of ImGui bounds we also cancel out hovering.
3357 void ImGui::NewFrame()
3359 IM_ASSERT(GImGui != NULL && "No current context. Did you call ImGui::CreateContext() or ImGui::SetCurrentContext()?");
3533 // This fallback is particularly important as it avoid ImGui:: calls from crashing.
3543 void ImGui::Initialize(ImGuiContext* context)
3561 void ImGui::Shutdown(ImGuiContext* context)
3572 // Cleanup of other data are conditional on actually having initialized ImGui.
3729 ImGuiIO& io = ImGui::GetIO();
3745 void ImGui::PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect)
3752 void ImGui::PopClipRect()
3760 void ImGui::EndFrame()
3766 IM_ASSERT(g.FrameScopeActive && "Forgot to call ImGui::NewFrame()?");
3851 void ImGui::Render()
3898 ImVec2 ImGui::CalcTextSize(const char* text, const char* text_end, bool hide_text_after_double_hash, float wrap_width)
3923 void ImGui::CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end)
4007 bool ImGui::IsMouseHoveringRect(const ImVec2& r_min, const ImVec2& r_max, bool clip)
4023 int ImGui::GetKeyIndex(ImGuiKey imgui_key)
4030 bool ImGui::IsKeyDown(int user_key_index)
4037 int ImGui::CalcTypematicPressedRepeatAmount(float t, float t_prev, float repeat_delay, float repeat_rate)
4047 int ImGui::GetKeyPressedAmount(int key_index, float repeat_delay, float repeat_rate)
4057 bool ImGui::IsKeyPressed(int user_key_index, bool repeat)
4071 bool ImGui::IsKeyReleased(int user_key_index)
4079 bool ImGui::IsMouseDown(int button)
4086 bool ImGui::IsAnyMouseDown()
4095 bool ImGui::IsMouseClicked(int button, bool repeat)
4113 bool ImGui::IsMouseReleased(int button)
4120 bool ImGui::IsMouseDoubleClicked(int button)
4127 bool ImGui::IsMouseDragging(int button, float lock_threshold)
4138 ImVec2 ImGui::GetMousePos()
4144 ImVec2 ImGui::GetMousePosOnOpeningCurrentPopup()
4153 bool ImGui::IsMousePosValid(const ImVec2* mouse_pos)
4166 ImVec2 ImGui::GetMouseDragDelta(int button, float lock_threshold)
4178 void ImGui::ResetMouseDragDelta(int button)
4186 ImGuiMouseCursor ImGui::GetMouseCursor()
4191 void ImGui::SetMouseCursor(ImGuiMouseCursor cursor_type)
4196 void ImGui::CaptureKeyboardFromApp(bool capture)
4201 void ImGui::CaptureMouseFromApp(bool capture)
4206 bool ImGui::IsItemActive()
4217 bool ImGui::IsItemActivated()
4229 bool ImGui::IsItemDeactivated()
4236 bool ImGui::IsItemDeactivatedAfterEdit()
4242 bool ImGui::IsItemFocused()
4252 bool ImGui::IsItemClicked(int mouse_button)
4257 bool ImGui::IsAnyItemHovered()
4263 bool ImGui::IsAnyItemActive()
4269 bool ImGui::IsAnyItemFocused()
4275 bool ImGui::IsItemVisible()
4281 bool ImGui::IsItemEdited()
4288 void ImGui::SetItemAllowOverlap()
4297 ImVec2 ImGui::GetItemRectMin()
4303 ImVec2 ImGui::GetItemRectMax()
4309 ImVec2 ImGui::GetItemRectSize()
4321 static bool ImGui::BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, bool border, ImGuiWindowFlags flags)
4372 bool ImGui::BeginChild(const char* str_id, const ImVec2& size_arg, bool border, ImGuiWindowFlags extra_flags)
4378 bool ImGui::BeginChild(ImGuiID id, const ImVec2& size_arg, bool border, ImGuiWindowFlags extra_flags)
4384 void ImGui::EndChild()
4424 bool ImGui::BeginChildFrame(ImGuiID id, const ImVec2& size, ImGuiWindowFlags extra_flags)
4438 void ImGui::EndChildFrame()
4466 ImGuiWindow* ImGui::FindWindowByID(ImGuiID id)
4472 ImGuiWindow* ImGui::FindWindowByName(const char* name)
4492 if (ImGuiWindowSettings* settings = ImGui::FindWindowSettings(window->ID))
4601 ImVec2 ImGui::CalcWindowExpectedSize(ImGuiWindow* window)
4607 float ImGui::GetWindowScrollMaxX(ImGuiWindow* window)
4612 float ImGui::GetWindowScrollMaxY(ImGuiWindow* window)
4640 scroll.x = ImMin(scroll.x, ImGui::GetWindowScrollMaxX(window));
4641 scroll.y = ImMin(scroll.y, ImGui::GetWindowScrollMaxY(window));
4697 static void ImGui::UpdateManualResize(ImGuiWindow* window, const ImVec2& size_auto_fit, int* border_held, int resize_grip_count, ImU32 resize_grip_col[4])
4807 static void ImGui::RenderOuterBorders(ImGuiWindow* window)
4844 void ImGui::UpdateWindowParentAndRootLinks(ImGuiWindow* window, ImGuiWindowFlags flags, ImGuiWindow* parent_window)
4859 // Push a new ImGui window to add widgets to.
4864 // - Return false when window is collapsed, so you can early out in your code. You always need to call ImGui::End() even if false is returned.
4866 bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
4871 IM_ASSERT(g.FrameScopeActive); // Forgot to call ImGui::NewFrame()
4872 IM_ASSERT(g.FrameCountEnded != g.FrameCount); // Called ImGui::Render() or ImGui::EndFrame() and haven't called ImGui::NewFrame() again yet
5489 bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_first_use, float bg_alpha_override, ImGuiWindowFlags flags)
5503 void ImGui::End()
5532 void ImGui::BringWindowToFocusFront(ImGuiWindow* window)
5546 void ImGui::BringWindowToDisplayFront(ImGuiWindow* window)
5561 void ImGui::BringWindowToDisplayBack(ImGuiWindow* window)
5576 void ImGui::FocusWindow(ImGuiWindow* window)
5611 void ImGui::FocusPreviousWindowIgnoringOne(ImGuiWindow* ignore_window)
5628 void ImGui::PushItemWidth(float item_width)
5635 void ImGui::PushMultiItemsWidths(int components, float w_full)
5649 void ImGui::PopItemWidth()
5656 float ImGui::CalcItemWidth()
5670 void ImGui::SetCurrentFont(ImFont* font)
5685 void ImGui::PushFont(ImFont* font)
5695 void ImGui::PopFont()
5703 void ImGui::PushItemFlag(ImGuiItemFlags option, bool enabled)
5713 void ImGui::PopItemFlag()
5721 void ImGui::PushAllowKeyboardFocus(bool allow_keyboard_focus)
5726 void ImGui::PopAllowKeyboardFocus()
5731 void ImGui::PushButtonRepeat(bool repeat)
5736 void ImGui::PopButtonRepeat()
5741 void ImGui::PushTextWrapPos(float wrap_pos_x)
5748 void ImGui::PopTextWrapPos()
5756 void ImGui::PushStyleColor(ImGuiCol idx, ImU32 col)
5766 void ImGui::PushStyleColor(ImGuiCol idx, const ImVec4& col)
5776 void ImGui::PopStyleColor(int count)
5830 void ImGui::PushStyleVar(ImGuiStyleVar idx, float val)
5844 void ImGui::PushStyleVar(ImGuiStyleVar idx, const ImVec2& val)
5858 void ImGui::PopStyleVar(int count)
5874 const char* ImGui::GetStyleColorName(ImGuiCol idx)
5932 bool ImGui::IsWindowChildOf(ImGuiWindow* window, ImGuiWindow* potential_parent)
5945 bool ImGui::IsWindowHovered(ImGuiHoveredFlags flags)
5986 bool ImGui::IsWindowFocused(ImGuiFocusedFlags flags)
6010 bool ImGui::IsWindowNavFocusable(ImGuiWindow* window)
6015 float ImGui::GetWindowWidth()
6021 float ImGui::GetWindowHeight()
6027 ImVec2 ImGui::GetWindowPos()
6034 void ImGui::SetWindowScrollX(ImGuiWindow* window, float new_scroll_x)
6041 void ImGui::SetWindowScrollY(ImGuiWindow* window, float new_scroll_y)
6048 void ImGui::SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiCond cond)
6065 void ImGui::SetWindowPos(const ImVec2& pos, ImGuiCond cond)
6071 void ImGui::SetWindowPos(const char* name, const ImVec2& pos, ImGuiCond cond)
6077 ImVec2 ImGui::GetWindowSize()
6083 void ImGui::SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond cond)
6115 void ImGui::SetWindowSize(const ImVec2& size, ImGuiCond cond)
6120 void ImGui::SetWindowSize(const char* name, const ImVec2& size, ImGuiCond cond)
6126 void ImGui::SetWindowCollapsed(ImGuiWindow* window, bool collapsed, ImGuiCond cond)
6137 void ImGui::SetWindowCollapsed(bool collapsed, ImGuiCond cond)
6142 bool ImGui::IsWindowCollapsed()
6148 bool ImGui::IsWindowAppearing()
6154 void ImGui::SetWindowCollapsed(const char* name, bool collapsed, ImGuiCond cond)
6160 void ImGui::SetWindowFocus()
6165 void ImGui::SetWindowFocus(const char* name)
6178 void ImGui::SetNextWindowPos(const ImVec2& pos, ImGuiCond cond, const ImVec2& pivot)
6187 void ImGui::SetNextWindowSize(const ImVec2& size, ImGuiCond cond)
6195 void ImGui::SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeCallback custom_callback, void* custom_callback_user_data)
6204 void ImGui::SetNextWindowContentSize(const ImVec2& size)
6211 void ImGui::SetNextWindowCollapsed(bool collapsed, ImGuiCond cond)
6219 void ImGui::SetNextWindowFocus()
6225 void ImGui::SetNextWindowBgAlpha(float alpha)
6233 ImVec2 ImGui::GetContentRegionMax()
6242 ImVec2 ImGui::GetContentRegionAvail()
6248 float ImGui::GetContentRegionAvailWidth()
6254 ImVec2 ImGui::GetWindowContentRegionMin()
6260 ImVec2 ImGui::GetWindowContentRegionMax()
6266 float ImGui::GetWindowContentRegionWidth()
6272 float ImGui::GetTextLineHeight()
6278 float ImGui::GetTextLineHeightWithSpacing()
6284 float ImGui::GetFrameHeight()
6290 float ImGui::GetFrameHeightWithSpacing()
6296 ImDrawList* ImGui::GetWindowDrawList()
6302 ImFont* ImGui::GetFont()
6307 float ImGui::GetFontSize()
6312 ImVec2 ImGui::GetFontTexUvWhitePixel()
6317 void ImGui::SetWindowFontScale(float scale)
6327 ImVec2 ImGui::GetCursorPos()
6333 float ImGui::GetCursorPosX()
6339 float ImGui::GetCursorPosY()
6345 void ImGui::SetCursorPos(const ImVec2& local_pos)
6352 void ImGui::SetCursorPosX(float x)
6359 void ImGui::SetCursorPosY(float y)
6366 ImVec2 ImGui::GetCursorStartPos()
6372 ImVec2 ImGui::GetCursorScreenPos()
6378 void ImGui::SetCursorScreenPos(const ImVec2& pos)
6385 float ImGui::GetScrollX()
6390 float ImGui::GetScrollY()
6395 float ImGui::GetScrollMaxX()
6400 float ImGui::GetScrollMaxY()
6405 void ImGui::SetScrollX(float scroll_x)
6412 void ImGui::SetScrollY(float scroll_y)
6419 void ImGui::SetScrollFromPosY(float local_y, float center_y_ratio)
6429 void ImGui::SetScrollHereY(float center_y_ratio)
6437 void ImGui::ActivateItem(ImGuiID id)
6443 void ImGui::SetKeyboardFocusHere(int offset)
6451 void ImGui::SetItemDefaultFocus()
6468 void ImGui::SetStateStorage(ImGuiStorage* tree)
6474 ImGuiStorage* ImGui::GetStateStorage()
6480 void ImGui::PushID(const char* str_id)
6486 void ImGui::PushID(const char* str_id_begin, const char* str_id_end)
6492 void ImGui::PushID(const void* ptr_id)
6498 void ImGui::PushID(int int_id)
6505 void ImGui::PopID()
6511 ImGuiID ImGui::GetID(const char* str_id)
6517 ImGuiID ImGui::GetID(const char* str_id_begin, const char* str_id_end)
6523 ImGuiID ImGui::GetID(const void* ptr_id)
6529 bool ImGui::IsRectVisible(const ImVec2& size)
6535 bool ImGui::IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max)
6542 void ImGui::BeginGroup()
6567 void ImGui::EndGroup()
6612 void ImGui::SameLine(float pos_x, float spacing_w)
6635 void ImGui::Indent(float indent_w)
6643 void ImGui::Unindent(float indent_w)
6655 void ImGui::BeginTooltip()
6677 void ImGui::BeginTooltipEx(ImGuiWindowFlags extra_flags, bool override_previous_tooltip)
6695 void ImGui::EndTooltip()
6701 void ImGui::SetTooltipV(const char* fmt, va_list args)
6712 void ImGui::SetTooltip(const char* fmt, ...)
6724 bool ImGui::IsPopupOpen(ImGuiID id)
6730 bool ImGui::IsPopupOpen(const char* str_id)
6736 ImGuiWindow* ImGui::GetFrontMostPopupModal()
6746 void ImGui::OpenPopup(const char* str_id)
6756 void ImGui::OpenPopupEx(ImGuiID id)
6798 bool ImGui::OpenPopupOnItemClick(const char* str_id, int mouse_button)
6811 void ImGui::ClosePopupsOverWindow(ImGuiWindow* ref_window)
6848 void ImGui::ClosePopupToLevel(int remaining, bool apply_focus_to_window_under)
6872 void ImGui::CloseCurrentPopup()
6902 bool ImGui::BeginPopupEx(ImGuiID id, ImGuiWindowFlags extra_flags)
6924 bool ImGui::BeginPopup(const char* str_id, ImGuiWindowFlags flags)
6938 bool ImGui::BeginPopupModal(const char* name, bool* p_open, ImGuiWindowFlags flags)
6966 void ImGui::EndPopup()
6981 bool ImGui::BeginPopupContextItem(const char* str_id, int mouse_button)
6991 bool ImGui::BeginPopupContextWindow(const char* str_id, int mouse_button, bool also_over_items)
7002 bool ImGui::BeginPopupContextVoid(const char* str_id, int mouse_button)
7012 ImRect ImGui::GetWindowAllowedExtentRect(ImGuiWindow*)
7022 ImVec2 ImGui::FindBestWindowPosForPopupEx(const ImVec2& ref_pos, const ImVec2& size, ImGuiDir* last_dir, const ImRect& r_outer, const ImRect& r_avoid, ImGuiPopupPositionPolicy policy)
7075 ImVec2 ImGui::FindBestWindowPosForPopup(ImGuiWindow* window)
7222 if (ImGui::IsMouseHoveringRect(cand.Min, cand.Max))
7225 ImDrawList* draw_list = ImGui::GetOverlayDrawList(window);
7228 draw_list->AddRectFilled(cand.Max-ImVec2(4,4), cand.Max+ImGui::CalcTextSize(buf)+ImVec2(4,4), IM_COL32(40,0,0,150));
7233 if (ImGui::IsKeyPressedMap(ImGuiKey_C)) { g.NavMoveDirLast = (ImGuiDir)((g.NavMoveDirLast + 1) & 3); g.IO.KeysDownDuration[g.IO.KeyMap[ImGuiKey_C]] = 0.01f; }
7237 ImDrawList* draw_list = ImGui::GetOverlayDrawList(window);
7291 static void ImGui::NavProcessItem(ImGuiWindow* window, const ImRect& nav_bb, const ImGuiID id)
7361 bool ImGui::NavMoveRequestButNoResultYet()
7367 void ImGui::NavMoveRequestCancel()
7374 void ImGui::NavMoveRequestForward(ImGuiDir move_dir, ImGuiDir clip_dir, const ImRect& bb_rel, ImGuiNavMoveFlags move_flags)
7378 ImGui::NavMoveRequestCancel();
7386 void ImGui::NavMoveRequestTryWrapping(ImGuiWindow* window, ImGuiNavMoveFlags move_flags)
7421 static void ImGui::NavSaveLastChildNavWindow(ImGuiWindow* nav_window)
7431 static ImGuiWindow* ImGui::NavRestoreLastChildNavWindow(ImGuiWindow* window)
7441 g.NavWindow = ImGui::NavRestoreLastChildNavWindow(g.NavWindow);
7443 ImGui::SetNavIDWithRectRel(g.NavWindow->NavLastIds[0], layer, g.NavWindow->NavRectRel[0]);
7445 ImGui::NavInitWindow(g.NavWindow, true);
7448 static inline void ImGui::NavUpdateAnyRequestFlag()
7457 void ImGui::NavInitWindow(ImGuiWindow* window, bool force_reinit)
7480 static ImVec2 ImGui::NavCalcPreferredRefPos()
7500 float ImGui::GetNavInputAmount(ImGuiNavInput n, ImGuiInputReadMode mode)
7522 ImVec2 ImGui::GetNavInputAmount2d(ImGuiNavDirSourceFlags dir_sources, ImGuiInputReadMode mode, float slow_factor, float fast_factor)
7570 static void ImGui::NavUpdate()
7839 static void ImGui::NavUpdateMoveResult()
7895 static float ImGui::NavUpdatePageUpPageDown(int allowed_dir_flags)
7952 if (ImGui::IsWindowNavFocusable(g.WindowsFocusOrder[i]))
7974 static void ImGui::NavUpdateWindowing()
8119 void ImGui::NavUpdateWindowingList()
8152 void ImGui::NextColumn()
8186 int ImGui::GetColumnIndex()
8192 int ImGui::GetColumnsCount()
8220 x = ImMax(x, ImGui::GetColumnOffset(column_index - 1) + g.Style.ColumnsMinSpacing);
8222 x = ImMin(x, ImGui::GetColumnOffset(column_index + 1) - g.Style.ColumnsMinSpacing);
8227 float ImGui::GetColumnOffset(int column_index)
8255 float ImGui::GetColumnWidth(int column_index)
8266 void ImGui::SetColumnOffset(int column_index, float offset)
8288 void ImGui::SetColumnWidth(int column_index, float width)
8299 void ImGui::PushColumnClipRect(int column_index)
8321 void ImGui::BeginColumns(const char* str_id, int columns_count, ImGuiColumnsFlags flags)
8385 void ImGui::EndColumns()
8453 void ImGui::Columns(int columns_count, const char* id, bool border)
8474 void ImGui::ClearDragDrop()
8490 bool ImGui::BeginDragDropSource(ImGuiDragDropFlags flags)
8588 void ImGui::EndDragDropSource()
8604 bool ImGui::SetDragDropPayload(const char* type, const void* data, size_t data_size, ImGuiCond cond)
8647 bool ImGui::BeginDragDropTargetCustom(const ImRect& bb, ImGuiID id)
8673 bool ImGui::BeginDragDropTarget()
8699 bool ImGui::IsDragDropPayloadBeingAccepted()
8705 const ImGuiPayload* ImGui::AcceptDragDropPayload(const char* type, ImGuiDragDropFlags flags)
8748 const ImGuiPayload* ImGui::GetDragDropPayload()
8755 void ImGui::EndDragDropTarget()
8777 void ImGui::LogText(const char* fmt, ...)
8794 void ImGui::LogRenderedText(const ImVec2* ref_pos, const char* text, const char* text_end)
8832 // Start logging ImGui output to TTY
8833 void ImGui::LogToTTY(int max_depth)
8848 // Start logging ImGui output to given file
8849 void ImGui::LogToFile(int max_depth, const char* filename)
8876 // Start logging ImGui output to clipboard
8877 void ImGui::LogToClipboard(int max_depth)
8892 void ImGui::LogFinish()
8916 void ImGui::LogButtons()
8944 void ImGui::MarkIniSettingsDirty()
8951 void ImGui::MarkIniSettingsDirty(ImGuiWindow* window)
8959 ImGuiWindowSettings* ImGui::CreateNewWindowSettings(const char* name)
8969 ImGuiWindowSettings* ImGui::FindWindowSettings(ImGuiID id)
8978 ImGuiWindowSettings* ImGui::FindOrCreateWindowSettings(const char* name)
8985 void ImGui::LoadIniSettingsFromDisk(const char* ini_filename)
8992 ImGui::MemFree(file_data);
8995 ImGuiSettingsHandler* ImGui::FindSettingsHandler(const char* type_name)
9006 void ImGui::LoadIniSettingsFromMemory(const char* ini_data, size_t ini_size)
9016 char* buf = (char*)ImGui::MemAlloc(ini_size + 1);
9063 ImGui::MemFree(buf);
9067 void ImGui::SaveIniSettingsToDisk(const char* ini_filename)
9084 const char* ImGui::SaveIniSettingsToMemory(size_t* out_size)
9102 ImGuiWindowSettings* settings = ImGui::FindWindowSettings(ImHashStr(name, 0));
9104 settings = ImGui::CreateNewWindowSettings(name);
9129 ImGuiWindowSettings* settings = (window->SettingsIdx != -1) ? &g.SettingsWindows[window->SettingsIdx] : ImGui::FindWindowSettings(window->ID);
9132 settings = ImGui::CreateNewWindowSettings(window->Name);
9226 // Local ImGui-only clipboard implementation, if user hasn't defined better clipboard handlers
9233 // Local ImGui-only clipboard implementation, if user hasn't defined better clipboard handlers
9279 void ImGui::ShowMetricsWindow(bool* p_open)
9281 if (!ImGui::Begin("ImGui Metrics", p_open))
9283 ImGui::End();
9289 ImGuiIO& io = ImGui::GetIO();
9290 ImGui::Text("Dear ImGui %s", ImGui::GetVersion());
9291 ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
9292 ImGui::Text("%d vertices, %d indices (%d triangles)", io.MetricsRenderVertices, io.MetricsRenderIndices, io.MetricsRenderIndices / 3);
9293 ImGui::Text("%d active windows (%d visible)", io.MetricsActiveWindows, io.MetricsRenderWindows);
9294 ImGui::Text("%d allocations", io.MetricsActiveAllocations);
9295 ImGui::Checkbox("Show clipping rectangles when hovering draw commands", &show_draw_cmd_clip_rects);
9296 ImGui::Checkbox("Ctrl shows window begin order", &show_window_begin_order);
9297 ImGui::Separator();
9303 bool node_open = ImGui::TreeNode(draw_list, "%s: '%s' %d vtx, %d indices, %d cmds", label, draw_list->_OwnerName ? draw_list->_OwnerName : "", draw_list->VtxBuffer.Size, draw_list->IdxBuffer.Size, draw_list->CmdBuffer.Size);
9304 if (draw_list == ImGui::GetWindowDrawList())
9306 ImGui::SameLine();
9307 ImGui::TextColored(ImVec4(1.0f,0.4f,0.4f,1.0f), "CURRENTLY APPENDING"); // Can't display stats for active draw list! (we don't have the data double-buffered)
9308 if (node_open) ImGui::TreePop();
9325 ImGui::BulletText("Callback %p, user_data %p", pcmd->UserCallback, pcmd->UserCallbackData);
9329 bool pcmd_node_open = ImGui::TreeNode((void*)(pcmd - draw_list->CmdBuffer.begin()), "Draw %4d %s vtx, tex 0x%p, clip_rect (%4.0f,%4.0f)-(%4.0f,%4.0f)", pcmd->ElemCount, draw_list->IdxBuffer.Size > 0 ? "indexed" : "non-indexed", pcmd->TextureId, pcmd->ClipRect.x, pcmd->ClipRect.y, pcmd->ClipRect.z, pcmd->ClipRect.w);
9330 if (show_draw_cmd_clip_rects && ImGui::IsItemHovered())
9358 ImGui::Selectable(buf, false);
9359 if (ImGui::IsItemHovered())
9367 ImGui::TreePop();
9369 ImGui::TreePop();
9374 if (!ImGui::TreeNode(label, "%s (%d)", label, windows.Size))
9378 ImGui::TreePop();
9383 if (!ImGui::TreeNode(window, "%s '%s', %d @ 0x%p", label, window->Name, window->Active || window->WasActive, window))
9387 ImGui::BulletText("Pos: (%.1f,%.1f), Size: (%.1f,%.1f), SizeContents (%.1f,%.1f)", window->Pos.x, window->Pos.y, window->Size.x, window->Size.y, window->SizeContents.x, window->SizeContents.y);
9388 ImGui::BulletText("Flags: 0x%08X (%s%s%s%s%s%s%s%s%s..)", flags,
9392 ImGui::BulletText("Scroll: (%.2f/%.2f,%.2f/%.2f)", window->Scroll.x, GetWindowScrollMaxX(window), window->Scroll.y, GetWindowScrollMaxY(window));
9393 ImGui::BulletText("Active: %d/%d, WriteAccessed: %d, BeginOrderWithinContext: %d", window->Active, window->WasActive, window->WriteAccessed, (window->Active || window->WasActive) ? window->BeginOrderWithinContext : -1);
9394 ImGui::BulletText("Appearing: %d, Hidden: %d (Reg %d Resize %d), SkipItems: %d", window->Appearing, window->Hidden, window->HiddenFramesRegular, window->HiddenFramesForResize, window->SkipItems);
9395 ImGui::BulletText("NavLastIds: 0x%08X,0x%08X, NavLayerActiveMask: %X", window->NavLastIds[0], window->NavLastIds[1], window->DC.NavLayerActiveMask);
9396 ImGui::BulletText("NavLastChildNavWindow: %s", window->NavLastChildNavWindow ? window->NavLastChildNavWindow->Name : "NULL");
9398 ImGui::BulletText("NavRectRel[0]: (%.1f,%.1f)(%.1f,%.1f)", window->NavRectRel[0].Min.x, window->NavRectRel[0].Min.y, window->NavRectRel[0].Max.x, window->NavRectRel[0].Max.y);
9400 ImGui::BulletText("NavRectRel[0]: <None>");
9404 if (window->ColumnsStorage.Size > 0 && ImGui::TreeNode("Columns", "Columns sets (%d)", window->ColumnsStorage.Size))
9409 if (ImGui::TreeNode((void*)(uintptr_t)columns->ID, "Columns Id: 0x%08X, Count: %d, Flags: 0x%04X", columns->ID, columns->Count, columns->Flags))
9411 ImGui::BulletText("Width: %.1f (MinX: %.1f, MaxX: %.1f)", columns->MaxX - columns->MinX, columns->MinX, columns->MaxX);
9413 ImGui::BulletText("Column %02d: OffsetNorm %.3f (= %.1f px)", column_n, columns->Columns[column_n].OffsetNorm, OffsetNormToPixels(columns, columns->Columns[column_n].OffsetNorm));
9414 ImGui::TreePop();
9417 ImGui::TreePop();
9419 ImGui::BulletText("Storage: %d bytes", window->StateStorage.Data.Size * (int)sizeof(ImGuiStorage::Pair));
9420 ImGui::TreePop();
9429 ImFormatString(p, buf_end - p, "TabBar (%d tabs)%s", tab_bar->Tabs.Size, (tab_bar->PrevFrameVisible < ImGui::GetFrameCount() - 2) ? " *Inactive*" : "");
9430 if (ImGui::TreeNode(tab_bar, "%s", buf))
9435 ImGui::PushID(tab);
9436 if (ImGui::SmallButton("<")) { TabBarQueueChangeTabOrder(tab_bar, tab, -1); } ImGui::SameLine(0, 2);
9437 if (ImGui::SmallButton(">")) { TabBarQueueChangeTabOrder(tab_bar, tab, +1); } ImGui::SameLine();
9438 ImGui::Text("%02d%c Tab 0x%08X", tab_n, (tab->ID == tab_bar->SelectedTabId) ? '*' : ' ', tab->ID);
9439 ImGui::PopID();
9441 ImGui::TreePop();
9449 if (ImGui::TreeNode("DrawList", "Active DrawLists (%d)", g.DrawDataBuilder.Layers[0].Size))
9453 ImGui::TreePop();
9455 if (ImGui::TreeNode("Popups", "Popups (%d)", g.OpenPopupStack.Size))
9460 ImGui::BulletText("PopupID: %08x, Window: '%s'%s%s", g.OpenPopupStack[i].PopupId, window ? window->Name : "NULL", window && (window->Flags & ImGuiWindowFlags_ChildWindow) ? " ChildWindow" : "", window && (window->Flags & ImGuiWindowFlags_ChildMenu) ? " ChildMenu" : "");
9462 ImGui::TreePop();
9464 if (ImGui::TreeNode("TabBars", "Tab Bars (%d)", g.TabBars.Data.Size))
9468 ImGui::TreePop();
9470 if (ImGui::TreeNode("Internal state"))
9473 ImGui::Text("HoveredWindow: '%s'", g.HoveredWindow ? g.HoveredWindow->Name : "NULL");
9474 ImGui::Text("HoveredRootWindow: '%s'", g.HoveredRootWindow ? g.HoveredRootWindow->Name : "NULL");
9475 ImGui::Text("HoveredId: 0x%08X/0x%08X (%.2f sec), AllowOverlap: %d", g.HoveredId, g.HoveredIdPreviousFrame, g.HoveredIdTimer, g.HoveredIdAllowOverlap); // Data is "in-flight" so depending on when the Metrics window is called we may see current frame information or not
9476 ImGui::Text("ActiveId: 0x%08X/0x%08X (%.2f sec), AllowOverlap: %d, Source: %s", g.ActiveId, g.ActiveIdPreviousFrame, g.ActiveIdTimer, g.ActiveIdAllowOverlap, input_source_names[g.ActiveIdSource]);
9477 ImGui::Text("ActiveIdWindow: '%s'", g.ActiveIdWindow ? g.ActiveIdWindow->Name : "NULL");
9478 ImGui::Text("MovingWindow: '%s'", g.MovingWindow ? g.MovingWindow->Name : "NULL");
9479 ImGui::Text("NavWindow: '%s'", g.NavWindow ? g.NavWindow->Name : "NULL");
9480 ImGui::Text("NavId: 0x%08X, NavLayer: %d", g.NavId, g.NavLayer);
9481 ImGui::Text("NavInputSource: %s", input_source_names[g.NavInputSource]);
9482 ImGui::Text("NavActive: %d, NavVisible: %d", g.IO.NavActive, g.IO.NavVisible);
9483 ImGui::Text("NavActivateId: 0x%08X, NavInputId: 0x%08X", g.NavActivateId, g.NavInputId);
9484 ImGui::Text("NavDisableHighlight: %d, NavDisableMouseHover: %d", g.NavDisableHighlight, g.NavDisableMouseHover);
9485 ImGui::Text("NavWindowingTarget: '%s'", g.NavWindowingTarget ? g.NavWindowingTarget->Name : "NULL");
9486 ImGui::Text("DragDrop: %d, SourceId = 0x%08X, Payload \"%s\" (%d bytes)", g.DragDropActive, g.DragDropPayload.SourceId, g.DragDropPayload.DataType, g.DragDropPayload.DataSize);
9487 ImGui::TreePop();
9500 float font_size = ImGui::GetFontSize() * 2;
9506 ImGui::End();