Class ImGuiPlatformIO
------------------------------------------------------------------ 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.
-
Field Summary
Fields inherited from class imgui.binding.ImGuiStruct
ptr -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetMonitors(int idx) intgetViewports(int idx) intvoidpushMonitors(long platformHandle, float mainPosX, float mainPosY, float mainSizeX, float mainSizeY, float workPosX, float workPosY, float workSizeX, float workSizeY, float dpiScale) voidresizeMonitors(int size) void// .void// N .void// N .void// .void// N .void// N .void// N .void// (Optional) [BETA] FIXME-DPI: DPI handling: Called during Begin() every time the viewport we are outputting into changes, so backend has a chance to swap fonts to adjust style.void// .void// .void// N .void// .void// .void// .void// .void// .void// .void// .void// N .void// .void// .void// .Methods inherited from class imgui.binding.ImGuiStruct
isNotValidPtr, isValidPtr
-
Constructor Details
-
ImGuiPlatformIO
public ImGuiPlatformIO(long ptr)
-
-
Method Details
-
setPlatformCreateWindow
// . . U . . // Create a new platform window for the given viewport. -
setPlatformDestroyWindow
// N . U . D // -
setPlatformShowWindow
// . . U . . // Newly created windows are initially hidden so SetWindowPos/Size/Title can be called on them before showing the window. -
setPlatformSetWindowPos
// . . U . . // Set platform window position (given the upper-left corner of client area). -
setPlatformGetWindowPos
// N . . . . // -
setPlatformSetWindowSize
// . . U . . // Set platform window client area size (ignoring OS decorations such as OS title bar etc.) -
setPlatformGetWindowSize
// N . . . . // Get platform window client area size -
setPlatformSetWindowFocus
// N . . . . // Move window to front and set input focus. -
setPlatformGetWindowFocus
// . . U . . // -
setPlatformGetWindowMinimized
// N . . . . // Get platform window minimized state. When minimized, we generally won't attempt to get/set size and contents will be culled more easily. -
setPlatformSetWindowTitle
// . . U . . // Set platform window title (given an UTF-8 string) -
setPlatformSetWindowAlpha
// . . U . . // (Optional) Setup window transparency -
setPlatformUpdateWindow
// . . U . . // (Optional) Called by UpdatePlatformWindows(). Optional hook to allow the platform backend from doing general book-keeping every frame. -
setPlatformRenderWindow
// . . . R . // (Optional) Main rendering (platform side! This is often unused, or just setting a "current" context for OpenGL bindings). -
setPlatformSwapBuffers
// . . . R . // (Optional) Call Present/SwapBuffers (platform side! This is often unused!). -
setPlatformGetWindowDpiScale
// N . . . . // (Optional) [BETA] FIXME-DPI: DPI handling: Return DPI scale for this viewport. 1.0f = 96 DPI. -
setPlatformOnChangedViewport
// (Optional) [BETA] FIXME-DPI: DPI handling: Called during Begin() every time the viewport we are outputting into changes, so backend has a chance to swap fonts to adjust style. -
setRendererCreateWindow
// . . U . . // Create swap chain, frame buffers etc. (called after Platform_CreateWindow) -
setRendererDestroyWindow
// N . U . D // Destroy swap chain, frame buffers etc. (called before Platform_DestroyWindow) -
setRendererSetWindowPos
// . . U . . // Resize swap chain, frame buffers etc. (called after Platform_SetWindowSize) -
setRendererRenderWindow
// . . . R . // (Optional) Clear framebuffer, setup render target, then render the viewport.DrawData. 'render_arg' is the value passed to RenderPlatformWindowsDefault(). -
setRendererSwapBuffers
// . . . R . // (Optional) Call Present/SwapBuffers. 'render_arg' is the value passed to RenderPlatformWindowsDefault(). -
resizeMonitors
public void resizeMonitors(int size) -
getMonitorsSize
public int getMonitorsSize() -
pushMonitors
public void pushMonitors(long platformHandle, float mainPosX, float mainPosY, float mainSizeX, float mainSizeY, float workPosX, float workPosY, float workSizeX, float workSizeY, float dpiScale) -
getMonitors
-
getViewportsSize
public int getViewportsSize() -
getViewports
-