Michael Krause > Tk-MK > Tk::BootSplash

Download:
Tk-MK-0.23.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.2   Source  

NAME ^

Tk::BootSplash - wrapper for the common Tk::SplashScreen

SYNOPSIS ^

    use Tk;
    use Tk::BootSplash;


    $bootpicture = $main->Pixmap(-file => "xxx.xpm"); 
    SetupBootSplash(
       -totaltime => '5000', # time is msecs
       -parent => $main,
       -application_name => $app_name,
       -size => '60',
       -image => $bootpicture,
       -width => '208',
       -height => '120',
       -x1 => '10', -y1 => '4',  # Line 1 Txt 'Booting'
       -x2 => '4',  -y2 => '10', # Application Name in HUGE Letters
       -x3 => '20', -y3 => '87', # Line 3 TxtCurrent bootphase
    );

DESCRIPTION ^

This module is a fully customizable wrapper for the common Tk:SplashScreen, which can be used to ease handling of a standardized boot splash screen with picture, texts and a progress bar. (see Tk::SplashScreen for details).

NOTE: This module is less a gimmick than a feature, since we need to wait some time until all the Windows and/or Widgets are layed out in their final positions/sizes. If we won't wait we'd run the risk of having them messed up on the same position.

The TOTALTIME is the maximum time the Splash is shown.

METHODS ^

SetupBootSplash()

'SetupBootSplash()' allows to intialize / configure the upcoming Splashsceen. See Options for a detailed description of the parameters understood.

SetBootPhase()

SetBootPhase() Sets a new Bootphase Text and the belonging border in percent (0..100). Ex.: You can specify 20 (%) as the new border for the next call to WaitSplash().

WaitSplash()

WaitSplash() will delay the execution for faster (external) setup operations. It will either keep waiting until the current applied border is reached (and concurrently increase the progress-bar by 1%) or just do nothing.

UpdateSplash()

UpdateSplash() will promote any new bootphase and or current percentage using SetBootPhase() on screen. It may be used for spreading in any external custom-initialization code to keep the Splash-texts up-to-date.

FinalizeSplash()

FinalizeSplash() is a helper function for the Boot-Splash-Screen finalization. It will necessary wait until the TOTALTIME is reached and safely shutdown the Splash afterwards.

OPTIONS ^

-parent

'-parent' allows to specify a reference to a valid parent window. In almost every case this will be the toplevel reference, received by MainWindow::->new().

-application_name

'-application_name' can be used to supply the Name of the application. It will be displayed in a dithred font across the BootImage. Note: Currently the size has to be adapted manually to the imagesize with the -size option.

-image

'-image' must be used to supply a reference to a valid pixmap, such as generated with $main->Pixmap( -file => "xxx.xpm") .

-width

'-width' current width of the SplashScreen, should match to used image-size.

-height

'-height' current height of the SplashScreen, should match to used image-size.

-x1, -y1

'-x1, -y1' must be used to define the x/y Position of the Line1 Text('Booting...').

-x2, -y2

'-x2, -y2' must be used to define the x/y Position of the Line2 Text(ApplicationName).

-x3, -y3

'-x3, -y3' must be used to define the x/y Position of the Line3 Text(Current BootPhase).

AUTHORS ^

Michael Krause, KrauseM_AT_gmx_DOT_net

This code may be distributed under the same conditions as Perl.

V1.0 (C) December 2003

syntax highlighting: