kkallio@14: type date = {Year : int, Month : int, Day : int} kkallio@14: val date_eq : eq date kkallio@14: val date_ord : ord date kkallio@14: val time : date -> time kkallio@14: val date : time -> date kkallio@14: (* A type to represent calendar dates and some operations on them. *) kkallio@14: kkallio@14: type t kkallio@14: (* Interactive calendar control widgets. The date can be set and read. kkallio@14: * They support adding a change listener which will be called on kkallio@14: * the new date. They are displayed as pictures of calendars which kkallio@14: * have clickable dates. *) kkallio@14: adam@15: val onChange : t -> (date -> transaction {}) -> transaction unit kkallio@14: (* Add a change listener to a calendar control. *) kkallio@14: kkallio@14: val set : t -> date -> transaction unit kkallio@14: (* Set the date of the calendar. *) kkallio@14: kkallio@14: val value : t -> signal date kkallio@14: (* Read the date of the calendar. *) kkallio@14: kkallio@14: val gui_t : Gui.gui t kkallio@14: (* Witness that this is a gui widget. *) kkallio@14: kkallio@14: val create : time -> transaction t kkallio@14: (* Get a basic interactive calendar control widget. *) kkallio@14: kkallio@14: style calendar kkallio@14: style prev kkallio@14: style this kkallio@14: style next kkallio@14: style weekday kkallio@14: style curday kkallio@14: style otherday kkallio@14: style selday kkallio@14: (* Styles for the calendar panel. *)