GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CURSES::UI::CALENDAR (3)

.ds Aq ’

NAME

Curses::UI::Calendar - Create and manipulate calendar widgets

CONTENTS

CLASS HIERARCHY



 Curses::UI::Widget
    |
    +----Curses::UI::Calendar



SYNOPSIS



    use Curses::UI;
    my $cui = new Curses::UI;
    my $win = $cui->add(window_id, Window);

    my $calendar = $win->add(
        mycalendar, Calendar,
    -date    => 2002-1-14
    );

    $calendar->focus();
    my $date = $calendar->get();



DESCRIPTION

Curses::UI::Calendar is a widget that can be used to create a calendar in which the user can select a date. The calendar widget looks like this:



  +----------------------+
  | mmm dd          yyyy |
  +----------------------+
  | su mo tu we th fr sa |
  |                      |
  |       01 02 03 04 05 |
  | 06 07 08 09 10 11 12 |
  | 13 14 15 16 17 18 19 |
  | 20 21 22 23 24 25 26 |
  | 27 28 29 30 31       |
  +----------------------+



See exampes/demo-Curses::UI::Calendar in the distribution for a short demo.

STANDARD OPTIONS

<B>-parentB>, <B>-xB>, <B>-yB>, <B>-widthB>, <B>-heightB>, <B>-padB>, <B>-padleftB>, <B>-padrightB>, <B>-padtopB>, <B>-padbottomB>, <B>-ipadB>, <B>-ipadleftB>, <B>-ipadrightB>, <B>-ipadtopB>, <B>-ipadbottomB>, <B>-titleB>, <B>-titlefullwidthB>, <B>-titlereverseB>, <B>-onfocusB>, <B>-onblurB>

For an explanation of these standard options, see Curses::UI::Widget.

<B>RemarkB>: <B>-widthB> and <B>-heightB> can be set, but this widget really want to have its content space at a minimum size. If your <B>-widthB> or <B>-heightB> is not large enough, the widget will automatically fix its value.

WIDGET-SPECIFIC OPTIONS

o <B>-dateB> < DATE >

This option sets the date to start with. If you do not specify a date, today’s date will be used automatically. The format that you can use for this date is one of:

* <B>YYYY-M-DB> (e.g. 2002-1-10 or 2002-01-10)

* <B>YYYY/M/DB> (e.g. 2002/1/10 or 2002/01/10))

* <B>YYYYMMDDB> (e.g. 20020110)

* <B>D-M-YYYYB> (e.g. 10-1-2002 or 10/01/2002)

* <B>D/M/YYYYB> (e.g. 10/1/2002 or 10/01/2002)

o <B>-onchangeB> < CODEREF >

This sets the onChange event handler for the calendar widget. If a new date is selected, the code in CODEREF will be executed. It will get the widget reference as its argument.

o <B>-drawlineB> < CODEREF >

This option specifies whether or not a line should be drawn under the calendar.

METHODS

o <B>newB> ( OPTIONS )
o <B>layoutB> ( )
o <B>drawB> ( BOOLEAN )
o <B>focusB> ( )
o <B>onFocusB> ( CODEREF )
o <B>onBlurB> ( CODEREF )
o <B>intellidrawB> ( )

These are standard methods. See Curses::UI::Widget for an explanation of these.

o <B>getB> ( )

This method will return the currently selected date in the format ’YYYY-MM-DD’.

o <B>setdateB> ( DATE, [BOOLEAN] )

Set the selected date of the widget to DATE. See <B>-dateB> above for the possible formats. The widget will redraw itself, unless BOOLEAN has a true value.

o <B>onChangeB> ( CODEREF )

This method can be used to set the <B>-onchangeB> event handler (see above) after initialization of the calendar.

DEFAULT BINDINGS

o <<B>tabB>>

Call the ’loose-focus’ routine. This will have the menubar loose its focus and return the value ’LOOSE_FOCUS’ to the calling routine.

o <<B>enterB>>, <<B>spaceB>>

Call the ’date-select’ routine. This will select the date on which the cursor is.

o <<B>cursor-leftB>>, <<B>hB>>

Call the ’date-prevday’ routine. This will have the date cursor go back one day.

o <<B>cursor-rightB>, <<B>lB>>

Call the ’date-nextday’ routine. This will have the date cursor go forward one day.

o <<B>cursor-downB>>, <<B>jB>>

Call the ’date-nextweek’ routine. This will have the date cursor go forward one week.

o <<B>cursor-upB>>, <<B>kB>>

Call the ’date-prevweek’ routine. This will have the date cursor go back one week.

o <<B>page-upB>>, <<B>SHIFT+KB>>

Call the ’date-prevmonth’ routine. This will have the date cursor go back one month.

o <<B>page-downB>>, <<B>SHIFT+JB>>

Call the ’date-nextmonth’ routine. This will have the date cursor go forward one month.

o <<B>pB>>, <<B>SHIFT+HB>>

Call the ’date-prevyear’ routine. This will have the date cursor go back one year.

o <<B>nB>>, <<B>SHIFT+LB>>

Call the ’date-nextyear’ routine. This will have the date cursor go forward one year.

o <<B>homeB>>, <<B>CTRL+AB>>, <<B>cB>>

Call the ’date-selected’ routine. This will have the date cursor go to the current selected date.

o <<B>tB>>

Call the ’date-today’ routine. This will have the date cursor go to today’s date.

SEE ALSO

Curses::UI, Curses::UI::Widget, Curses::UI::Common

AUTHOR

Copyright (c) 2001-2002 Maurice Makaay. All rights reserved.

Maintained by Marcus Thiesen (marcus@cpan.thiesenweb.de)

This package is free software and is provided as is without express or implied warranty. It may be used, redistributed and/or modified under the same terms as perl itself.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CURSES::UI::CALENDAR (3) 2011-09-01

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.