1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- class EXAMPLE2
- insert
- IUP_INTERFACE
- create {ANY}
- make
- feature {ANY}
- make
- local
- gui: IUP
- i: STRING
- a: ARRAY[IUP_WIDGET]
- l: IUP_LABEL
- lk: IUP_LINK
- b: IUP_BUTTON
- h: IUP_HBOX
- w: IUP_DIALOG
- do
- gui := iup_open
-
- create l.label("Hello world from Liberty Eiffel!")
- l.set_expand("YES")
-
- create lk.link("www.liberty-eiffel.org", "Visit the website")
- lk.set_expand("YES")
-
- create b.button("OK")
- b.set_cb_action(agent close(?))
- b.set_maxsize(70, 30)
- b.set_expand("YES")
-
- a := {ARRAY[IUP_WIDGET] 1, << l, lk, b >>}
- create h.hbox(a)
- h.set_alignment("ACENTER")
- h.set_gap(10)
- h.set_margin(10, 10)
-
- create w.dialog(h)
- w.set_title("Hello world")
- i := w.show
- gui.main_loop
- gui.close
- end
- close (widget: IUP_WIDGET): STRING
- do
- Result := "IUP_CLOSE"
- end
- end -- class EXAMPLE2
|