nCine::Backends::SdlAuxiliaryWindow class

Window besides the main one made with SDL, see AuxiliaryWindow.

Base classes

class nCine::AuxiliaryWindow
Window of the application besides the main one, as a panel dragged out of it.

Public static functions

static auto IsSupported() -> bool
Returns true if windows besides the main one can be made with this build and video driver.
static auto Create(const AuxiliaryWindowDesc& desc) -> std::unique_ptr<SdlAuxiliaryWindow>
Makes a hidden window, nullptr if it can't be made.

Constructors, destructors, conversion operators

~SdlAuxiliaryWindow() override

Public functions

void SetBounds(const Recti& bounds) override
Moves and resizes it, in units of the desktop.
auto GetBounds() const -> Recti override
Returns where it is and its size, in units of the desktop, which may be larger than pixels on a scaled display.
auto GetPixelSize() const -> Vector2i override
Returns the size of what is drawn into it in pixels.
auto GetContentScale() const -> float override
Returns the scale of the display it's on, 1 for 100 %.
auto IsFocused() const -> bool override
Returns true if it has the keyboard focus.
void Raise() override
Brings it in front of other windows and gives it the focus.
void SetTitle(StringView title) override
Sets its title, the system shows it on the taskbar.

Protected functions

void SetVisible(bool visible, bool activate) override
Makes the window seen, or hides it.

Function documentation

float nCine::Backends::SdlAuxiliaryWindow::GetContentScale() const override

Returns the scale of the display it's on, 1 for 100 %.

The ratio to the scale of the main window (see IGfxDevice::GetWindowContentScale()) is how much larger what is shown in it has to be drawn on another display. By default it's how many pixels it has for a unit of the desktop, which is the scale of the display where the system scales the units of windows by it.