1SplashFast(3)         User Contributed Perl Documentation        SplashFast(3)
2
3
4

NAME

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

SYNOPSIS

9         use Wx::Perl::SplashFast ('/path/to/logo.jpg',3000);
10         # timeout in milliseconds
11
12         package myApp ;
13         # subclass Wx::App ...
14
15         package myFrame;
16         # subclass Wx::Frame ...
17
18         package main;
19
20         my $myApp = myApp->new();
21         my $frame = myFrame->new();
22
23         $myApp->MainLoop();
24

DESCRIPTION

26       Using Wx::SplashScreen from Wx::App::OnInit may cause a high delay
27       before the splash screen is shown on low end machines.
28
29       This module works around this limitation; you just need to follow the
30       example.
31

USAGE

33       Just put the code inside the 'BEGIN {}' of your main app, like:
34
35         sub BEGIN {
36           use Wx::Perl::SplashFast ;
37           Wx::Perl::SplashFast->new("./logo.jpg",5000);
38         }
39
40       or load the module before any other:
41
42         use Wx::Perl::SplashFast ("./logo.jpg",5000) ;
43         use Wx ;
44         ...
45
46       import ( IMG_FILE, SPLASH_TIMEOUT )
47
48       IMG_FILE  Path of the image file to show.
49
50       SPLASH_TIMEOUT
51                 Timeout of the splash screen in milliseconds.
52
53       If you "use Wx::Perl::SplashFast './logo.jpg', 1000;" this has the same
54       affetc as.
55
56         BEGIN {
57           require Wx::Perl::SplashFast;
58           Wx::Perl::SplashFast->new( './logo.jpg', 1000 );
59         }
60
61       new ( IMG_FILE , SPLASH_TIMEOUT )
62
63       Show the splash screen.
64
65       IMG_FILE  Path of the image file to show.
66
67       SPLASH_TIMEOUT
68                 Timeout of the splash screen in milliseconds.
69

EXAMPLE

71         use Wx::Perl::SplashFast ("./logo.jpg",5000) ;
72         # Don't forget to put your own image in the same path. Duh
73
74         package myApp ;
75         use base 'Wx::App';
76         sub OnInit { return(@_[0]) ;}
77
78         package myFrame ;
79         use base 'Wx::Frame';
80         use Wx qw( wxDEFAULT_FRAME_STYLE );
81
82         sub new {
83           my $app = shift ;
84           my( $frame ) = $app->SUPER::new( @_[0] , -1, 'wxPerl Test' ,
85                                            [0,0] , [400,300] ) ;
86           return( $frame ) ;
87         }
88
89         package main ;
90         use Wx ;
91
92         my $myApp = myApp->new() ;
93
94         print "window\n" ;
95         my $win = myFrame->new() ;
96         $win->Show(1) ;
97
98         $myApp->SetTopWindow( $win ) ;
99         $myApp->MainLoop();
100

SEE ALSO

102       Wx, <Wx:SplashScreen>
103

AUTHOR

105       Graciliano M. P. <gm@virtuasites.com.br> Thanks to wxWidgets people and
106       Mattia Barbon for wxPerl! :P
107
109       This program is free software; you can redistribute it and/or modify it
110       under the same terms as Perl itself.
111
112
113
114perl v5.8.8                       2006-07-30                     SplashFast(3)
Impressum