Functions
clears a window to the specified color given in clr
Parameters:
Signatures:
void clear_window (window wind , color clr )
public void Window . ClearWindow (Color clr);
public static void SplashKit . ClearWindow (Window wind, Color clr);
def clear_window ( wind , clr ) :
procedure ClearWindow (wind: Window; clr: Color)
Releases all of the windows which have been loaded.
Usage:
See Implemenations in Guides
Signatures:
public static void WindowManager . CloseAllWindows ();
public static void SplashKit . CloseAllWindows ();
procedure CloseAllWindows ()
Closes and frees the current window.
Signatures:
void close_current_window ()
public static void WindowManager . CloseCurrentWindow ();
public static void SplashKit . CloseCurrentWindow ();
def close_current_window () :
procedure CloseCurrentWindow ()
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);
def close_window_named ( name ) :
procedure CloseWindow ( const name : String )
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 . CloseWindow ();
public static void SplashKit . CloseWindow (Window wind);
procedure CloseWindow (wind: 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:
public static Window WindowManager . CurrentWindow ();
public static Window SplashKit . CurrentWindow ();
function CurrentWindow (): Window
Indicate if the current window has a border.
Return Type: Boolean
Signatures:
bool current_window_has_border ()
public static bool WindowManager . CurrentWindowHasBorder ();
public static bool SplashKit . CurrentWindowHasBorder ();
def current_window_has_border () :
function CurrentWindowHasBorder (): Boolean
Returns the height of the current window.
Return Type: Integer
Signatures:
int current_window_height ()
public static int WindowManager . CurrentWindowHeight ();
public static int SplashKit . CurrentWindowHeight ();
def current_window_height () :
function CurrentWindowHeight (): Integer
Is the current window currently fullscreen?
Return Type: Boolean
Signatures:
bool current_window_is_fullscreen ()
public static bool WindowManager . CurrentWindowIsFullscreen ();
public static bool SplashKit . CurrentWindowIsFullscreen ();
def current_window_is_fullscreen () :
function CurrentWindowIsFullscreen (): Boolean
The location of the current window.
Return Type: Point 2d
Signatures:
point_2d current_window_position ()
public static Point2D WindowManager . CurrentWindowPosition ();
public static Point2D SplashKit . CurrentWindowPosition ();
def current_window_position () :
function CurrentWindowPosition (): Point2D
Toggle the current window border.
Signatures:
void current_window_toggle_border ()
public static void WindowManager . CurrentWindowToggleBorder ();
public static void SplashKit . CurrentWindowToggleBorder ();
def current_window_toggle_border () :
procedure CurrentWindowToggleBorder ()
Toggle the fullscreen property of the current window
Signatures:
void current_window_toggle_fullscreen ()
public static void WindowManager . CurrentWindowToggleFullscreen ();
public static void SplashKit . CurrentWindowToggleFullscreen ();
def current_window_toggle_fullscreen () :
procedure CurrentWindowToggleFullscreen ()
Returns the width of the current window.
Return Type: Integer
Signatures:
int current_window_width ()
public static int WindowManager . CurrentWindowWidth ();
public static int SplashKit . CurrentWindowWidth ();
def current_window_width () :
function CurrentWindowWidth (): Integer
The x location of the current window on the displays.
Return Type: Integer
Signatures:
public static int WindowManager . CurrentWindowX ();
public static int SplashKit . CurrentWindowX ();
function CurrentWindowX (): Integer
The y location of the current window on the displays.
Return Type: Integer
Signatures:
public static int WindowManager . CurrentWindowY ();
public static int SplashKit . CurrentWindowY ();
function CurrentWindowY (): Integer
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 WindowManager . HasWindow ( string caption);
public static bool SplashKit . HasWindow ( string caption);
function HasWindow (caption: String ): Boolean
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 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);
def move_current_window_to ( x , y ) :
procedure MoveCurrentWindowTo (x: Integer ; y: Integer )
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);
def move_window_to_named ( name , x , y ) :
procedure MoveWindowTo ( const name : String ; x: Integer ; y: Integer )
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 . MoveWindowTo ( 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 )
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
Usage:
See Implemenations in Guides
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
Refreshes the window wind
.
Parameters:
Usage:
See Implemenations in Guides
Signatures:
void refresh_window (window wind )
public void Window . RefreshWindow ();
public static void SplashKit . RefreshWindow (Window wind);
def refresh_window ( wind ) :
procedure RefreshWindow (wind: 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 . RefreshWindow ( 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 )
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);
def resize_current_window ( width , height ) :
procedure ResizeCurrentWindow (width: Integer ; height: Integer )
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 . ResizeWindow ( 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 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);
def set_current_window_named ( name ) :
procedure SetCurrentWindow ( const name : String )
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 . SetCurrentWindow ();
public static void SplashKit . SetCurrentWindow (Window wind);
def set_current_window ( wind ) :
procedure SetCurrentWindow (wind: Window)
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
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 WindowManager . WindowCloseRequested ( string name);
public static bool SplashKit . WindowCloseRequested ( string name);
def window_close_requested_named ( name ) :
function WindowCloseRequested ( const name : String ): Boolean
Closes the window given in wind
Parameters:
Return Type: Boolean
Usage:
See Implemenations in Guides
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
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 WindowManager . WindowHasBorder ( string name);
public static bool SplashKit . WindowHasBorder ( string name);
def window_has_border_named ( name ) :
function WindowHasBorder ( const name : String ): Boolean
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
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
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 WindowManager . WindowHeight ( string name);
public static int SplashKit . WindowHeight ( string name);
def window_height_named ( name ) :
function WindowHeight ( const name : String ): Integer
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);
function WindowHeight (wind: Window): Integer
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 WindowManager . WindowIsFullscreen ( string name);
public static bool SplashKit . WindowIsFullscreen ( string name);
def window_is_fullscreen_named ( name ) :
function WindowIsFullscreen ( const name : String ): Boolean
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
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 WindowManager . WindowNamed ( string caption);
public static Window SplashKit . WindowNamed ( string caption);
def window_named ( caption ) :
function WindowNamed (caption: String ): Window
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 WindowManager . WindowPosition ( string name);
public static Point2D SplashKit . WindowPosition ( string name);
def window_position_named ( name ) :
function WindowPosition ( const name : String ): Point2D
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
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)
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);
def window_toggle_border_named ( name ) :
procedure WindowToggleBorder ( const name : String )
Toggle the window border.
Parameters:
Name Type Description wnd Window
The window to change
Signatures:
void window_toggle_border (window wnd )
public void Window . WindowToggleBorder ();
public static void SplashKit . WindowToggleBorder (Window wnd);
def window_toggle_border ( wnd ) :
procedure WindowToggleBorder (wnd: Window)
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);
def window_toggle_fullscreen_named ( name ) :
procedure WindowToggleFullscreen ( const name : String )
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 . WindowToggleFullscreen ();
public static void SplashKit . WindowToggleFullscreen (Window wnd);
def window_toggle_fullscreen ( wnd ) :
procedure WindowToggleFullscreen (wnd: Window)
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 WindowManager . WindowWidth ( string name);
public static int SplashKit . WindowWidth ( string name);
def window_width_named ( name ) :
function WindowWidth ( const name : String ): Integer
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);
function WindowWidth (wind: Window): Integer
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 WindowManager . WindowWithFocus ();
public static Window SplashKit . WindowWithFocus ();
function WindowWithFocus (): Window
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 WindowManager . WindowX ( string name);
public static int SplashKit . WindowX ( string name);
def window_x_named ( name ) :
function WindowX ( const name : String ): Integer
The x location of the window on the displays.
Parameters:
Name Type Description wnd Window
The window
Return Type: Integer
Signatures:
public int Window . X { get }
public static int SplashKit . WindowX (Window wnd);
function WindowX (wnd: Window): Integer
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 WindowManager . WindowY ( string name);
public static int SplashKit . WindowY ( string name);
def window_y_named ( name ) :
function WindowY ( const name : String ): Integer
The y location of the window on the displays.
Parameters:
Name Type Description wnd Window
The window
Return Type: Integer
Signatures:
public int Window . Y { get }
public static int SplashKit . WindowY (Window wnd);
function WindowY (wnd: Window): Integer
Types
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
.