Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
69
Task/Window-management/Phix/window-management.phix
Normal file
69
Task/Window-management/Phix/window-management.phix
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
include pGUI.e
|
||||
|
||||
Ihandle dlg
|
||||
|
||||
function doFull(Ihandle /*ih*/)
|
||||
IupSetAttribute(dlg,"FULLSCREEN","YES")
|
||||
return IUP_DEFAULT
|
||||
end function
|
||||
|
||||
function doMax(Ihandle /*ih*/)
|
||||
IupSetAttribute(dlg,"PLACEMENT","MAXIMIZED")
|
||||
-- this is a work-around to get the dialog minimised (on win platform)
|
||||
IupSetAttribute(dlg,"VISIBLE","YES")
|
||||
return IUP_DEFAULT
|
||||
end function
|
||||
|
||||
function doMin(Ihandle /*ih*/)
|
||||
IupSetAttribute(dlg,"PLACEMENT","MINIMIZED")
|
||||
-- this is a work-around to get the dialog minimised (on win platform)
|
||||
IupSetAttribute(dlg,"VISIBLE","YES")
|
||||
return IUP_DEFAULT
|
||||
end function
|
||||
|
||||
function doRestore(Ihandle /*ih*/)
|
||||
IupSetAttribute(dlg,"OPACITY","255")
|
||||
IupSetAttribute(dlg,"FULLSCREEN","NO")
|
||||
IupSetAttribute(dlg,"PLACEMENT","NORMAL")
|
||||
IupSetAttribute(dlg,"VISIBLE","YES")
|
||||
return IUP_DEFAULT
|
||||
end function
|
||||
|
||||
function doDim(Ihandle /*ih*/)
|
||||
IupSetAttribute(dlg,"OPACITY","60")
|
||||
return IUP_DEFAULT
|
||||
end function
|
||||
|
||||
function doShow(Ihandle /*ih*/)
|
||||
IupSetAttribute(dlg,"OPACITY","255")
|
||||
return IUP_DEFAULT
|
||||
end function
|
||||
|
||||
function doMove(Ihandle /*ih*/)
|
||||
integer {x,y} = IupGetIntInt(dlg,"SCREENPOSITION")
|
||||
integer shift = iff(IupGetInt(NULL,"SHIFTKEY")?-10,+10)
|
||||
IupShowXY(dlg,x+shift,y+shift)
|
||||
return IUP_DEFAULT
|
||||
end function
|
||||
|
||||
procedure main()
|
||||
IupOpen("../pGUI/")
|
||||
|
||||
Ihandle hbox = IupHbox({IupButton("restore", Icallback("doRestore")),
|
||||
IupButton("full screen",Icallback("doFull")),
|
||||
IupButton("maximize", Icallback("doMax")),
|
||||
IupButton("minimize", Icallback("doMin")),
|
||||
IupButton("dim", Icallback("doDim")),
|
||||
IupButton("show", Icallback("doShow")),
|
||||
IupButton("move", Icallback("doMove"))})
|
||||
IupSetAttribute(hbox,"MARGIN", "10x10")
|
||||
IupSetAttribute(hbox,"PADDING", "5x5")
|
||||
|
||||
dlg = IupDialog(hbox)
|
||||
IupSetAttribute(dlg,"OPACITY","255")
|
||||
|
||||
IupShowXY(dlg,IUP_CENTER,IUP_CENTER)
|
||||
IupMainLoop()
|
||||
IupClose()
|
||||
end procedure
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue