// The reason this is exposed in imgui_internal.h is: on touch-based system that don't have hovering, we want to dispatch inputs to the right target (imgui vs imgui+app)
// The reason this is exposed in imgui_internal.h is: on touch-based system that don't have hovering, we want to dispatch inputs to the right target (imgui vs imgui+app)
// Message to the person tempted to delete this file when integrating ImGui into their code base:
// Message to the person tempted to delete this file when integrating ImGui into their code base:
@ -12,11 +12,11 @@
// Thank you,
// Thank you,
// -Your beloved friend, imgui_demo.cpp (that you won't delete)
// -Your beloved friend, imgui_demo.cpp (that you won't delete)
// Message to beginner C/C++ programmers. About the meaning of 'static': in this demo code, we frequently we use 'static' variables inside functions.
// Message to beginner C/C++ programmers about the meaning of the 'static' keyword: in this demo code, we frequently we use 'static' variables inside functions.
// We do this as a way to gather code and data in the same place, just to make the demo code faster to read, faster to write, and use less code.
// A static variable persist across calls, so it is essentially like a global variable but declared inside the scope of the function.
// A static variable persist across calls, so it is essentially like a global variable but declared inside the scope of the function.
// We do this as a way to gather code and data in the same place, just to make the demo code faster to read, faster to write, and use less code.
// It also happens to be a convenient way of storing simple UI related information as long as your function doesn't need to be reentrant or used in threads.
// It also happens to be a convenient way of storing simple UI related information as long as your function doesn't need to be reentrant or used in threads.
// This might be a pattern you occasionally want to use in your code, but most of the real data you would be editing is likely to be stored outside your function.
// This might be a pattern you occasionally want to use in your code, but most of the real data you would be editing is likely to be stored outside your functions.
ImGui::BulletText("Double-click on title bar to collapse window.");
ImGui::BulletText("Double-click on title bar to collapse window.");
@ -124,10 +127,11 @@ void ImGui::ShowUserGuide()
ImGui::Unindent();
ImGui::Unindent();
}
}
// Demonstrate most ImGui features (big function!)
// Demonstrate most Dear ImGui features (this is big function!)
// You may execute this function to experiment with the UI and understand what it does. You may then search for keywords in the code when you are interested by a specific feature.
voidImGui::ShowDemoWindow(bool*p_open)
voidImGui::ShowDemoWindow(bool*p_open)
{
{
// Examples apps
// Examples Apps (accessible from the "Examples" menu)
if(no_close)p_open=NULL;// Don't pass our bool* to Begin
if(no_close)p_open=NULL;// Don't pass our bool* to Begin
// We specify a default size in case there's no data in the .ini file. Typically this isn't required! We only do it to make the Demo applications a little more welcoming.
// Most "big" widgets share a common width settings by default.
//ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.65f); // Use 2/3 of the space for widgets and 1/3 for labels (default)
ImGui::PushItemWidth(ImGui::GetFontSize()*-12);// Use fixed width for labels (by passing a negative value), the rest goes to widgets. We choose a width proportional to our font size.
// You may use this file to debug, understand or extend ImGui features but we don't provide any guarantee of forward compatibility!
// You may use this file to debug, understand or extend ImGui features but we don't provide any guarantee of forward compatibility!
@ -1022,7 +1022,7 @@ struct IMGUI_API ImGuiWindow
boolCollapseToggleWanted;
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)
bool CloseButton;// Set when the window has a close button (p_open != NULL)
boolHasCloseButton;// Set when the window has a close button (p_open != NULL)
intBeginOrderWithinParent;// Order within immediate parent window, if we are a child window. Otherwise 0.
intBeginOrderWithinParent;// Order within immediate parent window, if we are a child window. Otherwise 0.
intBeginOrderWithinContext;// Order within entire imgui context. This is mostly used for debugging submission order related issues.
intBeginOrderWithinContext;// Order within entire imgui context. This is mostly used for debugging submission order related issues.
intBeginCount;// Number of Begin() during the current frame (generally 0 or 1, 1+ if appending via multiple Begin/End pairs)
intBeginCount;// Number of Begin() during the current frame (generally 0 or 1, 1+ if appending via multiple Begin/End pairs)
@ -1127,7 +1127,8 @@ namespace ImGui
IMGUI_APIvoidInitialize(ImGuiContext*context);
IMGUI_APIvoidInitialize(ImGuiContext*context);
IMGUI_APIvoidShutdown(ImGuiContext*context);// Since 1.60 this is a _private_ function. You can call DestroyContext() to destroy the context created by CreateContext().
IMGUI_APIvoidShutdown(ImGuiContext*context);// Since 1.60 this is a _private_ function. You can call DestroyContext() to destroy the context created by CreateContext().