Mouse position: Difference between revisions

m
m (Phix/pGUI)
Line 935:
Note that canvasmotion coordinates are relative to the top left of the canvas, whereas the other two are absolute.
{{libheader|Phix/pGUI}}
<lang Phix>-- demo\rosetta\Mouse_position.exw
-- demo\rosetta\Mouse_position.exw
--
include pGUI.e
 
Line 956 ⟶ 954:
IupSetStrAttribute(timer_lbl,"TITLE","timer %d, %d",{x,y})
return IUP_IGNORE
end function
 
function esc_close(Ihandle /*ih*/, atom c)
return iff(c=K_ESC?IUP_CLOSE:IUP_CONTINUE)
end function
 
Line 988 ⟶ 982:
dialog = IupDialog(IupHbox({frame_1,frame_2}, "MARGIN=5x5, GAP=5"))
IupSetAttribute(dialog,"TITLE","Mouse motion");
IupCloseOnEscape(dialog)
IupSetCallback(dialog, "K_ANY", Icallback("esc_close"));
 
IupSetGlobal("INPUTCALLBACKS", "Yes");
7,806

edits