home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / program / d / eventshel1 / Docs / Menus < prev    next >
Encoding:
Text File  |  1994-01-23  |  10.5 KB  |  415 lines

  1. PROCshell_AttachMenu()
  2. Params =>  
  3.          int  window handle
  4.          int  icon handle
  5.          int  item handle  
  6.          bool shift flag (not implemented)
  7.          bool ctrl  flag (not implemented)
  8.          bool alt   flag (not implemented)
  9.  
  10. The shift, ctrl and alt flags are for future
  11. enhancements to the library and should be set
  12. to 0 on this release.
  13.  
  14. If the menu is attached to an icon (rather than
  15. a window work area) a click with SELECT or MENU
  16. will open the menu. Also the button type of the
  17. icon is changed to 3 (click) to ensure the menu
  18. pops up when SELECT is used.
  19.  
  20. User FN (PROCshell_AttachMenu)
  21. Params => 
  22.          str text of menu selection
  23.  
  24. The function to call when the user makes
  25. a choice from the menu.
  26.  
  27. --------------------------------------------------------
  28.  
  29. PROCshell_AttachMenuMaker()
  30. Params =>   
  31.          int window handle   
  32.          int icon handle
  33.          str <function name=>UserFN16>
  34.  
  35. Registers a function to be called before the
  36. menu is opened, allowing ticking, shading etc
  37. of menu items.
  38.  
  39. User FN (PROCshell_AttachMenuMaker)
  40. Params =>
  41.          int window handle over which MENU
  42.              was pressed 
  43.          int icon handle over which MENU was
  44.              pressed (-1 for no icon)
  45.  
  46. This function is called before the menu is
  47. opened.
  48.  
  49. --------------------------------------------------------
  50.  
  51. PROCshell_AttachFontMenu()
  52. Params =>
  53.          int item handle
  54.          str function to call when menu_select
  55.              event occurs (optional, may be "")
  56.  
  57. Use this routine to attach the FontMenu to an icon or
  58. a window. Attach the FontMenu to an existing menu
  59. structure with PROCshell_AttachFontSubMenu.
  60.  
  61. This routine will attempt to load the necessary
  62. 'FontMenu' support module if it is not already
  63. loaded. It expects to find it in the
  64. EvntShellSystem$Path (usually in !ShellSys).
  65.  
  66. User FN (PROCshell_AttachFontMenu) 
  67. Params => 
  68.          str selection string
  69.  
  70.        <=
  71.          int junk
  72.  
  73. This function can be used to discover the name
  74. of the font (if any) that has been selected in
  75. the FontMenu. Use FNshell_FontMenuGetLastSelectedFont
  76. for this.
  77.  
  78. --------------------------------------------------------
  79.  
  80. FNshell_FontMenuGetLastSelectedFont
  81. Params =>
  82.          None
  83.  
  84.        <=
  85.          str font name (could be "")
  86.  
  87. This routine should be used in the function
  88. called when a menu_select event has occurred to
  89. discover if font menu selection has been made,
  90. and if so the name of the font.
  91.  
  92. If no valid font menu selection has been made
  93. the function will return "" and no action should
  94. be taken.
  95.  
  96. --------------------------------------------------------
  97.  
  98. PROCshell_FontMenuSelectFont()
  99. Params =>
  100.          str name of font to select
  101.  
  102. The font name is used by the library routines
  103. to decide which font name to select when the
  104. font menu opens. As the same font menu can be
  105. used by different applications it is important
  106. to set this up just before the menu opens.
  107.  
  108. --------------------------------------------------------
  109.  
  110. PROCshell_AttachMenuDBox()
  111. Params =>  
  112.          int menu item handle     
  113.          str window identifier
  114.          str function name
  115.          str function name
  116.  
  117. Calling this routine will automatically setup the sub
  118. menu arrow on the menu item, and also set the 'menu
  119. warning' flag. It is not necessary to do this in the
  120. menu editor.
  121.  
  122. User FN (PROCshell_AttachMenuDBox)
  123. Params => 
  124.          int window handle
  125.  
  126. The function to call after creating the window
  127. but before opening it. This can be used to fill
  128. in icon fields etc. A function name of "" may
  129. be used if you don't need to call a function.
  130.  
  131. User FN (PROCshell_AttachMenuDBox)
  132. Params => 
  133.          int window handle
  134.  
  135. The function to call after opening the window.
  136. A function name of "" may be used if you don't
  137. need to call a function.
  138.  
  139. --------------------------------------------------------
  140.  
  141. PROCshell_OpenMenu()
  142. Params =>     
  143.          int menu x coordinate
  144.          int menu y coordinate
  145.          int handle of menu to open
  146.  
  147. Normally this routine is called internally
  148. by the library routines in response to menu
  149. open events set up by PROCshell_AttachMenu.
  150. In some circumstances it may be advantageous
  151. to call it from the user applications.
  152.  
  153. Note that this routine checks the last window/
  154. icon pair clicked over and assumes that the
  155. menu is attached to these. If you open the
  156. menu in response to a click on the iconbar
  157. icon the Y coordinate will be ignored. In
  158. general you should always attach menus to
  159. windows or window/icon pairs rather than using
  160. this call.
  161.  
  162. --------------------------------------------------------
  163.  
  164. FNshell_MenuLastXPos
  165. Returns the X coordinate of the last menu
  166. opened by PROCshell_OpenMenu.
  167.  
  168. --------------------------------------------------------
  169.  
  170. FNshell_MenuLastYPos
  171. Returns the Y coordinate of the last menu
  172. opened by PROCshell_OpenMenu.
  173.  
  174. --------------------------------------------------------
  175.  
  176. PROCshell_MenuShade()
  177. Params =>
  178.          int menu or item handle
  179.          int state
  180.  
  181. Shades menu items. If a menu handle is
  182. given then all items in the menu are
  183. shaded or deshaded.
  184.  
  185. Menu Shade States
  186. The state is 0 for no shading, non 0 for shading.
  187.  
  188. --------------------------------------------------------
  189.  
  190. PROCshell_MenuTick()
  191. Params =>
  192.          int menu or item handle
  193.          int state
  194.  
  195. Adds or removes ticks for menu
  196. items. If a menu handle is given
  197. then all items in the menu are
  198. ticked or not ticked.
  199.  
  200. See also PROCshell_MenuTickOnly1,
  201.          PROCshell_MenuTickOnly2
  202.  
  203. Menu Tick States
  204. The state is 0 for no  tick, non 0 for a tick.
  205.  
  206. --------------------------------------------------------
  207.  
  208. PROCshell_MenuPutData()
  209. Params =>
  210.          int menu item handle
  211.          str data to write into menu item
  212.  
  213. This routine is used to alter the items of a
  214. menu when the program runs. The width of the
  215. menu is adjusted automatically.
  216.  
  217. --------------------------------------------------------
  218.  
  219. PROCshell_AttachSubMenu()
  220. Params =>
  221.          int item handle
  222.          int submenu menu handle
  223.          str function to call when menu_warning
  224.              message is received (optional, may
  225.              be "")
  226.  
  227. User FN (PROCshell_AttachSubMenu) 
  228. Params => 
  229.          int window handle
  230.          int icon handle
  231.  
  232.        <=
  233.          int junk
  234.          
  235. --------------------------------------------------------
  236.  
  237. PROCshell_AttachFontSubMenu()
  238. Params =>
  239.          int item handle
  240.          str function to call when menu_warning
  241.              message is received (optional, may
  242.              be "")
  243.  
  244. This routine will attempt to load the necessary
  245. 'FontMenu' support module if it is not already
  246. loaded. It expects to find it in the
  247. EvntShellSystem$Path (usually in !ShellSys).
  248.  
  249. User FN (PROCshell_AttachFontSubMenu) 
  250. Params => 
  251.          int window handle
  252.          int icon handle
  253.  
  254.        <=
  255.          int junk
  256.  
  257. This function can be used to set the currently
  258. selected font in the menu about to be opened.
  259. Use PROCshell_FontMenuSelectFont to do this.
  260.  
  261. --------------------------------------------------------
  262.  
  263. PROCshell_MenuWritable()
  264. Params =>
  265.          int menu or menu item handle
  266.          int state
  267.          int size of indirected buffer
  268.          str validation string
  269.  
  270. Makes the given menu item writable or non writable
  271. depending on the state parameter. If a menu handle
  272. is given then all items in the menu are made
  273. writable or non writable.
  274.  
  275. MenuWritable States
  276. The state is 0 for non writable, non 0
  277. for writable.
  278.  
  279. --------------------------------------------------------
  280.  
  281. PROCshell_MenuDotted()
  282. Params =>
  283.          int menu or menu item handle
  284.          int state
  285.  
  286. Adds or removes a dotted line from below
  287. the given menu item. If a menu handle is
  288. given instead all items in the menu are
  289. effected.
  290.  
  291. MenuDotted States
  292. The state is 0 for non writable, non 0
  293. for writable.
  294.  
  295. --------------------------------------------------------
  296.  
  297. FNshell_MenuNew()
  298. Params =>
  299.          str menu title
  300.  
  301.        <=
  302.          int menu handle
  303.          
  304. Creates a new menu with the given title.
  305.  
  306. --------------------------------------------------------
  307.  
  308. FNshell_MenuAdd()
  309. Params =>
  310.          int menu or menu item handle
  311.          str text for menu item
  312.          str fn to call when item is selected
  313.  
  314.        <=
  315.          int menu item handle
  316.          
  317. Adds a new item to an existing menu. If a menu
  318. handle is given then the new item is added to
  319. the end of the menu, if an item handle is given
  320. the new item is added before the existing item.
  321.  
  322. User FN (FNshell_MenuAdd)
  323. Params => 
  324.          int menu decode block
  325.  
  326. Menu decode block
  327. blk+00 position of selected menu item in menu
  328.        (starting from 0)
  329. blk+04 pointer to selected item data
  330. blk+08 selected item handle or zero if item
  331.        was created without MenuUtils
  332. blk+12 pointer to text string of selected item
  333. blk+16 position of parent menu item in menu
  334.        (starting from 0)
  335. blk+20 pointer to parent item data
  336. blk+24 parent item handle or zero if item was
  337.        created without MenuUtils
  338. blk+28 pointer to text string of parent item 
  339.  
  340. --------------------------------------------------------
  341.  
  342. FNshell_MenuTickOnly1()
  343. Params =>
  344.          int menu handle
  345.          int position of item in menu
  346.  
  347. Ticks only the item given by the menu handle
  348. and the position of the item. This call is
  349. provided for when you don't know the handle
  350. of the menu item.
  351.  
  352. See also PROCshell_MenuTickOnly2
  353.  
  354. --------------------------------------------------------
  355.  
  356. PROCshell_MenuTickOnly2()
  357. Params =>
  358.          int menu item handle
  359.  
  360. Ticks only the item given by the menu item
  361. handle.
  362.  
  363. See also PROCshell_MenuTickOnly1
  364.  
  365. --------------------------------------------------------
  366.  
  367. PROCshell_MenuColours()
  368. Params =>
  369.          int menu item handle
  370.          int foreground colour
  371.          int background colour
  372.  
  373. Sets the foreground and background colours
  374. of the item given.
  375.  
  376. --------------------------------------------------------
  377.  
  378. FNshell_MenuMakeFromFile()
  379. Params =>
  380.          str menu title
  381.          str menu selection function
  382.          str full file name of command
  383.              file
  384.  
  385.        <=
  386.          int menu handle
  387.          
  388. Creates a new menu with the given title,
  389. taking the menu items from the specified
  390. menu command file
  391.  
  392. --------------------------------------------------------
  393.  
  394. PROCshell_MenuSortItems()
  395. Params =>
  396.          int  menu handle
  397.          str  comparision function
  398.          bool ascending flag, non 0 for
  399.               ascending sort, 0 for
  400.               descending sort
  401.          int  first item number to sort
  402.               (normally 0)
  403.          int  last item number to sort
  404.  
  405. This routine is used to sort the menu items
  406. into order. It should not be used if the items
  407. do not have the same handler routine, as only
  408. the menu text is moved around.
  409.  
  410. If a last item number is given that exceeds
  411. the number of items in the menu it is reset
  412. to be equal to the number of items.
  413.  
  414. --------------------------------------------------------
  415.