PageRenderTime 32ms CodeModel.GetById 25ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/wrappers/gtk/examples/calendar/calendar_demo.e

http://github.com/tybor/Liberty
Specman e | 41 lines | 31 code | 6 blank | 4 comment | 0 complexity | e47727ffc6a2dbc5e930e993c71db1dc MD5 | raw file
 1class CALENDAR_DEMO
 2insert 
 3	-- TODO: Implement GTK_APPLICATION, with no undefined features; GTK
 4	-- has undefined features. Currently ANY must be inserted alongside
 5	-- with GTK in all effective classes otherwise they will contain
 6	-- undefined features, making them actually deferred.
 7	GTK 
 8	ANY 
 9
10creation make
11feature
12	make is
13		do
14			gtk.initialize -- instead of "initialize_gtk"
15			build
16			window.show_all
17			gtk.run_main_loop -- instead of "gtk_main"
18		end
19
20	window: GTK_WINDOW
21	calendar: GTK_CALENDAR
22	window_title: STRING is "Calendar demo"
23
24	build is
25		do
26			create window.make
27			create calendar.make
28			window.set_title (window_title)
29			window.midscreen
30			window.add (calendar)
31			window.connect_to_destroy_signal(agent on_quit)
32		end
33
34	on_quit(a_widget: GTK_OBJECT) is
35		do
36			print ("Choosen date is "+calendar.date.to_string+"%N")
37			gtk.quit
38		end
39end
40
41