home *** CD-ROM | disk | FTP | other *** search
- /* AppWindowExample */
-
- signal on halt
- signal on break_c
-
- call init
- call CreateApp
- call HandleApp
- /* never reached */
- /***********************************************************************/
- init: procedure
- l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
- if AddLibrary("rxmui.library")~=0 then exit
- return
- /***********************************************************************/
- 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
- when h.event="APPEVENT" then call appFun(h.to,h.name)
- otherwise interpret h.event
- end
- end
- /* never reached */
- /***********************************************************************/
- err: procedure expose sigl RxMUIError
- parse arg res
- msg = ProgramName()":" GetRxMUIString(res) "in line" sigl-1
- if RxMUIError~="RXMUIERROR" then msg = msg "["RxMUIError"]"
- say msg
- exit
- /***********************************************************************/
- CreateApp: procedure
-
- app.Title="AppWindowExample"
- app.Version="$VER: AppWindowExample 2.0 (12.10.2000)"
- app.Copyright="©2000, alfie"
- app.Author="alfie"
- app.Description="AppWindowExample"
- app.Base="RXMUIEXAMPLE"
- app.SubWindow="win"
- win.Title="AppWindowExample"
- win.AppWindow=1
- win.Contents="mgroup"
- mgroup.frametitle="Drop icons on me!"
- mgroup.0="droplist"
- droplist.class="listview"
- droplist.input=1
- droplist.frame="inputlist"
- droplist.list="list"
-
- res=NewObj("APPLICATION","APP")
- if res~=0 then call err(res)
-
- call Notify("win","closerequest",1,"app","returnid","quit")
- say Notify("droplist","entries","everytime","droplist","jump","triggervalue")
-
- call AppMessage("droplist")
-
- call set("win","open",1)
- call getattr("win","open","o")
- if o=0 then do
- say "can't open window"
- exit
- end
-
- return
- /***********************************************************************/
- halt:
- break_c:
- exit
- /**************************************************************************/
- appFun: procedure
- parse arg to,name
- res = DoMethod(to,"insert",name,"bottom")
- if res~=0 then call err(res)
-
- return
- /**************************************************************************/
-