class EditorRenderWindow

Inherits: IEditorWindow

Type of editor window that has a backing RenderWindow.

This means these are actual windows (in operating system terms), while other editor window types may be virtual (i.e. they cannot exist on their own, and they must be docked in an EditorRenderWindow).

Each window contains a GUI widget and a basic window background and frame, and it may be dragged and optionally resized.

Public

Constructors

EditorRenderWindow

EditorRenderWindow() = default

*********************************************************************

Methods

~EditorRenderWindow

~EditorRenderWindow() noexcept override

SetPosition

void SetPosition(const GUIPhysicalPoint &position) override

Top-left corner of the window in screen space.

GetPosition

GUIPhysicalPoint GetPosition() const override

SetSize

void SetSize(const GUIPhysicalSize &size) override

Size of the window.

GetSize

GUIPhysicalSize GetSize() const override

SetContentSize

void SetContentSize(const GUIPhysicalSize &size) override

Width & height of the content area of the window, in pixels.

The content area represents the area of the window not including the titlebar and the border.

GetContentSize

GUIPhysicalSize GetContentSize() const override

GetDPIScale

float GetDPIScale() const override

Returns currently set DPI scale.

Scale of 1.0 corresponds to 96 DPI. physical pixel = logical pixel * DPI scale logical pixel = physical pixel / DPI ccale;

GetRenderWindow

SPtr<RenderWindow> GetRenderWindow() const override

Returns the render window that this editor window is being rendered to.

GetGUIWidget

HGUIWidget GetGUIWidget() const override

Returns the GUI widget used for displaying GUI contents in the window.

GetGUICamera

HCamera GetGUICamera() const override

Returns the camera used for rendering the window GUI contents.

Close

void Close() override

Closes and destroys the window.

Hide

void Hide() override

Hides the window without closing it.

ScreenToWindowPosition

GUIPhysicalPoint ScreenToWindowPosition(const GUIPhysicalPoint &screenPoint) const override

Converts screen coordinates to coordinates relative to the window's GUI content panel.

WindowToScreenPosition

GUIPhysicalPoint WindowToScreenPosition(const GUIPhysicalPoint &windowPoint) const override

Converts coordinates relative to the window's GUI content panel to screen coordinates.

HasFocus

bool HasFocus() const

Checks whether the window currently has keyboard focus.

staticGetRttiStatic

static RTTIType *GetRttiStatic()

GetRtti

RTTIType *GetRtti() const override

Returns an interface you can use to access class' Run Time Type Information.

Protected

Methods

Initialize

void Initialize() override

Initializes data that cannot be initialized in the constructor.

Must be called right after construction.

DoOnWindowResized

virtual void DoOnWindowResized()

Callback that triggers whenever the underlying render window changes size.

DoOnWindowDPIScaleChanged

virtual void DoOnWindowDPIScaleChanged(float dpiScale)

Callback that triggers whenever the underlying render window DPI scale changes.

staticCreateRenderWindow

static SPtr<RenderWindow> CreateRenderWindow(const GUIPhysicalSize &size, bool isModal)

Creates a render window suitable for EditorRenderWindow use.

size
Size of the window.
isModal
True if the window is modal (always in front, non-resizable).

Fields

mRenderWindow

SPtr<RenderWindow> mRenderWindow

mSceneObject

HSceneObject mSceneObject

mGUI

HGUIWidget mGUI

mCamera

HCamera mCamera

mWindowFrame

mOwnsRenderWindow

bool mOwnsRenderWindow

mUseModalFrame

bool mUseModalFrame

mDPIScale

float mDPIScale

Private

Fields

mResizedConnection

HEvent mResizedConnection

mDPIScaleChangedConnection

HEvent mDPIScaleChangedConnection