Last Updated: June 28, 2016
·
122
· jmcveigh

New AliceBlue Tkinter MainWindow

Platforms of Mac OSX, Microsoft Windows, ReactOS, Linux, FreeBSD and Solaris hold the Universal App experience with a new AliceBlue Tkinter MainWindow from a unique, unified and single Git repository.

This, is a snippet of Perl code, posted upon CoderWall. This Perl snippet cooks up the Universal App experience. This Perl snippet, with help of ActiveState PDK, will present the Universal App experience upon the platforms of Mac OSX, Microsoft Windows, ReactOS and Linux then using Autrijus Tang's autrijus@autrijus.org pp follow suit with FreeBSD and Solaris.

# tk-aliceblue-mainwindow.pl
# This is an aliceblue mainwindow created in Perl Tkinter which will contain a single frame

use common::sense;

my $doc1;

package MyDocument {
    use Moose;

    use feature 'say';
    use feature 'state';
    use feature 'switch';

    use Tk;
    use Tk::Canvas;

    use namespace::autoclean;

    has 'mw' => (
        is => 'ro',
        isa => 'Tk::MainWindow',
        default => sub { my $mw = Tk::MainWindow->new or die 'Regrettably, there was an incident with the width and height as it has not yet been defined as 2 whole integer values in between 240 and 8192'; $mw->geometry("${ARGV[0]}x${ARGV[1]}"); return ($mw); },
    );

    has '_cn_background' => (
        is => 'ro',
        isa => 'Tk::Canvas',
        lazy => 1,
        default => sub { $doc1->mw->Canvas->pack(-expand => 1, -fill => 'both') },
    );

    has '_f1' => (
        is => 'ro',
        isa => 'Tk::Frame',        
        lazy => 1,
        default => sub { $doc1->_cn_background->Frame(-background => 'aliceblue')->pack(-expand => 1, -fill => 'both') },
    );

    # Order of Operations
    sub _ooo {
        my $i;
        ($_) = @_;

        $_->_cn_background;
        $_->_f1;
    }

    sub main {
        my $i;
        ($_) = @_;

        MainLoop;
    }

    __PACKAGE__->meta->make_immutable;
}


$doc1 = MyDocument->new;
$doc1->_ooo;
$doc1->main unless caller;

1;

This snippet has been typed after a tidy fashion. Using this, the Universal App experience is, in an entirely portable fashion, at your finger tips using the World's most reliable GUI module for Perl. Using accessible training, from popular trusted publishers and teachers, this snippet provides the Universal App experience to any proper typist to be sold, in turn, for real Dollars! Much like Hors D'ovres wets the appetite for a party, this snippet prepares the Universal App experience.

I ♥ what I do and I hope you do too!

Jason McVeigh (Zenbae) - C.V. (http://jmcveigh.gsc-orillia.org) - jmcveigh@outlook.com

3 Responses
Add your response

I ♥ what I do and I hope you do too!

over 1 year ago ·

I made this!

over 1 year ago ·

I've I.M. this link public channel on MAGNet #perl I.R.C..

over 1 year ago ·