view calendar.urs @ 19:3a303df9ae92

Partial generalize togglePanel solution (breaks build)
author Ron de Bruijn <rmbruijn@gmail.com>
date Fri, 23 Sep 2011 13:30:01 +0200
parents 16447dc6a68c
children 554e342665fe
line wrap: on
line source
type date = {Year : int, Month : int, Day : int}
val date_eq : eq date
val date_ord : ord date
val time : date -> time
val date : time -> date
(* A type to represent calendar dates and some operations on them. *)

type t
(* Interactive calendar control widgets. The date can be set and read.
 * They support adding a change listener which will be called on 
 * the new date.  They are displayed as pictures of calendars which
 * have clickable dates. *)

val onChange : t -> (date -> transaction {}) -> transaction unit
(* Add a change listener to a calendar control. *)

val set : t -> date -> transaction unit
(* Set the date of the calendar. *)

val value : t -> signal date
(* Read the date of the calendar. *)

val gui_t : Gui.gui t xbody
(* Witness that this is a gui widget. *)

val create : time -> transaction t
(* Get a basic interactive calendar control widget. *)

style calendar
style prev
style this
style next
style weekday
style curday
style otherday
style selday
(* Styles for the calendar panel. *)