Viewport: Changed Monitor field to use Pos+Size (more consistent), changed FullMin,FullMax to MainPos,MainSize. Made main viewport accessible in PlatformIO on first frame. Fixed casing of ImGuiViewportFlags_TopMost flag. (#1542)
// Warning: the validity of monitor DPI information on Windows depends on the application DPI awareness settings, which generally needs to be set in the manifest or at runtime.
IM_ASSERT(mon.FullMin.x<mon.FullMax.x&&mon.FullMin.y<mon.FullMax.y&&"Monitor bounds not setup properly.");
IM_ASSERT(mon.WorkMin.x<mon.WorkMax.x&&mon.WorkMin.y<mon.WorkMax.y&&"Monitor bounds not setup properly. If you don't have work area information, just copy Min/Max into them.");
IM_ASSERT(mon.MainSize.x>0.0f&&mon.MainSize.y>0.0f&&"Monitor bounds not setup properly.");
IM_ASSERT(mon.WorkSize.x>0.0f&&mon.WorkSize.y>0.0f&&"Monitor bounds not setup properly. If you don't have work area information, just copy Min/Max into them.");
@ -74,6 +74,7 @@ struct ImGuiListClipper; // Helper to manually clip large list of ite
structImGuiPayload;// User data payload for drag and drop operations
structImGuiViewport;// Viewport (generally ~1 per window to output to at the OS level. Need per-platform support to use multiple viewports)
structImGuiPlatformIO;// Multi-viewport support: interface for Platform/Renderer back-ends + viewports to render
structImGuiPlatformMonitor;// Multi-viewport support: user-provided bounds for each connected monitor/display. Used when positioning popups and tooltips to avoid them straddling monitors
structImGuiContext;// ImGui context (opaque)
#ifndef ImTextureID
@ -1890,10 +1891,10 @@ struct ImFont
// Dear ImGui only uses this to clamp the position of popups and tooltips so they don't straddle multiple monitors
structImGuiPlatformMonitor
{
ImVec2FullMin,FullMax;// Coordinates of the area displayed on this monitor (Min = upper left, Max = bottom right)
ImVec2WorkMin,WorkMax;// (Optional) Coordinates without task bars / side bars / menu bars. imgui uses this to avoid positioning popups/tooltips inside this region.
ImVec2MainPos,MainSize;// Coordinates of the area displayed on this monitor (Min = upper left, Max = bottom right)
ImVec2WorkPos,WorkSize;// (Optional) Coordinates without task bars / side bars / menu bars. imgui uses this to avoid positioning popups/tooltips inside this region.
// (Optional) Setup required only if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable) is enabled
@ -1956,7 +1957,7 @@ enum ImGuiViewportFlags_
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_NoRendererClear=1<<4,// Platform Window: Renderer doesn't need to clear the framebuffer ahead.
imGuiViewportFlags_TopMost =1<<5// Platform Window: Display on top (for tooltips only)
ImGuiViewportFlags_TopMost =1<<5// Platform Window: Display on top (for tooltips only)
};
// The viewports created and managed by imgui. The role of the platform back-end is to create the platform/OS windows corresponding to each viewport.