The OxygenBasic IUP team is making progress and we solved our callback and resource embedding issues. Peter Wirbelauer has teken the IUP lead for the O2 project and is building an
include set of IUP definitions to make using the GUI toolkit easier.
include "iup.inc"
sys win
Sub Btn1_clicked() callback
static sys a
a +=1
PRINT "BUTTON 1 Event " + a "x pressed"
End Sub
Sub Btn2_clicked() callback
static sys a
a +=1
PRINT "BUTTON 2 Event " + a "x pressed"
End Sub
Sub Btn3_clicked() callback
static sys a
a +=1
PRINT "BUTTON 3 Event " + a "x pressed"
End Sub
IupOpen(0,0)
win=IupCreate("dialog")
IupSetAttributes win, "TITLE= Test Dialog, SIZE=300x"
horzbox = IupCreate("hbox")
IupSetAttributes(horzbox, "GAP=5")
btn1 = IupCreate("button")
IupSetAttributes(btn1, "TITLE=Button1, EXPAND=HORIZONTAL")
btn2 = IupCreate("button")
IupSetAttributes(btn2, "TITLE=Button2, EXPAND=HORIZONTAL")
btn3 = IupCreate("button")
IupSetAttributes(btn3, "TITLE=Button3, EXPAND=HORIZONTAL")
IupAppend(horzbox, btn1)
IupAppend(horzbox, btn2)
IupAppend(horzbox, btn3)
IupAppend(win, horzbox)
IupSetCallback(btn1,"ACTION", @Btn1_clicked)
IupSetCallback(btn2,"ACTION", @Btn2_clicked)
IupSetCallback(btn3,"ACTION", @Btn3_clicked)
IupShow(win)
IupMainLoop()
IupClose()
This is an example using the
CD (Canvas Draw) features of the toolkit.
include "iup.inc"
sys win,cvas
Sub Text() callback
iupDrawText *cvas,"APPLES ARE FUNNY",16, 150,10, 200,200,248,""
iupDrawRectangle *cvas, 144,8, 148+140,20+8, 255,255,255, 1
iupDrawRectangle *cvas, 100,80, 100+210,64+80, 255,0,255, 0
iupDrawText *cvas,"IUP BANANAS ARE DELICIOUS",26, 105,100, 255,255,255, ""
iupDrawImage *cvas,"iup.bmp",1,180,200,102,100
iupDrawFlush *cvas
End Sub
IupOpen(0,0)
win=iupCreate "dialog"
IupSetAttributes win,"TITLE=OXYGENBASIC, SIZE=320x240"
IupShow win
cvas=IupDrawCreateCanvas (win)
IupSetCallback cvas,"ACTION", Text
IupMainLoop()
IupDrawKillCanvas *cvas
IupClose()
At this point I'm leaning towards OxygenBasic as my Windows IUP development environment. (ScriptBasic has already been embedded in O2 some time ago so both of my bases are covered)