@ -281,6 +281,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- examples: move ImGui::NewFrame() out of the backend _NewFrame() ?
- examples: move ImGui::NewFrame() out of the backend _NewFrame() ?
- viewport: make it possible to have no main/hosting viewport
- viewport: make it possible to have no main/hosting viewport
- viewport: with platform decoration enabled, platform may force constraint (e.g. minimum size)
- viewport: use getfocus/setfocus api to synchronize imgui<>platform focus better (e.g imgui-side ctrl-tab can focus os window, OS initial setup and alt-tab can focus imgui window etc.)
- viewport: use getfocus/setfocus api to synchronize imgui<>platform focus better (e.g imgui-side ctrl-tab can focus os window, OS initial setup and alt-tab can focus imgui window etc.)
- viewport: store per-viewport/monitor DPI in .ini file so an application reload or main window changing DPI on reload can be properly patched for.
- viewport: store per-viewport/monitor DPI in .ini file so an application reload or main window changing DPI on reload can be properly patched for.
// Late create viewport, based on the assumption that with our calculations, the DPI will be known ahead (same as the DPI of the selection done in UpdateSelectWindowViewport)
// Late create viewport, based on the assumption that with our calculations, the DPI will be known ahead (same as the DPI of the selection done in UpdateSelectWindowViewport)
ImGuiConfigFlags_ViewportsEnable=1<<10,// Viewport enable flags (require both ImGuiConfigFlags_PlatformHasViewports + ImGuiConfigFlags_RendererHasViewports set by the respective back-ends)
ImGuiConfigFlags_ViewportsEnable=1<<10,// Viewport enable flags (require both ImGuiConfigFlags_PlatformHasViewports + ImGuiConfigFlags_RendererHasViewports set by the respective back-ends)
ImGuiConfigFlags_ViewportsNoTaskBarIcons=1<<11,// Disable task bars icons for all secondary viewports (will set ImGuiViewportFlags_NoTaskBarIcon on them)
ImGuiConfigFlags_ViewportsNoTaskBarIcon=1<<11,// Disable task bars icons for all secondary viewports (will set ImGuiViewportFlags_NoTaskBarIcon on them)
ImGuiConfigFlags_ViewportsNoMerge=1<<12,// All floating windows will always create their own viewport and platform window.
ImGuiConfigFlags_ViewportsNoMerge=1<<12,// All floating windows will always create their own viewport and platform window.
ImGuiConfigFlags_DpiEnableScaleViewports=1<<13,// FIXME-DPI: Reposition and resize imgui windows when the DpiScale of a viewport changed (mostly useful for the main viewport hosting other window). Note that resizing the main window itself is up to your application.
ImGuiConfigFlags_ViewportsDecoration=1<<13,// FIXME [Broken] Enable platform decoration for all secondary viewports (will not set ImGuiViewportFlags_NoDecoration on them). This currently doesn't behave well in Windows because 1) By default the new window animation get in the way of our transitions, 2) It enable a minimum window size which tends to breaks resizing. You can workaround the later by setting style.WindowMinSize to a bigger value.
ImGuiConfigFlags_DpiEnableScaleFonts=1<<14,// FIXME-DPI: Request bitmap-scaled fonts to match DpiScale. This is a very low-quality workaround. The correct way to handle DPI is _currently_ to replace the atlas and/or fonts in the Platform_OnChangedViewport callback, but this is all early work in progress.
ImGuiConfigFlags_DpiEnableScaleViewports=1<<14,// FIXME-DPI: Reposition and resize imgui windows when the DpiScale of a viewport changed (mostly useful for the main viewport hosting other window). Note that resizing the main window itself is up to your application.
ImGuiConfigFlags_DpiEnableScaleFonts=1<<15,// FIXME-DPI: Request bitmap-scaled fonts to match DpiScale. This is a very low-quality workaround. The correct way to handle DPI is _currently_ to replace the atlas and/or fonts in the Platform_OnChangedViewport callback, but this is all early work in progress.
// User storage (to allow your back-end/engine to communicate to code that may be shared between multiple projects. Those flags are not used by core ImGui)
// User storage (to allow your back-end/engine to communicate to code that may be shared between multiple projects. Those flags are not used by core ImGui)
ImGuiConfigFlags_IsSRGB=1<<20,// Application is SRGB-aware.
ImGuiConfigFlags_IsSRGB=1<<20,// Application is SRGB-aware.
@ -2068,7 +2069,8 @@ struct ImGuiPlatformIO
// Flags stored in ImGuiViewport::Flags, giving indications to the platform back-ends
// Flags stored in ImGuiViewport::Flags, giving indications to the platform back-ends
enumImGuiViewportFlags_
enumImGuiViewportFlags_
{
{
ImGuiViewportFlags_NoDecoration=1<<0,// Platform Window: Disable platform title bar, borders, etc.
ImGuiViewportFlags_None=0,
ImGuiViewportFlags_NoDecoration=1<<0,// Platform Window: Disable platform decorations: title bar, borders, etc.
ImGuiViewportFlags_NoFocusOnAppearing=1<<1,// Platform Window: Don't take focus when created.
ImGuiViewportFlags_NoFocusOnAppearing=1<<1,// Platform Window: Don't take focus when created.
ImGuiViewportFlags_NoInputs=1<<2,// Platform Window: Make mouse pass through so we can drag this window while peaking behind it.
ImGuiViewportFlags_NoInputs=1<<2,// Platform Window: Make mouse pass through so we can drag this window while peaking behind it.
ImGuiViewportFlags_NoTaskBarIcon=1<<3,// Platform Window: Disable platform task bar icon (for popups, menus, or all windows if ImGuiConfigFlags_ViewportsNoTaskBarIcons if set)
ImGuiViewportFlags_NoTaskBarIcon=1<<3,// Platform Window: Disable platform task bar icon (for popups, menus, or all windows if ImGuiConfigFlags_ViewportsNoTaskBarIcons if set)
@ -2088,9 +2090,9 @@ struct ImGuiViewport
void*PlatformUserData;// void* to hold custom data structure for the platform (e.g. windowing info, render context)
void*PlatformUserData;// void* to hold custom data structure for the platform (e.g. windowing info, render context)
void*PlatformHandle;// void* for FindViewportByPlatformHandle(). (e.g. suggested to use natural platform handle such as HWND, GlfwWindow*, SDL_Window*)
void*PlatformHandle;// void* for FindViewportByPlatformHandle(). (e.g. suggested to use natural platform handle such as HWND, GlfwWindow*, SDL_Window*)
boolPlatformRequestClose;// Platform window requested closure (e.g. window was moved by the OS / host window manager, e.g. pressing ALT-F4)
boolPlatformRequestMove;// Platform window requested move (e.g. window was moved by the OS / host window manager)
boolPlatformRequestMove;// Platform window requested move (e.g. window was moved by the OS / host window manager, authoritative position will be OS window position)
boolPlatformRequestResize;// Platform window requested resize (e.g. window was resize by the OS / host window manager)
boolPlatformRequestResize;// Platform window requested resize (e.g. window was resized by the OS / host window manager, authoritative size will be OS window size)
void*RendererUserData;// void* to hold custom data structure for the renderer (e.g. swap chain, frame-buffers etc.)
void*RendererUserData;// void* to hold custom data structure for the renderer (e.g. swap chain, frame-buffers etc.)
ImGui::SameLine();ShowHelpMarker("Toggling this at runtime is normally unsupported (most platform back-ends won't refresh the task bar icon state right away).");
ImGui::SameLine();ShowHelpMarker("Toggling this at runtime is normally unsupported (most platform back-ends won't refresh the task bar icon state right away).");
ImGui::SameLine();ShowHelpMarker("Toggling this at runtime is normally unsupported (most platform back-ends won't refresh the decoration right away).");