@ -21,7 +21,8 @@ or view this file with any Markdown viewer.
| [Why using C++ (as opposed to C)?](#q-why-using-c-as-opposed-to-c) |
| [Why using C++ (as opposed to C)?](#q-why-using-c-as-opposed-to-c) |
| **Q&A: Integration** |
| **Q&A: Integration** |
| [How can I tell whether to dispatch mouse/keyboard to Dear ImGui or to my application?](#q-how-can-i-tell-whether-to-dispatch-mousekeyboard-to-dear-imgui-or-to-my-application) |
| [How can I tell whether to dispatch mouse/keyboard to Dear ImGui or to my application?](#q-how-can-i-tell-whether-to-dispatch-mousekeyboard-to-dear-imgui-or-to-my-application) |
| [How can I use this without a mouse, without a keyboard or without a screen? (gamepad, input share, remote display)](#q-how-can-i-use-this-without-a-mouse-without-a-keyboard-or-without-a-screen-gamepad-input-share-remote-display) |
| [How can I enable keyboard or gamepad controls?](#q-how-can-i-enable-keyboard-or-gamepad-controls) |
| [How can I use this on a machine without mouse, keyboard or screen? (input share, remote display)](#q-how-can-i-use-this-on-a-machine-without-mouse-keyboard-or-screen-input-share-remote-display) |
| [I integrated Dear ImGui in my engine and the text or lines are blurry..](#q-i-integrated-dear-imgui-in-my-engine-and-the-text-or-lines-are-blurry) |
| [I integrated Dear ImGui in my engine and the text or lines are blurry..](#q-i-integrated-dear-imgui-in-my-engine-and-the-text-or-lines-are-blurry) |
| [I integrated Dear ImGui in my engine and some elements are clipping or disappearing when I move windows around..](#q-i-integrated-dear-imgui-in-my-engine-and-some-elements-are-clipping-or-disappearing-when-i-move-windows-around) |
| [I integrated Dear ImGui in my engine and some elements are clipping or disappearing when I move windows around..](#q-i-integrated-dear-imgui-in-my-engine-and-some-elements-are-clipping-or-disappearing-when-i-move-windows-around) |
| **Q&A: Usage** |
| **Q&A: Usage** |
@ -44,11 +45,11 @@ or view this file with any Markdown viewer.
### Q: Where is the documentation?
### Q: Where is the documentation?
**This library is poorly documented at the moment and expects of the user to be acquainted with C/C++.**
**This library is poorly documented at the moment and expects of the user to be acquainted with C/C++.**
- Run the examples/ and explore them.
- Dozens of standalone example applications using e.g. OpenGL/DirectX are provided in the [examples/](https://github.com/ocornut/imgui/blob/master/examples/) folder to explain how to integrate Dear ImGui with your own engine/application. You can run those applications and explore them.
- See demo code in [imgui_demo.cpp](https://github.com/ocornut/imgui/blob/master/imgui_demo.cpp) and particularly the `ImGui::ShowDemoWindow()` function.
- See demo code in [imgui_demo.cpp](https://github.com/ocornut/imgui/blob/master/imgui_demo.cpp) and particularly the `ImGui::ShowDemoWindow()` function. The demo covers most features of Dear ImGui, so you can read the code and see its output.
- The demo covers most features of Dear ImGui, so you can read the code and see its output.
- See documentation and comments at the top of [imgui.cpp](https://github.com/ocornut/imgui/blob/master/imgui.cpp) + general API comments in [imgui.h](https://github.com/ocornut/imgui/blob/master/imgui.h).
- See documentation and comments at the top of [imgui.cpp](https://github.com/ocornut/imgui/blob/master/imgui.cpp) + general API comments in [imgui.h](https://github.com/ocornut/imgui/blob/master/imgui.h).
- Dozens of standalone example applications using e.g. OpenGL/DirectX are provided in the [examples/](https://github.com/ocornut/imgui/blob/master/examples/) folder to explain how to integrate Dear ImGui with your own engine/application.
- The [Wiki](https://github.com/ocornut/imgui/wiki) has many resources and links.
- The [Glossary](https://github.com/ocornut/imgui/wiki/Glossary) page may be useful.
- Your programming IDE is your friend, find the type or function declaration to find comments associated to it.
- Your programming IDE is your friend, find the type or function declaration to find comments associated to it.
---
---
@ -66,7 +67,7 @@ Many projects are using this branch and it is kept in sync with master regularly
### Q: Why the names "Dear ImGui" vs "ImGui"?
### Q: Why the names "Dear ImGui" vs "ImGui"?
**TL;DR: Please try to refer to this library as "Dear ImGui".**
**TL;DR: Please refer to this library as "Dear ImGui".**
The library started its life as "ImGui" due to the fact that I didn't give it a proper name when when I released 1.0, and had no particular expectation that it would take off. However, the term IMGUI (immediate-mode graphical user interface) was coined before and is being used in variety of other situations (e.g. Unity uses it own implementation of the IMGUI paradigm). To reduce the ambiguity without affecting existing code bases, I have decided on an alternate, longer name "Dear ImGui" that people can use to refer to this specific library.
The library started its life as "ImGui" due to the fact that I didn't give it a proper name when when I released 1.0, and had no particular expectation that it would take off. However, the term IMGUI (immediate-mode graphical user interface) was coined before and is being used in variety of other situations (e.g. Unity uses it own implementation of the IMGUI paradigm). To reduce the ambiguity without affecting existing code bases, I have decided on an alternate, longer name "Dear ImGui" that people can use to refer to this specific library.
@ -128,16 +129,24 @@ e.g. `if (ImGui::GetIO().WantCaptureMouse) { ... }`
---
---
### Q: How can I use this without a mouse, without a keyboard or without a screen? (gamepad, input share, remote display)
### Q: How can I enable keyboard or gamepad controls?
- You can control Dear ImGui with a gamepad. Read about navigation in "Using gamepad/keyboard navigation controls".
- The gamepad/keyboard navigation is fairly functional and keeps being improved. The initial focus was to support game controllers, but keyboard is becoming increasingly and decently usable. Gamepad support is particularly useful to use Dear ImGui on a game console (e.g. PS4, Switch, XB1) without a mouse connected!
(short version: map gamepad inputs into the io.NavInputs[] array + set `io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad`).
- Keyboard: set `io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard` to enable.
- You can share your computer mouse seamlessly with your console/tablet/phone using [Synergy](https://symless.com/synergy)
- Gamepad: set `io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad` to enable (with a supporting back-end).
- See [Control Sheets for Gamepads](http://www.dearimgui.org/controls_sheets) (reference PNG/PSD for for PS4, XB1, Switch gamepads).
- See `USING GAMEPAD/KEYBOARD NAVIGATION CONTROLS` section of [imgui.cpp](https://github.com/ocornut/imgui/blob/master/imgui.cpp) for more details.
---
### Q: How can I use this on a machine without mouse, keyboard or screen? (input share, remote display)
- You can share your computer mouse seamlessly with your console/tablet/phone using solutions such as [Synergy](https://symless.com/synergy)
This is the preferred solution for developer productivity.
This is the preferred solution for developer productivity.
In particular, the [micro-synergy-client repository](https://github.com/symless/micro-synergy-client) has simple
In particular, the [micro-synergy-client repository](https://github.com/symless/micro-synergy-client) has simple
and portable source code (uSynergy.c/.h) for a small embeddable client that you can use on any platform to connect
and portable source code (uSynergy.c/.h) for a small embeddable client that you can use on any platform to connect
to your host computer, based on the Synergy 1.x protocol. Make sure you download the Synergy 1 server on your computer.
to your host computer, based on the Synergy 1.x protocol. Make sure you download the Synergy 1 server on your computer.
Console SDK also sometimes provide equivalent tooling or wrapper for Synergy-like protocols.
Console SDK also sometimes provide equivalent tooling or wrapper for Synergy-like protocols.
- You may also use a third party solution such as [Remote ImGui](https://github.com/JordiRos/remoteimgui) or [imgui-ws](https://github.com/ggerganov/imgui-ws) which sends the vertices to render over the local network, allowing you to use Dear ImGui even on a screen-less machine. See Wiki index for most details.
- Game console users: consider emulating a mouse cursor with DualShock4 touch pad or a spare analog stick as a mouse-emulation fallback.
- You may also use a third party solution such as [Remote ImGui](https://github.com/JordiRos/remoteimgui) or [imgui-ws](https://github.com/ggerganov/imgui-ws) which sends the vertices to render over the local network, allowing you to use Dear ImGui even on a screen-less machine. See [Wiki](https://github.com/ocornut/imgui/wiki) index for most details.
- For touch inputs, you can increase the hit box of widgets (via the `style.TouchPadding` setting) to accommodate
- For touch inputs, you can increase the hit box of widgets (via the `style.TouchPadding` setting) to accommodate
for the lack of precision of touch inputs, but it is recommended you use a mouse or gamepad to allow optimizing
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.
for screen real-estate and precision.
@ -283,7 +292,7 @@ node open/closed state differently. See what makes more sense in your situation!
### Q: How can I display an image? What is ImTextureID, how does it work?
### Q: How can I display an image? What is ImTextureID, how does it work?
Short explanation:
Short explanation:
- Please read Wiki entry for examples: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
- Refer to [Image Loading and Displaying Examples](https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples) on the [Wiki](https://github.com/ocornut/imgui/wiki).
- You may use functions such as `ImGui::Image()`, `ImGui::ImageButton()` or lower-level `ImDrawList::AddImage()` to emit draw calls that will use your own textures.
- You may use functions such as `ImGui::Image()`, `ImGui::ImageButton()` or lower-level `ImDrawList::AddImage()` to emit draw calls that will use your own textures.
- Actual textures are identified in a way that is up to the user/engine. Those identifiers are stored and passed as ImTextureID (void*) value.
- Actual textures are identified in a way that is up to the user/engine. Those identifiers are stored and passed as ImTextureID (void*) value.
- Loading image files from the disk and turning them into a texture is not within the scope of Dear ImGui (for a good reason).
- Loading image files from the disk and turning them into a texture is not within the scope of Dear ImGui (for a good reason).
@ -301,15 +310,18 @@ Dear ImGui doesn't know or understand what you are storing in ImTextureID, it me
OpenGL:
OpenGL:
- ImTextureID = GLuint
- ImTextureID = GLuint
- See ImGui_ImplOpenGL3_RenderDrawData() function in imgui_impl_opengl3.cpp
- See ImGui_ImplOpenGL3_RenderDrawData() function in imgui_impl_opengl3.cpp
```
```
DirectX9:
DirectX9:
- ImTextureID = LPDIRECT3DTEXTURE9
- ImTextureID = LPDIRECT3DTEXTURE9
- See ImGui_ImplDX9_RenderDrawData() function in imgui_impl_dx9.cpp
- See ImGui_ImplDX9_RenderDrawData() function in imgui_impl_dx9.cpp
```
```
DirectX11:
DirectX11:
- ImTextureID = ID3D11ShaderResourceView*
- ImTextureID = ID3D11ShaderResourceView*
- See ImGui_ImplDX11_RenderDrawData() function in imgui_impl_dx11.cpp
- See ImGui_ImplDX11_RenderDrawData() function in imgui_impl_dx11.cpp
```
```
DirectX12:
DirectX12:
- ImTextureID = D3D12_GPU_DESCRIPTOR_HANDLE
- ImTextureID = D3D12_GPU_DESCRIPTOR_HANDLE
- See ImGui_ImplDX12_RenderDrawData() function in imgui_impl_dx12.cpp
- See ImGui_ImplDX12_RenderDrawData() function in imgui_impl_dx12.cpp
@ -337,7 +349,7 @@ Once you understand this design you will understand that loading image files and
This is by design and is actually a good thing, because it means your code has full control over your data types and how you display them.
This is by design and is actually a good thing, because it means your code has full control over your data types and how you display them.
If you want to display an image file (e.g. PNG file) into the screen, please refer to documentation and tutorials for the graphics API you are using.
If you want to display an image file (e.g. PNG file) into the screen, please refer to documentation and tutorials for the graphics API you are using.
Refer to the Wiki to find simplified examples for loading textures with OpenGL, DirectX9 and DirectX11: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
Refer to [Image Loading and Displaying Examples](https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples)on the [Wiki](https://github.com/ocornut/imgui/wiki) to find simplified examples for loading textures with OpenGL, DirectX9 and DirectX11.
C/C++ tip: a void* is pointer-sized storage. You may safely store any pointer or integer into it by casting your value to ImTextureID / void*, and vice-versa.
C/C++ tip: a void* is pointer-sized storage. You may safely store any pointer or integer into it by casting your value to ImTextureID / void*, and vice-versa.
Because both end-points (user code and rendering function) are under your control, you know exactly what is stored inside the ImTextureID / void*.
Because both end-points (user code and rendering function) are under your control, you know exactly what is stored inside the ImTextureID / void*.
@ -442,7 +454,7 @@ New programmers: remember that in C/C++ and most programming languages if you wa
backslash \ within a string literal, you need to write it double backslash "\\":
backslash \ within a string literal, you need to write it double backslash "\\":
```c
```c
io.Fonts->AddFontFromFileTTF("MyFolder\MyFont.ttf", size); // WRONG (you are escape the M here!)
io.Fonts->AddFontFromFileTTF("MyFolder\MyFont.ttf", size); // WRONG (you are escaping the M here!)
io.Fonts->AddFontFromFileTTF("MyFolder/MyFont.ttf", size); // ALSO CORRECT
io.Fonts->AddFontFromFileTTF("MyFolder/MyFont.ttf", size); // ALSO CORRECT
```
```
@ -452,7 +464,7 @@ io.Fonts->AddFontFromFileTTF("MyFolder/MyFont.ttf", size); // ALSO CORRECT
### Q: How can I easily use icons in my application?
### Q: How can I easily use icons in my application?
The most convenient and practical way is to merge an icon font such as FontAwesome inside you
The most convenient and practical way is to merge an icon font such as FontAwesome inside you
main font. Then you can refer to icons within your strings.
main font. Then you can refer to icons within your strings.
You may want to see ImFontConfig::GlyphMinAdvanceX to make your icon look monospace to facilitate alignment.
You may want to see `ImFontConfig::GlyphMinAdvanceX` to make your icon look monospace to facilitate alignment.
(Read the [docs/FONTS.txt](https://github.com/ocornut/imgui/blob/master/docs/FONTS.txt) file for more details about icons font loading.)
(Read the [docs/FONTS.txt](https://github.com/ocornut/imgui/blob/master/docs/FONTS.txt) file for more details about icons font loading.)
With some extra effort, you may use colorful icon by registering custom rectangle space inside the font atlas,
With some extra effort, you may use colorful icon by registering custom rectangle space inside the font atlas,
and copying your own graphics data into it. See docs/FONTS.txt about using the AddCustomRectFontGlyph API.
and copying your own graphics data into it. See docs/FONTS.txt about using the AddCustomRectFontGlyph API.
@ -513,7 +525,7 @@ by using the u8"hello" syntax. Specifying literal in your source code using a lo
(such as CP-923 for Japanese or CP-1251 for Cyrillic) will NOT work!
(such as CP-923 for Japanese or CP-1251 for Cyrillic) will NOT work!
Otherwise you can convert yourself to UTF-8 or load text data from file already saved as UTF-8.
Otherwise you can convert yourself to UTF-8 or load text data from file already saved as UTF-8.
Text input: it is up to your application to pass the right character code by calling io.AddInputCharacter().
Text input: it is up to your application to pass the right character code by calling `io.AddInputCharacter()`.
The applications in examples/ are doing that.
The applications in examples/ are doing that.
Windows: you can use the WM_CHAR or WM_UNICHAR or WM_IME_CHAR message (depending if your app is built using Unicode or MultiByte mode).
Windows: you can use the WM_CHAR or WM_UNICHAR or WM_IME_CHAR message (depending if your app is built using Unicode or MultiByte mode).
You may also use MultiByteToWideChar() or ToUnicode() to retrieve Unicode codepoints from MultiByte characters or keyboard state.
You may also use MultiByteToWideChar() or ToUnicode() to retrieve Unicode codepoints from MultiByte characters or keyboard state.
@ -529,8 +541,8 @@ the default implementation of io.ImeSetInputScreenPosFn() to set your Microsoft
- Businesses: convince your company to fund development via support contracts/sponsoring! This is among the most useful thing you can do for Dear ImGui. With increased funding we will be able to hire more people working on this project.
- Businesses: convince your company to fund development via support contracts/sponsoring! This is among the most useful thing you can do for Dear ImGui. With increased funding we will be able to hire more people working on this project.
- Individuals: you can also become a [Patron](http://www.patreon.com/imgui) or donate on PayPal! See README.
- Individuals: you can also become a [Patron](http://www.patreon.com/imgui) or donate on PayPal! See README.
- Disclose your usage of dear imgui via a dev blog post, a tweet, a screenshot, a mention somewhere etc.
- Disclose your usage of dear imgui via a dev blog post, a tweet, a screenshot, a mention somewhere etc.
You may post screenshot or links in the [gallery threads](https://github.com/ocornut/imgui/issues/2847). Visuals are ideal as they inspire other programmers.
You may post screenshot or links in the [gallery threads](https://github.com/ocornut/imgui/issues/2847). Visuals are ideal as they inspire other programmers. Disclosing your use of dear imgui help the library grow credibility, and help other teams and programmers with taking decisions.
But even without visuals, disclosing your use of dear imgui help the library grow credibility, and help other teams and programmers with taking decisions.
- If you have issues or if you need to hack into the library, even if you don't expect any support it is useful that you share your issues or sometimes incomplete PR.
- If you have issues or if you need to hack into the library, even if you don't expect any support it is useful that you share your issues or sometimes incomplete pR.
@ -126,7 +126,7 @@ Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
### Upcoming Changes
### Upcoming Changes
Some of the goals for 2019+ are:
Some of the goals for 2019-2020 are:
- Finish work on docking, tabs. (see [#2109](https://github.com/ocornut/imgui/issues/2109), in public [docking](https://github.com/ocornut/imgui/tree/docking) branch looking for feedback)
- Finish work on docking, tabs. (see [#2109](https://github.com/ocornut/imgui/issues/2109), in public [docking](https://github.com/ocornut/imgui/tree/docking) branch looking for feedback)
- Finish work on multiple viewports / multiple OS windows. (see [#1542](https://github.com/ocornut/imgui/issues/1542), in public [docking](https://github.com/ocornut/imgui/tree/docking) branch looking for feedback)
- Finish work on multiple viewports / multiple OS windows. (see [#1542](https://github.com/ocornut/imgui/issues/1542), in public [docking](https://github.com/ocornut/imgui/tree/docking) branch looking for feedback)
- Finish work on gamepad/keyboard controls. (see [#787](https://github.com/ocornut/imgui/issues/787))
- Finish work on gamepad/keyboard controls. (see [#787](https://github.com/ocornut/imgui/issues/787))
@ -8,6 +8,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- doc/test: add a proper documentation+regression testing system (#435)
- doc/test: add a proper documentation+regression testing system (#435)
- doc/test: checklist app to verify binding/integration of imgui (test inputs, rendering, callback, etc.).
- doc/test: checklist app to verify binding/integration of imgui (test inputs, rendering, callback, etc.).
- doc/tips: tips of the day: website? applet in imgui_club?
- doc/tips: tips of the day: website? applet in imgui_club?
- doc/wiki: work on the wiki https://github.com/ocornut/imgui/wiki
- window: preserve/restore relative focus ordering (persistent or not) (#2304) -> also see docking reference to same #.
- window: preserve/restore relative focus ordering (persistent or not) (#2304) -> also see docking reference to same #.
- window: calling SetNextWindowSize() every frame with <= 0 doesn't do anything, may be useful to allow (particularly when used for a single axis). (#690)
- window: calling SetNextWindowSize() every frame with <= 0 doesn't do anything, may be useful to allow (particularly when used for a single axis). (#690)
@ -27,6 +28,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- window: GetWindowSize() returns (0,0) when not calculated? (#1045)
- window: GetWindowSize() returns (0,0) when not calculated? (#1045)
- window: investigate better auto-positioning for new windows.
- window: investigate better auto-positioning for new windows.
- window: top most window flag? (#2574)
- window: top most window flag? (#2574)
- window: the size_on_first_use path of Begin() can probably be removed
- window/opt: freeze window flag: if not focused/hovered, return false, render with previous ImDrawList. and/or reduce refresh rate. -> this may require enforcing that it is illegal to submit contents if Begin returns false.
- window/opt: freeze window flag: if not focused/hovered, return false, render with previous ImDrawList. and/or reduce refresh rate. -> this may require enforcing that it is illegal to submit contents if Begin returns false.
- window/child: the first draw command of a child window could be moved into the current draw command of the parent window (unless child+tooltip?).
- window/child: the first draw command of a child window could be moved into the current draw command of the parent window (unless child+tooltip?).
- window/child: border could be emitted in parent as well.
- window/child: border could be emitted in parent as well.
@ -58,7 +60,6 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- main: find a way to preserve relative orders of multiple reappearing windows (so an app toggling between "modes" e.g. fullscreen vs all tools) won't lose relative ordering.
- main: find a way to preserve relative orders of multiple reappearing windows (so an app toggling between "modes" e.g. fullscreen vs all tools) won't lose relative ordering.
- main: IsItemHovered() make it more consistent for various type of widgets, widgets with multiple components, etc. also effectively IsHovered() region sometimes differs from hot region, e.g tree nodes
- main: IsItemHovered() make it more consistent for various type of widgets, widgets with multiple components, etc. also effectively IsHovered() region sometimes differs from hot region, e.g tree nodes
- main: IsItemHovered() info stored in a stack? so that 'if TreeNode() { Text; TreePop; } if IsHovered' return the hover state of the TreeNode?
- main: IsItemHovered() info stored in a stack? so that 'if TreeNode() { Text; TreePop; } if IsHovered' return the hover state of the TreeNode?
- main: rename the main "Debug" window to avoid ID collision with user who may want to use "Debug" with specific flags.
- widgets: display mode: widget-label, label-widget (aligned on column or using fixed size), label-newline-tab-widget etc. (#395)
- widgets: display mode: widget-label, label-widget (aligned on column or using fixed size), label-newline-tab-widget etc. (#395)
- widgets: clean up widgets internal toward exposing everything and stabilizing imgui_internals.h.
- widgets: clean up widgets internal toward exposing everything and stabilizing imgui_internals.h.
@ -301,7 +302,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- drag and drop: (#143) "both an in-process pointer and a promise to generate a serialized version, for whether the drag ends inside or outside the same process"
- drag and drop: (#143) "both an in-process pointer and a promise to generate a serialized version, for whether the drag ends inside or outside the same process"
- drag and drop: feedback when hovering a region blocked by modal (mouse cursor "NO"?)
- drag and drop: feedback when hovering a region blocked by modal (mouse cursor "NO"?)
- node/graph editor (#306)
- node/graph editors (#306) (also see https://github.com/ocornut/imgui/wiki#node-editors)
- pie menus patterns (#434)
- pie menus patterns (#434)
- markup: simple markup language for color change? (#902)
- markup: simple markup language for color change? (#902)
@ -329,12 +330,15 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- font: add support for kerning, probably optional. A) perhaps default to (32..128)^2 matrix ~ 9K entries = 36KB, then hash for non-ascii?. B) or sparse lookup into per-char list?
- font: add support for kerning, probably optional. A) perhaps default to (32..128)^2 matrix ~ 9K entries = 36KB, then hash for non-ascii?. B) or sparse lookup into per-char list?
- font: add a simpler CalcTextSizeA() api? current one ok but not welcome if user needs to call it directly (without going through ImGui::CalcTextSize)
- font: add a simpler CalcTextSizeA() api? current one ok but not welcome if user needs to call it directly (without going through ImGui::CalcTextSize)
- font: fix AddRemapChar() to work before atlas has been built.
- font: fix AddRemapChar() to work before atlas has been built.
- font: what would it take to support codepoint higher than 0xFFFF? (smileys, etc.) (#2538, #2541)
- font: support for unicode codepoints higher than 0xFFFF? (pr #2815)
- font: (api breaking) remove "TTF" from symbol names. also because it now supports OTF.
- font: (api breaking) remove "TTF" from symbol names. also because it now supports OTF.
- font/opt: Considering storing standalone AdvanceX table as 16-bit fixed point integer?
- font/opt: Considering storing standalone AdvanceX table as 16-bit fixed point integer?
- font/opt: Glyph currently 40 bytes (2+9*4). Consider storing UV as 16 bits integer? (->32 bytes). X0/Y0/X1/Y1 as 16 fixed-point integers? Or X0/Y0 as float and X1/Y1 as fixed8_8?
- font/opt: Glyph currently 40 bytes (2+9*4). Consider storing UV as 16 bits integer? (->32 bytes). X0/Y0/X1/Y1 as 16 fixed-point integers? Or X0/Y0 as float and X1/Y1 as fixed8_8?
- nav: some features such as PageUp/Down/Home/End should probably work without ImGuiConfigFlags_NavEnableKeyboard? (where do we draw the line?)
- nav: some features such as PageUp/Down/Home/End should probably work without ImGuiConfigFlags_NavEnableKeyboard? (where do we draw the line?)
! nav: never clear NavId on some setup (e.g. gamepad centric)
- nav: restore NavId on reappearing non-child window.
- nav: code to focus child-window on restoring NavId appears to have issue (to investigate)
- nav: configuration flag to disable global shortcuts (currently only CTRL-Tab) ?
- nav: configuration flag to disable global shortcuts (currently only CTRL-Tab) ?
- nav: Home/End behavior when navigable item is not fully visible at the edge of scrolling? should be backtrack to keep item into view?
- nav: Home/End behavior when navigable item is not fully visible at the edge of scrolling? should be backtrack to keep item into view?
- nav: NavScrollToBringItemIntoView() with item bigger than view should focus top-right? Repro: using Nav in "About Window"
- nav: NavScrollToBringItemIntoView() with item bigger than view should focus top-right? Repro: using Nav in "About Window"
@ -382,7 +386,6 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- inputs: support track pad style scrolling & slider edit.
- inputs: support track pad style scrolling & slider edit.
- inputs/io: backspace and arrows in the context of a text input could use system repeat rate.
- inputs/io: backspace and arrows in the context of a text input could use system repeat rate.
- inputs/io: clarify/standardize/expose repeat rate and repeat delays (#1808)
- inputs/io: clarify/standardize/expose repeat rate and repeat delays (#1808)
- inputs: add mouse cursor for unavailable/no? IDC_NO/SDL_SYSTEM_CURSOR_NO.
- inputs/scrolling: support for smooth scrolling (#2462, #2569)
- inputs/scrolling: support for smooth scrolling (#2462, #2569)
- misc: idle: expose "woken up" boolean (set by inputs) and/or animation time (for cursor blink) for back-end to be able stop refreshing easily.
- misc: idle: expose "woken up" boolean (set by inputs) and/or animation time (for cursor blink) for back-end to be able stop refreshing easily.
@ -395,9 +398,6 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- misc: possible compile-time support for string view/range instead of char* would e.g. facilitate usage with Rust (#683)
- misc: possible compile-time support for string view/range instead of char* would e.g. facilitate usage with Rust (#683)
- misc: possible compile-time support for wchar_t instead of char*?
- misc: possible compile-time support for wchar_t instead of char*?
- emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
- remote: make a system like RemoteImGui first-class citizen/project (#75)
- remote: make a system like RemoteImGui first-class citizen/project (#75)
- demo: find a way to demonstrate textures in the examples application, as it such a common issue for new users.
- demo: find a way to demonstrate textures in the examples application, as it such a common issue for new users.
@ -406,14 +406,19 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- demo: add virtual scrolling example?
- demo: add virtual scrolling example?
- demo: demonstrate Plot offset
- demo: demonstrate Plot offset
- demo: window size constraint: square demo is broken when resizing from edges (#1975), would need to rework the callback system to solve this
- demo: window size constraint: square demo is broken when resizing from edges (#1975), would need to rework the callback system to solve this
- examples: window minimize, maximize (#583)
- examples: window minimize, maximize (#583)
- examples: provide a zero frame-rate/idle example.
- examples: provide a zero frame-rate/idle example.
- examples: apple: example_apple should be using modern GL3.
- backends: apple: example_apple should be using modern GL3.
- examples: glfw: could go idle when minimized? if (glfwGetWindowAttrib(window, GLFW_ICONIFIED)) { glfwWaitEvents(); continue; } // issue: DeltaTime will be super high on resume, perhaps provide a way to let impl know (#440)
- backends: glfw: could go idle when minimized? if (glfwGetWindowAttrib(window, GLFW_ICONIFIED)) { glfwWaitEvents(); continue; } // issue: DeltaTime will be super high on resume, perhaps provide a way to let impl know (#440)
- examples: opengl: rename imgui_impl_opengl2 to impl_opengl_legacy and imgui_impl_opengl3 to imgui_impl_opengl? (#1900)
- backends: opengl: rename imgui_impl_opengl2 to impl_opengl_legacy and imgui_impl_opengl3 to imgui_impl_opengl? (#1900)
- examples: opengl: could use a single vertex buffer and glBufferSubData for uploads?
- backends: opengl: could use a single vertex buffer and glBufferSubData for uploads?
- examples: opengl: explicitly disable GL_STENCIL_TEST in bindings.
- backends: opengl: explicitly disable GL_STENCIL_TEST in bindings.
- examples: vulkan: viewport: support for synchronized swapping of multiple swap chains.
- backends: mscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
- optimization: replace vsnprintf with stb_printf? or enable the defines/infrastructure to allow it (#1038)
- optimization: replace vsnprintf with stb_printf? or enable the defines/infrastructure to allow it (#1038)
- optimization: add clipping for multi-component widgets (SliderFloatX, ColorEditX, etc.). one problem is that nav branch can't easily clip parent group when there is a move request.
- optimization: add clipping for multi-component widgets (SliderFloatX, ColorEditX, etc.). one problem is that nav branch can't easily clip parent group when there is a move request.
- optimization: add a flag to disable most of rendering, for the case where the user expect to skip it (#335)
- optimization: add a flag to disable most of rendering, for the case where the user expect to skip it (#335)
ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
counter++;
ImGui::SameLine();
ImGui::Text("counter = %d", counter);
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
ImGui::End();
}
// 3. Show another simple window.
if (show_another_window)
{
ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
#ifdef GLFW_RESIZE_NESW_CURSOR // Let's be nice to people who pulled GLFW between 2019-04-16 (3.4 define) and 2019-11-29 (cursors defines) // FIXME: Remove when GLFW 3.4 is released?
// (minor and older changes stripped away, please see git history for details)
// (minor and older changes stripped away, please see git history for details)
// 2018-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
// 2019-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
// 2019-12-05: Inputs: Added support for ImGuiMouseCursor_NotAllowed mouse cursor.
// 2019-05-11: Inputs: Don't filter value from WM_CHAR before calling AddInputCharacter().
// 2019-05-11: Inputs: Don't filter value from WM_CHAR before calling AddInputCharacter().
// 2019-01-17: Misc: Using GetForegroundWindow()+IsChild() instead of GetActiveWindow() to be compatible with windows created in a different thread or parent.
// 2019-01-17: Misc: Using GetForegroundWindow()+IsChild() instead of GetActiveWindow() to be compatible with windows created in a different thread or parent.
// 2019-01-17: Inputs: Added support for mouse buttons 4 and 5 via WM_XBUTTON* messages.
// 2019-01-17: Inputs: Added support for mouse buttons 4 and 5 via WM_XBUTTON* messages.
//---- Don't define obsolete functions/enums names. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names.
//---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names.
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
//#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS
//---- Don't implement demo windows functionality (ShowDemoWindow()/ShowStyleEditor()/ShowUserGuide() methods will be empty)
//---- Don't implement demo windows functionality (ShowDemoWindow()/ShowStyleEditor()/ShowUserGuide() methods will be empty)
// Use 'Metrics->Tools->Item Picker' to pick widgets with the mouse and break into them for easy debugging.
// (use 'Metrics->Tools->Item Picker' to pick widgets with the mouse and break into them for easy debugging.)
//#define IM_DEBUG_BREAK IM_ASSERT(0)
//#define IM_DEBUG_BREAK IM_ASSERT(0)
//#define IM_DEBUG_BREAK __debugbreak()
//#define IM_DEBUG_BREAK __debugbreak()
// Have the Item Picker break in the ItemAdd() function instead of ItemHoverable() - which is earlier in the code, will catch a few extra items, allow picking items other than Hovered one.
//---- Debug Tools: Have the Item Picker break in the ItemAdd() function instead of ItemHoverable(),
// (which comes earlier in the code, will catch a few extra items, allow picking items other than Hovered one.)
// This adds a small runtime cost which is why it is not enabled by default.
// This adds a small runtime cost which is why it is not enabled by default.
//#define IMGUI_DEBUG_TOOL_ITEM_PICKER_EX
//#define IMGUI_DEBUG_TOOL_ITEM_PICKER_EX
//---- Debug Tools: Enable slower asserts
//#define IMGUI_DEBUG_PARANOID
//---- Tip: You can add extra functions within the ImGui:: namespace, here or in your own headers files.
//---- Tip: You can add extra functions within the ImGui:: namespace, here or in your own headers files.
IM_ASSERT(IM_ARRAYSIZE(ImGuiIO::MouseDown)==ImGuiMouseButton_COUNT&&IM_ARRAYSIZE(ImGuiIO::MouseClicked)==ImGuiMouseButton_COUNT);// Our pre-C++11 IM_STATIC_ASSERT() macros triggers warning on modern compilers so we don't use it here.
// Settings
// Settings
ConfigFlags=ImGuiConfigFlags_None;
ConfigFlags=ImGuiConfigFlags_None;
@ -4582,7 +4605,8 @@ int ImGui::GetKeyIndex(ImGuiKey imgui_key)
returng.IO.KeyMap[imgui_key];
returng.IO.KeyMap[imgui_key];
}
}
// Note that imgui doesn't know the semantic of each entry of io.KeysDown[]. Use your own indices/enums according to how your back-end/engine stored them into io.KeysDown[]!
// Note that dear imgui doesn't know the semantic of each entry of io.KeysDown[]!
// Use your own indices/enums according to how your back-end/engine stored them into io.KeysDown[]!
// Return the delta from the initial clicking position while the mouse button is clicked or was just released.
// Return the delta from the initial clicking position while the mouse button is clicked or was just released.
// This is locked and return 0.0f until the mouse moves past a distance threshold at least once.
// 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.
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
typedefintImGuiMouseCursor;// -> enum ImGuiMouseCursor_ // Enum: A mouse cursor identifier
typedefintImGuiMouseCursor;// -> enum ImGuiMouseCursor_ // Enum: A mouse cursor identifier
typedefintImGuiStyleVar;// -> enum ImGuiStyleVar_ // Enum: A variable identifier for styling
typedefintImGuiStyleVar;// -> enum ImGuiStyleVar_ // Enum: A variable identifier for styling
typedefintImDrawCornerFlags;// -> enum ImDrawCornerFlags_ // Flags: for ImDrawList::AddRect(), AddRectFilled() etc.
typedefintImDrawCornerFlags;// -> enum ImDrawCornerFlags_ // Flags: for ImDrawList::AddRect(), AddRectFilled() etc.
@ -445,6 +446,7 @@ namespace ImGui
// - 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.
// - 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).
// - 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).
// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits.
// - Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits.
// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
// - Use v_min > v_max to lock edits.
// - Use v_min > v_max to lock edits.
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
// - Unless modal, they can be closed by clicking anywhere outside them, or by pressing ESCAPE.
// - Unless modal, they can be closed by clicking anywhere outside them, or by pressing ESCAPE.
// - Their visibility state (~bool) is held internally by imgui instead of being held by the programmer as we are used to with regular Begin() calls.
// - Their visibility state (~bool) is held internally by imgui instead of being held by the programmer as we are used to with regular Begin() calls.
// User can manipulate the visibility state by calling OpenPopup().
// User can manipulate the visibility state by calling OpenPopup().
// - We default to use the right mouse (ImGuiMouseButton_Right=1) for the Popup Context functions.
// (*) You can use IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup) to bypass it and detect hovering even when normally blocked by a popup.
// (*) You can use IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup) to bypass it and detect hovering even when normally blocked by a popup.
// Those three properties are connected. The library needs to hold their visibility state because it can close popups at any time.
// Those three properties are connected. The library needs to hold their visibility state because it can close popups at any time.
IMGUI_APIvoidOpenPopup(constchar*str_id);// call to mark popup as open (don't call every frame!). popups are closed when user click outside, or if CloseCurrentPopup() is called within a BeginPopup()/EndPopup() block. By default, Selectable()/MenuItem() are calling CloseCurrentPopup(). Popup identifiers are relative to the current ID-stack (so OpenPopup and BeginPopup needs to be at the same level).
IMGUI_APIvoidOpenPopup(constchar*str_id);// call to mark popup as open (don't call every frame!). popups are closed when user click outside, or if CloseCurrentPopup() is called within a BeginPopup()/EndPopup() block. By default, Selectable()/MenuItem() are calling CloseCurrentPopup(). Popup identifiers are relative to the current ID-stack (so OpenPopup and BeginPopup needs to be at the same level).
IMGUI_APIboolBeginPopup(constchar*str_id,ImGuiWindowFlagsflags=0);// return true if the popup is open, and you can start outputting to it. only call EndPopup() if BeginPopup() returns true!
IMGUI_APIboolBeginPopup(constchar*str_id,ImGuiWindowFlagsflags=0);// return true if the popup is open, and you can start outputting to it. only call EndPopup() if BeginPopup() returns true!
IMGUI_APIboolBeginPopupContextItem(constchar*str_id=NULL,intmouse_button=1);// helper to open and begin popup when clicked on last item. if you can pass a NULL str_id only if the previous item had an id. If you want to use that on a non-interactive item such as Text() you need to pass in an explicit ID here. read comments in .cpp!
IMGUI_APIboolBeginPopupContextItem(constchar*str_id=NULL,ImGuiMouseButtonmouse_button=1);// helper to open and begin popup when clicked on last item. if you can pass a NULL str_id only if the previous item had an id. If you want to use that on a non-interactive item such as Text() you need to pass in an explicit ID here. read comments in .cpp!
IMGUI_APIboolBeginPopupContextWindow(constchar*str_id=NULL,intmouse_button=1,boolalso_over_items=true);// helper to open and begin popup when clicked on current window.
IMGUI_APIboolBeginPopupContextWindow(constchar*str_id=NULL,ImGuiMouseButtonmouse_button=1,boolalso_over_items=true);// helper to open and begin popup when clicked on current window.
IMGUI_APIboolBeginPopupContextVoid(constchar*str_id=NULL,intmouse_button=1);// helper to open and begin popup when clicked in void (where there are no imgui windows).
IMGUI_APIboolBeginPopupContextVoid(constchar*str_id=NULL,ImGuiMouseButtonmouse_button=1);// helper to open and begin popup when clicked in void (where there are no imgui windows).
IMGUI_APIboolBeginPopupModal(constchar*name,bool*p_open=NULL,ImGuiWindowFlagsflags=0);// modal dialog (regular window with title bar, block interactions behind the modal window, can't close the modal window by clicking outside)
IMGUI_APIboolBeginPopupModal(constchar*name,bool*p_open=NULL,ImGuiWindowFlagsflags=0);// modal dialog (regular window with title bar, block interactions behind the modal window, can't close the modal window by clicking outside)
IMGUI_APIvoidEndPopup();// only call EndPopup() if BeginPopupXXX() returns true!
IMGUI_APIvoidEndPopup();// only call EndPopup() if BeginPopupXXX() returns true!
IMGUI_APIboolOpenPopupOnItemClick(constchar*str_id=NULL,intmouse_button=1);// helper to open popup when clicked on last item (note: actually triggers on the mouse _released_ event to be consistent with popup behaviors). return true when just opened.
IMGUI_APIboolOpenPopupOnItemClick(constchar*str_id=NULL,ImGuiMouseButtonmouse_button=1);// helper to open popup when clicked on last item (note: actually triggers on the mouse _released_ event to be consistent with popup behaviors). return true when just opened.
IMGUI_APIboolIsPopupOpen(constchar*str_id);// return true if the popup is open at the current begin-ed level of the popup stack.
IMGUI_APIboolIsPopupOpen(constchar*str_id);// return true if the popup is open at the current begin-ed level of the popup stack.
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.
@ -660,7 +663,7 @@ namespace ImGui
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?
IMGUI_APIboolIsItemClicked(intmouse_button=0);// is the last item clicked? (e.g. button/node just clicked on) == IsMouseClicked(mouse_button) && IsItemHovered()
IMGUI_APIboolIsItemClicked(ImGuiMouseButtonmouse_button=0);// is the last item clicked? (e.g. button/node just clicked on) == IsMouseClicked(mouse_button) && IsItemHovered()
IMGUI_APIboolIsItemVisible();// is the last item visible? (items may be out of sight because of clipping/scrolling)
IMGUI_APIboolIsItemVisible();// is the last item visible? (items may be out of sight because of clipping/scrolling)
IMGUI_APIboolIsItemEdited();// did the last item modify its underlying value this frame? or was pressed? This is generally the same as the "bool" return value of many widgets.
IMGUI_APIboolIsItemEdited();// did the last item modify its underlying value this frame? or was pressed? This is generally the same as the "bool" return value of many widgets.
IMGUI_APIboolIsItemActivated();// was the last item just made active (item was previously inactive).
IMGUI_APIboolIsItemActivated();// was the last item just made active (item was previously inactive).
// - For 'int user_key_index' you can use your own indices/enums according to how your backend/engine stored them in io.KeysDown[].
// - We don't know the meaning of those value. You can use GetKeyIndex() to map a ImGuiKey_ value into the user index.
IMGUI_APIintGetKeyIndex(ImGuiKeyimgui_key);// map ImGuiKey_* values into user's key index. == io.KeyMap[key]
IMGUI_APIintGetKeyIndex(ImGuiKeyimgui_key);// map ImGuiKey_* values into user's key index. == io.KeyMap[key]
IMGUI_APIboolIsKeyDown(intuser_key_index);// is key being held. == io.KeysDown[user_key_index]. note that imgui doesn't know the semantic of each entry of io.KeysDown[]. Use your own indices/enums according to how your backend/engine stored them into io.KeysDown[]!
IMGUI_APIboolIsKeyDown(intuser_key_index);// is key being held. == io.KeysDown[user_key_index].
IMGUI_APIboolIsKeyPressed(intuser_key_index,boolrepeat=true);// was key pressed (went from !Down to Down). if repeat=true, uses io.KeyRepeatDelay / KeyRepeatRate
IMGUI_APIboolIsKeyPressed(intuser_key_index,boolrepeat=true);// was key pressed (went from !Down to Down)? if repeat=true, uses io.KeyRepeatDelay / KeyRepeatRate
IMGUI_APIboolIsKeyReleased(intuser_key_index);// was key released (went from Down to !Down)..
IMGUI_APIboolIsKeyReleased(intuser_key_index);// was key released (went from Down to !Down)?
IMGUI_APIintGetKeyPressedAmount(intkey_index,floatrepeat_delay,floatrate);// uses provided repeat rate/delay. return a count, most often 0 or 1 but might be >1 if RepeatRate is small enough that DeltaTime > RepeatRate
IMGUI_APIintGetKeyPressedAmount(intkey_index,floatrepeat_delay,floatrate);// uses provided repeat rate/delay. return a count, most often 0 or 1 but might be >1 if RepeatRate is small enough that DeltaTime > RepeatRate
IMGUI_APIboolIsMouseDown(intbutton);// is mouse button held (0=left, 1=right, 2=middle)
IMGUI_APIvoidCaptureKeyboardFromApp(boolwant_capture_keyboard_value=true);// attention: misleading name! manually override io.WantCaptureKeyboard flag next frame (said flag is entirely left for your application to handle). e.g. force capture keyboard when your widget is being hovered. This is equivalent to setting "io.WantCaptureKeyboard = want_capture_keyboard_value"; after the next NewFrame() call.
IMGUI_APIboolIsAnyMouseDown();// is any mouse button held
IMGUI_APIboolIsMouseClicked(intbutton,boolrepeat=false);// did mouse button clicked (went from !Down to Down) (0=left, 1=right, 2=middle)
// Inputs Utilities: Mouse
IMGUI_APIboolIsMouseDoubleClicked(intbutton);// did mouse button double-clicked. a double-click returns false in IsMouseClicked(). uses io.MouseDoubleClickTime.
// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
IMGUI_APIboolIsMouseReleased(intbutton);// did mouse button released (went from Down to !Down)
// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
IMGUI_APIboolIsMouseDragging(intbutton=0,floatlock_threshold=-1.0f);// is mouse dragging. if lock_threshold < -1.0f uses io.MouseDraggingThreshold
// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
IMGUI_APIboolIsMouseHoveringRect(constImVec2&r_min,constImVec2&r_max,boolclip=true);// is mouse hovering given bounding rect (in screen space). clipped by current clipping settings, but disregarding of other consideration of focus/window ordering/popup-block.
IMGUI_APIboolIsMouseDown(ImGuiMouseButtonbutton);// is mouse button held?
IMGUI_APIboolIsMousePosValid(constImVec2*mouse_pos=NULL);// by convention we use (-FLT_MAX,-FLT_MAX) to denote that there is no mouse
IMGUI_APIboolIsMouseClicked(ImGuiMouseButtonbutton,boolrepeat=false);// did mouse button clicked? (went from !Down to Down)
IMGUI_APIboolIsMouseReleased(ImGuiMouseButtonbutton);// did mouse button released? (went from Down to !Down)
IMGUI_APIboolIsMouseDoubleClicked(ImGuiMouseButtonbutton);// did mouse button double-clicked? a double-click returns false in IsMouseClicked(). uses io.MouseDoubleClickTime.
IMGUI_APIboolIsMouseHoveringRect(constImVec2&r_min,constImVec2&r_max,boolclip=true);// is mouse hovering given bounding rect (in screen space). clipped by current clipping settings, but disregarding of other consideration of focus/window ordering/popup-block.
IMGUI_APIboolIsMousePosValid(constImVec2*mouse_pos=NULL);// by convention we use (-FLT_MAX,-FLT_MAX) to denote that there is no mouse available
IMGUI_APIboolIsAnyMouseDown();// is any mouse button held?
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 mouse position at the time of opening popup we have BeginPopup() into (helper to avoid user backing that value themselves)
IMGUI_APIImVec2GetMouseDragDelta(intbutton=0,floatlock_threshold=-1.0f);// return the delta from the initial clicking position while the mouse button is pressed or was just released. 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_APIboolIsMouseDragging(ImGuiMouseButtonbutton,floatlock_threshold=-1.0f);// is mouse dragging? (if lock_threshold < -1.0f, uses io.MouseDraggingThreshold)
IMGUI_APIvoidResetMouseDragDelta(intbutton=0);//
IMGUI_APIImVec2GetMouseDragDelta(ImGuiMouseButtonbutton=0,floatlock_threshold=-1.0f);// return the delta from the initial clicking position while the mouse button is pressed or was just released. 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_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(ImGuiMouseCursorcursor_type);// set desired cursor type
IMGUI_APIvoidCaptureKeyboardFromApp(boolwant_capture_keyboard_value=true);// attention: misleading name! manually override io.WantCaptureKeyboard flag next frame (said flag is entirely left for your application to handle). e.g. force capture keyboard when your widget is being hovered. This is equivalent to setting "io.WantCaptureKeyboard = want_capture_keyboard_value"; after the next NewFrame() call.
IMGUI_APIvoidCaptureMouseFromApp(boolwant_capture_mouse_value=true);// attention: misleading name! manually override io.WantCaptureMouse flag next frame (said flag is entirely left for your application to handle). This is equivalent to setting "io.WantCaptureMouse = want_capture_mouse_value;" after the next NewFrame() call.
IMGUI_APIvoidCaptureMouseFromApp(boolwant_capture_mouse_value=true);// attention: misleading name! manually override io.WantCaptureMouse flag next frame (said flag is entirely left for your application to handle). This is equivalent to setting "io.WantCaptureMouse = want_capture_mouse_value;" after the next NewFrame() call.
// Clipboard Utilities (also see the LogToClipboard() function to capture or output text data to the clipboard)
// Clipboard Utilities (also see the LogToClipboard() function to capture or output text data to the clipboard)
@ -797,8 +807,8 @@ enum ImGuiWindowFlags_
ImGuiWindowFlags_DockNodeHost=1<<29// Don't use! For internal use by Begin()/NewFrame()
ImGuiWindowFlags_DockNodeHost=1<<29// Don't use! For internal use by Begin()/NewFrame()
// [Obsolete]
// [Obsolete]
//ImGuiWindowFlags_ShowBorders = 1 << 7, // --> Set style.FrameBorderSize=1.0f / style.WindowBorderSize=1.0f to enable borders around windows and items
//ImGuiWindowFlags_ShowBorders = 1 << 7, // --> Set style.FrameBorderSize=1.0f or style.WindowBorderSize=1.0f to enable borders around items or windows.
//ImGuiWindowFlags_ResizeFromAnySide = 1 << 17, // --> Set io.ConfigWindowsResizeFromEdges and make sure mouse cursors are supported by back-end (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors)
//ImGuiWindowFlags_ResizeFromAnySide = 1 << 17, // --> Set io.ConfigWindowsResizeFromEdges=true and make sure mouse cursors are supported by back-end (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors)
};
};
// Flags for ImGui::InputText()
// Flags for ImGui::InputText()
@ -849,11 +859,6 @@ enum ImGuiTreeNodeFlags_
ImGuiTreeNodeFlags_NavLeftJumpsBackHere=1<<13,// (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop)
ImGuiTreeNodeFlags_NavLeftJumpsBackHere=1<<13,// (WIP) Nav: left direction may move to this TreeNode() from any of its child (items submitted between TreeNode and TreePop)
//ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 14, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible
//ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 14, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible
,ImGuiTreeNodeFlags_AllowOverlapMode=ImGuiTreeNodeFlags_AllowItemOverlap// [renamed in 1.53]
#endif
};
};
// Flags for ImGui::Selectable()
// Flags for ImGui::Selectable()
@ -1160,9 +1165,7 @@ enum ImGuiCol_
// Obsolete names (will be removed)
// Obsolete names (will be removed)
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
,ImGuiCol_ModalWindowDarkening=ImGuiCol_ModalWindowDimBg// [renamed in 1.63]
,ImGuiCol_ModalWindowDarkening=ImGuiCol_ModalWindowDimBg// [renamed in 1.63]
,ImGuiCol_ChildWindowBg=ImGuiCol_ChildBg// [renamed in 1.53]
//, ImGuiCol_CloseButton, ImGuiCol_CloseButtonActive, ImGuiCol_CloseButtonHovered// [unused since 1.60+] the close button now uses regular button colors.
//ImGuiCol_CloseButton, ImGuiCol_CloseButtonActive, ImGuiCol_CloseButtonHovered, // [unused since 1.60+] the close button now uses regular button colors.
//ImGuiCol_ComboBg, // [unused since 1.53+] ComboBg has been merged with PopupBg, so a redirect isn't accurate.
#endif
#endif
};
};
@ -1199,8 +1202,7 @@ enum ImGuiStyleVar_
// Obsolete names (will be removed)
// Obsolete names (will be removed)
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
,ImGuiStyleVar_Count_=ImGuiStyleVar_COUNT// [renamed in 1.60]
,ImGuiStyleVar_Count_=ImGuiStyleVar_COUNT// [renamed in 1.60]
,ImGuiStyleVar_ChildWindowRounding=ImGuiStyleVar_ChildRounding// [renamed in 1.53]
#endif
#endif
};
};
@ -1249,6 +1251,16 @@ enum ImGuiColorEditFlags_
#endif
#endif
};
};
// Identify a mouse button.
// Those values are guaranteed to be stable and we frequently use 0/1 directly. Named enums provided for convenience.
enumImGuiMouseButton_
{
ImGuiMouseButton_Left=0,
ImGuiMouseButton_Right=1,
ImGuiMouseButton_Middle=2,
ImGuiMouseButton_COUNT=5
};
// Enumeration for GetMouseCursor()
// Enumeration for GetMouseCursor()
// User code may request binding to display given cursor by calling SetMouseCursor(), which is why we have some cursors that are marked unused here
// User code may request binding to display given cursor by calling SetMouseCursor(), which is why we have some cursors that are marked unused here
enumImGuiMouseCursor_
enumImGuiMouseCursor_
@ -1262,6 +1274,7 @@ enum ImGuiMouseCursor_
ImGuiMouseCursor_ResizeNESW,// When hovering over the bottom-left corner of a window
ImGuiMouseCursor_ResizeNESW,// When hovering over the bottom-left corner of a window
ImGuiMouseCursor_ResizeNWSE,// When hovering over the bottom-right corner of a window
ImGuiMouseCursor_ResizeNWSE,// When hovering over the bottom-right corner of a window
ImGuiMouseCursor_Hand,// (Unused by Dear ImGui functions. Use for e.g. hyperlinks)
ImGuiMouseCursor_Hand,// (Unused by Dear ImGui functions. Use for e.g. hyperlinks)
ImGuiMouseCursor_NotAllowed,// When hovering something with disallowed interaction. Usually a crossed circle.
// NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
// NB: It is illegal to call push_back/push_front/insert with a reference pointing inside the ImVector data itself! e.g. v.push_back(v[10]) is forbidden.
@ -1476,9 +1489,9 @@ struct ImGuiIO
// 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.
// 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;// = NULL
constchar*BackendPlatformName;// = NULL
constchar*BackendRendererName;// = NULL
constchar*BackendRendererName;// = NULL
void*BackendPlatformUserData;// = NULL
void*BackendPlatformUserData;// = NULL // User data for platform back-end
void*BackendRendererUserData;// = NULL
void*BackendRendererUserData;// = NULL // User data for renderer back-end
void*BackendLanguageUserData;// = NULL
void*BackendLanguageUserData;// = NULL // User data for non C++ programming language back-end
// 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)
@ -1536,7 +1549,7 @@ struct ImGuiIO
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.
ImGuiTabItemFlags_NoCloseButton=1<<20,// Store whether p_open is set or not, which we need to recompute ContentWidth during layout.
ImGuiTabItemFlags_NoCloseButton=1<<20,// Track whether p_open was set or not (we'll need this info on the next frame to recompute ContentWidth during layout)
ImGuiTabItemFlags_Unsorted=1<<21,// [Docking] Trailing tabs with the _Unsorted flag will be sorted based on the DockOrder of their Window.
ImGuiTabItemFlags_Unsorted=1<<21,// [Docking] Trailing tabs with the _Unsorted flag will be sorted based on the DockOrder of their Window.
ImGuiTabItemFlags_Preview=1<<22// [Docking] Display tab shape for docking preview (height is adjusted slightly to compensate for the yet missing tab bar)
ImGuiTabItemFlags_Preview=1<<22// [Docking] Display tab shape for docking preview (height is adjusted slightly to compensate for the yet missing tab bar)