/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
- class CALENDAR_DEMO
- insert
- -- TODO: Implement GTK_APPLICATION, with no undefined features; GTK
- -- has undefined features. Currently ANY must be inserted alongside
- -- with GTK in all effective classes otherwise they will contain
- -- undefined features, making them actually deferred.
- GTK
- ANY
- creation make
- feature
- make is
- do
- gtk.initialize -- instead of "initialize_gtk"
- build
- window.show_all
- gtk.run_main_loop -- instead of "gtk_main"
- end
- window: GTK_WINDOW
- calendar: GTK_CALENDAR
- window_title: STRING is "Calendar demo"
- build is
- do
- create window.make
- create calendar.make
- window.set_title (window_title)
- window.midscreen
- window.add (calendar)
- window.connect_to_destroy_signal(agent on_quit)
- end
- on_quit(a_widget: GTK_OBJECT) is
- do
- print ("Choosen date is "+calendar.date.to_string+"%N")
- gtk.quit
- end
- end