class DropDownWindow

Inherits: IEditorWindow

This is a generic GUI drop down window class that can be used for displaying custom drop down content.

Public

Constructors

DropDownWindow

DropDownWindow() = default

Methods

~DropDownWindow

virtual ~DropDownWindow() noexcept

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

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;

ScreenToWindowPosition

GUIPhysicalPoint ScreenToWindowPosition(const GUIPhysicalPoint &screenPosition) const override

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

WindowToScreenPosition

GUIPhysicalPoint WindowToScreenPosition(const GUIPhysicalPoint &windowPosition) const override

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

GetContent

GUIPanel *GetContent() const override

Returns the GUI panel at the root of the window.

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

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.

staticGetRttiStatic

static RTTIType *GetRttiStatic()

GetRtti

RTTIType *GetRtti() const override

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

Protected

Constructors

DropDownWindow

DropDownWindow(const SPtr<RenderWindow> &parent, const HCamera &camera, const GUIPhysicalPoint &position, const GUIPhysicalSize &size)

Fields

mContent

GUIPanel * mContent

Private

Methods

DropDownFocusGained

void DropDownFocusGained()

Triggered when the user clicks outside of the drop down area.

Fields

mRenderWindow

SPtr<RenderWindow> mRenderWindow

mSceneObject

HSceneObject mSceneObject

mGUI

HGUIWidget mGUI

mFrontHitBox

GUIDropDownHitBox * mFrontHitBox

mBackHitBox

GUIDropDownHitBox * mBackHitBox

mRootPanel

GUIPanel * mRootPanel

mPosition

GUIPhysicalPoint mPosition

mSize

GUIPhysicalSize mSize

mDPIScale

float mDPIScale