annotate datebox.urs @ 22:4362b15220e4

Comment corrections based on code review.
author Karn Kallio <kkallio@eka>
date Mon, 22 Aug 2011 05:06:15 -0430
parents 8300d5f0dc19
children 3a303df9ae92
rev   line source
adam@2 1 type t
kkallio@14 2 (* The type of dateboxes, which are input elements
kkallio@14 3 * allowing the user to select a date from a popup
kkallio@14 4 * calendar. *)
adam@2 5
adam@4 6 type date = {Year : int, Month : int, Day : int}
kkallio@14 7 val date_eq : eq date
adam@5 8 val date_ord : ord date
adam@5 9 val time : date -> time
kkallio@12 10 val date : time -> date
kkallio@14 11 (* Type of dates and some useful utility functions. *)
adam@4 12
adam@4 13 val create : time -> transaction t
kkallio@14 14 (* Get a datebox initially set to the given time. *)
kkallio@14 15
adam@15 16 val onChange : t -> (date -> transaction {}) -> transaction {}
kkallio@14 17 (* Add an action to be run when the date changes. *)
kkallio@14 18
adam@15 19 val set : t -> date -> transaction {}
kkallio@14 20 (* Call this to change the selected date. *)
kkallio@14 21
kkallio@14 22 val value : t -> signal date
kkallio@14 23 (* Extract the current date value. *)
kkallio@14 24
adam@2 25 val render : t -> xbody
kkallio@14 26 (* Draws the datebox as a piece of xml. *)