wxRuby Documentation Home

# Wx::SplashScreen

SplashScreen shows a window with a thin border, displaying a bitmap describing your
application. Show it in application initialisation, and then either explicitly destroy
it or let it time-out.

Example usage – displays the image a_splash.png for 3 seconds as a
splash screen.

splash_bitmap = Wx::Bitmap.new(‘a_splash.png’, Wx::BITMAP_TYPE_PNG) splash = Wx::SplashScreen.new(splash_bitmap, Wx::SPLASH_CENTRE_ON_SCREEN|Wx::SPLASH_TIMEOUT,

3000, nil, -1)

## Derived from

Frame

Window

EvtHandler

Object

## Methods

- SplashScreen.new
- SplashScreen#on_close_window
- SplashScreen#get_splash_style
- SplashScreen#get_splash_window
- SplashScreen#get_timeout

### SplashScreen.new

SplashScreen.new(%(arg-type)Bitmap% bitmap, Integer splashStyle, Integer milliseconds, Window parent, Integer id, Point pos = DEFAULT_POSITION, Size size = DEFAULT_SIZE, Integer style = SIMPLE_BORDER|FRAME_NO_TASKBAR|STAY_ON_TOP)

Construct the splash screen passing a bitmap, a style, a timeout, a window id, optional position
and size, and a window style.

splashStyle is a bitlist of some of the following:

- SPLASH_CENTRE_ON_PARENT
- SPLASH_CENTRE_ON_SCREEN
- SPLASH_NO_CENTRE
- SPLASH_TIMEOUT
- SPLASH_NO_TIMEOUT

milliseconds is the timeout in milliseconds.

destructor()

Destroys the splash screen.

### SplashScreen#on_close_window

on_close_window(%(arg-type)CloseEvent% event)

Reimplement this event handler if you want to set an application variable on window destruction, for example.

### SplashScreen#get_splash_style

Integer get_splash_style()

Returns the splash style (see SplashScreen.new for
details).

### SplashScreen#get_splash_window

SplashScreenWindow get_splash_window()

Returns the window used to display the bitmap.

### SplashScreen#get_timeout

Integer get_timeout()

Returns the timeout in milliseconds.

[This page automatically generated from the Textile source at 2023-06-09 00:45:31 +0000]