1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- class EXAMPLE2
- inherit
- 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 Eiffel-IUP!")
-
- create lk.link("https://notabug.org/GermanGT/eiffel-iup", "Visit the website")
-
- create b.button("OK")
- b.set_cb_action(agent close)
- b.set_maxsize(70, 30)
-
- a := {ARRAY[IUP_WIDGET]} << 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_BUTTON): STRING
- do
- Result := "IUP_CLOSE"
- end
- end -- class EXAMPLE2
|