Generated: April 17, 2005, 13:58:13 | Copyright ©2005, Kurt Nørmark |  |
Reference Manual of the LAML Calendar Facility
Kurt Nørmark © normark@cs.auc.dk Department of Computer Science Aalborg University Denmark
Source file: tools/calendar/calendar.scm
LAML Version 26.0 (April 17, 2005, full)
| This is a tool for generation of calendars, which can be shown in an Internet Browser.
This tool relies on the very old HTML ad hoc stuff, and as such it is obsolete by now.
Please use tools/calendar/xml-in-laml/calendar.scm instead.
The main function is calendar.
Besides this function, it is important to understand the input format of appointments in the calendar.
Also, there are a number of constants, which affect the appearance of the calendar.
This tools requires input (appointments). The tool assumes that the calendar input is the Scheme
variabel calendar-events. In other words, you must define this variable.
Below, we explain the format of calendar-events.
This tools requires the libraries general, cgi, html, encode-decode, hex, and time.
They are not loaded by the tool itself. |
|
Table of Contents:
Alphabetic index:
| calendar | (calendar year from-month number-of-months . show-today) | Return a HTML calendar for year, from-months, and running through number-of-months. | calendar-background-color | calendar-background-color | The background color of the calendar. | calendar-font-size | calendar-font-size | The calendar font size. | event-brief-text | (event-brief-text e) | Return the brief textual description of a calendar appointment. | event-color | (event-color e) | Return the color of a calendar appointment. | event-end-time | (event-end-time e) | Return the end time of a calendar appointment. | event-long-text | (event-long-text e) | Return the long textual description of a calendar appointment. | event-start-time | (event-start-time e) | Return the start time of a calendar appointment. | event-url | (event-url e) | Return the url of a calendar appointment. | month-width | month-width | The width of a month. | week-calendar | (week-calendar t0) | Make a week calendar for the week that contains the time t0 (a second count). | week-separator-of-calendar | week-separator-of-calendar | Week separators: Whether thin og thick (symbols). |
|
1. ABOUT THE FORMAT OF CALENDAR INPUT.
The calendar input must be present in a variable named calendar-events.
calendar-events must be defined externally to the calendar tool.
Calendar-events is a list of appointments.
A single appointment is, in turn, a list. Thus calendar-events is a list of lists.
The detailed format of an appointment is the following:
(start-time end-time brief-description long-description color url)
Start-time and end-time are integers (a number of seconds since january 1, 1970).
The function time-encoding from the time library is useful for construction of these
numbers.
Brief-description is a string, the contents of which goes into the calendar.
Long-description is a longer description of the event. Currently, this information is not used.
Color is a RGB color list (a list of three integers). You can use the color constans of the html Scheme library,
if you want to.
Finally, url is the url, to which we link from the calendar entry. If it is the empty string, no link will be made.
2. EVENT SELECTION FUNCTIONS.
The event selector functions define accessors into a calendar appointment.
event-start-time
| Description | | Return the start time of a calendar appointment. |
|
event-end-time
| Description | | Return the end time of a calendar appointment. |
|
event-brief-text
| Description | | Return the brief textual description of a calendar appointment. |
|
event-long-text
| Description | | Return the long textual description of a calendar appointment. |
|
event-color
| Description | | Return the color of a calendar appointment. |
|
event-url
| Description | | Return the url of a calendar appointment. |
|
3. CALENDAR PARAMETERS.
In this section we find a number of variables which control the calendar appearance.
calendar-font-size
| Description | | The calendar font size. Default value is 1. |
|
week-separator-of-calendar
| Form | | week-separator-of-calendar |
|
| Description | | Week separators: Whether thin og thick (symbols). |
|
month-width
| Description | | The width of a month. Default value is 150. |
|
calendar-background-color
| Form | | calendar-background-color |
|
| Description | | The background color of the calendar. A RGB list. Default is white. |
|
4. THE MAIN CALENDAR FUNCTION.
In this section we find the most important function at all, the calendar function which generates a calendar.
calendar
| Form | | (calendar year from-month number-of-months . show-today) |
|
| Description | | Return a HTML calendar for year, from-months, and running through number-of-months.
This is the absolute main function of the tool.
As an example, (calendar 1999 2 3) will produce a calendar of February, March, and April in 1999.
If the optional parameter show-today is #t, the current date is shown in red. |
|
| Preconditions | | The variable calendar-events must be defined prior to the call of this function |
|
week-calendar
| Description | | Make a week calendar for the week that contains the time t0 (a second count). |
|
Generated: April 17, 2005, 13:58:13
This documentation has been extracted automatically from the Scheme source file by means of the Schemedoc tool