/tutorial/vision/opengl/NeHe/lesson01/lesson01.e

http://github.com/tybor/Liberty · Specman e · 38 lines · 27 code · 9 blank · 2 comment · 0 complexity · 9c33ab306692467f1935de9b391863a7 MD5 · raw file

  1. class LESSON01
  2. inherit
  3. GRAPHIC
  4. creation
  5. make
  6. feature{ANY}
  7. -- WORLD is a sample GL_WIDGET.
  8. -- It corresponds to the common OpenGL setup in these tutorials
  9. world : WORLD
  10. make is
  11. local
  12. win: TOPLEVEL_WINDOW
  13. exit : BUTTON
  14. do
  15. create win.default_create
  16. win.set_title("Lesson 01")
  17. win.set_background_color(white_color)
  18. win.map
  19. create world.make(win)
  20. create exit.with_label(win, U"Exit")
  21. exit.when_left_clicked(agent finish_program)
  22. win.when_close_requested(agent finish_program)
  23. vision.start
  24. end
  25. finish_program is
  26. do
  27. vision.loop_stack.break
  28. end
  29. end