/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

  1. class CALENDAR_DEMO
  2. insert
  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. creation make
  10. feature
  11. make is
  12. do
  13. gtk.initialize -- instead of "initialize_gtk"
  14. build
  15. window.show_all
  16. gtk.run_main_loop -- instead of "gtk_main"
  17. end
  18. window: GTK_WINDOW
  19. calendar: GTK_CALENDAR
  20. window_title: STRING is "Calendar demo"
  21. build is
  22. do
  23. create window.make
  24. create calendar.make
  25. window.set_title (window_title)
  26. window.midscreen
  27. window.add (calendar)
  28. window.connect_to_destroy_signal(agent on_quit)
  29. end
  30. on_quit(a_widget: GTK_OBJECT) is
  31. do
  32. print ("Choosen date is "+calendar.date.to_string+"%N")
  33. gtk.quit
  34. end
  35. end