Window

A window is, as it name suggests, a window This window class is extremely minimalistic and is a port of the SDL_Window

Constructors

this
this(int w, int h, SDL_WindowFlags flags = SDL_WINDOW_SHOWN, string title = "", int x = SDL_WINDOWPOS_CENTERED, int y = SDL_WINDOWPOS_CENTERED)

Constructor for a window; needs at least a width and a height

this
this(SDL_Window* alreadyExisting)

Creates the window from an already existing SDL_Window

Destructor

~this
~this()

Ensures that SDL can properly dispose of the window

Members

Functions

hide
void hide()

Hides the window

maximize
void maximize()

Maximizes the window

minimize
void minimize()

Minimizes window in terms of size

raise
void raise()

Moves the window to be on top of everything else and to have the focus

restore
void restore()

Restores a window to its original state before a maximize or minimize

setAsModalFor
void setAsModalFor(Window parent)

Marks the current window as a modal for the given parent window

setBordered
void setBordered(bool borderedStatus)

Sets whether the window should be bordered or not Is not a property method because it is a setter without a getter

setResizable
void setResizable(bool resizability)

Sets whether the window should be resizable or not Is not a property method because it is a setter without a getter

show
void show()

Shows the window

Properties

brightness
float brightness [@property setter]

Sets the window's brightness or gama multiplier

brightness
float brightness [@property getter]

Gets the window's brightness or gama multiplier

displayMode
SDL_DisplayMode displayMode [@property setter]

Sets the display mode of this window

displayMode
SDL_DisplayMode displayMode [@property getter]

Gets the display mode of this window

grab
bool grab [@property setter]

Sets whether the window grabs input or not

grab
bool grab [@property getter]

Gets whether the window grabs input or not

handle
SDL_Window* handle [@property getter]

Returns the raw SDL data of this object

icon
Surface icon [@property setter]

Sets the window's icon

info
SDL_WindowFlags[] info [@property getter]

Gets the information about the window Returns an array of all the flags that describe this window

maximumSize
iVector maximumSize [@property setter]

Sets the window's maximum size

maximumSize
iVector maximumSize [@property getter]

Gets the window's maximum size

minimumSize
iVector minimumSize [@property setter]

Sets the window's minimum size

minimumSize
iVector minimumSize [@property getter]

Gets the window's minimum size

opacity
float opacity [@property setter]

Sets the window's opacity

opacity
float opacity [@property getter]

Gets the window's opacity

position
iVector position [@property setter]

Sets the window's screen position

position
iVector position [@property getter]

Gets the window's screen position

renderer
Renderer renderer [@property getter]

Gets the window's renderer This function shouldn't be used because this function returns a renderer object Once the returned object gets garbage collected, it deletes all instances of this window's renderer

size
iVector size [@property setter]

Sets the window's size

size
iVector size [@property getter]

Gets the window's size

title
string title [@property setter]

Sets the window's title

title
string title [@property getter]

Gets the window's title

Meta