Wx::Perl::SplashFast(3pm)

Wx::Perl::SplashFast3pm

Fast splash screen for the wx module.

Usage

  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();

Overview

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:

  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 ;
  ...

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.

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

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.

Examples

  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( wxDEFAULT_FRAME_STYLE );
  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();

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 7 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11
  7. 12
  8. 13

Author

Graciliano M. P. <[email protected]> Thanks to wxWidgets people and Mattia Barbon for wxPerl! :P

From libwx-perl 1:0.9932-9+b2 in Debian 13 (Trixie). Parsed by carta from the page's man source.