1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- class HELLO_WORLD_5
- insert
- IUP_INTERFACE
- create {ANY}
- make
- feature {ANY}
- make
- local
- s: STRING
- gui: IUP
- dlg: IUP_DIALOG
- l: IUP_LABEL
- btn: IUP_BUTTON
- vb: IUP_VBOX
- do
- gui := iup_open
- create l.label("Hello world from IUP.")
- --l.set_alignment("ACENTER", "ACENTER")
- l.set_expand("HORIZONTAL")
- create btn.button("OK")
- btn.set_cb_action(agent click_btn(?))
- --btn.set_expand("HORIZONTAL")
- create vb.vbox({ARRAY[IUP_WIDGET] 1, << l, btn >>})
- vb.set_alignment("ACENTER")
- vb.set_gap(10)
- vb.set_margin(10, 10)
- --vb.set_expand_children(True)
- create dlg.dialog(vb)
- dlg.set_title("Hello World 5")
- s := dlg.show_predefined_xy("IUP_CENTER", "IUP_CENTER")
- gui.main_loop
- gui.close
- end
- click_btn (button: IUP_BUTTON): STRING
- local
- ms: IUP_MESSAGE
- do
- create ms.message("Hello World Message", "Hello world from IUP.")
- Result := "IUP_CLOSE"
- end
-
- end
|