public final class ImGuiPlatformIO extends ImGuiStruct
------------------------------------------------------------------ Input - Backend interface/functions + Monitor List ------------------------------------------------------------------ (Optional) Platform functions (e.g. Win32, GLFW, SDL2) For reference, the second column shows which function are generally calling the Platform Functions: N = ImGui::NewFrame() ~ beginning of the dear imgui frame: read info from platform/OS windows (latest size/position) F = ImGui::Begin(), ImGui::EndFrame() ~ during the dear imgui frame U = ImGui::UpdatePlatformWindows() ~ after the dear imgui frame: create and update all platform/OS windows R = ImGui::RenderPlatformWindowsDefault() ~ render D = ImGui::DestroyPlatformWindows() ~ shutdown The general idea is that NewFrame() we will read the current Platform/OS state, and UpdatePlatformWindows() will write to it. The functions are designed so we can mix and match 2 imgui_impl_xxxx files, one for the Platform (~window/input handling), one for Renderer. Custom engine backends will often provide both Platform and Renderer interfaces and so may not need to use all functions. Platform functions are typically called before their Renderer counterpart, apart from Destroy which are called the other way.
ptr
Constructor and Description |
---|
ImGuiPlatformIO(long ptr) |
isNotValidPtr, isValidPtr
public void setPlatformCreateWindow(ImPlatformFuncViewport func)
public void setPlatformDestroyWindow(ImPlatformFuncViewport func)
public void setPlatformShowWindow(ImPlatformFuncViewport func)
public void setPlatformSetWindowPos(ImPlatformFuncViewportImVec2 func)
public void setPlatformGetWindowPos(ImPlatformFuncViewportSuppImVec2 func)
public void setPlatformSetWindowSize(ImPlatformFuncViewportImVec2 func)
public void setPlatformGetWindowSize(ImPlatformFuncViewportSuppImVec2 func)
public void setPlatformSetWindowFocus(ImPlatformFuncViewport func)
public void setPlatformGetWindowFocus(ImPlatformFuncViewportSuppBoolean func)
public void setPlatformGetWindowMinimized(ImPlatformFuncViewportSuppBoolean func)
public void setPlatformSetWindowTitle(ImPlatformFuncViewportString func)
public void setPlatformSetWindowAlpha(ImPlatformFuncViewportFloat func)
public void setPlatformUpdateWindow(ImPlatformFuncViewport func)
public void setPlatformRenderWindow(ImPlatformFuncViewport func)
public void setPlatformSwapBuffers(ImPlatformFuncViewport func)
public void setPlatformGetWindowDpiScale(ImPlatformFuncViewportSuppFloat func)
public void setPlatformOnChangedViewport(ImPlatformFuncViewport func)
public void setRendererCreateWindow(ImPlatformFuncViewport func)
public void setRendererDestroyWindow(ImPlatformFuncViewport func)
public void setRendererSetWindowPos(ImPlatformFuncViewportImVec2 func)
public void setRendererRenderWindow(ImPlatformFuncViewport func)
public void setRendererSwapBuffers(ImPlatformFuncViewport func)
public void resizeMonitors(int size)
public int getMonitorsSize()
public void pushMonitors(float mainPosX, float mainPosY, float mainSizeX, float mainSizeY, float workPosX, float workPosY, float workSizeX, float workSizeY, float dpiScale)
public ImGuiPlatformMonitor getMonitors(int idx)
public int getViewportsSize()
public ImGuiViewport getViewports(int idx)