Windows
Functions
Clear Window
clears a window to the specified color given in clr
Parameters:
Name | Type | Description |
---|---|---|
wind | Window | the Window to clear |
clr | Color | the Color to clear the window to. |
Signatures:
void clear_window(window wind, color clr)
public void Window.Clear(Color clr);public static void SplashKit.ClearWindow(Window wind, Color clr);
def clear_window(wind, clr):
procedure ClearWindow(wind: Window; clr: Color)
Close All Windows
Releases all of the windows which have been loaded.
Signatures:
void close_all_windows()
public static void SplashKit.CloseAllWindows();
def close_all_windows():
procedure CloseAllWindows()
Usage:
Close Current Window
Closes and frees the current window.
Signatures:
void close_current_window()
public static void SplashKit.CloseCurrentWindow();
def close_current_window():
procedure CloseCurrentWindow()
Close Window
Close Window
Closes and frees the graphics window identified by name
.
Parameters:
Name | Type | Description |
---|---|---|
name | String | The name (caption) of the window to close |
Signatures:
void close_window(const string &name)
public static void SplashKit.CloseWindow(string name);
def close_window_named(name):
procedure CloseWindow(const name: String)
Close Window
Closes and frees the graphics window supplied in wind
.
Parameters:
Name | Type | Description |
---|---|---|
wind | Window | The window to close |
Signatures:
void close_window(window wind)
public void Window.Close();public static void SplashKit.CloseWindow(Window wind);
def close_window(wind):
procedure CloseWindow(wind: Window)
Current Window
Returns the window that you are currently interacting with. This will be the default window for drawing options, and events.
Return Type: Window
Signatures:
window current_window()
public static Window SplashKit.CurrentWindow();
def current_window():
function CurrentWindow(): Window
Current Window Has Border
Indicate if the current window has a border.
Return Type: Boolean
Signatures:
bool current_window_has_border()
public static bool SplashKit.CurrentWindowHasBorder();
def current_window_has_border():
function CurrentWindowHasBorder(): Boolean
Current Window Height
Returns the height of the current window.
Return Type: Integer
Signatures:
int current_window_height()
public static int SplashKit.CurrentWindowHeight();
def current_window_height():
function CurrentWindowHeight(): Integer
Current Window Is Fullscreen
Is the current window currently fullscreen?
Return Type: Boolean
Signatures:
bool current_window_is_fullscreen()
public static bool SplashKit.CurrentWindowIsFullscreen();
def current_window_is_fullscreen():
function CurrentWindowIsFullscreen(): Boolean
Current Window Position
The location of the current window.
Return Type: Point 2d
Signatures:
point_2d current_window_position()
public static Point2D SplashKit.CurrentWindowPosition();
def current_window_position():
function CurrentWindowPosition(): Point2D
Current Window Toggle Border
Toggle the current window border.
Signatures:
void current_window_toggle_border()
public static void SplashKit.CurrentWindowToggleBorder();
def current_window_toggle_border():
procedure CurrentWindowToggleBorder()
Current Window Toggle Fullscreen
Toggle the fullscreen property of the current window
Signatures:
void current_window_toggle_fullscreen()
public static void SplashKit.CurrentWindowToggleFullscreen();
def current_window_toggle_fullscreen():
procedure CurrentWindowToggleFullscreen()
Current Window Width
Returns the width of the current window.
Return Type: Integer
Signatures:
int current_window_width()
public static int SplashKit.CurrentWindowWidth();
def current_window_width():
function CurrentWindowWidth(): Integer
Current Window X
The x location of the current window on the displays.
Return Type: Integer
Signatures:
int current_window_x()
public static int SplashKit.CurrentWindowX();
def current_window_x():
function CurrentWindowX(): Integer
Current Window Y
The y location of the current window on the displays.
Return Type: Integer
Signatures:
int current_window_y()
public static int SplashKit.CurrentWindowY();
def current_window_y():
function CurrentWindowY(): Integer
Has Window
Determines if SplashKit has a window loaded with the supplied name. This checks against all windows loaded, those loaded without a name are assigned the filename as a default. If this returns false
, you may want to use load_window
to load in a specific window and give it the desired name.
Parameters:
Name | Type | Description |
---|---|---|
caption | String | The name of the window to check for. |
Return Type: Boolean
Signatures:
bool has_window(string caption)
public static bool SplashKit.HasWindow(string caption);
def has_window(caption):
function HasWindow(caption: String): Boolean
Is Current Window
Check if the requested window is the current window.
Parameters:
Name | Type | Description |
---|---|---|
wind | Window | The window to check |
Return Type: Boolean
Signatures:
bool is_current_window(window wind)
public bool Window.IsCurrentWindow { get }public static bool SplashKit.IsCurrentWindow(Window wind);
def is_current_window(wind):
function IsCurrentWindow(wind: Window): Boolean
Move Current Window To
Move the current window to the new location on the displays.
Parameters:
Name | Type | Description |
---|---|---|
x | Integer | The new x location |
y | Integer | The new y location |
Signatures:
void move_current_window_to(int x, int y)
public static void SplashKit.MoveCurrentWindowTo(int x, int y);
def move_current_window_to(x, y):
procedure MoveCurrentWindowTo(x: Integer; y: Integer)
Move Window To
Move Window To
Move the window to the new location on the displays.
Parameters:
Name | Type | Description |
---|---|---|
name | String | The name of the window to move |
x | Integer | The new x location |
y | Integer | The new y location |
Signatures:
void move_window_to(const string &name, int x, int y)
public static void SplashKit.MoveWindowTo(string name, int x, int y);
def move_window_to_named(name, x, y):
procedure MoveWindowTo(const name: String; x: Integer; y: Integer)
Move Window To
Move the window to the new location on the displays.
Parameters:
Name | Type | Description |
---|---|---|
wind | Window | the window to move. |
x | Integer | The new x location |
y | Integer | The new y location |
Signatures:
void move_window_to(window wind, int x, int y)
public void Window.MoveTo(int x, int y);public static void SplashKit.MoveWindowTo(Window wind, int x, int y);
def move_window_to(wind, x, y):
procedure MoveWindowTo(wind: Window; x: Integer; y: Integer)
Open Window
Opens a new graphics window. The supplied caption
is used to name and identify the window. The supplied width
and height
indicate the size of the window. The window can be retrieved by passing caption
to the Window Named
function.
Parameters:
Name | Type | Description |
---|---|---|
caption | String | The title of the window. If a window with this caption already exists, SplashKit will alter the caption to ensure that it is unique. |
width | Integer | The width of the window |
height | Integer | The height of the window |
Return Type: Window
Signatures:
window open_window(string caption, int width, int height)
public static Window SplashKit.OpenWindow(string caption, int width, int height);public Window(string caption, int width, int height);
def open_window(caption, width, height):
function OpenWindow(caption: String; width: Integer; height: Integer): Window
Usage:
Refresh Window
Refresh Window
Refreshes the window wind
.
Parameters:
Name | Type | Description |
---|---|---|
wind | Window | the Window to refresh. |
Signatures:
void refresh_window(window wind)
public void Window.Refresh();public static void SplashKit.RefreshWindow(Window wind);
def refresh_window(wind):
procedure RefreshWindow(wind: Window)
Usage:
Refresh Window
Refreshes the window wind
.
Parameters:
Name | Type | Description |
---|---|---|
wind | Window | the Window to refresh. |
target_fps | unsigned int | the desired framerate |
Signatures:
void refresh_window(window wind, unsigned int target_fps)
public void Window.Refresh(uint targetFps);public static void SplashKit.RefreshWindow(Window wind, uint targetFps);
def refresh_window_with_target_fps(wind, target_fps):
procedure RefreshWindow(wind: Window; targetFps: Cardinal)
Resize Current Window
Change the size of the current window.
Parameters:
Name | Type | Description |
---|---|---|
width | Integer | Its new width |
height | Integer | Its new height |
Signatures:
void resize_current_window(int width, int height)
public static void SplashKit.ResizeCurrentWindow(int width, int height);
def resize_current_window(width, height):
procedure ResizeCurrentWindow(width: Integer; height: Integer)
Resize Window
Change the size of the window.
Parameters:
Name | Type | Description |
---|---|---|
wnd | Window | The window to change. |
width | Integer | Its new width |
height | Integer | Its new height |
Signatures:
void resize_window(window wnd, int width, int height)
public void Window.Resize(int width, int height);public static void SplashKit.ResizeWindow(Window wnd, int width, int height);
def resize_window(wnd, width, height):
procedure ResizeWindow(wnd: Window; width: Integer; height: Integer)
Set Current Window
Set Current Window
Set the current window to the window with the supplied caption.
Parameters:
Name | Type | Description |
---|---|---|
name | String | The caption of the new current window. |
Signatures:
void set_current_window(const string &name)
public static void SplashKit.SetCurrentWindow(string name);
def set_current_window_named(name):
procedure SetCurrentWindow(const name: String)
Set Current Window
Change the current window. Use this so that you can draw to different windows by default.
Parameters:
Name | Type | Description |
---|---|---|
wind | Window | The new current window |
Signatures:
void set_current_window(window wind)
public void Window.MakeCurrent();public static void SplashKit.SetCurrentWindow(Window wind);
def set_current_window(wind):
procedure SetCurrentWindow(wind: Window)
Window Caption
The caption of the window.
Parameters:
Name | Type | Description |
---|---|---|
wind | Window | The window |
Return Type: String
Signatures:
string window_caption(window wind)
public string Window.Caption { get }public static string SplashKit.WindowCaption(Window wind);
def window_caption(wind):
function WindowCaption(wind: Window): String
Window Close Requested
Window Close Requested
Checks all opened windows in the current program to determin if a window with the name name
is currently open, and will close a window if one is found.
Parameters:
Name | Type | Description |
---|---|---|
name | String | The name of the window to close |
Return Type: Boolean
Signatures:
bool window_close_requested(const string &name)
public static bool SplashKit.WindowCloseRequested(string name);
def window_close_requested_named(name):
function WindowCloseRequested(const name: String): Boolean
Window Close Requested
Closes the window given in wind
Parameters:
Name | Type | Description |
---|---|---|
wind | Window | the Window to be closed |
Return Type: Boolean
Signatures:
bool window_close_requested(window wind)
public bool Window.CloseRequested { get }public static bool SplashKit.WindowCloseRequested(Window wind);
def window_close_requested(wind):
function WindowCloseRequested(wind: Window): Boolean
Usage:
Window Has Border
Window Has Border
Indicate if the window has a border.
Parameters:
Name | Type | Description |
---|---|---|
name | String | The name of the window |
Return Type: Boolean
Signatures:
bool window_has_border(const string &name)
public static bool SplashKit.WindowHasBorder(string name);
def window_has_border_named(name):
function WindowHasBorder(const name: String): Boolean
Window Has Border
Indicate if the window has a border.
Parameters:
Name | Type | Description |
---|---|---|
wnd | Window | The window |
Return Type: Boolean
Signatures:
bool window_has_border(window wnd)
public bool Window.HasBorder { get }public static bool SplashKit.WindowHasBorder(Window wnd);
def window_has_border(wnd):
function WindowHasBorder(wnd: Window): Boolean
Window Has Focus
Indicates if the window has focus.
Parameters:
Name | Type | Description |
---|---|---|
wind | Window | The window |
Return Type: Boolean
Signatures:
bool window_has_focus(window wind)
public bool Window.HasFocus { get }public static bool SplashKit.WindowHasFocus(Window wind);
def window_has_focus(wind):
function WindowHasFocus(wind: Window): Boolean
Window Height
Window Height
Returns the height of the window with the indicated name in pixels.
Parameters:
Name | Type | Description |
---|---|---|
name | String | The name of the window |
Return Type: Integer
Signatures:
int window_height(const string &name)
public static int SplashKit.WindowHeight(string name);
def window_height_named(name):
function WindowHeight(const name: String): Integer
Window Height
Returns the height of the window in pixels.
Parameters:
Name | Type | Description |
---|---|---|
wind | Window | The window |
Return Type: Integer
Signatures:
int window_height(window wind)
public int Window.Height { get }public static int SplashKit.WindowHeight(Window wind);
def window_height(wind):
function WindowHeight(wind: Window): Integer
Window Is Fullscreen
Window Is Fullscreen
Is the window currently fullscreen?
Parameters:
Name | Type | Description |
---|---|---|
name | String | The name of the window to check |
Return Type: Boolean
Signatures:
bool window_is_fullscreen(const string &name)
public static bool SplashKit.WindowIsFullscreen(string name);
def window_is_fullscreen_named(name):
function WindowIsFullscreen(const name: String): Boolean
Window Is Fullscreen
Is the window currently fullscreen?
Parameters:
Name | Type | Description |
---|---|---|
wnd | Window | The window to check |
Return Type: Boolean
Signatures:
bool window_is_fullscreen(window wnd)
public bool Window.IsFullscreen { get }public static bool SplashKit.WindowIsFullscreen(Window wnd);
def window_is_fullscreen(wnd):
function WindowIsFullscreen(wnd: Window): Boolean
Window Named
Returns an opened Window
with the given name caption
, if a window with name caption
is found.
Parameters:
Name | Type | Description |
---|---|---|
caption | String | the String name of the window. |
Return Type: Window
Signatures:
window window_named(string caption)
public static Window SplashKit.WindowNamed(string caption);
def window_named(caption):
function WindowNamed(caption: String): Window
Window Position
Window Position
The location of the window.
Parameters:
Name | Type | Description |
---|---|---|
name | String | The name of the window. |
Return Type: Point 2d
Signatures:
point_2d window_position(const string &name)
public static Point2D SplashKit.WindowPosition(string name);
def window_position_named(name):
function WindowPosition(const name: String): Point2D
Window Position
The location of the window.
Parameters:
Name | Type | Description |
---|---|---|
wnd | Window | The window. |
Return Type: Point 2d
Signatures:
point_2d window_position(window wnd)
public Point2D Window.Position { get }public static Point2D SplashKit.WindowPosition(Window wnd);
def window_position(wnd):
function WindowPosition(wnd: Window): Point2D
Window Set Icon
Sets the icon of the current window.
Parameters:
Name | Type | Description |
---|---|---|
wind | Window | The window to change the icon of |
bmp | Bitmap | The image with the details to show in the icon |
Signatures:
void window_set_icon(window wind, bitmap bmp)
public void Window.Icon { set }public static void SplashKit.WindowSetIcon(Window wind, Bitmap bmp);
def window_set_icon(wind, bmp):
procedure WindowSetIcon(wind: Window; bmp: Bitmap)
Window Toggle Border
Window Toggle Border
Toggle the window border.
Parameters:
Name | Type | Description |
---|---|---|
name | String | The name of the window to change |
Signatures:
void window_toggle_border(const string &name)
public static void SplashKit.WindowToggleBorder(string name);
def window_toggle_border_named(name):
procedure WindowToggleBorder(const name: String)
Window Toggle Border
Toggle the window border.
Parameters:
Name | Type | Description |
---|---|---|
wnd | Window | The window to change |
Signatures:
void window_toggle_border(window wnd)
public void Window.ToggleBorder();public static void SplashKit.WindowToggleBorder(Window wnd);
def window_toggle_border(wnd):
procedure WindowToggleBorder(wnd: Window)
Window Toggle Fullscreen
Window Toggle Fullscreen
Toggle the fullscreen property of the window
Parameters:
Name | Type | Description |
---|---|---|
name | String | The name of the window to change |
Signatures:
void window_toggle_fullscreen(const string &name)
public static void SplashKit.WindowToggleFullscreen(string name);
def window_toggle_fullscreen_named(name):
procedure WindowToggleFullscreen(const name: String)
Window Toggle Fullscreen
Toggle the fullscreen property of the window
Parameters:
Name | Type | Description |
---|---|---|
wnd | Window | The window to change |
Signatures:
void window_toggle_fullscreen(window wnd)
public void Window.ToggleFullscreen();public static void SplashKit.WindowToggleFullscreen(Window wnd);
def window_toggle_fullscreen(wnd):
procedure WindowToggleFullscreen(wnd: Window)
Window Width
Window Width
Returns the width of the window with the indicated name in pixels.
Parameters:
Name | Type | Description |
---|---|---|
name | String | The name of the window |
Return Type: Integer
Signatures:
int window_width(const string &name)
public static int SplashKit.WindowWidth(string name);
def window_width_named(name):
function WindowWidth(const name: String): Integer
Window Width
Returns the width of the window in pixels.
Parameters:
Name | Type | Description |
---|---|---|
wind | Window | The window |
Return Type: Integer
Signatures:
int window_width(window wind)
public int Window.Width { get }public static int SplashKit.WindowWidth(Window wind);
def window_width(wind):
function WindowWidth(wind: Window): Integer
Window With Focus
Returns the window that the user currently has selected. This may be different to the current window.
Return Type: Window
Signatures:
window window_with_focus()
public static Window SplashKit.WindowWithFocus();
def window_with_focus():
function WindowWithFocus(): Window
Window X
Window X
The x location of the window on the displays.
Parameters:
Name | Type | Description |
---|---|---|
name | String | The name of the window |
Return Type: Integer
Signatures:
int window_x(const string &name)
public static int SplashKit.WindowX(string name);
def window_x_named(name):
function WindowX(const name: String): Integer
Window X
The x location of the window on the displays.
Parameters:
Name | Type | Description |
---|---|---|
wnd | Window | The window |
Return Type: Integer
Signatures:
int window_x(window wnd)
public int Window.X { get }public static int SplashKit.WindowX(Window wnd);
def window_x(wnd):
function WindowX(wnd: Window): Integer
Window Y
Window Y
The y location of the window on the displays.
Parameters:
Name | Type | Description |
---|---|---|
name | String | The name of the window |
Return Type: Integer
Signatures:
int window_y(const string &name)
public static int SplashKit.WindowY(string name);
def window_y_named(name):
function WindowY(const name: String): Integer
Window Y
The y location of the window on the displays.
Parameters:
Name | Type | Description |
---|---|---|
wnd | Window | The window |
Return Type: Integer
Signatures:
int window_y(window wnd)
public int Window.Y { get }public static int SplashKit.WindowY(Window wnd);
def window_y(wnd):
function WindowY(wnd: Window): Integer
Types
Window
The Window type is used to refer to a window that you have opened
in SplashKit. You create new Windows using Open Window
and they can
be closed using Close Window
.
-
opened with
Open Window
-
and must be released using
Close Window
(to close a specific window) ordelete_all_windows
(to close all loaded windows).