_(This library is free as in freedom, but needs your support to sustain its development. In addition to maintenance and stability there are many desirable features yet to be added. If your company is using dear imgui, please consider reaching out for invoiced financial support. If you are an individual using dear imgui, please consider donating via Patreon or PayPal.)_
_(This library is free as in freedom, but needs your support to sustain its development. In addition to maintenance and stability there are many desirable features yet to be added. If your company is using dear imgui, please consider reaching out for invoiced financial support. If you are an individual using dear imgui, please consider donating via Patreon or PayPal.)_
Individuals/hobbyists: support continued maintenance and development via the monthly Patreon:
Individuals/hobbyists: support continued maintenance and development via the monthly Patreon:
Businesses: support continued maintenance and development via support contracts or sponsoring a few weeks/months of development:
Businesses: support continued maintenance and development via support contracts or sponsoring:
<br> _E-mail: omarcornut at gmail dot com_
<br> _E-mail: omarcornut at gmail dot com_
Dear ImGui is a bloat-free graphical user interface library for C++. It outputs optimized vertex buffers that you can render anytime in your 3D-pipeline enabled application. It is fast, portable, renderer agnostic and self-contained (no external dependencies).
Dear ImGui is a bloat-free graphical user interface library for C++. It outputs optimized vertex buffers that you can render anytime in your 3D-pipeline enabled application. It is fast, portable, renderer agnostic and self-contained (no external dependencies).
@ -177,33 +177,17 @@ User screenshots:
<br>[Gallery Part 7](https://github.com/ocornut/imgui/issues/1902) (June 2018 onward)
<br>[Gallery Part 7](https://github.com/ocornut/imgui/issues/1902) (June 2018 onward)
<br>Also see the [Mega screenshots](https://github.com/ocornut/imgui/issues/1273) for an idea of the available features.
<br>Also see the [Mega screenshots](https://github.com/ocornut/imgui/issues/1273) for an idea of the available features.
Dear ImGui can load TTF/OTF fonts. UTF-8 is supported for text display and input. Here using Arial Unicode font to display Japanese. Initialize custom font with:
<br>_(settings: Dark style (left), Light style (right) / Font: NotoSansCJKjp-Medium, 20px / Rounding: 5)_
References
References
----------
----------
@ -246,7 +230,7 @@ You may also peak at the [Multi-Viewport](https://github.com/ocornut/imgui/issue
See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes) and [Software using dear imgui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui) pages for an (incomplete) list of games/software which are publicly known to use dear imgui. Please add yours if you can!
See the [Quotes](https://github.com/ocornut/imgui/wiki/Quotes) and [Software using dear imgui](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui) pages for an (incomplete) list of games/software which are publicly known to use dear imgui. Please add yours if you can!
**Why the odd dual naming, "dear imgui" vs "ImGui"?**
**Why the odd dual naming, "Dear ImGui" vs "ImGui"?**
The library started its life and is best known as "ImGui" only due to the fact that I didn't give it a proper name when I released it. However, the term IMGUI (immediate-mode graphical user interface) was coined before and is being used in variety of other situations. It seemed confusing and unfair to hog the name. To reduce the ambiguity without affecting existing codebases, I have decided on an alternate, longer name "dear imgui" that people can use to refer to this specific library in ambiguous situations.
The library started its life and is best known as "ImGui" only due to the fact that I didn't give it a proper name when I released it. However, the term IMGUI (immediate-mode graphical user interface) was coined before and is being used in variety of other situations. It seemed confusing and unfair to hog the name. To reduce the ambiguity without affecting existing codebases, I have decided on an alternate, longer name "dear imgui" that people can use to refer to this specific library in ambiguous situations.
@ -257,22 +241,15 @@ The library started its life and is best known as "ImGui" only due to the fact t
<br>**How can I load a different font than the default?**
<br>**How can I load a different font than the default?**
<br>**How can I easily use icons in my application?**
<br>**How can I easily use icons in my application?**
<br>**How can I load multiple fonts?**
<br>**How can I load multiple fonts?**
<br>**How can I display and input non-latin characters such as Chinese, Japanese, Korean, Cyrillic?**
<br>**How can I display and input non-latin characters such as Chinese, Japanese, Korean, Cyrillic?** ([example](https://github.com/ocornut/imgui/wiki/Loading-Font-Example))
<br>**How can I use the drawing facilities without an Dear ImGui window? (using ImDrawList API)**
<br>**How can I use the drawing facilities without an Dear ImGui window? (using ImDrawList API)**
<br>**How can I use this without a mouse, without a keyboard or without a screen? (gamepad, input share, remote display)**
<br>**I integrated Dear ImGui in my engine and the text or lines are blurry..**
<br>**I integrated Dear ImGui in my engine and the text or lines are blurry..**
<br>**I integrated Dear ImGui in my engine and some elements are disappearing when I move windows around..**
<br>**I integrated Dear ImGui in my engine and some elements are disappearing when I move windows around..**
<br>**How can I help?**
<br>**How can I help?**
See the FAQ in imgui.cpp for answers.
See the FAQ in imgui.cpp for answers.
**How do you use Dear ImGui on a platform that may not have a mouse or keyboard?**
You can control Dear ImGui with a gamepad, see the explanation in imgui.cpp about how to use the navigation feature (short version: map your gamepad inputs into the `io.NavInputs[]` array and set `io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad`).
You can share your computer mouse seamlessly with your console/tablet/phone using [Synergy](http://synergy-project.org). This is the preferred solution for developer productivity. In particular, their [micro-synergy-client](https://github.com/symless/micro-synergy-client) repo there is _uSynergy.c_ sources for a small embeddable that you can use on any platform to connect to your host PC using Synergy 1.x. You may also use a third party solution such as [Remote ImGui](https://github.com/JordiRos/remoteimgui).
For touch inputs, you can increase the hit box of widgets (via the _style.TouchPadding_ setting) to accommodate a little for the lack of precision of touch inputs, but it is recommended you use a mouse or gamepad to allow optimizing for screen real-estate and precision.
**Can you create elaborate/serious tools with Dear ImGui?**
**Can you create elaborate/serious tools with Dear ImGui?**
Yes. People have written game editors, data browsers, debuggers, profilers and all sort of non-trivial tools with the library. In my experience the simplicity of the API is very empowering. Your UI runs close to your live data. Make the tools always-on and everybody in the team will be inclined to create new tools (as opposed to more "offline" UI toolkits where only a fraction of your team effectively creates tools). The list of sponsors below is also an indicator that serious game teams have been using the library.
Yes. People have written game editors, data browsers, debuggers, profilers and all sort of non-trivial tools with the library. In my experience the simplicity of the API is very empowering. Your UI runs close to your live data. Make the tools always-on and everybody in the team will be inclined to create new tools (as opposed to more "offline" UI toolkits where only a fraction of your team effectively creates tools). The list of sponsors below is also an indicator that serious game teams have been using the library.
@ -303,15 +280,15 @@ Support dear imgui
**How can I help financing further development of Dear ImGui?**
**How can I help financing further development of Dear ImGui?**
Your contributions are keeping this project alive. The library is free as in freedom, but continued maintenance and development are a full-time endeavor. In addition to maintenance and stability there are many desirable features yet to be added. If your company is using dear imgui, please consider reaching out for invoiced financial support. If you are an individual using dear imgui, please consider donating via Patreon or PayPal. Thank you!
Your contributions are keeping this project alive. The library is free as in freedom, but continued maintenance and development are a full-time endeavor. In addition to maintenance and stability there are many desirable features yet to be added. If your company is using dear imgui, please consider reaching out for financial support. If you are an individual using dear imgui, please consider donating via Patreon or PayPal. Thank you!
Individuals/hobbyists: support continued maintenance and development via the monthly Patreon:
Individuals/hobbyists: support continued maintenance and development via the monthly Patreon:
Businesses: support continued maintenance and development via support contracts or sponsoring a few weeks/months of development:
Businesses: support continued maintenance and development via support contracts or sponsoring:
<br> _E-mail: omarcornut at gmail dot com_
<br> _E-mail: omarcornut at gmail dot com_
Ongoing dear imgui development is financially supported by users and private sponsors (past and present):
Ongoing dear imgui development is financially supported by users and private sponsors (past and present):
@ -336,7 +313,7 @@ Credits
Developed by [Omar Cornut](http://www.miracleworld.net) and every direct or indirect contributors to the GitHub. The early version of this library was developed with the support of [Media Molecule](http://www.mediamolecule.com) and first used internally on the game [Tearaway](http://tearaway.mediamolecule.com).
Developed by [Omar Cornut](http://www.miracleworld.net) and every direct or indirect contributors to the GitHub. The early version of this library was developed with the support of [Media Molecule](http://www.mediamolecule.com) and first used internally on the game [Tearaway](http://tearaway.mediamolecule.com).
I first discovered imgui principles at [Q-Games](http://www.q-games.com) where Atman had dropped his own simple imgui implementation in the codebase, which I spent quite some time improving and thinking about. It turned out that Atman was exposed to the concept directly by working with Casey. When I moved to Media Molecule I rewrote a new library trying to overcome the flaws and limitations of the first one I've worked with. It became this library and since then I have spent an unreasonable amount of time iterating on it.
I first discovered the IMGUI paradigm at [Q-Games](http://www.q-games.com) where Atman had dropped his own simple implementation in the codebase, which I spent quite some time improving and thinking about. It turned out that Atman was exposed to the concept directly by working with Casey. When I moved to Media Molecule I rewrote a new library trying to overcome the flaws and limitations of the first one I've worked with. It became this library and since then I have spent an unreasonable amount of time iterating on it.
Embeds [ProggyClean.ttf](http://upperbounds.net) font by Tristan Grimmer (MIT license).
Embeds [ProggyClean.ttf](http://upperbounds.net) font by Tristan Grimmer (MIT license).
// Return the delta from the initial clicking position.
// This is locked and return 0.0f until the mouse moves past a distance threshold at least once.
// NB: This is only valid if IsMousePosValid(). Back-ends in theory should always keep mouse position valid when dragging even outside the client window.
// NB: This is only valid if IsMousePosValid(). Back-ends in theory should always keep mouse position valid when dragging even outside the client window.
viewport->LastPlatformPos=viewport->LastPlatformSize=ImVec2(FLT_MAX,FLT_MAX);// By clearing those we'll enforce a call to Platform_SetWindowPos/Platform_SetWindowSize before Platform_ShowWindow
viewport->LastPlatformPos=viewport->LastPlatformSize=ImVec2(FLT_MAX,FLT_MAX);// By clearing those we'll enforce a call to Platform_SetWindowPos/Size below, before Platform_ShowWindow (FIXME: Is that necessary?)
viewport->LastRendererSize=viewport->Size;
viewport->LastRendererSize=viewport->Size;// We don't need to call Renderer_SetWindowSize() as it is expected Renderer_CreateWindow() already did it.
// Show window. On startup ensure platform window don't get focus
if(is_new_platform_window)
if(is_new_window)
{
{
if(g.FrameCount<3)// Give a few frames for the application to stabilize (nested contents may lead to viewport being created a few frames late)
// On startup ensure new platform window don't steal focus (give it a few frames, as nested contents may lead to viewport being created a few frames late)
// Even without focus, we assume the window becomes front-most. This is used by our platform z-order heuristic when io.MouseHoveredViewport is not available.
// Even without focus, we assume the window becomes front-most.
// This is a default/basic function for performing the rendering/swap of multiple Platform Windows.
// Custom renderers may prefer to not call this function at all, and instead iterate the publicly exposed platform data and handle rendering/sync themselves.
// The Render/Swap functions stored in ImGuiPlatformIO are merely here to allow for this helper to exist, but you can do it yourself:
@ -8043,37 +8098,6 @@ static int ImGui::FindPlatformMonitorForRect(const ImRect& rect)
returnbest_monitor_n;
returnbest_monitor_n;
}
}
// This is a default/basic function for performing the rendering/swap of multiple platform windows.
// Custom renderers may prefer to not call this function at all, and instead iterate the publicly exposed platform data and handle rendering/sync themselves.
// The Render/Swap functions stored in ImGuiPlatformIO are merely here to allow for this helper to exist, but you can do it yourself:
// "current window" = the window we are appending into while inside a Begin()/End() block. "next window" = next window we will Begin() into.
// - "current window" = the window we are appending into while inside a Begin()/End() block. "next window" = next window we will Begin() into.
IMGUI_APIboolIsWindowAppearing();
IMGUI_APIboolIsWindowAppearing();
IMGUI_APIboolIsWindowCollapsed();
IMGUI_APIboolIsWindowCollapsed();
IMGUI_APIboolIsWindowFocused(ImGuiFocusedFlagsflags=0);// is current window focused? or its root/child, depending on flags. see flags for options.
IMGUI_APIboolIsWindowFocused(ImGuiFocusedFlagsflags=0);// is current window focused? or its root/child, depending on flags. see flags for options.
@ -296,8 +296,8 @@ namespace ImGui
IMGUI_APIfloatGetScrollMaxY();// get maximum scrolling amount ~~ ContentSize.Y - WindowSize.Y
IMGUI_APIfloatGetScrollMaxY();// get maximum scrolling amount ~~ ContentSize.Y - WindowSize.Y
IMGUI_APIvoidSetScrollX(floatscroll_x);// set scrolling amount [0..GetScrollMaxX()]
IMGUI_APIvoidSetScrollX(floatscroll_x);// set scrolling amount [0..GetScrollMaxX()]
IMGUI_APIvoidSetScrollY(floatscroll_y);// set scrolling amount [0..GetScrollMaxY()]
IMGUI_APIvoidSetScrollY(floatscroll_y);// set scrolling amount [0..GetScrollMaxY()]
IMGUI_APIvoidSetScrollHereY(floatcenter_y_ratio=0.5f);// adjust scrolling amount to make current cursor position visible. center_y_ratio=0.0: top, 0.5: center, 1.0: bottom. When using to make a "default/current item" visible, consider using SetItemDefaultFocus() instead.
IMGUI_APIvoidSetScrollHereY(floatcenter_y_ratio=0.5f);// adjust scrolling amount to make current cursor position visible. center_y_ratio=0.0: top, 0.5: center, 1.0: bottom. When using to make a "default/current item" visible, consider using SetItemDefaultFocus() instead.
IMGUI_APIvoidSetScrollFromPosY(floatpos_y,floatcenter_y_ratio=0.5f);// adjust scrolling amount to make given position valid. use GetCursorPos() or GetCursorStartPos()+offset to get valid positions.
IMGUI_APIvoidSetScrollFromPosY(floatlocal_y,floatcenter_y_ratio=0.5f);// adjust scrolling amount to make given position valid. use GetCursorPos() or GetCursorStartPos()+offset to get valid positions.
// Parameters stacks (shared)
// Parameters stacks (shared)
IMGUI_APIvoidPushFont(ImFont*font);// use NULL as a shortcut to push default font
IMGUI_APIvoidPushFont(ImFont*font);// use NULL as a shortcut to push default font
@ -320,7 +320,7 @@ namespace ImGui
IMGUI_APIvoidPushItemWidth(floatitem_width);// width of items for the common item+label case, pixels. 0.0f = default to ~2/3 of windows width, >0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -1.0f always align width to the right side)
IMGUI_APIvoidPushItemWidth(floatitem_width);// width of items for the common item+label case, pixels. 0.0f = default to ~2/3 of windows width, >0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -1.0f always align width to the right side)
IMGUI_APIvoidPopItemWidth();
IMGUI_APIvoidPopItemWidth();
IMGUI_APIfloatCalcItemWidth();// width of item given pushed settings and current cursor position
IMGUI_APIfloatCalcItemWidth();// width of item given pushed settings and current cursor position
IMGUI_APIvoidPushTextWrapPos(floatwrap_pos_x =0.0f);// word-wrapping for Text*() commands. < 0.0f: no wrapping; 0.0f: wrap to end of window (or column); > 0.0f: wrap at 'wrap_pos_x' position in window local space
IMGUI_APIvoidPushTextWrapPos(floatwrap_local_pos_x =0.0f);// word-wrapping for Text*() commands. < 0.0f: no wrapping; 0.0f: wrap to end of window (or column); > 0.0f: wrap at 'wrap_pos_x' position in window local space
IMGUI_APIvoidPopTextWrapPos();
IMGUI_APIvoidPopTextWrapPos();
IMGUI_APIvoidPushAllowKeyboardFocus(boolallow_keyboard_focus);// allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets
IMGUI_APIvoidPushAllowKeyboardFocus(boolallow_keyboard_focus);// allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets
IMGUI_APIvoidPopAllowKeyboardFocus();
IMGUI_APIvoidPopAllowKeyboardFocus();
@ -328,24 +328,26 @@ namespace ImGui
IMGUI_APIvoidPopButtonRepeat();
IMGUI_APIvoidPopButtonRepeat();
// Cursor / Layout
// Cursor / Layout
// - By "cursor" we mean the current output position.
// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
IMGUI_APIvoidSeparator();// separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical separator.
IMGUI_APIvoidSeparator();// separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical separator.
IMGUI_APIvoidSameLine(floatpos_x=0.0f,floatspacing_w=-1.0f);// call between widgets or groups to layout them horizontally
IMGUI_APIvoidSameLine(floatlocal_pos_x =0.0f,floatspacing_w=-1.0f);// call between widgets or groups to layout them horizontally. X position given in window coordinates.
IMGUI_APIvoidNewLine();// undo a SameLine()
IMGUI_APIvoidNewLine();// undo a SameLine() or force a new line when in an horizontal-layout context.
IMGUI_APIvoidSpacing();// add vertical spacing
IMGUI_APIvoidSpacing();// add vertical spacing.
IMGUI_APIvoidDummy(constImVec2&size);// add a dummy item of given size
IMGUI_APIvoidDummy(constImVec2&size);// add a dummy item of given size. unlike InvisibleButton(), Dummy() won't take the mouse click or be navigable into.
IMGUI_APIvoidIndent(floatindent_w=0.0f);// move content position toward the right, by style.IndentSpacing or indent_w if != 0
IMGUI_APIvoidIndent(floatindent_w=0.0f);// move content position toward the right, by style.IndentSpacing or indent_w if != 0
IMGUI_APIvoidUnindent(floatindent_w=0.0f);// move content position back to the left, by style.IndentSpacing or indent_w if != 0
IMGUI_APIvoidUnindent(floatindent_w=0.0f);// move content position back to the left, by style.IndentSpacing or indent_w if != 0
IMGUI_APIvoidBeginGroup();// lock horizontal starting position + capture group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.)
IMGUI_APIvoidBeginGroup();// lock horizontal starting position
IMGUI_APIvoidEndGroup();
IMGUI_APIvoidEndGroup();// unlock horizontal starting position + capture the whole group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.)
IMGUI_APIImVec2GetCursorPos();// cursor position is relative to window position
IMGUI_APIImVec2GetCursorPos();// cursor position in window coordinates (relative to window position)
IMGUI_APIfloatGetCursorPosX();// "
IMGUI_APIfloatGetCursorPosX();// (some functions are using window-relative coordinates, such as: GetCursorPos, GetCursorStartPos, GetContentRegionMax, GetWindowContentRegion* etc.
IMGUI_APIfloatGetCursorPosY();// "
IMGUI_APIfloatGetCursorPosY();// other functions such as GetCursorScreenPos or everything in ImDrawList::
IMGUI_APIImVec2GetCursorStartPos();// initial cursor position
IMGUI_APIImVec2GetCursorStartPos();// initial cursor position in window coordinates
IMGUI_APIImVec2GetCursorScreenPos();// cursor position in screen coordinates [0..io.DisplaySize] (or [io.ViewportPos..io.ViewportPos + io.ViewportSize] when using multiple viewport). useful to work with ImDrawList API.
IMGUI_APIImVec2GetCursorScreenPos();// cursor position in absolute screen coordinates (0..io.DisplaySize) or natural OS coordinates when using multiple viewport. Useful to work with ImDrawList API.
IMGUI_APIvoidSetCursorScreenPos(constImVec2&pos);// cursor position in screen coordinates [0..io.DisplaySize] (or [io.ViewportPos..io.ViewportPos + io.ViewportSize] when using multiple viewport)
IMGUI_APIvoidSetCursorScreenPos(constImVec2&pos);// cursor position in absolute screen coordinates (0..io.DisplaySize) or natural OS coordinates when using multiple viewport.
IMGUI_APIvoidAlignTextToFramePadding();// vertically align upcoming text baseline to FramePadding.y so that it will align properly to regularly framed items (call if you have text on a line before a framed item)
IMGUI_APIvoidAlignTextToFramePadding();// vertically align upcoming text baseline to FramePadding.y so that it will align properly to regularly framed items (call if you have text on a line before a framed item)
IMGUI_APIfloatGetTextLineHeight();// ~ FontSize
IMGUI_APIfloatGetTextLineHeight();// ~ FontSize
IMGUI_APIfloatGetTextLineHeightWithSpacing();// ~ FontSize + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of text)
IMGUI_APIfloatGetTextLineHeightWithSpacing();// ~ FontSize + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of text)
@ -353,16 +355,16 @@ namespace ImGui
IMGUI_APIfloatGetFrameHeightWithSpacing();// ~ FontSize + style.FramePadding.y * 2 + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of framed widgets)
IMGUI_APIfloatGetFrameHeightWithSpacing();// ~ FontSize + style.FramePadding.y * 2 + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of framed widgets)
// ID stack/scopes
// ID stack/scopes
// Read the FAQ for more details about how ID are handled in dear imgui. If you are creating widgets in a loop you most
// - Read the FAQ for more details about how ID are handled in dear imgui. If you are creating widgets in a loop you most
// likely want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them.
// likely want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them.
// You can also use the "##foobar" syntax within widget label to distinguish them from each others.
// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others.
// In this header file we use the "label"/"name" terminology to denote a string that will be displayed and used as an ID,
// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed and used as an ID,
// whereas "str_id" denote a string that is only used as an ID and not aimed to be displayed.
// whereas "str_id" denote a string that is only used as an ID and not normally displayed.
IMGUI_APIvoidPushID(constchar*str_id);// push identifier into the ID stack. IDs are hash of the entire stack!
IMGUI_APIvoidPushID(constchar*str_id);// push string identifier into the ID stack. IDs == hash of the entire stack!
IMGUI_APIvoidPushID(constvoid*ptr_id);// push pointer into the ID stack.
IMGUI_APIvoidPushID(intint_id);
IMGUI_APIvoidPushID(intint_id);// push integer into the ID stack.
IMGUI_APIvoidPopID();
IMGUI_APIvoidPopID();// pop from the ID stack.
IMGUI_APIImGuiIDGetID(constchar*str_id);// calculate unique ID (hash of whole ID stack + given parameter). e.g. if you want to query into ImGuiStorage yourself
IMGUI_APIImGuiIDGetID(constchar*str_id);// calculate unique ID (hash of whole ID stack + given parameter). e.g. if you want to query into ImGuiStorage yourself
IMGUI_APIboolSmallButton(constchar*label);// button with FramePadding=(0,0) to easily embed within text
IMGUI_APIboolSmallButton(constchar*label);// button with FramePadding=(0,0) to easily embed within text
IMGUI_APIboolInvisibleButton(constchar*str_id,constImVec2&size);// button behavior without the visuals, useful to build custom behaviors using the public api (along with IsItemActive, IsItemHovered, etc.)
IMGUI_APIboolInvisibleButton(constchar*str_id,constImVec2&size);// button behavior without the visuals, useful to build custom behaviors using the public api (along with IsItemActive, IsItemHovered, etc.)
@ -398,18 +400,19 @@ namespace ImGui
IMGUI_APIvoidBullet();// draw a small circle and keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses
IMGUI_APIvoidBullet();// draw a small circle and keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses
// Widgets: Combo Box
// Widgets: Combo Box
// The new BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items.
// - The new BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items.
// The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose.
// - The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose.
IMGUI_APIboolCombo(constchar*label,int*current_item,constchar*items_separated_by_zeros,intpopup_max_height_in_items=-1);// Separate items with \0 within a string, end item-list with \0\0. e.g. "One\0Two\0Three\0"
IMGUI_APIboolCombo(constchar*label,int*current_item,constchar*items_separated_by_zeros,intpopup_max_height_in_items=-1);// Separate items with \0 within a string, end item-list with \0\0. e.g. "One\0Two\0Three\0"
// Widgets: Drags (tip: ctrl+click on a drag box to input with keyboard. manually input values aren't clamped, can go off-bounds)
// Widgets: Drags
// For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every functions, note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x
// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped and can go off-bounds.
// Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every functions, note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x
// Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For gamepad/keyboard navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For gamepad/keyboard navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
IMGUI_APIboolDragFloat(constchar*label,float*v,floatv_speed=1.0f,floatv_min=0.0f,floatv_max=0.0f,constchar*format="%.3f",floatpower=1.0f);// If v_min >= v_max we have no bound
IMGUI_APIboolDragFloat(constchar*label,float*v,floatv_speed=1.0f,floatv_min=0.0f,floatv_max=0.0f,constchar*format="%.3f",floatpower=1.0f);// If v_min >= v_max we have no bound
// Widgets: Sliders (tip: ctrl+click on a slider to input with keyboard. manually input values aren't clamped, can go off-bounds)
// Widgets: Sliders
// Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped and can go off-bounds.
// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
IMGUI_APIboolSliderFloat(constchar*label,float*v,floatv_min,floatv_max,constchar*format="%.3f",floatpower=1.0f);// adjust format to decorate the value with a prefix or a suffix for in-slider labels or unit display. Use power!=1.0 for power curve sliders
IMGUI_APIboolSliderFloat(constchar*label,float*v,floatv_min,floatv_max,constchar*format="%.3f",floatpower=1.0f);// adjust format to decorate the value with a prefix or a suffix for in-slider labels or unit display. Use power!=1.0 for power curve sliders
// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little colored preview square that can be left-clicked to open a picker, and right-clicked to open an option menu.)
// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little colored preview square that can be left-clicked to open a picker, and right-clicked to open an option menu.)
// Note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can the pass the address of a first float element out of a contiguous structure, e.g. &myvector.x
// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can the pass the address of a first float element out of a contiguous structure, e.g. &myvector.x
IMGUI_APIvoidSetColorEditOptions(ImGuiColorEditFlagsflags);// initialize current options (generally on application startup) if you want to select a default format, picker type, etc. User will be able to change many settings, unless you pass the _NoOptions flag to your calls.
IMGUI_APIvoidSetColorEditOptions(ImGuiColorEditFlagsflags);// initialize current options (generally on application startup) if you want to select a default format, picker type, etc. User will be able to change many settings, unless you pass the _NoOptions flag to your calls.
// Widgets: Trees
// Widgets: Trees
// TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents.
// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents.
IMGUI_APIboolTreeNode(constchar*label);
IMGUI_APIboolTreeNode(constchar*label);
IMGUI_APIboolTreeNode(constchar*str_id,constchar*fmt,...)IM_FMTARGS(2);// helper variation to completely decorelate the id from the displayed string. Read the FAQ about why and how to use ID. to align arbitrary text at the same level as a TreeNode() you can use Bullet().
IMGUI_APIboolTreeNode(constchar*str_id,constchar*fmt,...)IM_FMTARGS(2);// helper variation to completely decorelate the id from the displayed string. Read the FAQ about why and how to use ID. to align arbitrary text at the same level as a TreeNode() you can use Bullet().
IMGUI_APIboolCollapsingHeader(constchar*label,bool*p_open,ImGuiTreeNodeFlagsflags=0);// when 'p_open' isn't NULL, display an additional small close button on upper right of the header
IMGUI_APIboolCollapsingHeader(constchar*label,bool*p_open,ImGuiTreeNodeFlagsflags=0);// when 'p_open' isn't NULL, display an additional small close button on upper right of the header
// Widgets: Selectables
// Widgets: Selectables
// - A selectable highlights when hovered, and can display another color when selected.
// - Neighbors selectable extend their highlight bounds in order to leave no gap between them.
IMGUI_APIboolSelectable(constchar*label,boolselected=false,ImGuiSelectableFlagsflags=0,constImVec2&size=ImVec2(0,0));// "bool selected" carry the selection state (read-only). Selectable() is clicked is returns true so you can modify your selection state. size.x==0.0: use remaining width, size.x>0.0: specify width. size.y==0.0: use label height, size.y>0.0: specify height
IMGUI_APIboolSelectable(constchar*label,boolselected=false,ImGuiSelectableFlagsflags=0,constImVec2&size=ImVec2(0,0));// "bool selected" carry the selection state (read-only). Selectable() is clicked is returns true so you can modify your selection state. size.x==0.0: use remaining width, size.x>0.0: specify width. size.y==0.0: use label height, size.y>0.0: specify height
IMGUI_APIboolSelectable(constchar*label,bool*p_selected,ImGuiSelectableFlagsflags=0,constImVec2&size=ImVec2(0,0));// "bool* p_selected" point to the selection state (read-write), as a convenient helper.
IMGUI_APIboolSelectable(constchar*label,bool*p_selected,ImGuiSelectableFlagsflags=0,constImVec2&size=ImVec2(0,0));// "bool* p_selected" point to the selection state (read-write), as a convenient helper.
// Widgets: List Boxes
// Widgets: List Boxes
// - FIXME: To be consistent with all the newer API, ListBoxHeader/ListBoxFooter should in reality be called BeginListBox/EndListBox. Will rename them.
IMGUI_APIboolListBoxHeader(constchar*label,constImVec2&size=ImVec2(0,0));// use if you want to reimplement ListBox() will custom data or interactions. if the function return true, you can output elements then call ListBoxFooter() afterwards.
IMGUI_APIboolListBoxHeader(constchar*label,constImVec2&size=ImVec2(0,0));// use if you want to reimplement ListBox() will custom data or interactions. if the function return true, you can output elements then call ListBoxFooter() afterwards.
// Widgets: Value() Helpers. Simple shortcut to calling Text() with a format string. Output single value in "name: value" format (tip: freely declare more in your code to handle your types. you can add functions to the ImGui namespace)
// Widgets: Value() Helpers.
// - Those are merely shortcut to calling Text() with a format string. Output single value in "name: value" format (tip: freely declare more in your code to handle your types. you can add functions to the ImGui namespace)
IMGUI_APIvoidCloseCurrentPopup();// close the popup we have begin-ed into. clicking on a MenuItem or Selectable automatically close the current popup.
IMGUI_APIvoidCloseCurrentPopup();// close the popup we have begin-ed into. clicking on a MenuItem or Selectable automatically close the current popup.
// Columns
// Columns
// You can also use SameLine(pos_x) to mimic simplified columns. The columns API is work-in-progress and rather lacking (columns are arguably the worst part of dear imgui at the moment!)
// - You can also use SameLine(pos_x) to mimic simplified columns.
// - The columns API is work-in-progress and rather lacking (columns are arguably the worst part of dear imgui at the moment!)
IMGUI_APIvoidNextColumn();// next column, defaults to current row or next row if the current row is finished
IMGUI_APIvoidNextColumn();// next column, defaults to current row or next row if the current row is finished
IMGUI_APIintGetColumnIndex();// get current column index
IMGUI_APIintGetColumnIndex();// get current column index
@ -576,7 +585,8 @@ namespace ImGui
IMGUI_APIImGuiIDGetWindowDockId();
IMGUI_APIImGuiIDGetWindowDockId();
IMGUI_APIboolIsWindowDocked();// is current window docked into another window?
IMGUI_APIboolIsWindowDocked();// is current window docked into another window?
// Logging/Capture: all text output from interface is captured to tty/file/clipboard. By default, tree nodes are automatically opened during logging.
// Logging/Capture
// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging.
IMGUI_APIvoidLogToTTY(intmax_depth=-1);// start logging to tty (stdout)
IMGUI_APIvoidLogToTTY(intmax_depth=-1);// start logging to tty (stdout)
IMGUI_APIvoidLogToFile(intmax_depth=-1,constchar*filename=NULL);// start logging to file
IMGUI_APIvoidLogToFile(intmax_depth=-1,constchar*filename=NULL);// start logging to file
IMGUI_APIvoidLogToClipboard(intmax_depth=-1);// start logging to OS clipboard
IMGUI_APIvoidLogToClipboard(intmax_depth=-1);// start logging to OS clipboard
@ -585,7 +595,7 @@ namespace ImGui
IMGUI_APIvoidLogText(constchar*fmt,...)IM_FMTARGS(1);// pass text data straight to log (without being displayed)
IMGUI_APIvoidLogText(constchar*fmt,...)IM_FMTARGS(1);// pass text data straight to log (without being displayed)
// Drag and Drop
// Drag and Drop
// [BETA API] Missing Demo code. API may evolve!
// [BETA API] API may evolve!
IMGUI_APIboolBeginDragDropSource(ImGuiDragDropFlagsflags=0);// call when the current item is active. If this return true, you can call SetDragDropPayload() + EndDragDropSource()
IMGUI_APIboolBeginDragDropSource(ImGuiDragDropFlagsflags=0);// call when the current item is active. If this return true, you can call SetDragDropPayload() + EndDragDropSource()
IMGUI_APIboolSetDragDropPayload(constchar*type,constvoid*data,size_tsize,ImGuiCondcond=0);// type is a user defined string of maximum 32 characters. Strings starting with '_' are reserved for dear imgui internal types. Data is copied and held by imgui.
IMGUI_APIboolSetDragDropPayload(constchar*type,constvoid*data,size_tsize,ImGuiCondcond=0);// type is a user defined string of maximum 32 characters. Strings starting with '_' are reserved for dear imgui internal types. Data is copied and held by imgui.
IMGUI_APIvoidEndDragDropSource();// only call EndDragDropSource() if BeginDragDropSource() returns true!
IMGUI_APIvoidEndDragDropSource();// only call EndDragDropSource() if BeginDragDropSource() returns true!
@ -599,13 +609,13 @@ namespace ImGui
IMGUI_APIvoidPopClipRect();
IMGUI_APIvoidPopClipRect();
// Focus, Activation
// Focus, Activation
// Prefer using "SetItemDefaultFocus()" over "if (IsWindowAppearing()) SetScrollHereY()" when applicable to signify "this is the default item"
// - Prefer using "SetItemDefaultFocus()" over "if (IsWindowAppearing()) SetScrollHereY()" when applicable to signify "this is the default item"
IMGUI_APIvoidSetItemDefaultFocus();// make last item the default focused item of a window.
IMGUI_APIvoidSetItemDefaultFocus();// make last item the default focused item of a window.
IMGUI_APIvoidSetKeyboardFocusHere(intoffset=0);// focus keyboard on the next widget. Use positive 'offset' to access sub components of a multiple component widget. Use -1 to access previous widget.
IMGUI_APIvoidSetKeyboardFocusHere(intoffset=0);// focus keyboard on the next widget. Use positive 'offset' to access sub components of a multiple component widget. Use -1 to access previous widget.
// Item/Widgets Utilities
// Item/Widgets Utilities
// Most of the functions are referring to the last/previous item we submitted.
// - Most of the functions are referring to the last/previous item we submitted.
// See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions.
// - See Demo Window under "Widgets->Querying Status" for an interactive visualization of most of those functions.
IMGUI_APIboolIsItemHovered(ImGuiHoveredFlagsflags=0);// is the last item hovered? (and usable, aka not blocked by a popup, etc.). See ImGuiHoveredFlags for more options.
IMGUI_APIboolIsItemHovered(ImGuiHoveredFlagsflags=0);// is the last item hovered? (and usable, aka not blocked by a popup, etc.). See ImGuiHoveredFlags for more options.
IMGUI_APIboolIsItemActive();// is the last item active? (e.g. button being held, text field being edited. This will continuously return true while holding mouse button on an item. Items that don't interact will always return false)
IMGUI_APIboolIsItemActive();// is the last item active? (e.g. button being held, text field being edited. This will continuously return true while holding mouse button on an item. Items that don't interact will always return false)
IMGUI_APIboolIsItemFocused();// is the last item focused for keyboard/gamepad navigation?
IMGUI_APIboolIsItemFocused();// is the last item focused for keyboard/gamepad navigation?
@ -617,9 +627,9 @@ namespace ImGui
IMGUI_APIboolIsAnyItemHovered();
IMGUI_APIboolIsAnyItemHovered();
IMGUI_APIboolIsAnyItemActive();
IMGUI_APIboolIsAnyItemActive();
IMGUI_APIboolIsAnyItemFocused();
IMGUI_APIboolIsAnyItemFocused();
IMGUI_APIImVec2GetItemRectMin();// get bounding rectangle of last item, in screen space
IMGUI_APIImVec2GetItemRectMin();// get upper-left bounding rectangle of the last item (screen space)
IMGUI_APIImVec2GetItemRectMax();// "
IMGUI_APIImVec2GetItemRectMax();// get lower-right bounding rectangle of the last item (screen space)
IMGUI_APIImVec2GetItemRectSize();// get size of last item, in screen space
IMGUI_APIImVec2GetItemRectSize();// get size of last item
IMGUI_APIvoidSetItemAllowOverlap();// allow last item to be overlapped by a subsequent item. sometimes useful with invisible buttons, selectables, etc. to catch unused area.
IMGUI_APIvoidSetItemAllowOverlap();// allow last item to be overlapped by a subsequent item. sometimes useful with invisible buttons, selectables, etc. to catch unused area.
IMGUI_APIImVec2GetMousePos();// shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls
IMGUI_APIImVec2GetMousePos();// shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls
IMGUI_APIImVec2GetMousePosOnOpeningCurrentPopup();// retrieve backup of mouse position at the time of opening popup we have BeginPopup() into
IMGUI_APIImVec2GetMousePosOnOpeningCurrentPopup();// retrieve backup of mouse position at the time of opening popup we have BeginPopup() into
IMGUI_APIImVec2GetMouseDragDelta(intbutton=0,floatlock_threshold=-1.0f);// dragging amount since clicking. if lock_threshold < -1.0f uses io.MouseDraggingThreshold
IMGUI_APIImVec2GetMouseDragDelta(intbutton=0,floatlock_threshold=-1.0f);// return the delta from the initial clicking position. This is locked and return 0.0f until the mouse moves past a distance threshold at least once. If lock_threshold < -1.0f uses io.MouseDraggingThreshold
IMGUI_APIvoidResetMouseDragDelta(intbutton=0);//
IMGUI_APIvoidResetMouseDragDelta(intbutton=0);//
IMGUI_APIImGuiMouseCursorGetMouseCursor();// get desired cursor type, reset in ImGui::NewFrame(), this is updated during the frame. valid before Render(). If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you
IMGUI_APIImGuiMouseCursorGetMouseCursor();// get desired cursor type, reset in ImGui::NewFrame(), this is updated during the frame. valid before Render(). If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you
IMGUI_APIvoidSetMouseCursor(ImGuiMouseCursortype);// set desired cursor type
IMGUI_APIvoidSetMouseCursor(ImGuiMouseCursortype);// set desired cursor type
@ -672,16 +682,16 @@ namespace ImGui
IMGUI_APIvoidSetClipboardText(constchar*text);
IMGUI_APIvoidSetClipboardText(constchar*text);
// Settings/.Ini Utilities
// Settings/.Ini Utilities
// The disk functions are automatically called if io.IniFilename != NULL (default is "imgui.ini").
// - The disk functions are automatically called if io.IniFilename != NULL (default is "imgui.ini").
// Set io.IniFilename to NULL to load/save manually. Read io.WantSaveIniSettings description about handling .ini saving manually.
// - Set io.IniFilename to NULL to load/save manually. Read io.WantSaveIniSettings description about handling .ini saving manually.
IMGUI_APIvoidLoadIniSettingsFromDisk(constchar*ini_filename);// call after CreateContext() and before the first call to NewFrame(). NewFrame() automatically calls LoadIniSettingsFromDisk(io.IniFilename).
IMGUI_APIvoidLoadIniSettingsFromDisk(constchar*ini_filename);// call after CreateContext() and before the first call to NewFrame(). NewFrame() automatically calls LoadIniSettingsFromDisk(io.IniFilename).
IMGUI_APIvoidLoadIniSettingsFromMemory(constchar*ini_data,size_tini_size=0);// call after CreateContext() and before the first call to NewFrame() to provide .ini data from your own data source.
IMGUI_APIvoidLoadIniSettingsFromMemory(constchar*ini_data,size_tini_size=0);// call after CreateContext() and before the first call to NewFrame() to provide .ini data from your own data source.
IMGUI_APIconstchar*SaveIniSettingsToMemory(size_t*out_ini_size=NULL);// return a zero-terminated string with the .ini data which you can save by your own mean. call when io.WantSaveIniSettings is set, then save data by your own mean and clear io.WantSaveIniSettings.
IMGUI_APIconstchar*SaveIniSettingsToMemory(size_t*out_ini_size=NULL);// return a zero-terminated string with the .ini data which you can save by your own mean. call when io.WantSaveIniSettings is set, then save data by your own mean and clear io.WantSaveIniSettings.
// Memory Utilities
// Memory Utilities
// All those functions are not reliant on the current context.
// - All those functions are not reliant on the current context.
// If you reload the contents of imgui.cpp at runtime, you may need to call SetCurrentContext() + SetAllocatorFunctions() again.
// - If you reload the contents of imgui.cpp at runtime, you may need to call SetCurrentContext() + SetAllocatorFunctions() again.
ImGuiConfigFlagsConfigFlags;// = 0 // See ImGuiConfigFlags_ enum. Set by user/application. Gamepad/keyboard navigation options, etc.
ImGuiConfigFlagsConfigFlags;// = 0 // See ImGuiConfigFlags_ enum. Set by user/application. Gamepad/keyboard navigation options, etc.
ImGuiBackendFlagsBackendFlags;// = 0 // See ImGuiBackendFlags_ enum. Set by back-end (imgui_impl_xxx files or custom back-end) to communicate features supported by the back-end.
ImGuiBackendFlagsBackendFlags;// = 0 // See ImGuiBackendFlags_ enum. Set by back-end (imgui_impl_xxx files or custom back-end) to communicate features supported by the back-end.
ImVec2DisplaySize;// <unset> // Main display size, in pixels. Used e.g. to clamp windows positions. This is the default viewport. Use BeginViewport() for other viewports.
ImVec2DisplaySize;// <unset> // Main display size, in pixels. Used e.g. to clamp windows positions. This is for the default viewport. Use BeginViewport() for other viewports.
floatDeltaTime;// = 1.0f/60.0f // Time elapsed since last frame, in seconds.
floatDeltaTime;// = 1.0f/60.0f // Time elapsed since last frame, in seconds.
floatIniSavingRate;// = 5.0f // Minimum time between saving positions/sizes to .ini file, in seconds.
floatIniSavingRate;// = 5.0f // Minimum time between saving positions/sizes to .ini file, in seconds.
constchar*IniFilename;// = "imgui.ini" // Path to .ini file. Set NULL to disable automatic .ini loading/saving, if e.g. you want to manually load/save from memory.
constchar*IniFilename;// = "imgui.ini" // Path to .ini file. Set NULL to disable automatic .ini loading/saving, if e.g. you want to manually load/save from memory.
constchar*LogFilename;// = "imgui_log.txt"// Path to .log file (default parameter to ImGui::LogToFile when no file is specified).
constchar*LogFilename;// = "imgui_log.txt"// Path to .log file (default parameter to ImGui::LogToFile when no file is specified).
floatMouseDoubleClickTime;// = 0.30f // Time for a double-click, in seconds.
floatMouseDoubleClickTime;// = 0.30f // Time for a double-click, in seconds.
floatMouseDoubleClickMaxDist;// = 6.0f // Distance threshold to stay in to validate a double-click, in pixels.
floatMouseDoubleClickMaxDist;// = 6.0f // Distance threshold to stay in to validate a double-click, in pixels.
floatMouseDragThreshold;// = 6.0f // Distance threshold before considering we are dragging.
floatMouseDragThreshold;// = 6.0f // Distance threshold before considering we are dragging.
intKeyMap[ImGuiKey_COUNT];// <unset> // Map of indices into the KeysDown[512] entries array which represent your "native" keyboard state.
intKeyMap[ImGuiKey_COUNT];// <unset> // Map of indices into the KeysDown[512] entries array which represent your "native" keyboard state.
floatKeyRepeatDelay;// = 0.250f // When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).
floatKeyRepeatDelay;// = 0.250f // When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).
floatKeyRepeatRate;// = 0.050f // When holding a key/button, rate at which it repeats, in seconds.
floatKeyRepeatRate;// = 0.050f // When holding a key/button, rate at which it repeats, in seconds.
void*UserData;// = NULL // Store your own data for retrieval by callbacks.
void*UserData;// = NULL // Store your own data for retrieval by callbacks.
ImFontAtlas*Fonts;// <auto> // Load and assemble one or more fonts into a single tightly packed texture. Output to Fonts array.
ImFontAtlas*Fonts;// <auto> // Load, rasterize and pack one or more fonts into a single texture.
floatFontGlobalScale;// = 1.0f // Global scale all fonts
floatFontGlobalScale;// = 1.0f // Global scale all fonts
boolFontAllowUserScaling;// = false // Allow user scaling text of individual window with CTRL+Wheel.
boolFontAllowUserScaling;// = false // Allow user scaling text of individual window with CTRL+Wheel.
ImFont*FontDefault;// = NULL // Font to use on NewFrame(). Use NULL to uses Fonts->Fonts[0].
ImFont*FontDefault;// = NULL // Font to use on NewFrame(). Use NULL to uses Fonts->Fonts[0].
ImVec2DisplayFramebufferScale;// = (1.0f,1.0f)// For retina display or other situations where window coordinates are different from framebuffer coordinates. User storage only, presently not used by ImGui.
ImVec2DisplayFramebufferScale;// = (1.0f,1.0f) // For hi-dpi/retina display or other situations where window coordinates are different from framebuffer coordinates. User storage only, presently not used by ImGui.
// Miscellaneous configuration options
// Miscellaneous configuration options
boolMouseDrawCursor;// = false // Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by back-end implementations.
boolMouseDrawCursor;// = false // Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by back-end implementations.
boolConfigDockingNoSplit;// = false // Simplified docking mode: disable window splitting, so docking is limited to merging multiple windows together into tab-bars.
boolConfigDockingNoSplit;// = false // Simplified docking mode: disable window splitting, so docking is limited to merging multiple windows together into tab-bars.
boolConfigDockingWithShift;// = false // Enable docking with holding Shift key (reduce visual noise, allows dropping in wider space)
boolConfigDockingWithShift;// = false // Enable docking with holding Shift key (reduce visual noise, allows dropping in wider space)
boolConfigDockingTabBarOnSingleWindows;//= false // [BETA] Make every single floating window display within a docking node.
boolConfigDockingTabBarOnSingleWindows;//= false // [BETA] Make every single floating window display within a docking node.
boolConfigDockingTransparentPayload;// = false // [BETA] Make window or viewport transparent when docking and only display docking boxes on the target viewport. Useful if rendering of multiple viewport can be synced. Best used with ImGuiConfigFlags_ViewportsNoMerge.
boolConfigDockingTransparentPayload;// = false // [BETA] Make window or viewport transparent when docking and only display docking boxes on the target viewport. Useful if rendering of multiple viewport can be synced. Best used with ImGuiConfigFlags_ViewportsNoMerge.
boolConfigMacOSXBehaviors;// = defined(__APPLE__) // OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl (was called io.OptMacOSXBehaviors prior to 1.63)
boolConfigMacOSXBehaviors;// = defined(__APPLE__) // OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl (was called io.OptMacOSXBehaviors prior to 1.63)
boolConfigInputTextCursorBlink;// = true // Set to false to disable blinking cursor, for users who consider it distracting. (was called: io.OptCursorBlink prior to 1.63)
boolConfigInputTextCursorBlink;// = true // Set to false to disable blinking cursor, for users who consider it distracting. (was called: io.OptCursorBlink prior to 1.63)
boolConfigWindowsResizeFromEdges;// = true // Enable resizing of windows from their edges and from the lower-left corner. This requires (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors) because it needs mouse cursor feedback. (This used to be the a per-window ImGuiWindowFlags_ResizeFromAnySide flag)
boolConfigWindowsResizeFromEdges;// = true // Enable resizing of windows from their edges and from the lower-left corner. This requires (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors) because it needs mouse cursor feedback. (This used to be the a per-window ImGuiWindowFlags_ResizeFromAnySide flag)
boolConfigWindowsMoveFromTitleBarOnly;// = false // [BETA] Set to true to only allow moving windows when clicked+dragged from the title bar. Windows without a title bar are not affected.
boolConfigWindowsMoveFromTitleBarOnly;// = false // [BETA] Set to true to only allow moving windows when clicked+dragged from the title bar. Windows without a title bar are not affected.
// Optional: Platform/Renderer back-end name (informational only! will be displayed in About Window)
// Optional: Platform/Renderer back-end name (informational only! will be displayed in About Window) + User data for back-end/wrappers to store their own stuff.
constchar*BackendPlatformName;
constchar*BackendPlatformName;// = NULL
constchar*BackendRendererName;
constchar*BackendRendererName;// = NULL
void*BackendPlatformUserData;// = NULL
void*BackendRendererUserData;// = NULL
void*BackendLanguageUserData;// = NULL
// Optional: Access OS clipboard
// Optional: Access OS clipboard
// (default to use native Win32 clipboard on Windows, otherwise uses a private clipboard. Override to access OS clipboard on other architectures)
// (default to use native Win32 clipboard on Windows, otherwise uses a private clipboard. Override to access OS clipboard on other architectures)
@ -1340,46 +1353,46 @@ struct ImGuiIO
floatNavInputs[ImGuiNavInput_COUNT];// Gamepad inputs (keyboard keys will be auto-mapped and be written here by ImGui::NewFrame, all values will be cleared back to zero in ImGui::EndFrame)
floatNavInputs[ImGuiNavInput_COUNT];// Gamepad inputs (keyboard keys will be auto-mapped and be written here by ImGui::NewFrame, all values will be cleared back to zero in ImGui::EndFrame)
// Functions
// Functions
IMGUI_APIvoidAddInputCharacter(ImWcharc);// Add new character into InputCharacters[]
IMGUI_APIvoidAddInputCharacter(ImWcharc);// Add new character into InputCharacters[]
IMGUI_APIvoidAddInputCharactersUTF8(constchar*utf8_chars);// Add new characters into InputCharacters[] from an UTF-8 string
IMGUI_APIvoidAddInputCharactersUTF8(constchar*utf8_chars);// Add new characters into InputCharacters[] from an UTF-8 string
inlinevoidClearInputCharacters(){InputCharacters[0]=0;}// Clear the text input buffer manually
inlinevoidClearInputCharacters(){InputCharacters[0]=0;}// Clear the text input buffer manually
boolWantCaptureMouse;// When io.WantCaptureMouse is true, imgui will use the mouse inputs, do not dispatch them to your main game/application (in both cases, always pass on mouse inputs to imgui). (e.g. unclicked mouse is hovering over an imgui window, widget is active, mouse was clicked over an imgui window, etc.).
boolWantCaptureMouse;// When io.WantCaptureMouse is true, imgui will use the mouse inputs, do not dispatch them to your main game/application (in both cases, always pass on mouse inputs to imgui). (e.g. unclicked mouse is hovering over an imgui window, widget is active, mouse was clicked over an imgui window, etc.).
boolWantCaptureKeyboard;// When io.WantCaptureKeyboard is true, imgui will use the keyboard inputs, do not dispatch them to your main game/application (in both cases, always pass keyboard inputs to imgui). (e.g. InputText active, or an imgui window is focused and navigation is enabled, etc.).
boolWantCaptureKeyboard;// When io.WantCaptureKeyboard is true, imgui will use the keyboard inputs, do not dispatch them to your main game/application (in both cases, always pass keyboard inputs to imgui). (e.g. InputText active, or an imgui window is focused and navigation is enabled, etc.).
boolWantTextInput;// Mobile/console: when io.WantTextInput is true, you may display an on-screen keyboard. This is set by ImGui when it wants textual keyboard input to happen (e.g. when a InputText widget is active).
boolWantTextInput;// Mobile/console: when io.WantTextInput is true, you may display an on-screen keyboard. This is set by ImGui when it wants textual keyboard input to happen (e.g. when a InputText widget is active).
boolWantSetMousePos;// MousePos has been altered, back-end should reposition mouse on next frame. Set only when ImGuiConfigFlags_NavEnableSetMousePos flag is enabled.
boolWantSetMousePos;// MousePos has been altered, back-end should reposition mouse on next frame. Set only when ImGuiConfigFlags_NavEnableSetMousePos flag is enabled.
boolWantSaveIniSettings;// When manual .ini load/save is active (io.IniFilename == NULL), this will be set to notify your application that you can call SaveIniSettingsToMemory() and save yourself. IMPORTANT: You need to clear io.WantSaveIniSettings yourself.
boolWantSaveIniSettings;// When manual .ini load/save is active (io.IniFilename == NULL), this will be set to notify your application that you can call SaveIniSettingsToMemory() and save yourself. IMPORTANT: You need to clear io.WantSaveIniSettings yourself.
boolNavActive;// Directional navigation is currently allowed (will handle ImGuiKey_NavXXX events) = a window is focused and it doesn't use the ImGuiWindowFlags_NoNavInputs flag.
boolNavActive;// Directional navigation is currently allowed (will handle ImGuiKey_NavXXX events) = a window is focused and it doesn't use the ImGuiWindowFlags_NoNavInputs flag.
boolNavVisible;// Directional navigation is visible and allowed (will handle ImGuiKey_NavXXX events).
boolNavVisible;// Directional navigation is visible and allowed (will handle ImGuiKey_NavXXX events).
floatFramerate;// Application framerate estimation, in frame per second. Solely for convenience. Rolling average estimation based on IO.DeltaTime over 120 frames
floatFramerate;// Application framerate estimation, in frame per second. Solely for convenience. Rolling average estimation based on IO.DeltaTime over 120 frames
intMetricsRenderVertices;// Vertices output during last call to Render()
intMetricsRenderVertices;// Vertices output during last call to Render()
intMetricsRenderIndices;// Indices output during last call to Render() = number of triangles * 3
intMetricsRenderIndices;// Indices output during last call to Render() = number of triangles * 3
intMetricsRenderWindows;// Number of visible windows
intMetricsRenderWindows;// Number of visible windows
intMetricsActiveWindows;// Number of active windows
intMetricsActiveWindows;// Number of active windows
intMetricsActiveAllocations;// Number of active allocations, updated by MemAlloc/MemFree based on current context. May be off if you have multiple imgui contexts.
intMetricsActiveAllocations;// Number of active allocations, updated by MemAlloc/MemFree based on current context. May be off if you have multiple imgui contexts.
ImVec2MouseDelta;// Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta.
ImVec2MouseDelta;// Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta.
ImVec2MousePosPrev;// Previous mouse position (note that MouseDelta is not necessary == MousePos-MousePosPrev, in case either position is invalid)
ImVec2MousePosPrev;// Previous mouse position (note that MouseDelta is not necessary == MousePos-MousePosPrev, in case either position is invalid)
ImVec2MouseClickedPos[5];// Position at time of clicking
ImVec2MouseClickedPos[5];// Position at time of clicking
doubleMouseClickedTime[5];// Time of last click (used to figure out double-click)
doubleMouseClickedTime[5];// Time of last click (used to figure out double-click)
boolMouseClicked[5];// Mouse button went from !Down to Down
boolMouseClicked[5];// Mouse button went from !Down to Down
boolMouseDoubleClicked[5];// Has mouse button been double-clicked?
boolMouseDoubleClicked[5];// Has mouse button been double-clicked?
boolMouseReleased[5];// Mouse button went from Down to !Down
boolMouseReleased[5];// Mouse button went from Down to !Down
boolMouseDownOwned[5];// Track if button was clicked inside a window. We don't request mouse capture from the application if click started outside ImGui bounds.
boolMouseDownOwned[5];// Track if button was clicked inside a window. We don't request mouse capture from the application if click started outside ImGui bounds.
floatMouseDownDuration[5];// Duration the mouse button has been down (0.0f == just clicked)
floatMouseDownDuration[5];// Duration the mouse button has been down (0.0f == just clicked)
floatMouseDownDurationPrev[5];// Previous time the mouse button has been down
floatMouseDownDurationPrev[5];// Previous time the mouse button has been down
ImVec2MouseDragMaxDistanceAbs[5];// Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point
ImVec2MouseDragMaxDistanceAbs[5];// Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point
floatMouseDragMaxDistanceSqr[5];// Squared maximum distance of how much mouse has traveled from the clicking point
floatMouseDragMaxDistanceSqr[5];// Squared maximum distance of how much mouse has traveled from the clicking point
floatKeysDownDuration[512];// Duration the keyboard key has been down (0.0f == just pressed)
floatKeysDownDuration[512];// Duration the keyboard key has been down (0.0f == just pressed)
floatKeysDownDurationPrev[512];// Previous duration the key has been down
floatKeysDownDurationPrev[512];// Previous duration the key has been down
float(*Platform_GetWindowDpiScale)(ImGuiViewport*vp);// (Optional) [BETA] (FIXME-DPI) DPI handling: Return DPI scale for this viewport. 1.0f = 96 DPI.
float(*Platform_GetWindowDpiScale)(ImGuiViewport*vp);// (Optional) [BETA] (FIXME-DPI) DPI handling: Return DPI scale for this viewport. 1.0f = 96 DPI.
void(*Platform_OnChangedViewport)(ImGuiViewport*vp);// (Optional) [BETA] (FIXME-DPI) DPI handling: Called during Begin() every time the viewport we are outputting into changes, so back-end has a chance to swap fonts to adjust style.
void(*Platform_OnChangedViewport)(ImGuiViewport*vp);// (Optional) [BETA] (FIXME-DPI) DPI handling: Called during Begin() every time the viewport we are outputting into changes, so back-end has a chance to swap fonts to adjust style.
@ -2264,8 +2278,8 @@ enum ImGuiViewportFlags_
// The viewports created and managed by imgui. The role of the platform back-end is to create the platform/OS windows corresponding to each viewport.
// The viewports created and managed by imgui. The role of the platform back-end is to create the platform/OS windows corresponding to each viewport.
structImGuiViewport
structImGuiViewport
{
{
ImGuiIDID;
ImGuiIDID;// Unique identifier for the viewport
ImGuiViewportFlagsFlags;
ImGuiViewportFlagsFlags;// See ImGuiViewportFlags_
ImVec2Pos;// Position of viewport both in imgui space and in OS desktop/native space
ImVec2Pos;// Position of viewport both in imgui space and in OS desktop/native space
ImGui::TextWrapped("(Using ImGui::BeginGroup()/EndGroup() to layout items. BeginGroup() basically locks the horizontal position. EndGroup() bundles the whole group so that you can use functions such as IsItemHovered() on it.)");
ShowHelpMarker("Using ImGui::BeginGroup()/EndGroup() to layout items. BeginGroup() basically locks the horizontal position. EndGroup() bundles the whole group so that you can use functions such as IsItemHovered() on it.");
ImGui::TextWrapped("(This is testing the vertical alignment that occurs on text to keep it at the same baseline as widgets. Lines only composed of text or \"small\" widgets fit in less vertical spaces than lines with normal widgets)");
ShowHelpMarker("This is testing the vertical alignment that gets applied on text to keep it aligned with widgets. Lines only composed of text or \"small\" widgets fit in less vertical spaces than lines with normal widgets.");
ImGui::Bullet();ImGui::TextWrapped("Horizontal scrolling for a window has to be enabled explicitly via the ImGuiWindowFlags_HorizontalScrollbar flag.");
ShowHelpMarker("Horizontal scrolling for a window has to be enabled explicitly via the ImGuiWindowFlags_HorizontalScrollbar flag.\n\nYou may want to explicitly specify content width by calling SetNextWindowContentWidth() before Begin().");
ImGui::Bullet();ImGui::TextWrapped("You may want to explicitly specify content width by calling SetNextWindowContentWidth() before Begin().");