/**/ signal on halt signal on break_c l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit if AddLibrary("rxmui.library")~=0 then exit call RxMUIOpt("debugmode showerr") call CreateApp call HandleApp /* never reached */ /***********************************************************************/ HandleApp: procedure ctrl_c=2**12 do forever call NewHandle("app","h",ctrl_c) if and(h.signals,ctrl_c)>0 then exit select when h.event="QUIT" then exit otherwise interpret h.event end end /* never reached */ /***********************************************************************/ err: procedure expose sigl rxmuierror parse arg res say sigl "["res"]" say getrxmuistring(res) "in line" sigl-1 rxmuierror exit /***********************************************************************/ CreateApp: procedure app.Title="TearOffExample" app.Version="$VER: TearOffExample 1.0 (12.10.2000)" app.Copyright="©2000, alfie" app.Author="alfie" app.Description="TearOffExample" app.Base="RXMUIEXAMPLE" app.SubWindow="win" win.ID="MAIN" win.Title="TearOffExample" win.Contents="MGROUP" mgroup.0="bay" bay.class="tearoffbay" bay.0="p1" p1.class="tearoffpanel" p1.tphoriz=1 p1.tplabel="First panel" p1.tpcontents="hg" hg.class="group" hg.horiz=1 hg.0=status("ciao","ciao") hg.1=button("alfonso","alfonso") hg.2=string("aa") bay.1="p2" p2.class="tearoffpanel" p2.tphoriz=1 p2.tplabel="Second panel" p2.tpcontents="TearOff" TearOff.class="cycle" TearOff.entries="one|two|three" mgroup.1=vspace() res=NewObj("APPLICATION","APP") if res~=0 then call err(res) call set("win","open",1) call getattr("win","open","o") if o=0 then do say "can't open window" exit end call Notify("win","CloseRequest",1,"app","ReturnID","quit") return /***********************************************************************/ halt: break_c: exit /**************************************************************************/