struct ImGuiViewportP

Overview

#include <imgui_internal.h>

struct ImGuiViewportP: public ImGuiViewport
{
    // fields

    ImGuiWindow* Window;
    int Idx;
    int LastFrameActive;
    int LastFocusedStampCount;
    ImGuiID LastNameHash;
    ImVec2 LastPos;
    ImVec2 LastSize;
    float Alpha;
    float LastAlpha;
    bool LastFocusedHadNavWindow;
    short PlatformMonitor;
    int BgFgDrawListsLastFrame[2];
    ImDrawList* BgFgDrawLists[2];
    ImDrawData DrawDataP;
    ImDrawDataBuilder DrawDataBuilder;
    ImVec2 LastPlatformPos;
    ImVec2 LastPlatformSize;
    ImVec2 LastRendererSize;
    ImVec2 WorkInsetMin;
    ImVec2 WorkInsetMax;
    ImVec2 BuildWorkInsetMin;
    ImVec2 BuildWorkInsetMax;
    ImGuiID ID;
    ImGuiViewportFlags Flags;
    ImVec2 Pos;
    ImVec2 Size;
    ImVec2 FramebufferScale;
    ImVec2 WorkPos;
    ImVec2 WorkSize;
    float DpiScale;
    ImGuiID ParentViewportId;
    ImGuiViewport* ParentViewport;
    ImDrawData* DrawData;
    void* RendererUserData;
    void* PlatformUserData;
    void* PlatformHandle;
    void* PlatformHandleRaw;
    bool PlatformWindowCreated;
    bool PlatformRequestMove;
    bool PlatformRequestResize;
    bool PlatformRequestClose;

    // methods

    void ClearRequestFlags();
    ImVec2 CalcWorkRectPos(const ImVec2& inset_min) const;

    ImVec2 CalcWorkRectSize(
        const ImVec2& inset_min,
        const ImVec2& inset_max
        ) const;

    void UpdateWorkRect();
    ImRect GetMainRect() const;
    ImRect GetWorkRect() const;
    ImRect GetBuildWorkRect() const;
    ImVec2 GetCenter() const;
    ImVec2 GetWorkCenter() const;
};