home *** CD-ROM | disk | FTP | other *** search
- /**/
-
- 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 */
- /***********************************************************************/
- CreateApp: procedure
-
- app.Title="BitmapExample"
- app.Version="$VER: BitmapExample 1.0 (12.10.2000)"
- app.Copyright="©2000, alfie"
- app.Author="alfie"
- app.Description="BitmapExample"
- app.Base="RXMUIEXAMPLE"
- app.SubWindow="win"
- win.ID="MAIN"
- win.Title="BitmapExample"
- win.Contents="MGROUP"
-
- mgroup.0=vspace()
- mgroup.1="gg"
- gg.class="group"
- gg.horiz=1
- gg.0=hspace()
- gg.1="bm"
- bm.class="bitmap"
- bm.file="pics/reload.iff"
- bm.inputmode="relverify"
- bm.frame="button"
- gg.2=hspace()
- mgroup.2=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")
- call Notify("bm","pressed",0,"app","return","say 'bm pressed'")
-
- return
- /***********************************************************************/
- halt:
- break_c:
- exit
- /**************************************************************************/
- 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
- /**************************************************************************/
-