@ -157,6 +157,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- tooltip: allow tooltips with timers? or general timer policy? (instaneous vs timed)
- tooltip: allow tooltips with timers? or general timer policy? (instaneous vs timed)
- menus: calling BeginMenu() twice with a same name doesn't append as Begin() does for regular windows (#1207)
- menus: calling BeginMenu() twice with a same name doesn't append as Begin() does for regular windows (#1207)
- menus: menu bars inside modals windows are acting weird.
- statusbar: add a per-window status bar helper similar to what menubar does.
- statusbar: add a per-window status bar helper similar to what menubar does.
- shortcuts: local-style shortcut api, e.g. parse "&Save"
- shortcuts: local-style shortcut api, e.g. parse "&Save"
- shortcuts,menus: global-style shortcut api e.g. "Save (CTRL+S)" -> explicit flag for recursing into closed menu
- shortcuts,menus: global-style shortcut api e.g. "Save (CTRL+S)" -> explicit flag for recursing into closed menu
@ -229,17 +230,24 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- font: fix AddRemapChar() to work before font has been built.
- font: fix AddRemapChar() to work before font has been built.
- font: (api breaking) removed "TTF" from symbol names. also because it now supports OTF.
- font: (api breaking) removed "TTF" from symbol names. also because it now supports OTF.
!- nav/keyboard: tooltip & combo boxes are messing up / not honoring keyboard tabbing.
- nav: integrate navigation branch into master. (#787)
- nav: integrate navigation branch into master. (#787)
- nav: allow input system to be be more tolerant of io.DeltaTime=0.0f
- nav: Left within a tree node block as a fallback.
- nav: Esc on a flattened child
- nav: menus: allow pressing Menu to leave a sub-menu.
- nav: integrate/design keyboard controls.
- nav: integrate/design keyboard controls.
- nav: once tab should go through most/all widgets (in submission order?)
- nav: simulate right-click or context activation? (SHIFT+F10)
- nav: currently cannot access menubar of a child window with Alt/menu key.
- nav: tabs should go through most/all widgets (in submission order?).
- nav: when CTRL-Tab/windowing is active, the HoveredWindow detection doesn't take account of the window display re-ordering.
- nav: cannot access menubar of a flattened child window with Alt/menu key (not a very common use case..).
- nav: esc/enter default behavior for popups, e.g. be able to mark an "ok" or "cancel" button that would get triggered by those keys.
- nav: esc/enter default behavior for popups, e.g. be able to mark an "ok" or "cancel" button that would get triggered by those keys.
- nav: when activating a button that changes label (without a static ID) or disappear, can we somehow automatically recover into a nearest highlight item?
- focus: preserve ActiveId/focus stack state, e.g. when opening a menu and close it, previously selected InputText() focus gets restored (#622)
- focus: preserve ActiveId/focus stack state, e.g. when opening a menu and close it, previously selected InputText() focus gets restored (#622)
- focus: SetKeyboardFocusHere() on with >= 0 offset could be done on same frame (else latch and modulate on beginning of next frame)
- focus: SetKeyboardFocusHere() on with >= 0 offset could be done on same frame (else latch and modulate on beginning of next frame)
- focus: unable to use SetKeyboardFocusHere() on clipped widgets. (#787)
- focus: unable to use SetKeyboardFocusHere() on clipped widgets. (#787)
- inputs: we need an explicit flag about whether the imgui window is focused, to be able to distinguish focused key releases vs alt-tabbing all release behaviors.
- inputs: rework IO system to be able to pass actual ordered/timestamped events. use an event queue? (~#335, #71)
- inputs: rework IO system to be able to pass actual ordered/timestamped events. use an event queue? (~#335, #71)
- inputs: allow to pass explicit double-clicks if that's the only thing the user's backend can get them. (e.g. for windows by the CS_DBLCLKS style).
- inputs: support track pad style scrolling & slider edit.
- inputs: support track pad style scrolling & slider edit.
- misc: idle refresh: expose cursor blink animation timer for backend to be able to lower framerate.
- misc: idle refresh: expose cursor blink animation timer for backend to be able to lower framerate.
// In this binding, ImTextureID is used to store a 'ALLEGRO_BITMAP*' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
// TODO:
// Implemented features:
// - Clipboard is not supported.
// [X] User texture binding. Use 'ALLEGRO_BITMAP*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// Missing features:
// [ ] Clipboard support via al_set_clipboard_text/al_clipboard_has_text.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// https://github.com/ocornut/imgui
// https://github.com/ocornut/imgui, Original code by @birthggd
// In this binding, ImTextureID is used to store a 'ALLEGRO_BITMAP*' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
// Implemented features:
// [X] User texture binding. Use 'ALLEGRO_BITMAP*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// Missing features:
// [ ] Clipboard support via al_set_clipboard_text/al_clipboard_has_text.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// https://github.com/ocornut/imgui
// https://github.com/ocornut/imgui, Original code by @birthggd
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// In this binding, ImTextureID is used to store a 'ID3D10ShaderResourceView*' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
// Implemented features:
// [X] User texture binding. Use 'ID3D10ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// In this binding, ImTextureID is used to store a 'ID3D10ShaderResourceView*' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
// Implemented features:
// [X] User texture binding. Use 'ID3D10ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// In this binding, ImTextureID is used to store a 'ID3D11ShaderResourceView*' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
// Implemented features:
// [X] User texture binding. Use 'ID3D11ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// In this binding, ImTextureID is used to store a 'ID3D11ShaderResourceView*' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
// Implemented features:
// [X] User texture binding. Use 'ID3D11ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// In this binding, ImTextureID is used to store a 'LPDIRECT3DTEXTURE9' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
// Implemented features:
// [X] User texture binding. Use 'LPDIRECT3DTEXTURE9' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// In this binding, ImTextureID is used to store a 'LPDIRECT3DTEXTURE9' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
// Implemented features:
// [X] User texture binding. Use 'LPDIRECT3DTEXTURE9' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// In this binding, ImTextureID is used to store a 'CIwTexture*' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
// Implemented features:
// [X] User texture binding. Use 'CIwTexture*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// In this binding, ImTextureID is used to store a 'CIwTexture*' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
// Implemented features:
// [X] User texture binding. Use 'CIwTexture*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// In this binding, ImTextureID is used to store an OpenGL 'GLuint' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
// (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// (GL3W is a helper library to access OpenGL functions since there is no standard header to access modern OpenGL functions easily. Alternatives are GLEW, Glad, etc.)
// (GL3W is a helper library to access OpenGL functions since there is no standard header to access modern OpenGL functions easily. Alternatives are GLEW, Glad, etc.)
// Implemented features:
// [X] User texture binding. Cast 'GLuint' OpenGL texture identifier as void*/ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// [X] Gamepad navigation mapping. Enable with 'io.NavFlags |= ImGuiNavFlags_EnableGamepad'.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// Start the frame. This call will update the io.WantCaptureMouse, io.WantCaptureKeyboard flag that you can use to dispatch inputs (or not) to your application.
// Start the frame. This call will update the io.WantCaptureMouse, io.WantCaptureKeyboard flag that you can use to dispatch inputs (or not) to your application.
// In this binding, ImTextureID is used to store an OpenGL 'GLuint' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
// (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// (GL3W is a helper library to access OpenGL functions since there is no standard header to access modern OpenGL functions easily. Alternatives are GLEW, Glad, etc.)
// (GL3W is a helper library to access OpenGL functions since there is no standard header to access modern OpenGL functions easily. Alternatives are GLEW, Glad, etc.)
// Implemented features:
// [X] User texture binding. Cast 'GLuint' OpenGL texture identifier as void*/ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// [X] Gamepad navigation mapping. Enable with 'io.NavFlags |= ImGuiNavFlags_EnableGamepad'.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// In this binding, ImTextureID is used to store an OpenGL 'GLuint' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// (GL3W is a helper library to access OpenGL functions since there is no standard header to access modern OpenGL functions easily. Alternatives are GLEW, Glad, etc.)
// (GL3W is a helper library to access OpenGL functions since there is no standard header to access modern OpenGL functions easily. Alternatives are GLEW, Glad, etc.)
// Implemented features:
// [X] User texture binding. Cast 'GLuint' OpenGL texture identifier as void*/ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// In this binding, ImTextureID is used to store an OpenGL 'GLuint' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// (GL3W is a helper library to access OpenGL functions since there is no standard header to access modern OpenGL functions easily. Alternatives are GLEW, Glad, etc.)
// (GL3W is a helper library to access OpenGL functions since there is no standard header to access modern OpenGL functions easily. Alternatives are GLEW, Glad, etc.)
// Implemented features:
// [X] User texture binding. Cast 'GLuint' OpenGL texture identifier as void*/ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// FIXME: Changes of ImTextureID aren't supported by this binding! Please, someone add it!
// Missing features:
// [ ] User texture binding. Changes of ImTextureID aren't supported by this binding! See https://github.com/ocornut/imgui/pull/914
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 5 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXX_CreateFontsTexture(), ImGui_ImplXXXX_NewFrame(), ImGui_ImplXXXX_Render() and ImGui_ImplXXXX_Shutdown().
// If you use this binding you'll need to call 5 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXX_CreateFontsTexture(), ImGui_ImplXXXX_NewFrame(), ImGui_ImplXXXX_Render() and ImGui_ImplXXXX_Shutdown().
@ -753,6 +755,7 @@ bool ImGui_ImplGlfwVulkan_Init(GLFWwindow* window, bool install_callbacks, Im
// FIXME: Changes of ImTextureID aren't supported by this binding! Please, someone add it!
// Missing features:
// [ ] User texture binding. Changes of ImTextureID aren't supported by this binding! See https://github.com/ocornut/imgui/pull/914
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 5 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXX_CreateFontsTexture(), ImGui_ImplXXXX_NewFrame(), ImGui_ImplXXXX_Render() and ImGui_ImplXXXX_Shutdown().
// If you use this binding you'll need to call 5 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXX_CreateFontsTexture(), ImGui_ImplXXXX_NewFrame(), ImGui_ImplXXXX_Render() and ImGui_ImplXXXX_Shutdown().
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Read 'misc/fonts/README.txt' for more instructions and details.
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
// Define attributes of all API symbols declarations, e.g. for DLL under Windows.
// Define attributes of all API symbols declarations, e.g. for DLL under Windows.
#ifndef IMGUI_API
#ifndef IMGUI_API
@ -82,6 +83,7 @@ typedef void* ImTextureID; // user data to identify a texture (this is
typedefintImGuiCol;// enum: a color identifier for styling // enum ImGuiCol_
typedefintImGuiCol;// enum: a color identifier for styling // enum ImGuiCol_
typedefintImGuiCond;// enum: a condition for Set*() // enum ImGuiCond_
typedefintImGuiCond;// enum: a condition for Set*() // enum ImGuiCond_
typedefintImGuiKey;// enum: a key identifier (ImGui-side enum) // enum ImGuiKey_
typedefintImGuiKey;// enum: a key identifier (ImGui-side enum) // enum ImGuiKey_
typedefintImGuiNavInput;// enum: an input identifier for navigation // enum ImGuiNavInput_
typedefintImGuiMouseCursor;// enum: a mouse cursor identifier // enum ImGuiMouseCursor_
typedefintImGuiMouseCursor;// enum: a mouse cursor identifier // enum ImGuiMouseCursor_
typedefintImGuiStyleVar;// enum: a variable identifier for styling // enum ImGuiStyleVar_
typedefintImGuiStyleVar;// enum: a variable identifier for styling // enum ImGuiStyleVar_
typedefintImDrawCornerFlags;// flags: for ImDrawList::AddRect*() etc. // enum ImDrawCornerFlags_
typedefintImDrawCornerFlags;// flags: for ImDrawList::AddRect*() etc. // enum ImDrawCornerFlags_
@ -93,6 +95,7 @@ typedef int ImGuiComboFlags; // flags: for BeginCombo()
typedefintImGuiFocusedFlags;// flags: for IsWindowFocused() // enum ImGuiFocusedFlags_
typedefintImGuiFocusedFlags;// flags: for IsWindowFocused() // enum ImGuiFocusedFlags_
typedefintImGuiHoveredFlags;// flags: for IsItemHovered() etc. // enum ImGuiHoveredFlags_
typedefintImGuiHoveredFlags;// flags: for IsItemHovered() etc. // enum ImGuiHoveredFlags_
typedefintImGuiInputTextFlags;// flags: for InputText*() // enum ImGuiInputTextFlags_
typedefintImGuiInputTextFlags;// flags: for InputText*() // enum ImGuiInputTextFlags_
typedefintImGuiNavFlags;// flags: for io.NavFlags // enum ImGuiNavFlags_
typedefintImGuiSelectableFlags;// flags: for Selectable() // enum ImGuiSelectableFlags_
typedefintImGuiSelectableFlags;// flags: for Selectable() // enum ImGuiSelectableFlags_
typedefintImGuiTreeNodeFlags;// flags: for TreeNode*(),CollapsingHeader()// enum ImGuiTreeNodeFlags_
typedefintImGuiTreeNodeFlags;// flags: for TreeNode*(),CollapsingHeader()// enum ImGuiTreeNodeFlags_
typedefintImGuiWindowFlags;// flags: for Begin*() // enum ImGuiWindowFlags_
typedefintImGuiWindowFlags;// flags: for Begin*() // enum ImGuiWindowFlags_
@ -317,6 +320,7 @@ namespace ImGui
// 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 (tip: ctrl+click on a drag box to input with keyboard. manually input values aren't clamped, can go off-bounds)
// 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
// 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).
IMGUI_APIboolDragFloat(constchar*label,float*v,floatv_speed=1.0f,floatv_min=0.0f,floatv_max=0.0f,constchar*display_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*display_format="%.3f",floatpower=1.0f);// If v_min >= v_max we have no bound
// (FIXME: Those functions will be reworked after we merge the navigation branch + have a pass at focusing/tabbing features.)
// (Prefer using "SetItemDefaultFocus()" over "if (IsWindowAppearing()) SetScrollHere()" when applicable, to make your code more forward compatible when navigation branch is merged)
// (Prefer using "SetItemDefaultFocus()" over "if (IsWindowAppearing()) SetScrollHere()" when applicable, to make your code more forward compatible when navigation branch is merged)
IMGUI_APIvoidSetItemDefaultFocus();// make last item the default focused item of a window (WIP navigation branch only). Pleaase use instead of SetScrollHere().
IMGUI_APIvoidSetItemDefaultFocus();// make last item the default focused item of a window. Please use instead of "if (IsWindowAppearing()) SetScrollHere()" to signify "default item".
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.
// Utilities
// Utilities
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- 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- items that don't interact will always return false)
IMGUI_APIboolIsItemFocused();// is the last item focused for keyboard/gamepad navigation?
IMGUI_APIboolIsItemClicked(intmouse_button=0);// is the last item clicked? (e.g. button/node just clicked on)
IMGUI_APIboolIsItemClicked(intmouse_button=0);// is the last item clicked? (e.g. button/node just clicked on)
IMGUI_APIboolIsItemVisible();// is the last item visible? (aka not out of sight due to clipping/scrolling.)
IMGUI_APIboolIsItemVisible();// is the last item visible? (aka not out of sight due to clipping/scrolling.)
IMGUI_APIboolIsAnyItemHovered();
IMGUI_APIboolIsAnyItemHovered();
IMGUI_APIboolIsAnyItemActive();
IMGUI_APIboolIsAnyItemActive();
IMGUI_APIboolIsAnyItemFocused();
IMGUI_APIImVec2GetItemRectMin();// get bounding rectangle of last item, in screen space
IMGUI_APIImVec2GetItemRectMin();// get bounding rectangle of last item, in screen space
IMGUI_APIImVec2GetItemRectMax();// "
IMGUI_APIImVec2GetItemRectMax();// "
IMGUI_APIImVec2GetItemRectSize();// get size of last item, in screen space
IMGUI_APIImVec2GetItemRectSize();// get size of last item, in screen space
@ -547,8 +552,12 @@ enum ImGuiWindowFlags_
ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<<15,// Always show horizontal scrollbar (even if ContentSize.x < Size.x)
ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<<15,// Always show horizontal scrollbar (even if ContentSize.x < Size.x)
ImGuiWindowFlags_AlwaysUseWindowPadding=1<<16,// Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient)
ImGuiWindowFlags_AlwaysUseWindowPadding=1<<16,// Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient)
ImGuiWindowFlags_ResizeFromAnySide=1<<17,// (WIP) Enable resize from any corners and borders. Your back-end needs to honor the different values of io.MouseCursor set by imgui.
ImGuiWindowFlags_ResizeFromAnySide=1<<17,// (WIP) Enable resize from any corners and borders. Your back-end needs to honor the different values of io.MouseCursor set by imgui.
ImGuiWindowFlags_NoNavInputs=1<<18,// No gamepad/keyboard navigation within the window
ImGuiWindowFlags_NoNavFocus=1<<19,// No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB)
ImGuiWindowFlags_NavFlattened=1<<23,// (WIP) Allow gamepad/keyboard navigation to cross over parent border to this child (only use on child that have no scrolling!)
ImGuiWindowFlags_ChildWindow=1<<24,// Don't use! For internal use by BeginChild()
ImGuiWindowFlags_ChildWindow=1<<24,// Don't use! For internal use by BeginChild()
ImGuiWindowFlags_Tooltip=1<<25,// Don't use! For internal use by BeginTooltip()
ImGuiWindowFlags_Tooltip=1<<25,// Don't use! For internal use by BeginTooltip()
ImGuiWindowFlags_Popup=1<<26,// Don't use! For internal use by BeginPopup()
ImGuiWindowFlags_Popup=1<<26,// Don't use! For internal use by BeginPopup()
@ -596,6 +605,7 @@ enum ImGuiTreeNodeFlags_
ImGuiTreeNodeFlags_FramePadding=1<<10,// Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding().
ImGuiTreeNodeFlags_FramePadding=1<<10,// Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding().
//ImGuITreeNodeFlags_SpanAllAvailWidth = 1 << 11, // FIXME: TODO: Extend hit box horizontally even if not framed
//ImGuITreeNodeFlags_SpanAllAvailWidth = 1 << 11, // FIXME: TODO: Extend hit box horizontally even if not framed
//ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 12, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible
//ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 12, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible
ImGuiTreeNodeFlags_NavCloseFromChild=1<<13,// (WIP) Nav: left direction may close this TreeNode() when focusing on any child (items submitted between TreeNode and TreePop)
// User fill ImGuiIO.KeyMap[] array with indices into the ImGuiIO.KeysDown[512] array
// User fill ImGuiIO.KeyMap[] array with indices into the ImGuiIO.KeysDown[512] array
enumImGuiKey_
enumImGuiKey_
{
{
ImGuiKey_Tab,// for tabbing through fields
ImGuiKey_Tab,
ImGuiKey_LeftArrow,// for text edit
ImGuiKey_LeftArrow,
ImGuiKey_RightArrow,// for text edit
ImGuiKey_RightArrow,
ImGuiKey_UpArrow,// for text edit
ImGuiKey_UpArrow,
ImGuiKey_DownArrow,// for text edit
ImGuiKey_DownArrow,
ImGuiKey_PageUp,
ImGuiKey_PageUp,
ImGuiKey_PageDown,
ImGuiKey_PageDown,
ImGuiKey_Home,// for text edit
ImGuiKey_Home,
ImGuiKey_End,// for text edit
ImGuiKey_End,
ImGuiKey_Insert,// for text edit
ImGuiKey_Insert,
ImGuiKey_Delete,// for text edit
ImGuiKey_Delete,
ImGuiKey_Backspace,// for text edit
ImGuiKey_Backspace,
ImGuiKey_Enter,// for text edit
ImGuiKey_Space,
ImGuiKey_Escape,// for text edit
ImGuiKey_Enter,
ImGuiKey_Escape,
ImGuiKey_A,// for text edit CTRL+A: select all
ImGuiKey_A,// for text edit CTRL+A: select all
ImGuiKey_C,// for text edit CTRL+C: copy
ImGuiKey_C,// for text edit CTRL+C: copy
ImGuiKey_V,// for text edit CTRL+V: paste
ImGuiKey_V,// for text edit CTRL+V: paste
@ -692,6 +703,50 @@ enum ImGuiKey_
ImGuiKey_COUNT
ImGuiKey_COUNT
};
};
// [BETA] Gamepad/Keyboard directional navigation
// Keyboard: Set io.NavFlags |= ImGuiNavFlags_EnableKeyboard to enable. NewFrame() will automatically fill io.NavInputs[] based on your io.KeyDown[] + io.KeyMap[] arrays.
// Gamepad: Set io.NavFlags |= ImGuiNavFlags_EnableGamepad to enable. Fill the io.NavInputs[] fields before calling NewFrame(). Note that io.NavInputs[] is cleared by EndFrame().
// Read instructions in imgui.cpp for more details.
enumImGuiNavInput_
{
// Gamepad Mapping
ImGuiNavInput_Activate,// activate / open / toggle / tweak value // e.g. Circle (PS4), A (Xbox), B (Switch), Space (Keyboard)
ImGuiNavInput_Cancel,// cancel / close / exit // e.g. Cross (PS4), B (Xbox), A (Switch), Escape (Keyboard)
ImGuiNavInput_Input,// text input / on-screen keyboard // e.g. Triang.(PS4), Y (Xbox), X (Switch), Return (Keyboard)
ImGuiNavInput_Menu,// tap: toggle menu / hold: focus, move, resize // e.g. Square (PS4), X (Xbox), Y (Switch), Alt (Keyboard)
ImGuiNavInput_LStickLeft,// scroll / move window (w/ PadMenu) // e.g. Left Analog Stick Left/Right/Up/Down
ImGuiNavInput_LStickRight,//
ImGuiNavInput_LStickUp,//
ImGuiNavInput_LStickDown,//
ImGuiNavInput_FocusPrev,// next window (w/ PadMenu) // e.g. L1 or L2 (PS4), LB or LT (Xbox), L or ZL (Switch)
ImGuiNavInput_FocusNext,// prev window (w/ PadMenu) // e.g. R1 or R2 (PS4), RB or RT (Xbox), R or ZL (Switch)
ImGuiNavInput_TweakSlow,// slower tweaks // e.g. L1 or L2 (PS4), LB or LT (Xbox), L or ZL (Switch)
ImGuiNavInput_TweakFast,// faster tweaks // e.g. R1 or R2 (PS4), RB or RT (Xbox), R or ZL (Switch)
// [Internal] Don't use directly! This is used internally to differentiate keyboard from gamepad inputs for behaviors that require to differentiate them.
// Keyboard behavior that have no corresponding gamepad mapping (e.g. CTRL+TAB) may be directly reading from io.KeyDown[] instead of io.NavInputs[].
ImGuiNavInput_KeyMenu_,// toggle menu // = io.KeyAlt
ImGuiNavInput_KeyLeft_,// move left // = Arrow keys
ImGuiNavFlags_EnableKeyboard=1<<0,// Master keyboard navigation enable flag. NewFrame() will automatically fill io.NavInputs[] based on io.KeyDown[].
ImGuiNavFlags_EnableGamepad=1<<1,// Master gamepad navigation enable flag. This is mostly to instruct your imgui back-end to fill io.NavInputs[].
ImGuiNavFlags_MoveMouse=1<<2,// Request navigation to allow moving the mouse cursor. May be useful on TV/console systems where moving a virtual mouse is awkward. Will update io.MousePos and set io.WantMoveMouse=true. If enabled you MUST honor io.WantMoveMouse requests in your binding, otherwise ImGui will react as if the mouse is jumping around back and forth.
ImGuiNavFlags_NoCaptureKeyboard=1<<3// Do not set the io.WantCaptureKeyboard flag with io.NavActive is set.
};
// Enumeration for PushStyleColor() / PopStyleColor()
// Enumeration for PushStyleColor() / PopStyleColor()
enumImGuiCol_
enumImGuiCol_
{
{
@ -738,6 +793,8 @@ enum ImGuiCol_
ImGuiCol_TextSelectedBg,
ImGuiCol_TextSelectedBg,
ImGuiCol_ModalWindowDarkening,// darken entire screen when a modal window is active
ImGuiCol_ModalWindowDarkening,// darken entire screen when a modal window is active
ImGuiCol_DragDropTarget,
ImGuiCol_DragDropTarget,
ImGuiCol_NavHighlight,// gamepad/keyboard: current highlighted item
ImGuiCol_NavWindowingHighlight,// gamepad/keyboard: when holding NavMenu to focus/move/resize windows
ImGuiCol_COUNT
ImGuiCol_COUNT
// Obsolete names (will be removed)
// Obsolete names (will be removed)
@ -893,6 +950,7 @@ struct ImGuiIO
floatIniSavingRate;// = 5.0f // Maximum time between saving positions/sizes to .ini file, in seconds.
floatIniSavingRate;// = 5.0f // Maximum time between saving positions/sizes to .ini file, in seconds.
constchar*IniFilename;// = "imgui.ini" // Path to .ini file. NULL to disable .ini saving.
constchar*IniFilename;// = "imgui.ini" // Path to .ini file. NULL to disable .ini saving.
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).
ImGuiNavFlagsNavFlags;// = 0 // See ImGuiNavFlags_. Gamepad/keyboard navigation options.
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.
ImVec2MousePos;// Mouse position, in pixels. Set to ImVec2(-FLT_MAX,-FLT_MAX) if mouse is unavailable (on another screen, etc.)
ImVec2MousePos;// Mouse position, in pixels. Set to ImVec2(-FLT_MAX,-FLT_MAX) if mouse is unavailable (on another screen, etc.)
boolMouseDown[5];// Mouse buttons: left, right, middle + extras. ImGui itself mostly only uses left button (BeginPopupContext** are using right button). Others buttons allows us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API.
boolMouseDown[5];// Mouse buttons: left, right, middle + extras. ImGui itself mostly only uses left button (BeginPopupContext** are using right button). Others buttons allows us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API.
floatMouseWheel;// Mouse wheel: 1 unit scrolls about 5 lines text.
floatMouseWheel;// Mouse wheel: 1 unit scrolls about 5 lines text.
floatMouseWheelH;// Mouse wheel (Horizontal). Most users don't have a mouse with an horizontal wheel, may not be filled by all back ends.
floatMouseWheelH;// Mouse wheel (Horizontal). Most users don't have a mouse with an horizontal wheel, may not be filled by all back ends.
boolMouseDrawCursor;// Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor).
boolMouseDrawCursor;// Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor).
boolKeysDown[512];// Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
boolKeysDown[512];// Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
ImWcharInputCharacters[16+1];// List of characters input (translated by user from keypress+keyboard state). Fill using AddInputCharacter() helper.
ImWcharInputCharacters[16+1];// List of characters input (translated by user from keypress+keyboard state). Fill using AddInputCharacter() helper.
floatNavInputs[ImGuiNavInput_COUNT];// Gamepad inputs (keyboard keys will be auto-mapped and be written here by ImGui::NewFrame)
// Functions
// Functions
IMGUI_APIvoidAddInputCharacter(ImWcharc);// Add new character into InputCharacters[]
IMGUI_APIvoidAddInputCharacter(ImWcharc);// Add new character into InputCharacters[]
@ -966,7 +1025,9 @@ struct ImGuiIO
boolWantCaptureMouse;// When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application. This is set by ImGui when it wants to use your mouse (e.g. unclicked mouse is hovering a window, or a widget is active).
boolWantCaptureMouse;// When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application. This is set by ImGui when it wants to use your mouse (e.g. unclicked mouse is hovering a window, or a widget is active).
boolWantCaptureKeyboard;// When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application. This is set by ImGui when it wants to use your keyboard inputs.
boolWantCaptureKeyboard;// When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application. This is set by ImGui when it wants to use your keyboard inputs.
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).
boolWantMoveMouse;// [BETA-NAV] MousePos has been altered, back-end should reposition mouse on next frame. Set only when 'NavMovesMouse=true'.
boolWantMoveMouse;// MousePos has been altered, back-end should reposition mouse on next frame. Set only when ImGuiNavFlags_MoveMouse flag is enabled in io.NavFlags.
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).
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
intMetricsAllocs;// Number of active memory allocations
intMetricsAllocs;// Number of active memory allocations
intMetricsRenderVertices;// Vertices output during last call to Render()
intMetricsRenderVertices;// Vertices output during last call to Render()
@ -991,6 +1052,8 @@ struct ImGuiIO
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
ImGui::SameLine();ShowHelpMarker("Request ImGui to render a mouse cursor for you in software. Note that a mouse cursor rendered via your application GPU rendering path will feel more laggy than hardware cursor, but will be more in sync with your other visuals.\n\nSome desktop applications may use both kinds of cursors (e.g. enable software cursor only when resizing/dragging something).");
ImGui::SameLine();ShowHelpMarker("Request ImGui to render a mouse cursor for you in software. Note that a mouse cursor rendered via your application GPU rendering path will feel more laggy than hardware cursor, but will be more in sync with your other visuals.\n\nSome desktop applications may use both kinds of cursors (e.g. enable software cursor only when resizing/dragging something).");
ImGui::SameLine();ShowHelpMarker("Request ImGui to move your move cursor when using gamepad/keyboard navigation. NewFrame() will change io.MousePos and set the io.WantMoveMouse flag, your backend will need to apply the new mouse position.");
@ -46,6 +47,8 @@ typedef int ImGuiLayoutType; // enum: horizontal or vertical
typedefintImGuiButtonFlags;// flags: for ButtonEx(), ButtonBehavior() // enum ImGuiButtonFlags_
typedefintImGuiButtonFlags;// flags: for ButtonEx(), ButtonBehavior() // enum ImGuiButtonFlags_
typedefintImGuiItemFlags;// flags: for PushItemFlag() // enum ImGuiItemFlags_
typedefintImGuiItemFlags;// flags: for PushItemFlag() // enum ImGuiItemFlags_
typedefintImGuiItemStatusFlags;// flags: storage for DC.LastItemXXX // enum ImGuiItemStatusFlags_
typedefintImGuiItemStatusFlags;// flags: storage for DC.LastItemXXX // enum ImGuiItemStatusFlags_
typedefintImGuiNavHighlightFlags;// flags: for RenderNavHighlight() // enum ImGuiNavHighlightFlags_
typedefintImGuiNavDirSourceFlags;// flags: for GetNavInputAmount2d() // enum ImGuiNavDirSourceFlags_
typedefintImGuiSeparatorFlags;// flags: for Separator() - internal // enum ImGuiSeparatorFlags_
typedefintImGuiSeparatorFlags;// flags: for Separator() - internal // enum ImGuiSeparatorFlags_
typedefintImGuiSliderFlags;// flags: for SliderBehavior() // enum ImGuiSliderFlags_
typedefintImGuiSliderFlags;// flags: for SliderBehavior() // enum ImGuiSliderFlags_
@ -184,7 +187,8 @@ enum ImGuiButtonFlags_
ImGuiButtonFlags_AlignTextBaseLine=1<<9,// vertically align button to match text baseline - ButtonEx() only // FIXME: Should be removed and handled by SmallButton(), not possible currently because of DC.CursorPosPrevLine
ImGuiButtonFlags_AlignTextBaseLine=1<<9,// vertically align button to match text baseline - ButtonEx() only // FIXME: Should be removed and handled by SmallButton(), not possible currently because of DC.CursorPosPrevLine
ImGuiButtonFlags_NoKeyModifiers=1<<10,// disable interaction if a key modifier is held
ImGuiButtonFlags_NoKeyModifiers=1<<10,// disable interaction if a key modifier is held
ImGuiButtonFlags_NoHoldingActiveID=1<<11,// don't set ActiveId while holding the mouse (ImGuiButtonFlags_PressedOnClick only)
ImGuiButtonFlags_NoHoldingActiveID=1<<11,// don't set ActiveId while holding the mouse (ImGuiButtonFlags_PressedOnClick only)
ImGuiButtonFlags_PressedOnDragDropHold=1<<12// press when held into while we are drag and dropping another item (used by e.g. tree nodes, collapsing headers)
ImGuiButtonFlags_PressedOnDragDropHold=1<<12,// press when held into while we are drag and dropping another item (used by e.g. tree nodes, collapsing headers)
ImGuiButtonFlags_NoNavFocus=1<<13// don't override navigation focus when activated
};
};
enumImGuiSliderFlags_
enumImGuiSliderFlags_
@ -261,6 +265,49 @@ enum ImGuiDir
ImGuiDir_Count_
ImGuiDir_Count_
};
};
enumImGuiInputSource
{
ImGuiInputSource_None=0,
ImGuiInputSource_Mouse,
ImGuiInputSource_Nav,
ImGuiInputSource_NavKeyboard,// Only used occasionally for storage, not tested/handled by most code
ImGuiInputSource_NavGamepad,// "
ImGuiInputSource_Count_,
};
// FIXME-NAV: Clarify/expose various repeat delay/rate
enumImGuiInputReadMode
{
ImGuiInputReadMode_Down,
ImGuiInputReadMode_Pressed,
ImGuiInputReadMode_Released,
ImGuiInputReadMode_Repeat,
ImGuiInputReadMode_RepeatSlow,
ImGuiInputReadMode_RepeatFast
};
enumImGuiNavHighlightFlags_
{
ImGuiNavHighlightFlags_TypeDefault=1<<0,
ImGuiNavHighlightFlags_TypeThin=1<<1,
ImGuiNavHighlightFlags_AlwaysDraw=1<<2,
ImGuiNavHighlightFlags_NoRounding=1<<3
};
enumImGuiNavDirSourceFlags_
{
ImGuiNavDirSourceFlags_Keyboard=1<<0,
ImGuiNavDirSourceFlags_PadDPad=1<<1,
ImGuiNavDirSourceFlags_PadLStick=1<<2
};
enumImGuiNavForward
{
ImGuiNavForward_None,
ImGuiNavForward_ForwardQueued,
ImGuiNavForward_ForwardActive
};
// 2D axis aligned bounding-box
// 2D axis aligned bounding-box
// NB: we can't rely on ImVec2 math operators being available here
// NB: we can't rely on ImVec2 math operators being available here
structIMGUI_APIImRect
structIMGUI_APIImRect
@ -467,6 +514,20 @@ struct ImDrawDataBuilder
IMGUI_APIvoidFlattenIntoSingleLayer();
IMGUI_APIvoidFlattenIntoSingleLayer();
};
};
structImGuiNavMoveResult
{
ImGuiIDID;// Best candidate
ImGuiIDParentID;// Best candidate window->IDStack.back() - to compare context
ImGuiWindow*Window;// Best candidate window
floatDistBox;// Best candidate box distance to current NavId
floatDistCenter;// Best candidate center distance to current NavId
floatDistAxial;
ImRectRectRel;// Best candidate bounding box in window relative space
ImGuiWindow*NavWindow;// Nav/focused window for navigation
ImGuiWindow*HoveredWindow;// Will catch mouse inputs
ImGuiWindow*HoveredWindow;// Will catch mouse inputs
ImGuiWindow*HoveredRootWindow;// Will catch mouse inputs (for focus/move only)
ImGuiWindow*HoveredRootWindow;// Will catch mouse inputs (for focus/move only)
ImGuiIDHoveredId;// Hovered widget
ImGuiIDHoveredId;// Hovered widget
@ -539,8 +599,10 @@ struct ImGuiContext
boolActiveIdIsAlive;// Active widget has been seen this frame
boolActiveIdIsAlive;// Active widget has been seen this frame
boolActiveIdIsJustActivated;// Set at the time of activation for one frame
boolActiveIdIsJustActivated;// Set at the time of activation for one frame
boolActiveIdAllowOverlap;// Active widget allows another widget to steal active id (generally for overlapping widgets, but not always)
boolActiveIdAllowOverlap;// Active widget allows another widget to steal active id (generally for overlapping widgets, but not always)
intActiveIdAllowNavDirFlags;// Active widget allows using directional navigation (e.g. can activate a button and move away from it)
ImVec2ActiveIdClickOffset;// Clicked offset from upper-left corner, if applicable (currently only set by ButtonBehavior)
ImVec2ActiveIdClickOffset;// Clicked offset from upper-left corner, if applicable (currently only set by ButtonBehavior)
ImGuiWindow*ActiveIdWindow;
ImGuiWindow*ActiveIdWindow;
ImGuiInputSourceActiveIdSource;// Activating with mouse or nav (gamepad/keyboard)
ImGuiWindow*MovingWindow;// Track the window we clicked on (in order to preserve focus). The actually window that is moved is generally MovingWindow->RootWindow.
ImGuiWindow*MovingWindow;// Track the window we clicked on (in order to preserve focus). The actually window that is moved is generally MovingWindow->RootWindow.
ImVector<ImGuiColMod>ColorModifiers;// Stack for PushStyleColor()/PopStyleColor()
ImVector<ImGuiColMod>ColorModifiers;// Stack for PushStyleColor()/PopStyleColor()
ImVector<ImGuiStyleMod>StyleModifiers;// Stack for PushStyleVar()/PopStyleVar()
ImVector<ImGuiStyleMod>StyleModifiers;// Stack for PushStyleVar()/PopStyleVar()
@ -551,6 +613,41 @@ struct ImGuiContext
boolNextTreeNodeOpenVal;// Storage for SetNextTreeNode** functions
boolNextTreeNodeOpenVal;// Storage for SetNextTreeNode** functions
ImGuiCondNextTreeNodeOpenCond;
ImGuiCondNextTreeNodeOpenCond;
// Navigation data (for gamepad/keyboard)
ImGuiWindow*NavWindow;// Focused window for navigation. Could be called 'FocusWindow'
ImGuiIDNavId;// Focused item for navigation
ImGuiIDNavActivateId;// ~~ (g.ActiveId == 0) && IsNavInputPressed(ImGuiNavInput_Activate) ? NavId : 0, also set when calling ActivateItem()
ImGuiIDNavNextActivateId;// Set by ActivateItem(), queued until next frame
ImGuiIDNavJustMovedToId;// Just navigated to this id (result of a successfully MoveRequest)
ImRectNavScoringRectScreen;// Rectangle used for scoring, in screen space. Based of window->DC.NavRefRectRel[], modified for directional navigation scoring.
intNavScoringCount;// Metrics for debugging
ImGuiWindow*NavWindowingTarget;// When selecting a window (holding Menu+FocusPrev/Next, or equivalent of CTRL-TAB) this window is temporarily displayed front-most.
floatNavWindowingHighlightTimer;
floatNavWindowingHighlightAlpha;
boolNavWindowingToggleLayer;
ImGuiInputSourceNavWindowingInputSource;// Gamepad or keyboard mode
intNavLayer;// Layer we are navigating on. For now the system is hard-coded for 0=main contents and 1=menu/title bar, may expose layers later.
intNavIdTabCounter;// == NavWindow->DC.FocusIdxTabCounter at time of NavId processing
boolNavIdIsAlive;// Nav widget has been seen this frame ~~ NavRefRectRel is valid
boolNavMousePosDirty;// When set we will update mouse position if (NavFlags & ImGuiNavFlags_MoveMouse) if set (NB: this not enabled by default)
boolNavDisableHighlight;// When user starts using mouse, we hide gamepad/keyboard highlight (nb: but they are still available, which is why NavDisableHighlight isn't always != NavDisableMouseHover)
boolNavDisableMouseHover;// When user starts using gamepad/keyboard, we hide mouse hovering highlight until mouse is touched again.
OverlayDrawList._OwnerName="##Overlay";// Give it a name for debugging
OverlayDrawList._OwnerName="##Overlay";// Give it a name for debugging
@ -687,8 +809,8 @@ enum ImGuiItemFlags_
ImGuiItemFlags_AllowKeyboardFocus=1<<0,// true
ImGuiItemFlags_AllowKeyboardFocus=1<<0,// true
ImGuiItemFlags_ButtonRepeat=1<<1,// false // Button() will return true multiple times based on io.KeyRepeatDelay and io.KeyRepeatRate settings.
ImGuiItemFlags_ButtonRepeat=1<<1,// false // Button() will return true multiple times based on io.KeyRepeatDelay and io.KeyRepeatRate settings.
ImGuiItemFlags_Disabled=1<<2,// false // FIXME-WIP: Disable interactions but doesn't affect visuals. Should be: grey out and disable interactions with widgets that affect data + view widgets (WIP)
ImGuiItemFlags_Disabled=1<<2,// false // FIXME-WIP: Disable interactions but doesn't affect visuals. Should be: grey out and disable interactions with widgets that affect data + view widgets (WIP)
ImU32TreeDepthMayCloseOnPop;// Store a copy of !g.NavIdIsAlive for TreeDepth 0..31
ImGuiIDLastItemId;
ImGuiIDLastItemId;
ImGuiItemStatusFlagsLastItemStatusFlags;
ImGuiItemStatusFlagsLastItemStatusFlags;
ImRectLastItemRect;// Interaction rect
ImRectLastItemRect;// Interaction rect
ImRectLastItemDisplayRect;// End-user display rect (only valid if LastItemStatusFlags & ImGuiItemStatusFlags_HasDisplayRect)
ImRectLastItemDisplayRect;// End-user display rect (only valid if LastItemStatusFlags & ImGuiItemStatusFlags_HasDisplayRect)
boolMenuBarAppending;
boolNavHideHighlightOneFrame;
boolNavHasScroll;// Set when scrolling can be used (ScrollMax > 0.0f)
intNavLayerCurrent;// Current layer, 0..31 (we currently only use 0..1)
intNavLayerCurrentMask;// = (1 << NavLayerCurrent) used by ItemAdd prior to clipping.
intNavLayerActiveMask;// Which layer have been written to (result from previous frame)
intNavLayerActiveMaskNext;// Which layer have been written to (buffer for current frame)
boolMenuBarAppending;// FIXME: Remove this
floatMenuBarOffsetX;
floatMenuBarOffsetX;
ImVector<ImGuiWindow*>ChildWindows;
ImVector<ImGuiWindow*>ChildWindows;
ImGuiStorage*StateStorage;
ImGuiStorage*StateStorage;
ImGuiLayoutTypeLayoutType;
ImGuiLayoutTypeLayoutType;
ImGuiLayoutTypeParentLayoutType;// Layout type of parent window at the time of Begin()
// We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings.
// We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings.
floatWindowRounding;// Window rounding at the time of begin.
floatWindowRounding;// Window rounding at the time of begin.
floatWindowBorderSize;// Window border size at the time of begin.
floatWindowBorderSize;// Window border size at the time of begin.
ImGuiIDMoveId;// == window->GetID("#MOVE")
ImGuiIDMoveId;// == window->GetID("#MOVE")
ImGuiIDChildId;// Id of corresponding item in parent window (for child windows)
ImVec2Scroll;
ImVec2Scroll;
ImVec2ScrollTarget;// target scroll position. stored as cursor position with scrolling canceled out, so the highest point is always 0.0f. (FLT_MAX for no change)
ImVec2ScrollTarget;// target scroll position. stored as cursor position with scrolling canceled out, so the highest point is always 0.0f. (FLT_MAX for no change)
ImVec2ScrollTargetCenterRatio;// 0.0f = scroll so that target position is at top, 0.5f = scroll so that target position is centered
ImVec2ScrollTargetCenterRatio;// 0.0f = scroll so that target position is at top, 0.5f = scroll so that target position is centered
@ -785,6 +922,7 @@ struct IMGUI_API ImGuiWindow
boolWasActive;
boolWasActive;
boolWriteAccessed;// Set to true when any widget access the current window
boolWriteAccessed;// Set to true when any widget access the current window
boolCollapsed;// Set when collapsing window to become only title-bar
boolCollapsed;// Set when collapsing window to become only title-bar
boolCollapseToggleWanted;
boolSkipItems;// Set when items can safely be all clipped (e.g. window not visible or collapsed)
boolSkipItems;// Set when items can safely be all clipped (e.g. window not visible or collapsed)
boolAppearing;// Set during the frame where the window is appearing (or re-appearing)
boolAppearing;// Set during the frame where the window is appearing (or re-appearing)
boolCloseButton;// Set when the window has a close button (p_open != NULL)
boolCloseButton;// Set when the window has a close button (p_open != NULL)
@ -819,7 +957,13 @@ struct IMGUI_API ImGuiWindow
ImGuiWindow*RootWindow;// Generally point to ourself. If we are a child window, this is pointing to the first non-child parent window.
ImGuiWindow*RootWindow;// Generally point to ourself. If we are a child window, this is pointing to the first non-child parent window.
ImGuiWindow*RootNonPopupWindow;// Generally point to ourself. Used to display TitleBgActive color and for selecting which window to use for NavWindowing
ImGuiWindow*RootNonPopupWindow;// Generally point to ourself. Used to display TitleBgActive color and for selecting which window to use for NavWindowing
ImGuiWindow*NavRootWindow;// Generally point to ourself. If we are a child window with the NavFlattened flag, point to a parent window.
ImGuiWindow*NavLastChildNavWindow;// When going to the menu bar, we remember the child window we came from. (This could probably be made implicit if we kept g.Windows sorted by last focused including child window.)
ImGuiIDNavLastIds[2];// Last known NavId for this window, per layer (0/1)
ImRectNavRectRel[2];// Reference rectangle, in window relative space
// Navigation / Focus
// Navigation / Focus
// FIXME-NAV: Merge all this with the new Nav system, at least the request variables should be moved to ImGuiContext
intFocusIdxAllCounter;// Start at -1 and increase as assigned via FocusItemRegister()
intFocusIdxAllCounter;// Start at -1 and increase as assigned via FocusItemRegister()
intFocusIdxTabCounter;// (same, but only count widgets which you can Tab through)
intFocusIdxTabCounter;// (same, but only count widgets which you can Tab through)
intFocusIdxAllRequestCurrent;// Item being requested for focus
intFocusIdxAllRequestCurrent;// Item being requested for focus
IMGUI_APIvoidActivateItem(ImGuiIDid);// Remotely activate a button, checkbox, tree node etc. given its unique ID. activation is queued and processed on the next frame when the item is encountered again.