home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / apps / program / d / eventshell / Docs / Menus < prev    next >
Encoding:
Text File  |  1993-10-31  |  10.3 KB  |  410 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. --------------------------------------------------------
  123.  
  124. User FN (PROCshell_AttachMenuDBox)
  125. Params => 
  126.          int window handle
  127.  
  128. The function to call after creating the window
  129. but before opening it. This can be used to fill
  130. in icon fields etc. A function name of "" may
  131. be used if you don't need to call a function.
  132.  
  133. --------------------------------------------------------
  134.  
  135. User FN (PROCshell_AttachMenuDBox)
  136. Params => 
  137.          int window handle
  138.  
  139. The function to call after opening the window.
  140. A function name of "" may be used if you don't
  141. need to call a function.
  142.  
  143. --------------------------------------------------------
  144.  
  145. PROCshell_OpenMenu()
  146. Params =>     
  147.          int menu x coordinate
  148.          int menu y coordinate
  149.          int handle of menu to open
  150.  
  151. Normally this routine is called internally
  152. by the library routines in response to menu
  153. open events set up by PROCshell_AttachMenu.
  154. In some circumstances it may be advantageous
  155. to call it from the user applications.
  156.  
  157. --------------------------------------------------------
  158.  
  159. FNshell_MenuLastXPos
  160. Returns the X coordinate of the last menu
  161. opened by PROCshell_OpenMenu.
  162.  
  163. --------------------------------------------------------
  164.  
  165. FNshell_MenuLastYPos
  166. Returns the Y coordinate of the last menu
  167. opened by PROCshell_OpenMenu.
  168.  
  169. --------------------------------------------------------
  170.  
  171. PROCshell_MenuShade()
  172. Params =>
  173.          int menu or item handle
  174.          int state
  175.  
  176. Shades menu items. If a menu handle is
  177. given then all items in the menu are
  178. shaded or deshaded.
  179.  
  180. Menu Shade States
  181. The state is 0 for no shading, non 0 for shading.
  182.  
  183. --------------------------------------------------------
  184.  
  185. PROCshell_MenuTick()
  186. Params =>
  187.          int menu or item handle
  188.          int state
  189.  
  190. Adds or removes ticks for menu
  191. items. If a menu handle is given
  192. then all items in the menu are
  193. ticked or not ticked.
  194.  
  195. See also PROCshell_MenuTickOnly1,
  196.          PROCshell_MenuTickOnly2
  197.  
  198. Menu Tick States
  199. The state is 0 for no  tick, non 0 for a tick.
  200.  
  201. --------------------------------------------------------
  202.  
  203. PROCshell_MenuPutData()
  204. Params =>
  205.          int menu item handle
  206.          str data to write into menu item
  207.  
  208. This routine is used to alter the items of a
  209. menu when the program runs. The width of the
  210. menu is adjusted automatically.
  211.  
  212. --------------------------------------------------------
  213.  
  214. PROCshell_AttachSubMenu()
  215. Params =>
  216.          int item handle
  217.          int submenu menu handle
  218.          str function to call when menu_warning
  219.              message is received (optional, may
  220.              be "")
  221.  
  222. User FN (PROCshell_AttachSubMenu) 
  223. Params => 
  224.          int window handle
  225.          int icon handle
  226.  
  227.        <=
  228.          int junk
  229.          
  230. --------------------------------------------------------
  231.  
  232. PROCshell_AttachFontSubMenu()
  233. Params =>
  234.          int item handle
  235.          str function to call when menu_warning
  236.              message is received (optional, may
  237.              be "")
  238.  
  239. This routine will attempt to load the necessary
  240. 'FontMenu' support module if it is not already
  241. loaded. It expects to find it in the
  242. EvntShellSystem$Path (usually in !ShellSys).
  243.  
  244. User FN (PROCshell_AttachFontSubMenu) 
  245. Params => 
  246.          int window handle
  247.          int icon handle
  248.  
  249.        <=
  250.          int junk
  251.  
  252. This function can be used to set the currently
  253. selected font in the menu about to be opened.
  254. Use PROCshell_FontMenuSelectFont to do this.
  255.  
  256. --------------------------------------------------------
  257.  
  258. PROCshell_MenuWritable()
  259. Params =>
  260.          int menu or menu item handle
  261.          int state
  262.          int size of indirected buffer
  263.          str validation string
  264.  
  265. Makes the given menu item writable or non writable
  266. depending on the state parameter. If a menu handle
  267. is given then all items in the menu are made
  268. writable or non writable.
  269.  
  270. MenuWritable States
  271. The state is 0 for non writable, non 0
  272. for writable.
  273.  
  274. --------------------------------------------------------
  275.  
  276. PROCshell_MenuDotted()
  277. Params =>
  278.          int menu or menu item handle
  279.          int state
  280.  
  281. Adds or removes a dotted line from below
  282. the given menu item. If a menu handle is
  283. given instead all items in the menu are
  284. effected.
  285.  
  286. MenuDotted States
  287. The state is 0 for non writable, non 0
  288. for writable.
  289.  
  290. --------------------------------------------------------
  291.  
  292. FNshell_MenuNew()
  293. Params =>
  294.          str menu title
  295.  
  296.        <=
  297.          int menu handle
  298.          
  299. Creates a new menu with the given title.
  300.  
  301. --------------------------------------------------------
  302.  
  303. FNshell_MenuAdd()
  304. Params =>
  305.          int menu or menu item handle
  306.          str text for menu item
  307.          str fn to call when item is selected
  308.  
  309.        <=
  310.          int menu item handle
  311.          
  312. Adds a new item to an existing menu. If a menu
  313. handle is given then the new item is added to
  314. the end of the menu, if an item handle is given
  315. the new item is added before the existing item.
  316.  
  317. User FN (FNshell_MenuAdd)
  318. Params => 
  319.          int menu decode block
  320.  
  321. Menu decode block
  322. blk+00 position of selected menu item in menu
  323.        (starting from 0)
  324. blk+04 pointer to selected item data
  325. blk+08 selected item handle or zero if item
  326.        was created without MenuUtils
  327. blk+12 pointer to text string of selected item
  328. blk+16 position of parent menu item in menu
  329.        (starting from 0)
  330. blk+20 pointer to parent item data
  331. blk+24 parent item handle or zero if item was
  332.        created without MenuUtils
  333. blk+28 pointer to text string of parent item 
  334.  
  335. --------------------------------------------------------
  336.  
  337. FNshell_MenuTickOnly1()
  338. Params =>
  339.          int menu handle
  340.          int position of item in menu
  341.  
  342. Ticks only the item given by the menu handle
  343. and the position of the item. This call is
  344. provided for when you don't know the handle
  345. of the menu item.
  346.  
  347. See also PROCshell_MenuTickOnly2
  348.  
  349. --------------------------------------------------------
  350.  
  351. PROCshell_MenuTickOnly2()
  352. Params =>
  353.          int menu item handle
  354.  
  355. Ticks only the item given by the menu item
  356. handle.
  357.  
  358. See also PROCshell_MenuTickOnly1
  359.  
  360. --------------------------------------------------------
  361.  
  362. PROCshell_MenuColours()
  363. Params =>
  364.          int menu item handle
  365.          int foreground colour
  366.          int background colour
  367.  
  368. Sets the foreground and background colours
  369. of the item given.
  370.  
  371. --------------------------------------------------------
  372.  
  373. FNshell_MenuMakeFromFile()
  374. Params =>
  375.          str menu title
  376.          str menu selection function
  377.          str full file name of command
  378.              file
  379.  
  380.        <=
  381.          int menu handle
  382.          
  383. Creates a new menu with the given title,
  384. taking the menu items from the specified
  385. menu command file
  386.  
  387. --------------------------------------------------------
  388.  
  389. PROCshell_MenuSortItems()
  390. Params =>
  391.          int  menu handle
  392.          str  comparision function
  393.          bool ascending flag, non 0 for
  394.               ascending sort, 0 for
  395.               descending sort
  396.          int  first item number to sort
  397.               (normally 0)
  398.          int  last item number to sort
  399.  
  400. This routine is used to sort the menu items
  401. into order. It should not be used if the items
  402. do not have the same handler routine, as only
  403. the menu text is moved around.
  404.  
  405. If a last item number is given that exceeds
  406. the number of items in the menu it is reset
  407. to be equal to the number of items.
  408.  
  409. --------------------------------------------------------
  410.