The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Wx::App::AnnualCal - the main module of the AnnualCal distribution

VERSION

version 0.92

SYNOPSIS

Main module for AnnualCal, a GUI application programmed in wxPerl, displaying an annual calendar for the year input by the user.

METHODS

OnInit

The entry point to a wxPerl program, analagous to 'main' in a C program.

DESIGN

The design of the GUI is moderately complex, utilizing BoxSizer, Grid, GridSizer, TxtCtrl, and Button widgets.

The name of each month is inserted into a TxtCtrl, and the days of each month are inserted into a 7x7 GridSizer, the first row of which is reserved for the weekday names. Each of these 12 pairs of widgets is then inserted into a vertical BoxSizer, the TxtCtrl added prior to the GridSizer, creating a set of 12 widgets containing all the data needed to display a year. The next step is to insert this collection into a single 3x4 Grid, in the correct order; a GridSizer is not used here because today's date is highlighted, when it is displayed.

A horizontal BoxSizer is used to contain the interactive Buttons for changing the year, and a TxtCtrl to display the current year.

Finally, a vertical BoxSizer is created which contains the Grid on top, and the horizontal BoxSizer on the bottom. The motivation for this design is that only the 'upper sizer' has to be replaced when the user changes the year; the 'bottom sizer' is essentially static, except for updating the TexCtrl to display the new year.

AUTHOR

Elliot Winston <exw@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Elliot Winston.

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