home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / program / d / eventshell / Examples / !EvntShell / !EvntShell (.txt) < prev    next >
Encoding:
RISC OS BBC BASIC V Source  |  1993-11-15  |  3.7 KB  |  106 lines

  1.  > <EvntShell$Dir>.!EvntShell
  2. debugging%=
  3.  Copyright Paul Hobbs 1990,1991,1992
  4.  Rheinpfalzstrasse 2
  5.     85049 Ingolstadt
  6.              Germany
  7.  This program and parts thereof may be freely distributed
  8. shell_Error
  9.  "<EvntShellSystem$Path>ShellLibRT"
  10.  "Hourglass_On"
  11.  "Wimp_SlotSize",-1,-1 
  12.  progsize%
  13. pagesize%=1<<10
  14. freespace%=&8000+progsize%
  15. =freespace%+pagesize%
  16. =freespace%
  17. shell_HeapManagerInit("<EvntShellSystem$Path>",freespace%)
  18. shell_Init
  19. 1task%=
  20. shell_WimpInit_I(200,"EvntShell Demo")
  21. shell_TraceInit("")
  22. shell_TraceOn
  23. shell_ResourcesInit
  24. app_init
  25.  -------------------- Initialise Variables ----------------------------
  26. !G_closedown%     =
  27.  Set this to TRUE when you want the program to
  28. "!                       :
  29. #Dchanged%        =
  30.  Used to keep track of whether the data has
  31. $K                       :
  32.  been changed. Call PROCfile_changed() when it
  33. %G                       :
  34.  has. But if the program does not use data
  35. &H                       :
  36.  files just ignore this variable but do not
  37. 'G                       :
  38.  delete it as the program checks it before
  39. (&                       :
  40.  exiting!
  41.  -------------------- Miscelleanous Initialisation --------------------
  42.  "Hourglass_Off"
  43. shell_Error
  44. shell_Action(
  45. shell_Poll_I(0,task%))
  46.  _closedown%
  47. shell_Exit:
  48.  ======================================================================
  49. app_init
  50. SetUp_Menus
  51. 9Ysicon=
  52. shell_Iconbar(-1,"!"+
  53. shell_GetAppName,"NoData",120,MenuHandle_IconBar%,0,0,0)
  54. shell_AttachClickSelect(-1,sicon,"_ClickSelect_IconBar")
  55. shell_AttachHelpTag(-1,sicon,"iconbar")
  56. shell_CreateWindowStatic("mainw",mainw%)
  57. shell_AttachMenu(mainw%,-1,MenuHandle_Main%,0,0,0)
  58. shell_CreateWindowStatic("search",search%)
  59. shell_AttachMenu(search%,4,MenuHandle_Demo%,0,0,0)
  60.  ===== Menu_Setup routines ======================================
  61. SetUp_Menus
  62.  void%
  63. H3MenuHandle_IconBar%=
  64. shell_MenuNew("EvntShell")
  65. I3MenuItem_Info%     =
  66. shell_MenuAdd(0,"Info","")
  67. J<void%              =
  68. shell_MenuAdd(0,"Preferences..","")
  69. KCvoid%              =
  70. shell_MenuAdd(0,"Quit","_MenuSelect_Quit")
  71. shell_AttachMenuDBox(MenuItem_Info%,"progInfo","_PreOpenInfo","")
  72. N3MenuHandle_Main%   =
  73. shell_MenuNew("Main Menu")
  74. O3void%              =
  75. shell_MenuAdd(0,"Paul","")
  76. P4void%              =
  77. shell_MenuAdd(0,"Hilke","")
  78. QCvoid%              =
  79. shell_MenuAdd(0,"Quit","_MenuSelect_Quit")
  80. S3MenuHandle_Demo%   =
  81. shell_MenuNew("Demo Menu")
  82. TKvoid%              =
  83. shell_MenuAdd(0,"As you can see, menus can be","")
  84. ULvoid%              =
  85. shell_MenuAdd(0,"any width and can be attached","")
  86. VLvoid%              =
  87. shell_MenuAdd(0,"to specific icons if required","")
  88.  ===== Dialog_PreOpen routines ==================================
  89. _PreOpenInfo(wh%)
  90. shell_IconPutData(wh%,0,
  91. shell_MessageNoArgs("progInfo0"),0)
  92. shell_IconPutData(wh%,1,
  93. shell_MessageNoArgs("progInfo1"),0)
  94. shell_IconPutData(wh%,2,
  95. shell_MessageNoArgs("progInfo2"),0)
  96. shell_IconPutData(wh%,3,
  97. shell_MessageNoArgs("progInfo3"),0)
  98.  ===== Click_Select routines ====================================
  99. _ClickSelect_IconBar(wh%,icon%)
  100. shell_OpenWindowStatic(mainw%)
  101. shell_OpenWindowStatic(search%)
  102.  ===== Menu_Select routines =====================================
  103. _MenuSelect_Quit(blk%)
  104. _closedown%=
  105.  ===== End of user application ==================================
  106.