June 2018 Update
This commit is contained in:
parent
ba8067c3b7
commit
22f33d4004
5278 changed files with 84726 additions and 14379 deletions
|
|
@ -0,0 +1,20 @@
|
|||
include pGUI.e
|
||||
|
||||
Ihandle dlg, lbl, btn, vbox
|
||||
integer clicks = 0
|
||||
|
||||
function click_cb(Ihandle /*btn*/)
|
||||
clicks += 1
|
||||
IupSetStrAttribute(lbl,"TITLE","clicked %d times",{clicks})
|
||||
return IUP_DEFAULT;
|
||||
end function
|
||||
|
||||
IupOpen()
|
||||
lbl = IupLabel("There have been no clicks yet")
|
||||
btn = IupButton("Click me", Icallback("click_cb"))
|
||||
vbox = IupVbox({lbl, IupHbox({IupFill(),btn,IupFill()})})
|
||||
dlg = IupDialog(vbox,"MARGIN=10x10, GAP=10, RASTERSIZE=400x0")
|
||||
IupSetAttribute(dlg, "TITLE", "Simple windowed application")
|
||||
IupShow(dlg)
|
||||
IupMainLoop()
|
||||
IupClose()
|
||||
|
|
@ -1,12 +1,11 @@
|
|||
include arwen.ew
|
||||
|
||||
constant main = create(Window,"myApp",0,0,100,100,300,200, 0)
|
||||
constant main = create(Window,"Simple windowed application",0,0,100,100,300,200, 0)
|
||||
constant label = create(Label, "There have been no clicks yet",0,main,10,10,250,30,0)
|
||||
constant btn = create(Button,"Click me",0,main,100,50,100,30,0)
|
||||
integer count = 0
|
||||
|
||||
function mainHandler(integer id, integer msg, atom wParam, object lParam)
|
||||
without warning
|
||||
function mainHandler(integer id, integer msg, atom /*wParam*/, object /*lParam*/)
|
||||
if id=btn and msg=WM_COMMAND then
|
||||
count += 1
|
||||
setText(label,sprintf("clicked %d times",count))
|
||||
Loading…
Add table
Add a link
Reference in a new issue