ImGuiViewport

imguicpp.ImGuiViewport (extern class)

Static Members

getCenter(self: cpp.Star): ImVec2
Name Type
self cpp.Star
Returns
ImVec2

getWorkCenter(self: cpp.Star): ImVec2
Name Type
self cpp.Star
Returns
ImVec2

getDebugName(self: cpp.Star): cpp.ConstCharStar
Name Type
self cpp.Star
Returns
cpp.ConstCharStar

Instance Members

id: UInt

Unique identifier for the viewport


flags: Int

See ImGuiViewportFlags_


pos: ImVec2

Main Area: Position of the viewport (Dear ImGui coordinates are the same as OS desktop/native coordinates)


size: ImVec2

Main Area: Size of the viewport.


framebufferScale: ImVec2

Density of the viewport for Retina display (always 1,1 on Windows, may be 2,2 etc on macOS/iOS). This will affect font rasterizer density.


workPos: ImVec2

Work Area: Position of the viewport minus task bars, menus bars, status bars (>= Pos)


workSize: ImVec2

Work Area: Size of the viewport minus task bars, menu bars, status bars (<= Size)


dpiScale: cpp.Float32

1.0f = 96 DPI = No extra scale.


parentViewportId: UInt

(Advanced) 0: no parent. Instruct the platform backend to setup a parent/child relationship between platform windows.


parentViewport: cpp.Star

(Advanced) Direct shortcut to ImGui::FindViewportByID(ParentViewportId). NULL: no parent.


drawData: cpp.Star

The ImDrawData corresponding to this viewport. Valid after Render() and until the next call to NewFrame().


rendererUserData: cpp.RawPointer<cpp.Void>

void* to hold custom data structure for the renderer (e.g. swap chain, framebuffers etc.). generally set by your Renderer_CreateWindow function.


platformUserData: cpp.RawPointer<cpp.Void>

void* to hold custom data structure for the OS / platform (e.g. windowing info, render context). generally set by your Platform_CreateWindow function.


platformIconData: cpp.RawPointer<cpp.Void>

void* to hold custom data structure for the OS / platform to specify an icon. Currently unused for exposed to allow experiments.


platformHandle: cpp.RawPointer<cpp.Void>

void* to hold higher-level, platform window handle (e.g. HWND for Win32 backend, Uint32 WindowID for SDL, GLFWWindow* for GLFW), for FindViewportByPlatformHandle().


platformHandleRaw: cpp.RawPointer<cpp.Void>

void* to hold lower-level, platform-native window handle (always HWND on Win32 platform, unused for other platforms).


platformWindowCreated: Bool

Platform window has been created (Platform_CreateWindow() has been called). This is false during the first frame where a viewport is being created.


platformRequestMove: Bool

Platform window requested move (e.g. window was moved by the OS / host window manager, authoritative position will be OS window position)


platformRequestResize: Bool

Platform window requested resize (e.g. window was resized by the OS / host window manager, authoritative size will be OS window size)


platformRequestClose: Bool

Platform window requested closure (e.g. window was moved by the OS / host window manager, e.g. pressing ALT-F4)

Metadata

Name Parameters
:structAccess -
:include "linc_imgui.h"