Functions
Clear Window
clears a window to the specified color given in Clr
- Parameters
-
Name Type Description Wind the
Window
to clearClr the
Color
to clear the window to. - Signatures
-
void clear_window(window wind, color clr)
public void Window.ClearWindow(Color clr); public static void SplashKit.ClearWindow(Window wind, Color clr);
procedure ClearWindow(wind: Window; clr: Color)
def clear_window(wind, clr):
Close All Windows
Releases all of the windows which have been loaded.
- Signatures
-
void close_all_windows()
public static void WindowManager.CloseAllWindows(); public static void SplashKit.CloseAllWindows();
procedure CloseAllWindows()
def close_all_windows():
Close Current Window
Closes and frees the current window.
- Signatures
-
void close_current_window()
public static void WindowManager.CloseCurrentWindow(); public static void SplashKit.CloseCurrentWindow();
procedure CloseCurrentWindow()
def close_current_window():
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 WindowManager.CloseWindow(string name); public static void SplashKit.CloseWindow(string name);
procedure CloseWindow(const name: String)
def close_window_named(name):
Close Window
Closes and frees the graphics window supplied in Wind
.
- Parameters
-
Name Type Description Wind The window to close
- Signatures
-
void close_window(window wind)
public void Window.CloseWindow(); public static void SplashKit.CloseWindow(Window wind);
procedure CloseWindow(wind: Window)
def close_window(wind):
Current Window
Returns the window that you are currently interacting with. This will be the default window for drawing options, and events.
- Return Type
-
The current window
- Signatures
-
window current_window()
public static Window WindowManager.CurrentWindow(); public static Window SplashKit.CurrentWindow();
function CurrentWindow(): Window
def current_window():
Current Window Has Border
Indicate if the current window has a border.
- Return Type
-
Boolean
True if the window has a border
- Signatures
-
bool current_window_has_border()
public static bool WindowManager.CurrentWindowHasBorder(); public static bool SplashKit.CurrentWindowHasBorder();
function CurrentWindowHasBorder(): Boolean
def current_window_has_border():
Current Window Height
Returns the height of the current window.
- Return Type
-
Integer
The height of the current window
- Signatures
-
int current_window_height()
public static int WindowManager.CurrentWindowHeight(); public static int SplashKit.CurrentWindowHeight();
function CurrentWindowHeight(): Integer
def current_window_height():
Current Window Is Fullscreen
Is the current window currently fullscreen?
- Return Type
-
Boolean
True when the window is fullscreen
- Signatures
-
bool current_window_is_fullscreen()
public static bool WindowManager.CurrentWindowIsFullscreen(); public static bool SplashKit.CurrentWindowIsFullscreen();
function CurrentWindowIsFullscreen(): Boolean
def current_window_is_fullscreen():
Current Window Position
The location of the current window.
- Return Type
-
Its location on the displays
- Signatures
-
point_2d current_window_position()
public static Point2D WindowManager.CurrentWindowPosition(); public static Point2D SplashKit.CurrentWindowPosition();
function CurrentWindowPosition(): Point2D
def current_window_position():
Current Window Toggle Border
Toggle the current window border.
- Signatures
-
void current_window_toggle_border()
public static void WindowManager.CurrentWindowToggleBorder(); public static void SplashKit.CurrentWindowToggleBorder();
procedure CurrentWindowToggleBorder()
def current_window_toggle_border():
Current Window Toggle Fullscreen
Toggle the fullscreen property of the current window
- Signatures
-
void current_window_toggle_fullscreen()
public static void WindowManager.CurrentWindowToggleFullscreen(); public static void SplashKit.CurrentWindowToggleFullscreen();
procedure CurrentWindowToggleFullscreen()
def current_window_toggle_fullscreen():
Current Window Width
Returns the width of the current window.
- Return Type
-
Integer
The width of the current window
- Signatures
-
int current_window_width()
public static int WindowManager.CurrentWindowWidth(); public static int SplashKit.CurrentWindowWidth();
function CurrentWindowWidth(): Integer
def current_window_width():
Current Window X
The x location of the current window on the displays.
- Return Type
-
Integer
Its location on the displays
- Signatures
-
int current_window_x()
public static int WindowManager.CurrentWindowX(); public static int SplashKit.CurrentWindowX();
function CurrentWindowX(): Integer
def current_window_x():
Current Window Y
The y location of the current window on the displays.
- Return Type
-
Integer
Its location on the displays
- Signatures
-
int current_window_y()
public static int WindowManager.CurrentWindowY(); public static int SplashKit.CurrentWindowY();
function CurrentWindowY(): Integer
def current_window_y():
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.
- Return Type
-
Boolean
Returns
True
if there is a window with the givenCaption
which has has been loaded. - Parameters
-
Name Type Description Caption String
The name of the window to check for.
- Signatures
-
bool has_window(string caption)
public static bool WindowManager.HasWindow(string caption); public static bool SplashKit.HasWindow(string caption);
function HasWindow(caption: String): Boolean
def has_window(caption):
Is Current Window
Check if the requested window is the current window.
- Return Type
-
Boolean
true if the window is the current window
- Parameters
-
Name Type Description Wind The window to check
- Signatures
-
bool is_current_window(window wind)
public bool Window.IsCurrentWindow { get } public static bool SplashKit.IsCurrentWindow(Window wind);
function IsCurrentWindow(wind: Window): Boolean
def is_current_window(wind):
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 WindowManager.MoveCurrentWindowTo(int x, int y); public static void SplashKit.MoveCurrentWindowTo(int x, int y);
procedure MoveCurrentWindowTo(x: Integer; y: Integer)
def move_current_window_to(x, y):
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 WindowManager.MoveWindowTo(string name, int x, int y); public static void SplashKit.MoveWindowTo(string name, int x, int y);
procedure MoveWindowTo(const name: String; x: Integer; y: Integer)
def move_window_to_named(name, x, y):
Move Window To
Move the window to the new location on the displays.
- Parameters
-
Name Type Description Wind 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.MoveWindowTo(int x, int y); public static void SplashKit.MoveWindowTo(Window wind, int x, int y);
procedure MoveWindowTo(wind: Window; x: Integer; y: Integer)
def move_window_to(wind, x, y):
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.
- Return Type
-
A new window
- 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
- 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);
function OpenWindow(caption: String; width: Integer; height: Integer): Window
def open_window(caption, width, height):
Refresh Window
Refresh Window
Refreshes the window Wind
.
Refresh Window
Refreshes the window Wind
.
- Parameters
-
Name Type Description Wind the
Window
to refresh.Target Fps Unsigned Integer
the desired framerate
- Signatures
-
void refresh_window(window wind, unsigned int target_fps)
public void Window.RefreshWindow(uint targetFps); public static void SplashKit.RefreshWindow(Window wind, uint targetFps);
procedure RefreshWindow(wind: Window; targetFps: Cardinal)
def refresh_window_with_target_fps(wind, target_fps):
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 WindowManager.ResizeCurrentWindow(int width, int height); public static void SplashKit.ResizeCurrentWindow(int width, int height);
procedure ResizeCurrentWindow(width: Integer; height: Integer)
def resize_current_window(width, height):
Resize Window
Change the size of the window.
- Parameters
-
Name Type Description Wnd 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.ResizeWindow(int width, int height); public static void SplashKit.ResizeWindow(Window wnd, int width, int height);
procedure ResizeWindow(wnd: Window; width: Integer; height: Integer)
def resize_window(wnd, width, height):
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 WindowManager.SetCurrentWindow(string name); public static void SplashKit.SetCurrentWindow(string name);
procedure SetCurrentWindow(const name: String)
def set_current_window_named(name):
Set Current Window
Change the current window. Use this so that you can draw to different windows by default.
- Parameters
-
Name Type Description Wind The new current window
- Signatures
-
void set_current_window(window wind)
public void Window.SetCurrentWindow(); public static void SplashKit.SetCurrentWindow(Window wind);
procedure SetCurrentWindow(wind: Window)
def set_current_window(wind):
Window Caption
The caption of the window.
- Return Type
-
String
The window's caption.
- Parameters
-
Name Type Description Wind The window
- Signatures
-
string window_caption(window wind)
public string Window.Caption { get } public static string SplashKit.WindowCaption(Window wind);
function WindowCaption(wind: Window): String
def window_caption(wind):
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.
- Return Type
-
Boolean
Returns
True
if the window has been asked to close. - Parameters
-
Name Type Description Name String
The name of the window to close
- Signatures
-
bool window_close_requested(const string &name)
public static bool WindowManager.WindowCloseRequested(string name); public static bool SplashKit.WindowCloseRequested(string name);
function WindowCloseRequested(const name: String): Boolean
def window_close_requested_named(name):
Window Close Requested
Closes the window given in Wind
- Return Type
-
Boolean
Returns
True
if the window is closed,False
if there is an error. - Parameters
-
Name Type Description Wind the
Window
to be closed - Signatures
-
bool window_close_requested(window wind)
public bool Window.CloseRequested { get } public static bool SplashKit.WindowCloseRequested(Window wind);
function WindowCloseRequested(wind: Window): Boolean
def window_close_requested(wind):
Window Has Border
Window Has Border
Indicate if the window has a border.
- Return Type
-
Boolean
True if the window has a border
- Parameters
-
Name Type Description Name String
The name of the window
- Signatures
-
bool window_has_border(const string &name)
public static bool WindowManager.WindowHasBorder(string name); public static bool SplashKit.WindowHasBorder(string name);
function WindowHasBorder(const name: String): Boolean
def window_has_border_named(name):
Window Has Border
Indicate if the window has a border.
- Return Type
-
Boolean
True if the window has a border
- Parameters
-
Name Type Description Wnd The window
- Signatures
-
bool window_has_border(window wnd)
public bool Window.HasBorder { get } public static bool SplashKit.WindowHasBorder(Window wnd);
function WindowHasBorder(wnd: Window): Boolean
def window_has_border(wnd):
Window Has Focus
Indicates if the window has focus.
- Return Type
-
Boolean
True if the window has the user's focus
- Parameters
-
Name Type Description Wind The window
- Signatures
-
bool window_has_focus(window wind)
public bool Window.HasFocus { get } public static bool SplashKit.WindowHasFocus(Window wind);
function WindowHasFocus(wind: Window): Boolean
def window_has_focus(wind):
Window Height
Window Height
Returns the height of the window with the indicated name in pixels.
- Return Type
-
Integer
The height of the window
- Parameters
-
Name Type Description Name String
The name of the window
- Signatures
-
int window_height(const string &name)
public static int WindowManager.WindowHeight(string name); public static int SplashKit.WindowHeight(string name);
function WindowHeight(const name: String): Integer
def window_height_named(name):
Window Height
Returns the height of the window in pixels.
- Return Type
-
Integer
The height of the window
- Parameters
-
Name Type Description Wind The window
- Signatures
-
int window_height(window wind)
public int Window.Height { get } public static int SplashKit.WindowHeight(Window wind);
function WindowHeight(wind: Window): Integer
def window_height(wind):
Window Is Fullscreen
Window Is Fullscreen
Is the window currently fullscreen?
- Return Type
-
Boolean
True when the window is fullscreen
- Parameters
-
Name Type Description Name String
The name of the window to check
- Signatures
-
bool window_is_fullscreen(const string &name)
public static bool WindowManager.WindowIsFullscreen(string name); public static bool SplashKit.WindowIsFullscreen(string name);
function WindowIsFullscreen(const name: String): Boolean
def window_is_fullscreen_named(name):
Window Is Fullscreen
Is the window currently fullscreen?
- Return Type
-
Boolean
True when the window is fullscreen
- Parameters
-
Name Type Description Wnd The window to check
- Signatures
-
bool window_is_fullscreen(window wnd)
public bool Window.IsFullscreen { get } public static bool SplashKit.WindowIsFullscreen(Window wnd);
function WindowIsFullscreen(wnd: Window): Boolean
def window_is_fullscreen(wnd):
Window Named
Returns an opened Window
with the given name Caption
, if a window with
name Caption
is found.
- Return Type
-
Returns a
Window
with the name specified byCaption
- Parameters
-
Name Type Description Caption String
the
String
name of the window. - Signatures
-
window window_named(string caption)
public static Window WindowManager.WindowNamed(string caption); public static Window SplashKit.WindowNamed(string caption);
function WindowNamed(caption: String): Window
def window_named(caption):
Window Position
Window Position
The location of the window.
- Return Type
-
Its location on the displays
- Parameters
-
Name Type Description Name String
The name of the window.
- Signatures
-
point_2d window_position(const string &name)
public static Point2D WindowManager.WindowPosition(string name); public static Point2D SplashKit.WindowPosition(string name);
function WindowPosition(const name: String): Point2D
def window_position_named(name):
Window Position
The location of the window.
- Return Type
-
Its location on the displays
- Parameters
-
Name Type Description Wnd The window.
- Signatures
-
point_2d window_position(window wnd)
public Point2D Window.Position { get } public static Point2D SplashKit.WindowPosition(Window wnd);
function WindowPosition(wnd: Window): Point2D
def window_position(wnd):
Window Set Icon
Sets the icon of the current window.
- Parameters
-
Name Type Description Wind The window to change the icon of
Bmp 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);
procedure WindowSetIcon(wind: Window; bmp: Bitmap)
def window_set_icon(wind, bmp):
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 WindowManager.WindowToggleBorder(string name); public static void SplashKit.WindowToggleBorder(string name);
procedure WindowToggleBorder(const name: String)
def window_toggle_border_named(name):
Window Toggle Border
Toggle the window border.
- Parameters
-
Name Type Description Wnd The window to change
- Signatures
-
void window_toggle_border(window wnd)
public void Window.WindowToggleBorder(); public static void SplashKit.WindowToggleBorder(Window wnd);
procedure WindowToggleBorder(wnd: Window)
def window_toggle_border(wnd):
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 WindowManager.WindowToggleFullscreen(string name); public static void SplashKit.WindowToggleFullscreen(string name);
procedure WindowToggleFullscreen(const name: String)
def window_toggle_fullscreen_named(name):
Window Toggle Fullscreen
Toggle the fullscreen property of the window
- Parameters
-
Name Type Description Wnd The window to change
- Signatures
-
void window_toggle_fullscreen(window wnd)
public void Window.WindowToggleFullscreen(); public static void SplashKit.WindowToggleFullscreen(Window wnd);
procedure WindowToggleFullscreen(wnd: Window)
def window_toggle_fullscreen(wnd):
Window Width
Window Width
Returns the width of the window with the indicated name in pixels.
- Return Type
-
Integer
The width of the window
- Parameters
-
Name Type Description Name String
The name of the window
- Signatures
-
int window_width(const string &name)
public static int WindowManager.WindowWidth(string name); public static int SplashKit.WindowWidth(string name);
function WindowWidth(const name: String): Integer
def window_width_named(name):
Window Width
Returns the width of the window in pixels.
- Return Type
-
Integer
The width of the window
- Parameters
-
Name Type Description Wind The window
- Signatures
-
int window_width(window wind)
public int Window.Width { get } public static int SplashKit.WindowWidth(Window wind);
function WindowWidth(wind: Window): Integer
def window_width(wind):
Window With Focus
Returns the window that the user currently has selected. This may be different to the current window.
- Return Type
-
The window the user has selected
- Signatures
-
window window_with_focus()
public static Window WindowManager.WindowWithFocus(); public static Window SplashKit.WindowWithFocus();
function WindowWithFocus(): Window
def window_with_focus():
Window X
Window X
The x location of the window on the displays.
- Return Type
-
Integer
Its location on the displays
- Parameters
-
Name Type Description Name String
The name of the window
- Signatures
-
int window_x(const string &name)
public static int WindowManager.WindowX(string name); public static int SplashKit.WindowX(string name);
function WindowX(const name: String): Integer
def window_x_named(name):
Window X
The x location of the window on the displays.
- Return Type
-
Integer
Its location on the displays
- Parameters
-
Name Type Description Wnd The window
- Signatures
-
int window_x(window wnd)
public int Window.X { get } public static int SplashKit.WindowX(Window wnd);
function WindowX(wnd: Window): Integer
def window_x(wnd):
Window Y
Window Y
The y location of the window on the displays.
- Return Type
-
Integer
Its location on the displays
- Parameters
-
Name Type Description Name String
The name of the window
- Signatures
-
int window_y(const string &name)
public static int WindowManager.WindowY(string name); public static int SplashKit.WindowY(string name);
function WindowY(const name: String): Integer
def window_y_named(name):
Window Y
The y location of the window on the displays.
- Return Type
-
Integer
Its location on the displays
- Parameters
-
Name Type Description Wnd The window
- Signatures
-
int window_y(window wnd)
public int Window.Y { get } public static int SplashKit.WindowY(Window wnd);
function WindowY(wnd: Window): Integer
def window_y(wnd):
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).