NAME
Wx::Perl::SplashFast - Fast splash screen for the Wx module.
SYNOPSIS
DESCRIPTION
Using Wx::SplashScreen from Wx::App::OnInit may cause a high delay before the splash screen is shown on low end machines.
This module works around this limitation; you just need to follow the example.
USAGE
Just put the code inside the 'BEGIN {}' of your main app, like:
or load the module before any other:
import ( IMG_FILE, SPLASH_TIMEOUT )
- IMG_FILE
-
Path of the image file to show.
- SPLASH_TIMEOUT
-
Timeout of the splash screen in milliseconds.
If you use Wx::Perl::SplashFast './logo.jpg', 1000;
this has the same affetc as.
new ( IMG_FILE , SPLASH_TIMEOUT )
Show the splash screen.
- IMG_FILE
-
Path of the image file to show.
- SPLASH_TIMEOUT
-
Timeout of the splash screen in milliseconds.
EXAMPLE
# Don't forget to put your own image in the same path. Duh
package
myApp ;
sub
OnInit {
return
(
@_
[0]) ;}
package
myFrame ;
sub
new {
my
$app
=
shift
;
my
(
$frame
) =
$app
->SUPER::new(
@_
[0] , -1,
'wxPerl Test'
,
[0,0] , [400,300] ) ;
return
(
$frame
) ;
}
package
main ;
use
Wx ;
my
$myApp
= myApp->new() ;
"window\n"
;
my
$win
= myFrame->new() ;
$win
->Show(1) ;
$myApp
->SetTopWindow(
$win
) ;
$myApp
->MainLoop();
SEE ALSO
AUTHOR
Graciliano M. P. <gm@virtuasites.com.br> Thanks to wxWidgets people and Mattia Barbon for wxPerl! :P
COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.