comparison datebox.urs @ 20:554e342665fe

Add a new parameter to Gui.gui
author Adam Chlipala <adam@chlipala.net>
date Sat, 24 Sep 2011 15:47:00 -0400
parents 3a303df9ae92
children 5905b56e0cd9
comparison
equal deleted inserted replaced
19:3a303df9ae92 20:554e342665fe
1 con t::{Unit}->Type 1 type t
2 2
3 (* The type of dateboxes, which are input elements 3 (* The type of dateboxes, which are input elements allowing the user to select a
4 * allowing the user to select a date from a popup 4 * date from a popup calendar. *)
5 * calendar. *)
6 5
7 type date = {Year : int, Month : int, Day : int} 6 type date = {Year : int, Month : int, Day : int}
8 val date_eq : eq date 7 val date_eq : eq date
9 val date_ord : ord date 8 val date_ord : ord date
10 val time : date -> time 9 val time : date -> time
11 val date : time -> date 10 val date : time -> date
12 (* Type of dates and some useful utility functions. *) 11 (* Type of dates and some useful utility functions. *)
13 12
14 val create : other_ctx:::{Unit} -> [other_ctx ~ body] => time -> transaction (t other_ctx) 13 val create : time -> transaction t
15 (* Get a datebox initially set to the given time. *) 14 (* Get a datebox initially set to the given time. *)
16 15
17 val onChange : other_ctx:::{Unit} -> [other_ctx ~ body] => t other_ctx -> (date -> transaction {}) -> transaction {} 16 val onChange : t -> (date -> transaction {}) -> transaction {}
18 (* Add an action to be run when the date changes. *) 17 (* Add an action to be run when the date changes. *)
19 18
20 val set : other_ctx:::{Unit} -> [other_ctx ~ body] => t other_ctx -> date -> transaction {} 19 val set : t -> date -> transaction {}
21 (* Call this to change the selected date. *) 20 (* Call this to change the selected date. *)
22 21
23 val value : other_ctx:::{Unit} -> [other_ctx ~ body] => t other_ctx -> signal date 22 val value : t -> signal date
24 (* Extract the current date value. *) 23 (* Extract the current date value. *)
25 24
26 val render : other_ctx:::{Unit} -> [other_ctx ~ body] => t other_ctx -> xml ([Body] ++ other_ctx) [] [] 25 val gui_t : Gui.gui t []
27 (* Draws the datebox as a piece of xml. *) 26 (* Draws the datebox as a piece of xml. *)