Alexander Nusov > Tkx-SplashScreen > Tkx::SplashScreen

Download:
Tkx-SplashScreen-0.16.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.16   Source  

NAME ^

Tkx::SplashScreen - splashscreen megawidget for Tkx.

VERSION ^

This documentation referers to Tkx::SplashScreen version 0.16

SYNOPSIS ^

    use Tkx;
    use Tkx::SplashScreen;
    
    Tkx::package_require('img::png');
    
    my $mw = Tkx::widget->new('.');
       $mw->g_wm_withdraw();
    
    my $sr = $mw->new_tkx_SplashScreen(
        -image      => Tkx::image_create_photo(-file => './image.png'),
        -width      => 'auto',
        -height     => 'auto',
        -show       => 1,
        -topmost    => 1,
    );
    
    my $cv = $sr->canvas();
       $cv->create_text(qw(10 10), -text => 'Loading...', -anchor => 'w');
    
    # Do some stuff.
    
    # Destroy splash screen and show main window.
    Tkx::after(5000 => sub {
        $sr->g_destroy();
        $mw->g_wm_deiconify();
    });

DESCRIPTION ^

Tkx::SplashScreen is a megawidget that describes an image that appears while application is loading.

OPTIONS ^

The options bellow are passed through the constructor of megawidget.

-image => image

Background image.

-width => width

Width. Default is 400.

-height => height

Height. Default is 300.

-posx => x

Position X of top left corner. By default window fits center the screen.

-posy => y

Position Y of top left corner. By default window fits center the screen.

-delay => ms

Delay in milliseconds after window will be hidden.

-alpha => level

Alpha transparency level of the window (only win32). Default is 1.0

-override => overrideredirect

Override redirect flag. Enable by default.

-show => show

Show splash screen after construction.

-hideonclick => hideonclick

Hide splash screen on mouse click

METHODS ^

Tkx::SplashScreen methods.

new

Constructor.

configure

Configure widget properties after constructing.

show

Show splash screen.

hide

Hide splash screen.

canvas

Returns canvas for the splash screen.

BUGS AND LIMITATIONS ^

None known at this time.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc Tkx::SplashScreen

AUTHOR ^

Alexander Nusov <alexander.nusov+cpan <at> gmail.com>

COPYRIGHTS AND LICENSE ^

Copyright (C) 2009-2010 Alexander Nusov

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: