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       IMG_FILE  Path of the image file to show.
48
49       SPLASH_TIMEOUT
50                 Timeout of the splash screen in milliseconds.
51
52       If you "use Wx::Perl::SplashFast './logo.jpg', 1000;" this has the same
53       affetc as.
54
55         BEGIN {
56           require Wx::Perl::SplashFast;
57           Wx::Perl::SplashFast->new( './logo.jpg', 1000 );
58         }
59
60   new ( IMG_FILE , SPLASH_TIMEOUT )
61       Show the splash screen.
62
63       IMG_FILE  Path of the image file to show.
64
65       SPLASH_TIMEOUT
66                 Timeout of the splash screen in milliseconds.
67

EXAMPLE

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

SEE ALSO

100       Wx, <Wx:SplashScreen>
101

AUTHOR

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