Viewport, Platform: Fixed IME positioning for multi-viewport. Moved API from ImGuiIO to ImGuiPlatformIO. Because it is extremely unlikely to people redefined this API manually the moving-forward-breakage is ok. (#1542)
@ -261,7 +261,6 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- viewport: popup/tooltip glitches when appearing near the monitor limits (e.g. opening a menu).
- viewport: popup/tooltip glitches when appearing near the monitor limits (e.g. opening a menu).
- viewport: platform: introduce getfocus/setfocus api, so e.g. focus flags can be honored, imgui-side ctrl-tab can focus os window, OS alt-tab can focus imgui window etc.
- viewport: platform: introduce getfocus/setfocus api, so e.g. focus flags can be honored, imgui-side ctrl-tab can focus os window, OS 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.
- viewport: IME positioning are wrong.
- viewport: vulkan renderer implementation.
- viewport: vulkan renderer implementation.
- viewport: need to clarify how to use GetMousePos() from a user point of view.
- viewport: need to clarify how to use GetMousePos() from a user point of view.
// Optional: notify OS Input Method Editor of the screen position of your cursor for text input position (e.g. when using Japanese/Chinese IME in Windows)
// (default to use native imm32 api on Windows)
void(*ImeSetInputScreenPosFn)(intx,inty);
void*ImeWindowHandle;// (Windows) Set this to your HWND to get automatic IME cursor positioning.
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
// [OBSOLETE] Rendering function, will be automatically called in Render(). Please call your rendering function yourself now! You can obtain the ImDrawData* by calling ImGui::GetDrawData() after Render().
// [OBSOLETE] Rendering function, will be automatically called in Render(). Please call your rendering function yourself now! You can obtain the ImDrawData* by calling ImGui::GetDrawData() after Render().
// See example applications if you are unsure of how to implement this.
// See example applications if you are unsure of how to implement this.
@ -1896,7 +1891,7 @@ struct ImGuiPlatformIO
// Input - Back-end interface/functions + Monitor List
// Input - Back-end interface/functions + Monitor List
float(*Platform_GetWindowDpiScale)(ImGuiViewport*vp);// (Optional) DPI handling: Return DPI scale for this viewport. 1.0f = 96 DPI. (FIXME-DPI)
float(*Platform_GetWindowDpiScale)(ImGuiViewport*vp);// (Optional) DPI handling: Return DPI scale for this viewport. 1.0f = 96 DPI. (FIXME-DPI)
void(*Platform_OnChangedViewport)(ImGuiViewport*vp);// (Optional) DPI handling: Called during Begin() every time the viewport we are outputting into changes, so back-end has a chance to swap fonts to adjust style.
void(*Platform_OnChangedViewport)(ImGuiViewport*vp);// (Optional) DPI handling: Called during Begin() every time the viewport we are outputting into changes, so back-end has a chance to swap fonts to adjust style.
void(*Platform_SetImeInputPos)(ImGuiViewport*vp,ImVec2pos);// (Optional) Set IME (Input Method Editor, e.g. for Asian languages) input position, so text preview appears over the imgui input box.
int(*Platform_CreateVkSurface)(ImGuiViewport*vp,ImU64vk_inst,constvoid*vk_allocators,ImU64*out_vk_surface);// (Optional) For Renderer to call into Platform code
int(*Platform_CreateVkSurface)(ImGuiViewport*vp,ImU64vk_inst,constvoid*vk_allocators,ImU64*out_vk_surface);// (Optional) For Renderer to call into Platform code
// List of monitors (updated by: app/back-end, used by: imgui to clamp popups/tooltips within same monitor and not have them straddle monitors)
// (Optional) List of monitors (updated by: app/back-end, used by: imgui to clamp popups/tooltips within same monitor and not have them straddle monitors)