class IEditorWindow

Provides a common interface for all editor window types.

Public

Methods

~IEditorWindow

virtual ~IEditorWindow() noexcept = default

SetPosition

virtual void SetPosition(const GUIPhysicalPoint &position) = 0

Top-left corner of the window in screen space.

GetPosition

virtual GUIPhysicalPoint GetPosition() const = 0

SetSize

virtual void SetSize(const GUIPhysicalSize &size) = 0

Size of the window.

GetSize

virtual GUIPhysicalSize GetSize() const = 0

SetLogicalSize

void SetLogicalSize(const GUILogicalSize &size)

Sets the size of the window in logical units.

This means window will scale with DPI scale.

SetContentSize

virtual void SetContentSize(const GUIPhysicalSize &size)

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

virtual GUIPhysicalSize GetContentSize() const

GetDPIScale

virtual float GetDPIScale() const = 0

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;

Close

virtual void Close() = 0

Closes and destroys the window.

Hide

virtual void Hide()

Hides the window without closing it.

ScreenToWindowPosition

virtual GUIPhysicalPoint ScreenToWindowPosition(const GUIPhysicalPoint &screenPosition) const = 0

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

WindowToScreenPosition

virtual GUIPhysicalPoint WindowToScreenPosition(const GUIPhysicalPoint &windowPosition) const = 0

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

staticGetRttiStatic

static RTTIType *GetRttiStatic()

GetRtti

RTTIType *GetRtti() const override

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

Internal

Methods

GetContent

virtual GUIPanel *GetContent() const

Returns the GUI panel at the root of the window.

You should all your own GUI elements as children of this element.

Initialize

virtual void Initialize()

Initializes data that cannot be initialized in the constructor.

Must be called right after construction.

Update

virtual void Update()

Called once every frame.

GetRenderWindow

virtual SPtr<RenderWindow> GetRenderWindow() const = 0

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

GetGUIWidget

virtual HGUIWidget GetGUIWidget() const = 0

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

GetGUICamera

virtual HCamera GetGUICamera() const = 0

Returns the camera used for rendering the window GUI contents.