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
-
- if ~RMH_ReadArgs("FILE/A") then do
- call PrintFault()
- exit
- end
-
- call RxMUIOpt("debugmode showerr")
-
- call CreateApp(parm.0.value)
- 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
- parse arg file
-
- app.Title="MysticViewExample"
- app.Version="$VER: MysticViewExample 1.0 (12.10.2000)"
- app.Copyright="©2000, alfie"
- app.Author="alfie"
- app.Description="MysticViewExample"
- app.Base="RXMUIEXAMPLE"
- app.SubWindow="win"
- win.ID="MAIN"
- win.Title="MysticViewExample"
- win.Contents="MGROUP"
-
- mgroup.0="mv"
- mv.class="MysticView"
- mv.Frame = "virtual"
- mv.FileName = file
- mv.BACKCOLOUR = '00e143'x
- mv.DisplayMode = "IGNOREASPECT"
- mv.ShowArrows = 1
- mv.ShowCursor = 1
- mv.MouseDrag = 1
- mv.RefreshMode = "NONE"
- mv.StaticPalette = 1
- mv.Text = FilePart(file)
- mv.SHOWPIP = 1
- mv.DisplayMode = "IGNOREASPECT"
-
- mgroup.1="zg"
- zg.class="group"
- zg.horiz=1
- zg.Frame="Group"
- zg.FrameTitle="Zoom"
- zg.samesize=1
- zg.0=button("zoomin","Zoom _In")
- zg.1=button("zoomout","Zoom _Out")
- zg.2=button("resetzoom","_Reset")
-
- mgroup.2="rg"
- rg.class="group"
- rg.horiz=1
- rg.Frame="Group"
- rg.FrameTitle="Rotate"
- rg.samesize=1
- rg.0=button("rotl","Rotate _Left")
- rg.1=button("rotr","Rotate _Right")
- rg.2=button("resetrot","_Reset")
-
- 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" "("fault()")"
- exit
- end
-
- call Notify("win","CloseRequest",1,"app","ReturnID","quit")
-
- call Notify("zoomout","Pressed",0,"mv","set","ZoomOutRelative",16384)
- call Notify("zoomin","Pressed",0,"mv","set","ZoomInRelative",16384)
- call Notify("resetzoom","Pressed",0,"mv","set","ResetZoom",0)
-
- call Notify("rotl","Pressed",0,"mv","set","RotateLeftRelative",5461)
- call Notify("rotr","Pressed",0,"mv","set","RotateRightRelative",5461)
- call Notify("resetrot","Pressed",0,"mv","set","ResetRotate",0)
-
- return
- /***********************************************************************/
- halt:
- break_c:
- exit
- /**************************************************************************/
-