Manual Pages for UNIX Darwin command on man Wx::Perl::SplashFast
MyWebUniversity

Manual Pages for UNIX Darwin command on man Wx::Perl::SplashFast

SplashFast(3) User Contributed Perl Documentation SplashFast(3)

NAME

Wx::Perl::SplashFast - Fast splash screen for the Wx module.

SYNOPSIS

use Wx::Perl::SplashFast ('/path/to/logo.jpg',3000);

# timeout in milliseconds

package myApp ;

# subclass Wx::App ...

package myFrame;

# subclass Wx::Frame ...

package main;

my $myApp = myApp->new();

my $frame = myFrame->new();

$myApp->MainLoop();

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. UUSSAAGGEE Just put the code inside the 'BEGIN {}' of your main app, like: sub BEGIN {

use Wx::Perl::SplashFast ;

Wx::Perl::SplashFast->new("./logo.jpg",5000);

} or load the module before any other:

use Wx::Perl::SplashFast ("./logo.jpg",5000) ;

use Wx ; ... iimmppoorrtt (( IIMMGGFFIILLEE,, SSPPLLAASSHHTTIIMMEEOOUUTT )) IMGFILE Path of the image file to show. SPLASHTIMEOUT Timeout of the splash screen in milliseconds.

If you "use Wx::Perl::SplashFast './logo.jpg', 1000;" this has the same

affetc as. BEGIN {

require Wx::Perl::SplashFast;

Wx::Perl::SplashFast->new( './logo.jpg', 1000 );

} nneeww (( IIMMGGFFIILLEE ,, SSPPLLAASSHHTTIIMMEEOOUUTT )) Show the splash screen. IMGFILE Path of the image file to show. SPLASHTIMEOUT Timeout of the splash screen in milliseconds. EEXXAAMMPPLLEE

use Wx::Perl::SplashFast ("./logo.jpg",5000) ;

# Don't forget to put your own image in the same path. Duh

package myApp ; use base 'Wx::App'; sub OnInit { return(@[0]) ;} package myFrame ; use base 'Wx::Frame'; use Wx qw( wxDEFAULTFRAMESTYLE ); 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() ;

print "window\n" ;

my $win = myFrame->new() ;

$win->Show(1) ;

$myApp->SetTopWindow( $win ) ;

$myApp->MainLoop();

SEE ALSO

Wx, AUTHOR Graciliano M. P. 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.

perl v5.8.8 2006-07-30 SplashFast(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™