NAME
TUI::Gadgets::CalendarView - view showing a month calendar
HIERARCHY
TObject
TView
TCalendarView
SYNOPSIS
use TUI::Objects;
use TUI::Gadgets;
my $calendar = TCalendarView->new(
bounds => TRect->new( ax => 2, ay => 2, bx => 24, by => 10 )
);
$window->insert( $calendar );
DESCRIPTION
TCalendarView shows a calendar page for one month. The first line shows the month name and the year, followed by the weekday header and up to six weeks. The current day of the system clock is drawn in the bold color of the palette.
The view is selectable. It changes the month with the + and - keys, the cursor keys Down and Up, and by clicking the arrows in the header line.
CONSTRUCTOR
new
my $calendar = TCalendarView->new( bounds => $bounds );
Creates a calendar for the current month of the system clock.
new_TCalendarView
my $calendar = new_TCalendarView( $bounds );
Factory-style constructor using a positional bounds argument.
METHODS
draw
$calendar->draw();
Draws the month, the weekday header and the days of the month.
handleEvent
$calendar->handleEvent( $event );
Changes the displayed month for mouse clicks on the header arrows and for the keys +, -, Down and Up, while the view is selected.
SEE ALSO
AUTHORS
Borland International (original Turbo Vision design)
J. Schneider <brickpool@cpan.org> (Perl implementation and maintenance)
COPYRIGHT AND LICENSE
Copyright (c) 1990-1994, 1997 by Borland International
Copyright (c) 2026 the "AUTHORS" as listed above.
This software is licensed under the MIT license (see the LICENSE file, which is part of the distribution).