Tkx::SplashScreen - splashscreen megawidget for Tkx.
This documentation referers to Tkx::SplashScreen version 0.16
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(); });
Tkx::SplashScreen is a megawidget that describes an image that appears while application is loading.
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
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.
None known at this time.
You can find documentation for this module with the perldoc command.
perldoc Tkx::SplashScreen
Alexander Nusov <alexander.nusov+cpan <at> gmail.com>
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.
To install Tkx::SplashScreen, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tkx::SplashScreen
CPAN shell
perl -MCPAN -e shell install Tkx::SplashScreen
For more information on module installation, please visit the detailed CPAN module installation guide.