Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888) + Comments in imgui.h
- Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
- Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
- Internals: PushItemFlag() flags are inherited by BeginChild().
- Internals: PushItemFlag() flags are inherited by BeginChild().
// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
// PS: In this Win32 handler, we use the capture API (GetCapture/SetCapture/ReleaseCapture) to be able to read mouse coordinations when dragging mouse outside of our window bounds.
// PS: In this Win32 handler, we use the capture API (GetCapture/SetCapture/ReleaseCapture) to be able to read mouse coordinations when dragging mouse outside of our window bounds.
// PS: We treat DBLCLK messages as regular mouse down messages, so this code will work on windows classes that have the CS_DBLCLKS flag set. Our own example app code doesn't set this flag.
// PS: We treat DBLCLK messages as regular mouse down messages, so this code will work on windows classes that have the CS_DBLCLKS flag set. Our own example app code doesn't set this flag.
// 2D vector (often used to store positions, sizes, etc.)
structImVec2
structImVec2
{
{
floatx,y;
floatx,y;
@ -128,7 +133,7 @@ struct ImVec2
#endif
#endif
};
};
// 4d vector (often used to store floating-point colors)
// 4D vector (often used to store floating-point colors)
structImVec4
structImVec4
{
{
floatx,y,z,w;
floatx,y,z,w;
@ -156,9 +161,9 @@ namespace ImGui
IMGUI_APIImGuiIO&GetIO();// access the IO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)
IMGUI_APIImGuiIO&GetIO();// access the IO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)
IMGUI_APIImGuiStyle&GetStyle();// access the Style structure (colors, sizes). Always use PushStyleCol(), PushStyleVar() to modify style mid-frame.
IMGUI_APIImGuiStyle&GetStyle();// access the Style structure (colors, sizes). Always use PushStyleCol(), PushStyleVar() to modify style mid-frame.
IMGUI_APIvoidNewFrame();// start a new ImGui frame, you can submit any command from this point until Render()/EndFrame().
IMGUI_APIvoidNewFrame();// start a new ImGui frame, you can submit any command from this point until Render()/EndFrame().
IMGUI_APIvoidEndFrame();// ends the ImGui frame. automatically called by Render(), you likely don't need to call that yourself directly. If you don't need to render data (skipping rendering) you may call EndFrame() but you'll have wasted CPU already! If you don't need to render, better to not create any imgui windows and not call NewFrame() at all!
IMGUI_APIvoidRender();// ends the ImGui frame, finalize the draw data. (Obsolete: optionally call io.RenderDrawListsFn if set. Nowadays, prefer calling your render function yourself.)
IMGUI_APIvoidRender();// ends the ImGui frame, finalize the draw data. (Obsolete: optionally call io.RenderDrawListsFn if set. Nowadays, prefer calling your render function yourself.)
IMGUI_APIImDrawData*GetDrawData();// valid after Render() and until the next call to NewFrame(). this is what you have to render. (Obsolete: this used to be passed to your io.RenderDrawListsFn() function.)
IMGUI_APIImDrawData*GetDrawData();// valid after Render() and until the next call to NewFrame(). this is what you have to render. (Obsolete: this used to be passed to your io.RenderDrawListsFn() function.)
IMGUI_APIvoidEndFrame();// ends the ImGui frame. automatically called by Render(), so most likely don't need to ever call that yourself directly. If you don't need to render you may call EndFrame() but you'll have wasted CPU already. If you don't need to render, better to not create any imgui windows instead!
// Demo, Debug, Information
// Demo, Debug, Information
IMGUI_APIvoidShowDemoWindow(bool*p_open=NULL);// create demo/test window (previously called ShowTestWindow). demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!
IMGUI_APIvoidShowDemoWindow(bool*p_open=NULL);// create demo/test window (previously called ShowTestWindow). demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!