.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "SplashFast 3pm" .TH SplashFast 3pm 2024-04-11 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Wx::Perl::SplashFast \- Fast splash screen for the Wx module. .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 2 \& use Wx::Perl::SplashFast (\*(Aq/path/to/logo.jpg\*(Aq,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(); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" Using Wx::SplashScreen from Wx::App::OnInit may cause a high delay before the splash screen is shown on low end machines. .PP This module works around this limitation; you just need to follow the example. .SH USAGE .IX Header "USAGE" Just put the code inside the 'BEGIN {}' of your main app, like: .PP .Vb 4 \& sub BEGIN { \& use Wx::Perl::SplashFast ; \& Wx::Perl::SplashFast\->new("./logo.jpg",5000); \& } .Ve .PP or load the module before any other: .PP .Vb 3 \& use Wx::Perl::SplashFast ("./logo.jpg",5000) ; \& use Wx ; \& ... .Ve .SS "import ( IMG_FILE, SPLASH_TIMEOUT )" .IX Subsection "import ( IMG_FILE, SPLASH_TIMEOUT )" .IP IMG_FILE 10 .IX Item "IMG_FILE" Path of the image file to show. .IP SPLASH_TIMEOUT 10 .IX Item "SPLASH_TIMEOUT" Timeout of the splash screen in milliseconds. .PP If you \f(CW\*(C`use Wx::Perl::SplashFast \*(Aq./logo.jpg\*(Aq, 1000;\*(C'\fR this has the same affetc as. .PP .Vb 4 \& BEGIN { \& require Wx::Perl::SplashFast; \& Wx::Perl::SplashFast\->new( \*(Aq./logo.jpg\*(Aq, 1000 ); \& } .Ve .SS "new ( IMG_FILE , SPLASH_TIMEOUT )" .IX Subsection "new ( IMG_FILE , SPLASH_TIMEOUT )" Show the splash screen. .IP IMG_FILE 10 .IX Item "IMG_FILE" Path of the image file to show. .IP SPLASH_TIMEOUT 10 .IX Item "SPLASH_TIMEOUT" Timeout of the splash screen in milliseconds. .SH EXAMPLE .IX Header "EXAMPLE" .Vb 2 \& use Wx::Perl::SplashFast ("./logo.jpg",5000) ; \& # Don\*(Aqt forget to put your own image in the same path. Duh \& \& package myApp ; \& use base \*(AqWx::App\*(Aq; \& sub OnInit { return(@_[0]) ;} \& \& package myFrame ; \& use base \*(AqWx::Frame\*(Aq; \& use Wx qw( wxDEFAULT_FRAME_STYLE ); \& \& sub new { \& my $app = shift ; \& my( $frame ) = $app\->SUPER::new( @_[0] , \-1, \*(AqwxPerl Test\*(Aq , \& [0,0] , [400,300] ) ; \& return( $frame ) ; \& } \& \& package main ; \& use Wx ; \& \& my $myApp = myApp\->new() ; \& \& print "window\en" ; \& my $win = myFrame\->new() ; \& $win\->Show(1) ; \& \& $myApp\->SetTopWindow( $win ) ; \& $myApp\->MainLoop(); .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" Wx, .SH AUTHOR .IX Header "AUTHOR" Graciliano M. P. Thanks to wxWidgets people and Mattia Barbon for wxPerl! :P .SH COPYRIGHT .IX Header "COPYRIGHT" This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.