Home » Archimedes archive » Archimedes World » AW-1995-01-Disc2.adf » Disk2Jan95 » !AWJan95/Goodies/Event/Docs/Menus
!AWJan95/Goodies/Event/Docs/Menus
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Archimedes World » AW-1995-01-Disc2.adf » Disk2Jan95 |
Filename: | !AWJan95/Goodies/Event/Docs/Menus |
Read OK: | ✔ |
File size: | 2A0B bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
PROCshell_AttachMenu() Params => int window handle int icon handle int item handle bool shift flag (not implemented) bool ctrl flag (not implemented) bool alt flag (not implemented) The shift, ctrl and alt flags are for future enhancements to the library and should be set to 0 on this release. If the menu is attached to an icon (rather than a window work area) a click with SELECT or MENU will open the menu. Also the button type of the icon is changed to 3 (click) to ensure the menu pops up when SELECT is used. User FN (PROCshell_AttachMenu) Params => str text of menu selection The function to call when the user makes a choice from the menu. -------------------------------------------------------- PROCshell_AttachMenuMaker() Params => int window handle int icon handle str <function name=>UserFN16> Registers a function to be called before the menu is opened, allowing ticking, shading etc of menu items. User FN (PROCshell_AttachMenuMaker) Params => int window handle over which MENU was pressed int icon handle over which MENU was pressed (-1 for no icon) This function is called before the menu is opened. -------------------------------------------------------- PROCshell_AttachFontMenu() Params => int item handle str function to call when menu_select event occurs (optional, may be "") Use this routine to attach the FontMenu to an icon or a window. Attach the FontMenu to an existing menu structure with PROCshell_AttachFontSubMenu. This routine will attempt to load the necessary 'FontMenu' support module if it is not already loaded. It expects to find it in the EvntShellSystem$Path (usually in !ShellSys). User FN (PROCshell_AttachFontMenu) Params => str selection string <= int junk This function can be used to discover the name of the font (if any) that has been selected in the FontMenu. Use FNshell_FontMenuGetLastSelectedFont for this. -------------------------------------------------------- FNshell_FontMenuGetLastSelectedFont Params => None <= str font name (could be "") This routine should be used in the function called when a menu_select event has occurred to discover if font menu selection has been made, and if so the name of the font. If no valid font menu selection has been made the function will return "" and no action should be taken. -------------------------------------------------------- PROCshell_FontMenuSelectFont() Params => str name of font to select The font name is used by the library routines to decide which font name to select when the font menu opens. As the same font menu can be used by different applications it is important to set this up just before the menu opens. -------------------------------------------------------- PROCshell_AttachMenuDBox() Params => int menu item handle str window identifier str function name str function name Calling this routine will automatically setup the sub menu arrow on the menu item, and also set the 'menu warning' flag. It is not necessary to do this in the menu editor. User FN (PROCshell_AttachMenuDBox) Params => int window handle The function to call after creating the window but before opening it. This can be used to fill in icon fields etc. A function name of "" may be used if you don't need to call a function. User FN (PROCshell_AttachMenuDBox) Params => int window handle The function to call after opening the window. A function name of "" may be used if you don't need to call a function. -------------------------------------------------------- PROCshell_OpenMenu() Params => int menu x coordinate int menu y coordinate int handle of menu to open Normally this routine is called internally by the library routines in response to menu open events set up by PROCshell_AttachMenu. In some circumstances it may be advantageous to call it from the user applications. Note that this routine checks the last window/ icon pair clicked over and assumes that the menu is attached to these. If you open the menu in response to a click on the iconbar icon the Y coordinate will be ignored. In general you should always attach menus to windows or window/icon pairs rather than using this call. -------------------------------------------------------- FNshell_MenuLastXPos Returns the X coordinate of the last menu opened by PROCshell_OpenMenu. -------------------------------------------------------- FNshell_MenuLastYPos Returns the Y coordinate of the last menu opened by PROCshell_OpenMenu. -------------------------------------------------------- PROCshell_MenuShade() Params => int menu or item handle int state Shades menu items. If a menu handle is given then all items in the menu are shaded or deshaded. Menu Shade States The state is 0 for no shading, non 0 for shading. -------------------------------------------------------- PROCshell_MenuTick() Params => int menu or item handle int state Adds or removes ticks for menu items. If a menu handle is given then all items in the menu are ticked or not ticked. See also PROCshell_MenuTickOnly1, PROCshell_MenuTickOnly2 Menu Tick States The state is 0 for no tick, non 0 for a tick. -------------------------------------------------------- PROCshell_MenuPutData() Params => int menu item handle str data to write into menu item This routine is used to alter the items of a menu when the program runs. The width of the menu is adjusted automatically. -------------------------------------------------------- PROCshell_AttachSubMenu() Params => int item handle int submenu menu handle str function to call when menu_warning message is received (optional, may be "") User FN (PROCshell_AttachSubMenu) Params => int window handle int icon handle <= int junk -------------------------------------------------------- PROCshell_AttachFontSubMenu() Params => int item handle str function to call when menu_warning message is received (optional, may be "") This routine will attempt to load the necessary 'FontMenu' support module if it is not already loaded. It expects to find it in the EvntShellSystem$Path (usually in !ShellSys). User FN (PROCshell_AttachFontSubMenu) Params => int window handle int icon handle <= int junk This function can be used to set the currently selected font in the menu about to be opened. Use PROCshell_FontMenuSelectFont to do this. -------------------------------------------------------- PROCshell_MenuWritable() Params => int menu or menu item handle int state int size of indirected buffer str validation string Makes the given menu item writable or non writable depending on the state parameter. If a menu handle is given then all items in the menu are made writable or non writable. MenuWritable States The state is 0 for non writable, non 0 for writable. -------------------------------------------------------- PROCshell_MenuDotted() Params => int menu or menu item handle int state Adds or removes a dotted line from below the given menu item. If a menu handle is given instead all items in the menu are effected. MenuDotted States The state is 0 for non writable, non 0 for writable. -------------------------------------------------------- FNshell_MenuNew() Params => str menu title <= int menu handle Creates a new menu with the given title. -------------------------------------------------------- FNshell_MenuAdd() Params => int menu or menu item handle str text for menu item str fn to call when item is selected <= int menu item handle Adds a new item to an existing menu. If a menu handle is given then the new item is added to the end of the menu, if an item handle is given the new item is added before the existing item. User FN (FNshell_MenuAdd) Params => int menu decode block Menu decode block blk+00 position of selected menu item in menu (starting from 0) blk+04 pointer to selected item data blk+08 selected item handle or zero if item was created without MenuUtils blk+12 pointer to text string of selected item blk+16 position of parent menu item in menu (starting from 0) blk+20 pointer to parent item data blk+24 parent item handle or zero if item was created without MenuUtils blk+28 pointer to text string of parent item -------------------------------------------------------- FNshell_MenuTickOnly1() Params => int menu handle int position of item in menu Ticks only the item given by the menu handle and the position of the item. This call is provided for when you don't know the handle of the menu item. See also PROCshell_MenuTickOnly2 -------------------------------------------------------- PROCshell_MenuTickOnly2() Params => int menu item handle Ticks only the item given by the menu item handle. See also PROCshell_MenuTickOnly1 -------------------------------------------------------- PROCshell_MenuColours() Params => int menu item handle int foreground colour int background colour Sets the foreground and background colours of the item given. -------------------------------------------------------- FNshell_MenuMakeFromFile() Params => str menu title str menu selection function str full file name of command file <= int menu handle Creates a new menu with the given title, taking the menu items from the specified menu command file -------------------------------------------------------- PROCshell_MenuSortItems() Params => int menu handle str comparision function bool ascending flag, non 0 for ascending sort, 0 for descending sort int first item number to sort (normally 0) int last item number to sort This routine is used to sort the menu items into order. It should not be used if the items do not have the same handler routine, as only the menu text is moved around. If a last item number is given that exceeds the number of items in the menu it is reset to be equal to the number of items. --------------------------------------------------------
00000000 50 52 4f 43 73 68 65 6c 6c 5f 41 74 74 61 63 68 |PROCshell_Attach| 00000010 4d 65 6e 75 28 29 0a 50 61 72 61 6d 73 20 3d 3e |Menu().Params =>| 00000020 20 20 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 | . int | 00000030 20 77 69 6e 64 6f 77 20 68 61 6e 64 6c 65 0a 20 | window handle. | 00000040 20 20 20 20 20 20 20 20 69 6e 74 20 20 69 63 6f | int ico| 00000050 6e 20 68 61 6e 64 6c 65 0a 20 20 20 20 20 20 20 |n handle. | 00000060 20 20 69 6e 74 20 20 69 74 65 6d 20 68 61 6e 64 | int item hand| 00000070 6c 65 20 20 0a 20 20 20 20 20 20 20 20 20 62 6f |le . bo| 00000080 6f 6c 20 73 68 69 66 74 20 66 6c 61 67 20 28 6e |ol shift flag (n| 00000090 6f 74 20 69 6d 70 6c 65 6d 65 6e 74 65 64 29 0a |ot implemented).| 000000a0 20 20 20 20 20 20 20 20 20 62 6f 6f 6c 20 63 74 | bool ct| 000000b0 72 6c 20 20 66 6c 61 67 20 28 6e 6f 74 20 69 6d |rl flag (not im| 000000c0 70 6c 65 6d 65 6e 74 65 64 29 0a 20 20 20 20 20 |plemented). | 000000d0 20 20 20 20 62 6f 6f 6c 20 61 6c 74 20 20 20 66 | bool alt f| 000000e0 6c 61 67 20 28 6e 6f 74 20 69 6d 70 6c 65 6d 65 |lag (not impleme| 000000f0 6e 74 65 64 29 0a 0a 54 68 65 20 73 68 69 66 74 |nted)..The shift| 00000100 2c 20 63 74 72 6c 20 61 6e 64 20 61 6c 74 20 66 |, ctrl and alt f| 00000110 6c 61 67 73 20 61 72 65 20 66 6f 72 20 66 75 74 |lags are for fut| 00000120 75 72 65 0a 65 6e 68 61 6e 63 65 6d 65 6e 74 73 |ure.enhancements| 00000130 20 74 6f 20 74 68 65 20 6c 69 62 72 61 72 79 20 | to the library | 00000140 61 6e 64 20 73 68 6f 75 6c 64 20 62 65 20 73 65 |and should be se| 00000150 74 0a 74 6f 20 30 20 6f 6e 20 74 68 69 73 20 72 |t.to 0 on this r| 00000160 65 6c 65 61 73 65 2e 0a 0a 49 66 20 74 68 65 20 |elease...If the | 00000170 6d 65 6e 75 20 69 73 20 61 74 74 61 63 68 65 64 |menu is attached| 00000180 20 74 6f 20 61 6e 20 69 63 6f 6e 20 28 72 61 74 | to an icon (rat| 00000190 68 65 72 20 74 68 61 6e 0a 61 20 77 69 6e 64 6f |her than.a windo| 000001a0 77 20 77 6f 72 6b 20 61 72 65 61 29 20 61 20 63 |w work area) a c| 000001b0 6c 69 63 6b 20 77 69 74 68 20 53 45 4c 45 43 54 |lick with SELECT| 000001c0 20 6f 72 20 4d 45 4e 55 0a 77 69 6c 6c 20 6f 70 | or MENU.will op| 000001d0 65 6e 20 74 68 65 20 6d 65 6e 75 2e 20 41 6c 73 |en the menu. Als| 000001e0 6f 20 74 68 65 20 62 75 74 74 6f 6e 20 74 79 70 |o the button typ| 000001f0 65 20 6f 66 20 74 68 65 0a 69 63 6f 6e 20 69 73 |e of the.icon is| 00000200 20 63 68 61 6e 67 65 64 20 74 6f 20 33 20 28 63 | changed to 3 (c| 00000210 6c 69 63 6b 29 20 74 6f 20 65 6e 73 75 72 65 20 |lick) to ensure | 00000220 74 68 65 20 6d 65 6e 75 0a 70 6f 70 73 20 75 70 |the menu.pops up| 00000230 20 77 68 65 6e 20 53 45 4c 45 43 54 20 69 73 20 | when SELECT is | 00000240 75 73 65 64 2e 0a 0a 55 73 65 72 20 46 4e 20 28 |used...User FN (| 00000250 50 52 4f 43 73 68 65 6c 6c 5f 41 74 74 61 63 68 |PROCshell_Attach| 00000260 4d 65 6e 75 29 0a 50 61 72 61 6d 73 20 3d 3e 20 |Menu).Params => | 00000270 0a 20 20 20 20 20 20 20 20 20 73 74 72 20 74 65 |. str te| 00000280 78 74 20 6f 66 20 6d 65 6e 75 20 73 65 6c 65 63 |xt of menu selec| 00000290 74 69 6f 6e 0a 20 0a 54 68 65 20 66 75 6e 63 74 |tion. .The funct| 000002a0 69 6f 6e 20 74 6f 20 63 61 6c 6c 20 77 68 65 6e |ion to call when| 000002b0 20 74 68 65 20 75 73 65 72 20 6d 61 6b 65 73 0a | the user makes.| 000002c0 61 20 63 68 6f 69 63 65 20 66 72 6f 6d 20 74 68 |a choice from th| 000002d0 65 20 6d 65 6e 75 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d |e menu...-------| 000002e0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000310 2d 0a 0a 50 52 4f 43 73 68 65 6c 6c 5f 41 74 74 |-..PROCshell_Att| 00000320 61 63 68 4d 65 6e 75 4d 61 6b 65 72 28 29 0a 50 |achMenuMaker().P| 00000330 61 72 61 6d 73 20 3d 3e 20 20 20 0a 20 20 20 20 |arams => . | 00000340 20 20 20 20 20 69 6e 74 20 77 69 6e 64 6f 77 20 | int window | 00000350 68 61 6e 64 6c 65 20 20 20 0a 20 20 20 20 20 20 |handle . | 00000360 20 20 20 69 6e 74 20 69 63 6f 6e 20 68 61 6e 64 | int icon hand| 00000370 6c 65 0a 20 20 20 20 20 20 20 20 20 73 74 72 20 |le. str | 00000380 3c 66 75 6e 63 74 69 6f 6e 20 6e 61 6d 65 3d 3e |<function name=>| 00000390 55 73 65 72 46 4e 31 36 3e 0a 0a 52 65 67 69 73 |UserFN16>..Regis| 000003a0 74 65 72 73 20 61 20 66 75 6e 63 74 69 6f 6e 20 |ters a function | 000003b0 74 6f 20 62 65 20 63 61 6c 6c 65 64 20 62 65 66 |to be called bef| 000003c0 6f 72 65 20 74 68 65 0a 6d 65 6e 75 20 69 73 20 |ore the.menu is | 000003d0 6f 70 65 6e 65 64 2c 20 61 6c 6c 6f 77 69 6e 67 |opened, allowing| 000003e0 20 74 69 63 6b 69 6e 67 2c 20 73 68 61 64 69 6e | ticking, shadin| 000003f0 67 20 65 74 63 0a 6f 66 20 6d 65 6e 75 20 69 74 |g etc.of menu it| 00000400 65 6d 73 2e 0a 0a 55 73 65 72 20 46 4e 20 28 50 |ems...User FN (P| 00000410 52 4f 43 73 68 65 6c 6c 5f 41 74 74 61 63 68 4d |ROCshell_AttachM| 00000420 65 6e 75 4d 61 6b 65 72 29 0a 50 61 72 61 6d 73 |enuMaker).Params| 00000430 20 3d 3e 0a 20 20 20 20 20 20 20 20 20 69 6e 74 | =>. int| 00000440 20 77 69 6e 64 6f 77 20 68 61 6e 64 6c 65 20 6f | window handle o| 00000450 76 65 72 20 77 68 69 63 68 20 4d 45 4e 55 0a 20 |ver which MENU. | 00000460 20 20 20 20 20 20 20 20 20 20 20 20 77 61 73 20 | was | 00000470 70 72 65 73 73 65 64 20 0a 20 20 20 20 20 20 20 |pressed . | 00000480 20 20 69 6e 74 20 69 63 6f 6e 20 68 61 6e 64 6c | int icon handl| 00000490 65 20 6f 76 65 72 20 77 68 69 63 68 20 4d 45 4e |e over which MEN| 000004a0 55 20 77 61 73 0a 20 20 20 20 20 20 20 20 20 20 |U was. | 000004b0 20 20 20 70 72 65 73 73 65 64 20 28 2d 31 20 66 | pressed (-1 f| 000004c0 6f 72 20 6e 6f 20 69 63 6f 6e 29 0a 20 0a 54 68 |or no icon). .Th| 000004d0 69 73 20 66 75 6e 63 74 69 6f 6e 20 69 73 20 63 |is function is c| 000004e0 61 6c 6c 65 64 20 62 65 66 6f 72 65 20 74 68 65 |alled before the| 000004f0 20 6d 65 6e 75 20 69 73 0a 6f 70 65 6e 65 64 2e | menu is.opened.| 00000500 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |..--------------| 00000510 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000530 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 50 52 4f 43 |----------..PROC| 00000540 73 68 65 6c 6c 5f 41 74 74 61 63 68 46 6f 6e 74 |shell_AttachFont| 00000550 4d 65 6e 75 28 29 0a 50 61 72 61 6d 73 20 3d 3e |Menu().Params =>| 00000560 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 69 74 |. int it| 00000570 65 6d 20 68 61 6e 64 6c 65 0a 20 20 20 20 20 20 |em handle. | 00000580 20 20 20 73 74 72 20 66 75 6e 63 74 69 6f 6e 20 | str function | 00000590 74 6f 20 63 61 6c 6c 20 77 68 65 6e 20 6d 65 6e |to call when men| 000005a0 75 5f 73 65 6c 65 63 74 0a 20 20 20 20 20 20 20 |u_select. | 000005b0 20 20 20 20 20 20 65 76 65 6e 74 20 6f 63 63 75 | event occu| 000005c0 72 73 20 28 6f 70 74 69 6f 6e 61 6c 2c 20 6d 61 |rs (optional, ma| 000005d0 79 20 62 65 20 22 22 29 0a 0a 55 73 65 20 74 68 |y be "")..Use th| 000005e0 69 73 20 72 6f 75 74 69 6e 65 20 74 6f 20 61 74 |is routine to at| 000005f0 74 61 63 68 20 74 68 65 20 46 6f 6e 74 4d 65 6e |tach the FontMen| 00000600 75 20 74 6f 20 61 6e 20 69 63 6f 6e 20 6f 72 0a |u to an icon or.| 00000610 61 20 77 69 6e 64 6f 77 2e 20 41 74 74 61 63 68 |a window. Attach| 00000620 20 74 68 65 20 46 6f 6e 74 4d 65 6e 75 20 74 6f | the FontMenu to| 00000630 20 61 6e 20 65 78 69 73 74 69 6e 67 20 6d 65 6e | an existing men| 00000640 75 0a 73 74 72 75 63 74 75 72 65 20 77 69 74 68 |u.structure with| 00000650 20 50 52 4f 43 73 68 65 6c 6c 5f 41 74 74 61 63 | PROCshell_Attac| 00000660 68 46 6f 6e 74 53 75 62 4d 65 6e 75 2e 0a 0a 54 |hFontSubMenu...T| 00000670 68 69 73 20 72 6f 75 74 69 6e 65 20 77 69 6c 6c |his routine will| 00000680 20 61 74 74 65 6d 70 74 20 74 6f 20 6c 6f 61 64 | attempt to load| 00000690 20 74 68 65 20 6e 65 63 65 73 73 61 72 79 0a 27 | the necessary.'| 000006a0 46 6f 6e 74 4d 65 6e 75 27 20 73 75 70 70 6f 72 |FontMenu' suppor| 000006b0 74 20 6d 6f 64 75 6c 65 20 69 66 20 69 74 20 69 |t module if it i| 000006c0 73 20 6e 6f 74 20 61 6c 72 65 61 64 79 0a 6c 6f |s not already.lo| 000006d0 61 64 65 64 2e 20 49 74 20 65 78 70 65 63 74 73 |aded. It expects| 000006e0 20 74 6f 20 66 69 6e 64 20 69 74 20 69 6e 20 74 | to find it in t| 000006f0 68 65 0a 45 76 6e 74 53 68 65 6c 6c 53 79 73 74 |he.EvntShellSyst| 00000700 65 6d 24 50 61 74 68 20 28 75 73 75 61 6c 6c 79 |em$Path (usually| 00000710 20 69 6e 20 21 53 68 65 6c 6c 53 79 73 29 2e 0a | in !ShellSys)..| 00000720 0a 55 73 65 72 20 46 4e 20 28 50 52 4f 43 73 68 |.User FN (PROCsh| 00000730 65 6c 6c 5f 41 74 74 61 63 68 46 6f 6e 74 4d 65 |ell_AttachFontMe| 00000740 6e 75 29 20 0a 50 61 72 61 6d 73 20 3d 3e 20 0a |nu) .Params => .| 00000750 20 20 20 20 20 20 20 20 20 73 74 72 20 73 65 6c | str sel| 00000760 65 63 74 69 6f 6e 20 73 74 72 69 6e 67 0a 0a 20 |ection string.. | 00000770 20 20 20 20 20 20 3c 3d 0a 20 20 20 20 20 20 20 | <=. | 00000780 20 20 69 6e 74 20 6a 75 6e 6b 0a 0a 54 68 69 73 | int junk..This| 00000790 20 66 75 6e 63 74 69 6f 6e 20 63 61 6e 20 62 65 | function can be| 000007a0 20 75 73 65 64 20 74 6f 20 64 69 73 63 6f 76 65 | used to discove| 000007b0 72 20 74 68 65 20 6e 61 6d 65 0a 6f 66 20 74 68 |r the name.of th| 000007c0 65 20 66 6f 6e 74 20 28 69 66 20 61 6e 79 29 20 |e font (if any) | 000007d0 74 68 61 74 20 68 61 73 20 62 65 65 6e 20 73 65 |that has been se| 000007e0 6c 65 63 74 65 64 20 69 6e 0a 74 68 65 20 46 6f |lected in.the Fo| 000007f0 6e 74 4d 65 6e 75 2e 20 55 73 65 20 46 4e 73 68 |ntMenu. Use FNsh| 00000800 65 6c 6c 5f 46 6f 6e 74 4d 65 6e 75 47 65 74 4c |ell_FontMenuGetL| 00000810 61 73 74 53 65 6c 65 63 74 65 64 46 6f 6e 74 0a |astSelectedFont.| 00000820 66 6f 72 20 74 68 69 73 2e 0a 0a 2d 2d 2d 2d 2d |for this...-----| 00000830 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000860 2d 2d 2d 0a 0a 46 4e 73 68 65 6c 6c 5f 46 6f 6e |---..FNshell_Fon| 00000870 74 4d 65 6e 75 47 65 74 4c 61 73 74 53 65 6c 65 |tMenuGetLastSele| 00000880 63 74 65 64 46 6f 6e 74 0a 50 61 72 61 6d 73 20 |ctedFont.Params | 00000890 3d 3e 0a 20 20 20 20 20 20 20 20 20 4e 6f 6e 65 |=>. None| 000008a0 0a 0a 20 20 20 20 20 20 20 3c 3d 0a 20 20 20 20 |.. <=. | 000008b0 20 20 20 20 20 73 74 72 20 66 6f 6e 74 20 6e 61 | str font na| 000008c0 6d 65 20 28 63 6f 75 6c 64 20 62 65 20 22 22 29 |me (could be "")| 000008d0 0a 0a 54 68 69 73 20 72 6f 75 74 69 6e 65 20 73 |..This routine s| 000008e0 68 6f 75 6c 64 20 62 65 20 75 73 65 64 20 69 6e |hould be used in| 000008f0 20 74 68 65 20 66 75 6e 63 74 69 6f 6e 0a 63 61 | the function.ca| 00000900 6c 6c 65 64 20 77 68 65 6e 20 61 20 6d 65 6e 75 |lled when a menu| 00000910 5f 73 65 6c 65 63 74 20 65 76 65 6e 74 20 68 61 |_select event ha| 00000920 73 20 6f 63 63 75 72 72 65 64 20 74 6f 0a 64 69 |s occurred to.di| 00000930 73 63 6f 76 65 72 20 69 66 20 66 6f 6e 74 20 6d |scover if font m| 00000940 65 6e 75 20 73 65 6c 65 63 74 69 6f 6e 20 68 61 |enu selection ha| 00000950 73 20 62 65 65 6e 20 6d 61 64 65 2c 0a 61 6e 64 |s been made,.and| 00000960 20 69 66 20 73 6f 20 74 68 65 20 6e 61 6d 65 20 | if so the name | 00000970 6f 66 20 74 68 65 20 66 6f 6e 74 2e 0a 0a 49 66 |of the font...If| 00000980 20 6e 6f 20 76 61 6c 69 64 20 66 6f 6e 74 20 6d | no valid font m| 00000990 65 6e 75 20 73 65 6c 65 63 74 69 6f 6e 20 68 61 |enu selection ha| 000009a0 73 20 62 65 65 6e 20 6d 61 64 65 0a 74 68 65 20 |s been made.the | 000009b0 66 75 6e 63 74 69 6f 6e 20 77 69 6c 6c 20 72 65 |function will re| 000009c0 74 75 72 6e 20 22 22 20 61 6e 64 20 6e 6f 20 61 |turn "" and no a| 000009d0 63 74 69 6f 6e 20 73 68 6f 75 6c 64 0a 62 65 20 |ction should.be | 000009e0 74 61 6b 65 6e 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d |taken...--------| 000009f0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000a20 0a 0a 50 52 4f 43 73 68 65 6c 6c 5f 46 6f 6e 74 |..PROCshell_Font| 00000a30 4d 65 6e 75 53 65 6c 65 63 74 46 6f 6e 74 28 29 |MenuSelectFont()| 00000a40 0a 50 61 72 61 6d 73 20 3d 3e 0a 20 20 20 20 20 |.Params =>. | 00000a50 20 20 20 20 73 74 72 20 6e 61 6d 65 20 6f 66 20 | str name of | 00000a60 66 6f 6e 74 20 74 6f 20 73 65 6c 65 63 74 0a 0a |font to select..| 00000a70 54 68 65 20 66 6f 6e 74 20 6e 61 6d 65 20 69 73 |The font name is| 00000a80 20 75 73 65 64 20 62 79 20 74 68 65 20 6c 69 62 | used by the lib| 00000a90 72 61 72 79 20 72 6f 75 74 69 6e 65 73 0a 74 6f |rary routines.to| 00000aa0 20 64 65 63 69 64 65 20 77 68 69 63 68 20 66 6f | decide which fo| 00000ab0 6e 74 20 6e 61 6d 65 20 74 6f 20 73 65 6c 65 63 |nt name to selec| 00000ac0 74 20 77 68 65 6e 20 74 68 65 0a 66 6f 6e 74 20 |t when the.font | 00000ad0 6d 65 6e 75 20 6f 70 65 6e 73 2e 20 41 73 20 74 |menu opens. As t| 00000ae0 68 65 20 73 61 6d 65 20 66 6f 6e 74 20 6d 65 6e |he same font men| 00000af0 75 20 63 61 6e 20 62 65 0a 75 73 65 64 20 62 79 |u can be.used by| 00000b00 20 64 69 66 66 65 72 65 6e 74 20 61 70 70 6c 69 | different appli| 00000b10 63 61 74 69 6f 6e 73 20 69 74 20 69 73 20 69 6d |cations it is im| 00000b20 70 6f 72 74 61 6e 74 0a 74 6f 20 73 65 74 20 74 |portant.to set t| 00000b30 68 69 73 20 75 70 20 6a 75 73 74 20 62 65 66 6f |his up just befo| 00000b40 72 65 20 74 68 65 20 6d 65 6e 75 20 6f 70 65 6e |re the menu open| 00000b50 73 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |s...------------| 00000b60 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000b80 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 50 52 |------------..PR| 00000b90 4f 43 73 68 65 6c 6c 5f 41 74 74 61 63 68 4d 65 |OCshell_AttachMe| 00000ba0 6e 75 44 42 6f 78 28 29 0a 50 61 72 61 6d 73 20 |nuDBox().Params | 00000bb0 3d 3e 20 20 0a 20 20 20 20 20 20 20 20 20 69 6e |=> . in| 00000bc0 74 20 6d 65 6e 75 20 69 74 65 6d 20 68 61 6e 64 |t menu item hand| 00000bd0 6c 65 20 20 20 20 20 0a 20 20 20 20 20 20 20 20 |le . | 00000be0 20 73 74 72 20 77 69 6e 64 6f 77 20 69 64 65 6e | str window iden| 00000bf0 74 69 66 69 65 72 0a 20 20 20 20 20 20 20 20 20 |tifier. | 00000c00 73 74 72 20 66 75 6e 63 74 69 6f 6e 20 6e 61 6d |str function nam| 00000c10 65 0a 20 20 20 20 20 20 20 20 20 73 74 72 20 66 |e. str f| 00000c20 75 6e 63 74 69 6f 6e 20 6e 61 6d 65 0a 0a 43 61 |unction name..Ca| 00000c30 6c 6c 69 6e 67 20 74 68 69 73 20 72 6f 75 74 69 |lling this routi| 00000c40 6e 65 20 77 69 6c 6c 20 61 75 74 6f 6d 61 74 69 |ne will automati| 00000c50 63 61 6c 6c 79 20 73 65 74 75 70 20 74 68 65 20 |cally setup the | 00000c60 73 75 62 0a 6d 65 6e 75 20 61 72 72 6f 77 20 6f |sub.menu arrow o| 00000c70 6e 20 74 68 65 20 6d 65 6e 75 20 69 74 65 6d 2c |n the menu item,| 00000c80 20 61 6e 64 20 61 6c 73 6f 20 73 65 74 20 74 68 | and also set th| 00000c90 65 20 27 6d 65 6e 75 0a 77 61 72 6e 69 6e 67 27 |e 'menu.warning'| 00000ca0 20 66 6c 61 67 2e 20 49 74 20 69 73 20 6e 6f 74 | flag. It is not| 00000cb0 20 6e 65 63 65 73 73 61 72 79 20 74 6f 20 64 6f | necessary to do| 00000cc0 20 74 68 69 73 20 69 6e 20 74 68 65 0a 6d 65 6e | this in the.men| 00000cd0 75 20 65 64 69 74 6f 72 2e 0a 0a 55 73 65 72 20 |u editor...User | 00000ce0 46 4e 20 28 50 52 4f 43 73 68 65 6c 6c 5f 41 74 |FN (PROCshell_At| 00000cf0 74 61 63 68 4d 65 6e 75 44 42 6f 78 29 0a 50 61 |tachMenuDBox).Pa| 00000d00 72 61 6d 73 20 3d 3e 20 0a 20 20 20 20 20 20 20 |rams => . | 00000d10 20 20 69 6e 74 20 77 69 6e 64 6f 77 20 68 61 6e | int window han| 00000d20 64 6c 65 0a 20 0a 54 68 65 20 66 75 6e 63 74 69 |dle. .The functi| 00000d30 6f 6e 20 74 6f 20 63 61 6c 6c 20 61 66 74 65 72 |on to call after| 00000d40 20 63 72 65 61 74 69 6e 67 20 74 68 65 20 77 69 | creating the wi| 00000d50 6e 64 6f 77 0a 62 75 74 20 62 65 66 6f 72 65 20 |ndow.but before | 00000d60 6f 70 65 6e 69 6e 67 20 69 74 2e 20 54 68 69 73 |opening it. This| 00000d70 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 | can be used to | 00000d80 66 69 6c 6c 0a 69 6e 20 69 63 6f 6e 20 66 69 65 |fill.in icon fie| 00000d90 6c 64 73 20 65 74 63 2e 20 41 20 66 75 6e 63 74 |lds etc. A funct| 00000da0 69 6f 6e 20 6e 61 6d 65 20 6f 66 20 22 22 20 6d |ion name of "" m| 00000db0 61 79 0a 62 65 20 75 73 65 64 20 69 66 20 79 6f |ay.be used if yo| 00000dc0 75 20 64 6f 6e 27 74 20 6e 65 65 64 20 74 6f 20 |u don't need to | 00000dd0 63 61 6c 6c 20 61 20 66 75 6e 63 74 69 6f 6e 2e |call a function.| 00000de0 0a 0a 55 73 65 72 20 46 4e 20 28 50 52 4f 43 73 |..User FN (PROCs| 00000df0 68 65 6c 6c 5f 41 74 74 61 63 68 4d 65 6e 75 44 |hell_AttachMenuD| 00000e00 42 6f 78 29 0a 50 61 72 61 6d 73 20 3d 3e 20 0a |Box).Params => .| 00000e10 20 20 20 20 20 20 20 20 20 69 6e 74 20 77 69 6e | int win| 00000e20 64 6f 77 20 68 61 6e 64 6c 65 0a 20 0a 54 68 65 |dow handle. .The| 00000e30 20 66 75 6e 63 74 69 6f 6e 20 74 6f 20 63 61 6c | function to cal| 00000e40 6c 20 61 66 74 65 72 20 6f 70 65 6e 69 6e 67 20 |l after opening | 00000e50 74 68 65 20 77 69 6e 64 6f 77 2e 0a 41 20 66 75 |the window..A fu| 00000e60 6e 63 74 69 6f 6e 20 6e 61 6d 65 20 6f 66 20 22 |nction name of "| 00000e70 22 20 6d 61 79 20 62 65 20 75 73 65 64 20 69 66 |" may be used if| 00000e80 20 79 6f 75 20 64 6f 6e 27 74 0a 6e 65 65 64 20 | you don't.need | 00000e90 74 6f 20 63 61 6c 6c 20 61 20 66 75 6e 63 74 69 |to call a functi| 00000ea0 6f 6e 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |on...-----------| 00000eb0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000ed0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 50 |-------------..P| 00000ee0 52 4f 43 73 68 65 6c 6c 5f 4f 70 65 6e 4d 65 6e |ROCshell_OpenMen| 00000ef0 75 28 29 0a 50 61 72 61 6d 73 20 3d 3e 20 20 20 |u().Params => | 00000f00 20 20 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 | . int | 00000f10 6d 65 6e 75 20 78 20 63 6f 6f 72 64 69 6e 61 74 |menu x coordinat| 00000f20 65 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 6d |e. int m| 00000f30 65 6e 75 20 79 20 63 6f 6f 72 64 69 6e 61 74 65 |enu y coordinate| 00000f40 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 68 61 |. int ha| 00000f50 6e 64 6c 65 20 6f 66 20 6d 65 6e 75 20 74 6f 20 |ndle of menu to | 00000f60 6f 70 65 6e 0a 0a 4e 6f 72 6d 61 6c 6c 79 20 74 |open..Normally t| 00000f70 68 69 73 20 72 6f 75 74 69 6e 65 20 69 73 20 63 |his routine is c| 00000f80 61 6c 6c 65 64 20 69 6e 74 65 72 6e 61 6c 6c 79 |alled internally| 00000f90 0a 62 79 20 74 68 65 20 6c 69 62 72 61 72 79 20 |.by the library | 00000fa0 72 6f 75 74 69 6e 65 73 20 69 6e 20 72 65 73 70 |routines in resp| 00000fb0 6f 6e 73 65 20 74 6f 20 6d 65 6e 75 0a 6f 70 65 |onse to menu.ope| 00000fc0 6e 20 65 76 65 6e 74 73 20 73 65 74 20 75 70 20 |n events set up | 00000fd0 62 79 20 50 52 4f 43 73 68 65 6c 6c 5f 41 74 74 |by PROCshell_Att| 00000fe0 61 63 68 4d 65 6e 75 2e 0a 49 6e 20 73 6f 6d 65 |achMenu..In some| 00000ff0 20 63 69 72 63 75 6d 73 74 61 6e 63 65 73 20 69 | circumstances i| 00001000 74 20 6d 61 79 20 62 65 20 61 64 76 61 6e 74 61 |t may be advanta| 00001010 67 65 6f 75 73 0a 74 6f 20 63 61 6c 6c 20 69 74 |geous.to call it| 00001020 20 66 72 6f 6d 20 74 68 65 20 75 73 65 72 20 61 | from the user a| 00001030 70 70 6c 69 63 61 74 69 6f 6e 73 2e 0a 0a 4e 6f |pplications...No| 00001040 74 65 20 74 68 61 74 20 74 68 69 73 20 72 6f 75 |te that this rou| 00001050 74 69 6e 65 20 63 68 65 63 6b 73 20 74 68 65 20 |tine checks the | 00001060 6c 61 73 74 20 77 69 6e 64 6f 77 2f 0a 69 63 6f |last window/.ico| 00001070 6e 20 70 61 69 72 20 63 6c 69 63 6b 65 64 20 6f |n pair clicked o| 00001080 76 65 72 20 61 6e 64 20 61 73 73 75 6d 65 73 20 |ver and assumes | 00001090 74 68 61 74 20 74 68 65 0a 6d 65 6e 75 20 69 73 |that the.menu is| 000010a0 20 61 74 74 61 63 68 65 64 20 74 6f 20 74 68 65 | attached to the| 000010b0 73 65 2e 20 49 66 20 79 6f 75 20 6f 70 65 6e 20 |se. If you open | 000010c0 74 68 65 0a 6d 65 6e 75 20 69 6e 20 72 65 73 70 |the.menu in resp| 000010d0 6f 6e 73 65 20 74 6f 20 61 20 63 6c 69 63 6b 20 |onse to a click | 000010e0 6f 6e 20 74 68 65 20 69 63 6f 6e 62 61 72 0a 69 |on the iconbar.i| 000010f0 63 6f 6e 20 74 68 65 20 59 20 63 6f 6f 72 64 69 |con the Y coordi| 00001100 6e 61 74 65 20 77 69 6c 6c 20 62 65 20 69 67 6e |nate will be ign| 00001110 6f 72 65 64 2e 20 49 6e 0a 67 65 6e 65 72 61 6c |ored. In.general| 00001120 20 79 6f 75 20 73 68 6f 75 6c 64 20 61 6c 77 61 | you should alwa| 00001130 79 73 20 61 74 74 61 63 68 20 6d 65 6e 75 73 20 |ys attach menus | 00001140 74 6f 0a 77 69 6e 64 6f 77 73 20 6f 72 20 77 69 |to.windows or wi| 00001150 6e 64 6f 77 2f 69 63 6f 6e 20 70 61 69 72 73 20 |ndow/icon pairs | 00001160 72 61 74 68 65 72 20 74 68 61 6e 20 75 73 69 6e |rather than usin| 00001170 67 0a 74 68 69 73 20 63 61 6c 6c 2e 0a 0a 2d 2d |g.this call...--| 00001180 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000011b0 2d 2d 2d 2d 2d 2d 0a 0a 46 4e 73 68 65 6c 6c 5f |------..FNshell_| 000011c0 4d 65 6e 75 4c 61 73 74 58 50 6f 73 0a 52 65 74 |MenuLastXPos.Ret| 000011d0 75 72 6e 73 20 74 68 65 20 58 20 63 6f 6f 72 64 |urns the X coord| 000011e0 69 6e 61 74 65 20 6f 66 20 74 68 65 20 6c 61 73 |inate of the las| 000011f0 74 20 6d 65 6e 75 0a 6f 70 65 6e 65 64 20 62 79 |t menu.opened by| 00001200 20 50 52 4f 43 73 68 65 6c 6c 5f 4f 70 65 6e 4d | PROCshell_OpenM| 00001210 65 6e 75 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |enu...----------| 00001220 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00001240 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a |--------------..| 00001250 46 4e 73 68 65 6c 6c 5f 4d 65 6e 75 4c 61 73 74 |FNshell_MenuLast| 00001260 59 50 6f 73 0a 52 65 74 75 72 6e 73 20 74 68 65 |YPos.Returns the| 00001270 20 59 20 63 6f 6f 72 64 69 6e 61 74 65 20 6f 66 | Y coordinate of| 00001280 20 74 68 65 20 6c 61 73 74 20 6d 65 6e 75 0a 6f | the last menu.o| 00001290 70 65 6e 65 64 20 62 79 20 50 52 4f 43 73 68 65 |pened by PROCshe| 000012a0 6c 6c 5f 4f 70 65 6e 4d 65 6e 75 2e 0a 0a 2d 2d |ll_OpenMenu...--| 000012b0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000012e0 2d 2d 2d 2d 2d 2d 0a 0a 50 52 4f 43 73 68 65 6c |------..PROCshel| 000012f0 6c 5f 4d 65 6e 75 53 68 61 64 65 28 29 0a 50 61 |l_MenuShade().Pa| 00001300 72 61 6d 73 20 3d 3e 0a 20 20 20 20 20 20 20 20 |rams =>. | 00001310 20 69 6e 74 20 6d 65 6e 75 20 6f 72 20 69 74 65 | int menu or ite| 00001320 6d 20 68 61 6e 64 6c 65 0a 20 20 20 20 20 20 20 |m handle. | 00001330 20 20 69 6e 74 20 73 74 61 74 65 0a 0a 53 68 61 | int state..Sha| 00001340 64 65 73 20 6d 65 6e 75 20 69 74 65 6d 73 2e 20 |des menu items. | 00001350 49 66 20 61 20 6d 65 6e 75 20 68 61 6e 64 6c 65 |If a menu handle| 00001360 20 69 73 0a 67 69 76 65 6e 20 74 68 65 6e 20 61 | is.given then a| 00001370 6c 6c 20 69 74 65 6d 73 20 69 6e 20 74 68 65 20 |ll items in the | 00001380 6d 65 6e 75 20 61 72 65 0a 73 68 61 64 65 64 20 |menu are.shaded | 00001390 6f 72 20 64 65 73 68 61 64 65 64 2e 0a 0a 4d 65 |or deshaded...Me| 000013a0 6e 75 20 53 68 61 64 65 20 53 74 61 74 65 73 0a |nu Shade States.| 000013b0 54 68 65 20 73 74 61 74 65 20 69 73 20 30 20 66 |The state is 0 f| 000013c0 6f 72 20 6e 6f 20 73 68 61 64 69 6e 67 2c 20 6e |or no shading, n| 000013d0 6f 6e 20 30 20 66 6f 72 20 73 68 61 64 69 6e 67 |on 0 for shading| 000013e0 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |...-------------| 000013f0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00001410 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 50 52 4f |-----------..PRO| 00001420 43 73 68 65 6c 6c 5f 4d 65 6e 75 54 69 63 6b 28 |Cshell_MenuTick(| 00001430 29 0a 50 61 72 61 6d 73 20 3d 3e 0a 20 20 20 20 |).Params =>. | 00001440 20 20 20 20 20 69 6e 74 20 6d 65 6e 75 20 6f 72 | int menu or| 00001450 20 69 74 65 6d 20 68 61 6e 64 6c 65 0a 20 20 20 | item handle. | 00001460 20 20 20 20 20 20 69 6e 74 20 73 74 61 74 65 0a | int state.| 00001470 0a 41 64 64 73 20 6f 72 20 72 65 6d 6f 76 65 73 |.Adds or removes| 00001480 20 74 69 63 6b 73 20 66 6f 72 20 6d 65 6e 75 0a | ticks for menu.| 00001490 69 74 65 6d 73 2e 20 49 66 20 61 20 6d 65 6e 75 |items. If a menu| 000014a0 20 68 61 6e 64 6c 65 20 69 73 20 67 69 76 65 6e | handle is given| 000014b0 0a 74 68 65 6e 20 61 6c 6c 20 69 74 65 6d 73 20 |.then all items | 000014c0 69 6e 20 74 68 65 20 6d 65 6e 75 20 61 72 65 0a |in the menu are.| 000014d0 74 69 63 6b 65 64 20 6f 72 20 6e 6f 74 20 74 69 |ticked or not ti| 000014e0 63 6b 65 64 2e 0a 0a 53 65 65 20 61 6c 73 6f 20 |cked...See also | 000014f0 50 52 4f 43 73 68 65 6c 6c 5f 4d 65 6e 75 54 69 |PROCshell_MenuTi| 00001500 63 6b 4f 6e 6c 79 31 2c 0a 20 20 20 20 20 20 20 |ckOnly1,. | 00001510 20 20 50 52 4f 43 73 68 65 6c 6c 5f 4d 65 6e 75 | PROCshell_Menu| 00001520 54 69 63 6b 4f 6e 6c 79 32 0a 0a 4d 65 6e 75 20 |TickOnly2..Menu | 00001530 54 69 63 6b 20 53 74 61 74 65 73 0a 54 68 65 20 |Tick States.The | 00001540 73 74 61 74 65 20 69 73 20 30 20 66 6f 72 20 6e |state is 0 for n| 00001550 6f 20 20 74 69 63 6b 2c 20 6e 6f 6e 20 30 20 66 |o tick, non 0 f| 00001560 6f 72 20 61 20 74 69 63 6b 2e 0a 0a 2d 2d 2d 2d |or a tick...----| 00001570 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000015a0 2d 2d 2d 2d 0a 0a 50 52 4f 43 73 68 65 6c 6c 5f |----..PROCshell_| 000015b0 4d 65 6e 75 50 75 74 44 61 74 61 28 29 0a 50 61 |MenuPutData().Pa| 000015c0 72 61 6d 73 20 3d 3e 0a 20 20 20 20 20 20 20 20 |rams =>. | 000015d0 20 69 6e 74 20 6d 65 6e 75 20 69 74 65 6d 20 68 | int menu item h| 000015e0 61 6e 64 6c 65 0a 20 20 20 20 20 20 20 20 20 73 |andle. s| 000015f0 74 72 20 64 61 74 61 20 74 6f 20 77 72 69 74 65 |tr data to write| 00001600 20 69 6e 74 6f 20 6d 65 6e 75 20 69 74 65 6d 0a | into menu item.| 00001610 0a 54 68 69 73 20 72 6f 75 74 69 6e 65 20 69 73 |.This routine is| 00001620 20 75 73 65 64 20 74 6f 20 61 6c 74 65 72 20 74 | used to alter t| 00001630 68 65 20 69 74 65 6d 73 20 6f 66 20 61 0a 6d 65 |he items of a.me| 00001640 6e 75 20 77 68 65 6e 20 74 68 65 20 70 72 6f 67 |nu when the prog| 00001650 72 61 6d 20 72 75 6e 73 2e 20 54 68 65 20 77 69 |ram runs. The wi| 00001660 64 74 68 20 6f 66 20 74 68 65 0a 6d 65 6e 75 20 |dth of the.menu | 00001670 69 73 20 61 64 6a 75 73 74 65 64 20 61 75 74 6f |is adjusted auto| 00001680 6d 61 74 69 63 61 6c 6c 79 2e 0a 0a 2d 2d 2d 2d |matically...----| 00001690 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000016c0 2d 2d 2d 2d 0a 0a 50 52 4f 43 73 68 65 6c 6c 5f |----..PROCshell_| 000016d0 41 74 74 61 63 68 53 75 62 4d 65 6e 75 28 29 0a |AttachSubMenu().| 000016e0 50 61 72 61 6d 73 20 3d 3e 0a 20 20 20 20 20 20 |Params =>. | 000016f0 20 20 20 69 6e 74 20 69 74 65 6d 20 68 61 6e 64 | int item hand| 00001700 6c 65 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 |le. int | 00001710 73 75 62 6d 65 6e 75 20 6d 65 6e 75 20 68 61 6e |submenu menu han| 00001720 64 6c 65 0a 20 20 20 20 20 20 20 20 20 73 74 72 |dle. str| 00001730 20 66 75 6e 63 74 69 6f 6e 20 74 6f 20 63 61 6c | function to cal| 00001740 6c 20 77 68 65 6e 20 6d 65 6e 75 5f 77 61 72 6e |l when menu_warn| 00001750 69 6e 67 0a 20 20 20 20 20 20 20 20 20 20 20 20 |ing. | 00001760 20 6d 65 73 73 61 67 65 20 69 73 20 72 65 63 65 | message is rece| 00001770 69 76 65 64 20 28 6f 70 74 69 6f 6e 61 6c 2c 20 |ived (optional, | 00001780 6d 61 79 0a 20 20 20 20 20 20 20 20 20 20 20 20 |may. | 00001790 20 62 65 20 22 22 29 0a 0a 55 73 65 72 20 46 4e | be "")..User FN| 000017a0 20 28 50 52 4f 43 73 68 65 6c 6c 5f 41 74 74 61 | (PROCshell_Atta| 000017b0 63 68 53 75 62 4d 65 6e 75 29 20 0a 50 61 72 61 |chSubMenu) .Para| 000017c0 6d 73 20 3d 3e 20 0a 20 20 20 20 20 20 20 20 20 |ms => . | 000017d0 69 6e 74 20 77 69 6e 64 6f 77 20 68 61 6e 64 6c |int window handl| 000017e0 65 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 69 |e. int i| 000017f0 63 6f 6e 20 68 61 6e 64 6c 65 0a 0a 20 20 20 20 |con handle.. | 00001800 20 20 20 3c 3d 0a 20 20 20 20 20 20 20 20 20 69 | <=. i| 00001810 6e 74 20 6a 75 6e 6b 0a 20 20 20 20 20 20 20 20 |nt junk. | 00001820 20 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | .--------------| 00001830 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00001850 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 50 52 4f 43 |----------..PROC| 00001860 73 68 65 6c 6c 5f 41 74 74 61 63 68 46 6f 6e 74 |shell_AttachFont| 00001870 53 75 62 4d 65 6e 75 28 29 0a 50 61 72 61 6d 73 |SubMenu().Params| 00001880 20 3d 3e 0a 20 20 20 20 20 20 20 20 20 69 6e 74 | =>. int| 00001890 20 69 74 65 6d 20 68 61 6e 64 6c 65 0a 20 20 20 | item handle. | 000018a0 20 20 20 20 20 20 73 74 72 20 66 75 6e 63 74 69 | str functi| 000018b0 6f 6e 20 74 6f 20 63 61 6c 6c 20 77 68 65 6e 20 |on to call when | 000018c0 6d 65 6e 75 5f 77 61 72 6e 69 6e 67 0a 20 20 20 |menu_warning. | 000018d0 20 20 20 20 20 20 20 20 20 20 6d 65 73 73 61 67 | messag| 000018e0 65 20 69 73 20 72 65 63 65 69 76 65 64 20 28 6f |e is received (o| 000018f0 70 74 69 6f 6e 61 6c 2c 20 6d 61 79 0a 20 20 20 |ptional, may. | 00001900 20 20 20 20 20 20 20 20 20 20 62 65 20 22 22 29 | be "")| 00001910 0a 0a 54 68 69 73 20 72 6f 75 74 69 6e 65 20 77 |..This routine w| 00001920 69 6c 6c 20 61 74 74 65 6d 70 74 20 74 6f 20 6c |ill attempt to l| 00001930 6f 61 64 20 74 68 65 20 6e 65 63 65 73 73 61 72 |oad the necessar| 00001940 79 0a 27 46 6f 6e 74 4d 65 6e 75 27 20 73 75 70 |y.'FontMenu' sup| 00001950 70 6f 72 74 20 6d 6f 64 75 6c 65 20 69 66 20 69 |port module if i| 00001960 74 20 69 73 20 6e 6f 74 20 61 6c 72 65 61 64 79 |t is not already| 00001970 0a 6c 6f 61 64 65 64 2e 20 49 74 20 65 78 70 65 |.loaded. It expe| 00001980 63 74 73 20 74 6f 20 66 69 6e 64 20 69 74 20 69 |cts to find it i| 00001990 6e 20 74 68 65 0a 45 76 6e 74 53 68 65 6c 6c 53 |n the.EvntShellS| 000019a0 79 73 74 65 6d 24 50 61 74 68 20 28 75 73 75 61 |ystem$Path (usua| 000019b0 6c 6c 79 20 69 6e 20 21 53 68 65 6c 6c 53 79 73 |lly in !ShellSys| 000019c0 29 2e 0a 0a 55 73 65 72 20 46 4e 20 28 50 52 4f |)...User FN (PRO| 000019d0 43 73 68 65 6c 6c 5f 41 74 74 61 63 68 46 6f 6e |Cshell_AttachFon| 000019e0 74 53 75 62 4d 65 6e 75 29 20 0a 50 61 72 61 6d |tSubMenu) .Param| 000019f0 73 20 3d 3e 20 0a 20 20 20 20 20 20 20 20 20 69 |s => . i| 00001a00 6e 74 20 77 69 6e 64 6f 77 20 68 61 6e 64 6c 65 |nt window handle| 00001a10 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 69 63 |. int ic| 00001a20 6f 6e 20 68 61 6e 64 6c 65 0a 0a 20 20 20 20 20 |on handle.. | 00001a30 20 20 3c 3d 0a 20 20 20 20 20 20 20 20 20 69 6e | <=. in| 00001a40 74 20 6a 75 6e 6b 0a 0a 54 68 69 73 20 66 75 6e |t junk..This fun| 00001a50 63 74 69 6f 6e 20 63 61 6e 20 62 65 20 75 73 65 |ction can be use| 00001a60 64 20 74 6f 20 73 65 74 20 74 68 65 20 63 75 72 |d to set the cur| 00001a70 72 65 6e 74 6c 79 0a 73 65 6c 65 63 74 65 64 20 |rently.selected | 00001a80 66 6f 6e 74 20 69 6e 20 74 68 65 20 6d 65 6e 75 |font in the menu| 00001a90 20 61 62 6f 75 74 20 74 6f 20 62 65 20 6f 70 65 | about to be ope| 00001aa0 6e 65 64 2e 0a 55 73 65 20 50 52 4f 43 73 68 65 |ned..Use PROCshe| 00001ab0 6c 6c 5f 46 6f 6e 74 4d 65 6e 75 53 65 6c 65 63 |ll_FontMenuSelec| 00001ac0 74 46 6f 6e 74 20 74 6f 20 64 6f 20 74 68 69 73 |tFont to do this| 00001ad0 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |...-------------| 00001ae0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00001b00 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 50 52 4f |-----------..PRO| 00001b10 43 73 68 65 6c 6c 5f 4d 65 6e 75 57 72 69 74 61 |Cshell_MenuWrita| 00001b20 62 6c 65 28 29 0a 50 61 72 61 6d 73 20 3d 3e 0a |ble().Params =>.| 00001b30 20 20 20 20 20 20 20 20 20 69 6e 74 20 6d 65 6e | int men| 00001b40 75 20 6f 72 20 6d 65 6e 75 20 69 74 65 6d 20 68 |u or menu item h| 00001b50 61 6e 64 6c 65 0a 20 20 20 20 20 20 20 20 20 69 |andle. i| 00001b60 6e 74 20 73 74 61 74 65 0a 20 20 20 20 20 20 20 |nt state. | 00001b70 20 20 69 6e 74 20 73 69 7a 65 20 6f 66 20 69 6e | int size of in| 00001b80 64 69 72 65 63 74 65 64 20 62 75 66 66 65 72 0a |directed buffer.| 00001b90 20 20 20 20 20 20 20 20 20 73 74 72 20 76 61 6c | str val| 00001ba0 69 64 61 74 69 6f 6e 20 73 74 72 69 6e 67 0a 0a |idation string..| 00001bb0 4d 61 6b 65 73 20 74 68 65 20 67 69 76 65 6e 20 |Makes the given | 00001bc0 6d 65 6e 75 20 69 74 65 6d 20 77 72 69 74 61 62 |menu item writab| 00001bd0 6c 65 20 6f 72 20 6e 6f 6e 20 77 72 69 74 61 62 |le or non writab| 00001be0 6c 65 0a 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 |le.depending on | 00001bf0 74 68 65 20 73 74 61 74 65 20 70 61 72 61 6d 65 |the state parame| 00001c00 74 65 72 2e 20 49 66 20 61 20 6d 65 6e 75 20 68 |ter. If a menu h| 00001c10 61 6e 64 6c 65 0a 69 73 20 67 69 76 65 6e 20 74 |andle.is given t| 00001c20 68 65 6e 20 61 6c 6c 20 69 74 65 6d 73 20 69 6e |hen all items in| 00001c30 20 74 68 65 20 6d 65 6e 75 20 61 72 65 20 6d 61 | the menu are ma| 00001c40 64 65 0a 77 72 69 74 61 62 6c 65 20 6f 72 20 6e |de.writable or n| 00001c50 6f 6e 20 77 72 69 74 61 62 6c 65 2e 0a 0a 4d 65 |on writable...Me| 00001c60 6e 75 57 72 69 74 61 62 6c 65 20 53 74 61 74 65 |nuWritable State| 00001c70 73 0a 54 68 65 20 73 74 61 74 65 20 69 73 20 30 |s.The state is 0| 00001c80 20 66 6f 72 20 6e 6f 6e 20 77 72 69 74 61 62 6c | for non writabl| 00001c90 65 2c 20 6e 6f 6e 20 30 0a 66 6f 72 20 77 72 69 |e, non 0.for wri| 00001ca0 74 61 62 6c 65 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d |table...--------| 00001cb0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00001ce0 0a 0a 50 52 4f 43 73 68 65 6c 6c 5f 4d 65 6e 75 |..PROCshell_Menu| 00001cf0 44 6f 74 74 65 64 28 29 0a 50 61 72 61 6d 73 20 |Dotted().Params | 00001d00 3d 3e 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 |=>. int | 00001d10 6d 65 6e 75 20 6f 72 20 6d 65 6e 75 20 69 74 65 |menu or menu ite| 00001d20 6d 20 68 61 6e 64 6c 65 0a 20 20 20 20 20 20 20 |m handle. | 00001d30 20 20 69 6e 74 20 73 74 61 74 65 0a 0a 41 64 64 | int state..Add| 00001d40 73 20 6f 72 20 72 65 6d 6f 76 65 73 20 61 20 64 |s or removes a d| 00001d50 6f 74 74 65 64 20 6c 69 6e 65 20 66 72 6f 6d 20 |otted line from | 00001d60 62 65 6c 6f 77 0a 74 68 65 20 67 69 76 65 6e 20 |below.the given | 00001d70 6d 65 6e 75 20 69 74 65 6d 2e 20 49 66 20 61 20 |menu item. If a | 00001d80 6d 65 6e 75 20 68 61 6e 64 6c 65 20 69 73 0a 67 |menu handle is.g| 00001d90 69 76 65 6e 20 69 6e 73 74 65 61 64 20 61 6c 6c |iven instead all| 00001da0 20 69 74 65 6d 73 20 69 6e 20 74 68 65 20 6d 65 | items in the me| 00001db0 6e 75 20 61 72 65 0a 65 66 66 65 63 74 65 64 2e |nu are.effected.| 00001dc0 0a 0a 4d 65 6e 75 44 6f 74 74 65 64 20 53 74 61 |..MenuDotted Sta| 00001dd0 74 65 73 0a 54 68 65 20 73 74 61 74 65 20 69 73 |tes.The state is| 00001de0 20 30 20 66 6f 72 20 6e 6f 6e 20 77 72 69 74 61 | 0 for non writa| 00001df0 62 6c 65 2c 20 6e 6f 6e 20 30 0a 66 6f 72 20 77 |ble, non 0.for w| 00001e00 72 69 74 61 62 6c 65 2e 0a 0a 2d 2d 2d 2d 2d 2d |ritable...------| 00001e10 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00001e40 2d 2d 0a 0a 46 4e 73 68 65 6c 6c 5f 4d 65 6e 75 |--..FNshell_Menu| 00001e50 4e 65 77 28 29 0a 50 61 72 61 6d 73 20 3d 3e 0a |New().Params =>.| 00001e60 20 20 20 20 20 20 20 20 20 73 74 72 20 6d 65 6e | str men| 00001e70 75 20 74 69 74 6c 65 0a 0a 20 20 20 20 20 20 20 |u title.. | 00001e80 3c 3d 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 |<=. int | 00001e90 6d 65 6e 75 20 68 61 6e 64 6c 65 0a 20 20 20 20 |menu handle. | 00001ea0 20 20 20 20 20 0a 43 72 65 61 74 65 73 20 61 20 | .Creates a | 00001eb0 6e 65 77 20 6d 65 6e 75 20 77 69 74 68 20 74 68 |new menu with th| 00001ec0 65 20 67 69 76 65 6e 20 74 69 74 6c 65 2e 0a 0a |e given title...| 00001ed0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00001f00 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 46 4e 73 68 65 6c |--------..FNshel| 00001f10 6c 5f 4d 65 6e 75 41 64 64 28 29 0a 50 61 72 61 |l_MenuAdd().Para| 00001f20 6d 73 20 3d 3e 0a 20 20 20 20 20 20 20 20 20 69 |ms =>. i| 00001f30 6e 74 20 6d 65 6e 75 20 6f 72 20 6d 65 6e 75 20 |nt menu or menu | 00001f40 69 74 65 6d 20 68 61 6e 64 6c 65 0a 20 20 20 20 |item handle. | 00001f50 20 20 20 20 20 73 74 72 20 74 65 78 74 20 66 6f | str text fo| 00001f60 72 20 6d 65 6e 75 20 69 74 65 6d 0a 20 20 20 20 |r menu item. | 00001f70 20 20 20 20 20 73 74 72 20 66 6e 20 74 6f 20 63 | str fn to c| 00001f80 61 6c 6c 20 77 68 65 6e 20 69 74 65 6d 20 69 73 |all when item is| 00001f90 20 73 65 6c 65 63 74 65 64 0a 0a 20 20 20 20 20 | selected.. | 00001fa0 20 20 3c 3d 0a 20 20 20 20 20 20 20 20 20 69 6e | <=. in| 00001fb0 74 20 6d 65 6e 75 20 69 74 65 6d 20 68 61 6e 64 |t menu item hand| 00001fc0 6c 65 0a 20 20 20 20 20 20 20 20 20 0a 41 64 64 |le. .Add| 00001fd0 73 20 61 20 6e 65 77 20 69 74 65 6d 20 74 6f 20 |s a new item to | 00001fe0 61 6e 20 65 78 69 73 74 69 6e 67 20 6d 65 6e 75 |an existing menu| 00001ff0 2e 20 49 66 20 61 20 6d 65 6e 75 0a 68 61 6e 64 |. If a menu.hand| 00002000 6c 65 20 69 73 20 67 69 76 65 6e 20 74 68 65 6e |le is given then| 00002010 20 74 68 65 20 6e 65 77 20 69 74 65 6d 20 69 73 | the new item is| 00002020 20 61 64 64 65 64 20 74 6f 0a 74 68 65 20 65 6e | added to.the en| 00002030 64 20 6f 66 20 74 68 65 20 6d 65 6e 75 2c 20 69 |d of the menu, i| 00002040 66 20 61 6e 20 69 74 65 6d 20 68 61 6e 64 6c 65 |f an item handle| 00002050 20 69 73 20 67 69 76 65 6e 0a 74 68 65 20 6e 65 | is given.the ne| 00002060 77 20 69 74 65 6d 20 69 73 20 61 64 64 65 64 20 |w item is added | 00002070 62 65 66 6f 72 65 20 74 68 65 20 65 78 69 73 74 |before the exist| 00002080 69 6e 67 20 69 74 65 6d 2e 0a 0a 55 73 65 72 20 |ing item...User | 00002090 46 4e 20 28 46 4e 73 68 65 6c 6c 5f 4d 65 6e 75 |FN (FNshell_Menu| 000020a0 41 64 64 29 0a 50 61 72 61 6d 73 20 3d 3e 20 0a |Add).Params => .| 000020b0 20 20 20 20 20 20 20 20 20 69 6e 74 20 6d 65 6e | int men| 000020c0 75 20 64 65 63 6f 64 65 20 62 6c 6f 63 6b 0a 0a |u decode block..| 000020d0 4d 65 6e 75 20 64 65 63 6f 64 65 20 62 6c 6f 63 |Menu decode bloc| 000020e0 6b 0a 62 6c 6b 2b 30 30 20 70 6f 73 69 74 69 6f |k.blk+00 positio| 000020f0 6e 20 6f 66 20 73 65 6c 65 63 74 65 64 20 6d 65 |n of selected me| 00002100 6e 75 20 69 74 65 6d 20 69 6e 20 6d 65 6e 75 0a |nu item in menu.| 00002110 20 20 20 20 20 20 20 28 73 74 61 72 74 69 6e 67 | (starting| 00002120 20 66 72 6f 6d 20 30 29 0a 62 6c 6b 2b 30 34 20 | from 0).blk+04 | 00002130 70 6f 69 6e 74 65 72 20 74 6f 20 73 65 6c 65 63 |pointer to selec| 00002140 74 65 64 20 69 74 65 6d 20 64 61 74 61 0a 62 6c |ted item data.bl| 00002150 6b 2b 30 38 20 73 65 6c 65 63 74 65 64 20 69 74 |k+08 selected it| 00002160 65 6d 20 68 61 6e 64 6c 65 20 6f 72 20 7a 65 72 |em handle or zer| 00002170 6f 20 69 66 20 69 74 65 6d 0a 20 20 20 20 20 20 |o if item. | 00002180 20 77 61 73 20 63 72 65 61 74 65 64 20 77 69 74 | was created wit| 00002190 68 6f 75 74 20 4d 65 6e 75 55 74 69 6c 73 0a 62 |hout MenuUtils.b| 000021a0 6c 6b 2b 31 32 20 70 6f 69 6e 74 65 72 20 74 6f |lk+12 pointer to| 000021b0 20 74 65 78 74 20 73 74 72 69 6e 67 20 6f 66 20 | text string of | 000021c0 73 65 6c 65 63 74 65 64 20 69 74 65 6d 0a 62 6c |selected item.bl| 000021d0 6b 2b 31 36 20 70 6f 73 69 74 69 6f 6e 20 6f 66 |k+16 position of| 000021e0 20 70 61 72 65 6e 74 20 6d 65 6e 75 20 69 74 65 | parent menu ite| 000021f0 6d 20 69 6e 20 6d 65 6e 75 0a 20 20 20 20 20 20 |m in menu. | 00002200 20 28 73 74 61 72 74 69 6e 67 20 66 72 6f 6d 20 | (starting from | 00002210 30 29 0a 62 6c 6b 2b 32 30 20 70 6f 69 6e 74 65 |0).blk+20 pointe| 00002220 72 20 74 6f 20 70 61 72 65 6e 74 20 69 74 65 6d |r to parent item| 00002230 20 64 61 74 61 0a 62 6c 6b 2b 32 34 20 70 61 72 | data.blk+24 par| 00002240 65 6e 74 20 69 74 65 6d 20 68 61 6e 64 6c 65 20 |ent item handle | 00002250 6f 72 20 7a 65 72 6f 20 69 66 20 69 74 65 6d 20 |or zero if item | 00002260 77 61 73 0a 20 20 20 20 20 20 20 63 72 65 61 74 |was. creat| 00002270 65 64 20 77 69 74 68 6f 75 74 20 4d 65 6e 75 55 |ed without MenuU| 00002280 74 69 6c 73 0a 62 6c 6b 2b 32 38 20 70 6f 69 6e |tils.blk+28 poin| 00002290 74 65 72 20 74 6f 20 74 65 78 74 20 73 74 72 69 |ter to text stri| 000022a0 6e 67 20 6f 66 20 70 61 72 65 6e 74 20 69 74 65 |ng of parent ite| 000022b0 6d 20 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |m ..------------| 000022c0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000022e0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 46 4e |------------..FN| 000022f0 73 68 65 6c 6c 5f 4d 65 6e 75 54 69 63 6b 4f 6e |shell_MenuTickOn| 00002300 6c 79 31 28 29 0a 50 61 72 61 6d 73 20 3d 3e 0a |ly1().Params =>.| 00002310 20 20 20 20 20 20 20 20 20 69 6e 74 20 6d 65 6e | int men| 00002320 75 20 68 61 6e 64 6c 65 0a 20 20 20 20 20 20 20 |u handle. | 00002330 20 20 69 6e 74 20 70 6f 73 69 74 69 6f 6e 20 6f | int position o| 00002340 66 20 69 74 65 6d 20 69 6e 20 6d 65 6e 75 0a 0a |f item in menu..| 00002350 54 69 63 6b 73 20 6f 6e 6c 79 20 74 68 65 20 69 |Ticks only the i| 00002360 74 65 6d 20 67 69 76 65 6e 20 62 79 20 74 68 65 |tem given by the| 00002370 20 6d 65 6e 75 20 68 61 6e 64 6c 65 0a 61 6e 64 | menu handle.and| 00002380 20 74 68 65 20 70 6f 73 69 74 69 6f 6e 20 6f 66 | the position of| 00002390 20 74 68 65 20 69 74 65 6d 2e 20 54 68 69 73 20 | the item. This | 000023a0 63 61 6c 6c 20 69 73 0a 70 72 6f 76 69 64 65 64 |call is.provided| 000023b0 20 66 6f 72 20 77 68 65 6e 20 79 6f 75 20 64 6f | for when you do| 000023c0 6e 27 74 20 6b 6e 6f 77 20 74 68 65 20 68 61 6e |n't know the han| 000023d0 64 6c 65 0a 6f 66 20 74 68 65 20 6d 65 6e 75 20 |dle.of the menu | 000023e0 69 74 65 6d 2e 0a 0a 53 65 65 20 61 6c 73 6f 20 |item...See also | 000023f0 50 52 4f 43 73 68 65 6c 6c 5f 4d 65 6e 75 54 69 |PROCshell_MenuTi| 00002400 63 6b 4f 6e 6c 79 32 0a 0a 2d 2d 2d 2d 2d 2d 2d |ckOnly2..-------| 00002410 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00002440 2d 0a 0a 50 52 4f 43 73 68 65 6c 6c 5f 4d 65 6e |-..PROCshell_Men| 00002450 75 54 69 63 6b 4f 6e 6c 79 32 28 29 0a 50 61 72 |uTickOnly2().Par| 00002460 61 6d 73 20 3d 3e 0a 20 20 20 20 20 20 20 20 20 |ams =>. | 00002470 69 6e 74 20 6d 65 6e 75 20 69 74 65 6d 20 68 61 |int menu item ha| 00002480 6e 64 6c 65 0a 0a 54 69 63 6b 73 20 6f 6e 6c 79 |ndle..Ticks only| 00002490 20 74 68 65 20 69 74 65 6d 20 67 69 76 65 6e 20 | the item given | 000024a0 62 79 20 74 68 65 20 6d 65 6e 75 20 69 74 65 6d |by the menu item| 000024b0 0a 68 61 6e 64 6c 65 2e 0a 0a 53 65 65 20 61 6c |.handle...See al| 000024c0 73 6f 20 50 52 4f 43 73 68 65 6c 6c 5f 4d 65 6e |so PROCshell_Men| 000024d0 75 54 69 63 6b 4f 6e 6c 79 31 0a 0a 2d 2d 2d 2d |uTickOnly1..----| 000024e0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00002510 2d 2d 2d 2d 0a 0a 50 52 4f 43 73 68 65 6c 6c 5f |----..PROCshell_| 00002520 4d 65 6e 75 43 6f 6c 6f 75 72 73 28 29 0a 50 61 |MenuColours().Pa| 00002530 72 61 6d 73 20 3d 3e 0a 20 20 20 20 20 20 20 20 |rams =>. | 00002540 20 69 6e 74 20 6d 65 6e 75 20 69 74 65 6d 20 68 | int menu item h| 00002550 61 6e 64 6c 65 0a 20 20 20 20 20 20 20 20 20 69 |andle. i| 00002560 6e 74 20 66 6f 72 65 67 72 6f 75 6e 64 20 63 6f |nt foreground co| 00002570 6c 6f 75 72 0a 20 20 20 20 20 20 20 20 20 69 6e |lour. in| 00002580 74 20 62 61 63 6b 67 72 6f 75 6e 64 20 63 6f 6c |t background col| 00002590 6f 75 72 0a 0a 53 65 74 73 20 74 68 65 20 66 6f |our..Sets the fo| 000025a0 72 65 67 72 6f 75 6e 64 20 61 6e 64 20 62 61 63 |reground and bac| 000025b0 6b 67 72 6f 75 6e 64 20 63 6f 6c 6f 75 72 73 0a |kground colours.| 000025c0 6f 66 20 74 68 65 20 69 74 65 6d 20 67 69 76 65 |of the item give| 000025d0 6e 2e 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |n...------------| 000025e0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00002600 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 46 4e |------------..FN| 00002610 73 68 65 6c 6c 5f 4d 65 6e 75 4d 61 6b 65 46 72 |shell_MenuMakeFr| 00002620 6f 6d 46 69 6c 65 28 29 0a 50 61 72 61 6d 73 20 |omFile().Params | 00002630 3d 3e 0a 20 20 20 20 20 20 20 20 20 73 74 72 20 |=>. str | 00002640 6d 65 6e 75 20 74 69 74 6c 65 0a 20 20 20 20 20 |menu title. | 00002650 20 20 20 20 73 74 72 20 6d 65 6e 75 20 73 65 6c | str menu sel| 00002660 65 63 74 69 6f 6e 20 66 75 6e 63 74 69 6f 6e 0a |ection function.| 00002670 20 20 20 20 20 20 20 20 20 73 74 72 20 66 75 6c | str ful| 00002680 6c 20 66 69 6c 65 20 6e 61 6d 65 20 6f 66 20 63 |l file name of c| 00002690 6f 6d 6d 61 6e 64 0a 20 20 20 20 20 20 20 20 20 |ommand. | 000026a0 20 20 20 20 66 69 6c 65 0a 0a 20 20 20 20 20 20 | file.. | 000026b0 20 3c 3d 0a 20 20 20 20 20 20 20 20 20 69 6e 74 | <=. int| 000026c0 20 6d 65 6e 75 20 68 61 6e 64 6c 65 0a 20 20 20 | menu handle. | 000026d0 20 20 20 20 20 20 0a 43 72 65 61 74 65 73 20 61 | .Creates a| 000026e0 20 6e 65 77 20 6d 65 6e 75 20 77 69 74 68 20 74 | new menu with t| 000026f0 68 65 20 67 69 76 65 6e 20 74 69 74 6c 65 2c 0a |he given title,.| 00002700 74 61 6b 69 6e 67 20 74 68 65 20 6d 65 6e 75 20 |taking the menu | 00002710 69 74 65 6d 73 20 66 72 6f 6d 20 74 68 65 20 73 |items from the s| 00002720 70 65 63 69 66 69 65 64 0a 6d 65 6e 75 20 63 6f |pecified.menu co| 00002730 6d 6d 61 6e 64 20 66 69 6c 65 0a 0a 2d 2d 2d 2d |mmand file..----| 00002740 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00002770 2d 2d 2d 2d 0a 0a 50 52 4f 43 73 68 65 6c 6c 5f |----..PROCshell_| 00002780 4d 65 6e 75 53 6f 72 74 49 74 65 6d 73 28 29 0a |MenuSortItems().| 00002790 50 61 72 61 6d 73 20 3d 3e 0a 20 20 20 20 20 20 |Params =>. | 000027a0 20 20 20 69 6e 74 20 20 6d 65 6e 75 20 68 61 6e | int menu han| 000027b0 64 6c 65 0a 20 20 20 20 20 20 20 20 20 73 74 72 |dle. str| 000027c0 20 20 63 6f 6d 70 61 72 69 73 69 6f 6e 20 66 75 | comparision fu| 000027d0 6e 63 74 69 6f 6e 0a 20 20 20 20 20 20 20 20 20 |nction. | 000027e0 62 6f 6f 6c 20 61 73 63 65 6e 64 69 6e 67 20 66 |bool ascending f| 000027f0 6c 61 67 2c 20 6e 6f 6e 20 30 20 66 6f 72 0a 20 |lag, non 0 for. | 00002800 20 20 20 20 20 20 20 20 20 20 20 20 20 61 73 63 | asc| 00002810 65 6e 64 69 6e 67 20 73 6f 72 74 2c 20 30 20 66 |ending sort, 0 f| 00002820 6f 72 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |or. | 00002830 20 64 65 73 63 65 6e 64 69 6e 67 20 73 6f 72 74 | descending sort| 00002840 0a 20 20 20 20 20 20 20 20 20 69 6e 74 20 20 66 |. int f| 00002850 69 72 73 74 20 69 74 65 6d 20 6e 75 6d 62 65 72 |irst item number| 00002860 20 74 6f 20 73 6f 72 74 0a 20 20 20 20 20 20 20 | to sort. | 00002870 20 20 20 20 20 20 20 28 6e 6f 72 6d 61 6c 6c 79 | (normally| 00002880 20 30 29 0a 20 20 20 20 20 20 20 20 20 69 6e 74 | 0). int| 00002890 20 20 6c 61 73 74 20 69 74 65 6d 20 6e 75 6d 62 | last item numb| 000028a0 65 72 20 74 6f 20 73 6f 72 74 0a 0a 54 68 69 73 |er to sort..This| 000028b0 20 72 6f 75 74 69 6e 65 20 69 73 20 75 73 65 64 | routine is used| 000028c0 20 74 6f 20 73 6f 72 74 20 74 68 65 20 6d 65 6e | to sort the men| 000028d0 75 20 69 74 65 6d 73 0a 69 6e 74 6f 20 6f 72 64 |u items.into ord| 000028e0 65 72 2e 20 49 74 20 73 68 6f 75 6c 64 20 6e 6f |er. It should no| 000028f0 74 20 62 65 20 75 73 65 64 20 69 66 20 74 68 65 |t be used if the| 00002900 20 69 74 65 6d 73 0a 64 6f 20 6e 6f 74 20 68 61 | items.do not ha| 00002910 76 65 20 74 68 65 20 73 61 6d 65 20 68 61 6e 64 |ve the same hand| 00002920 6c 65 72 20 72 6f 75 74 69 6e 65 2c 20 61 73 20 |ler routine, as | 00002930 6f 6e 6c 79 0a 74 68 65 20 6d 65 6e 75 20 74 65 |only.the menu te| 00002940 78 74 20 69 73 20 6d 6f 76 65 64 20 61 72 6f 75 |xt is moved arou| 00002950 6e 64 2e 0a 0a 49 66 20 61 20 6c 61 73 74 20 69 |nd...If a last i| 00002960 74 65 6d 20 6e 75 6d 62 65 72 20 69 73 20 67 69 |tem number is gi| 00002970 76 65 6e 20 74 68 61 74 20 65 78 63 65 65 64 73 |ven that exceeds| 00002980 0a 74 68 65 20 6e 75 6d 62 65 72 20 6f 66 20 69 |.the number of i| 00002990 74 65 6d 73 20 69 6e 20 74 68 65 20 6d 65 6e 75 |tems in the menu| 000029a0 20 69 74 20 69 73 20 72 65 73 65 74 0a 74 6f 20 | it is reset.to | 000029b0 62 65 20 65 71 75 61 6c 20 74 6f 20 74 68 65 20 |be equal to the | 000029c0 6e 75 6d 62 65 72 20 6f 66 20 69 74 65 6d 73 2e |number of items.| 000029d0 0a 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |..--------------| 000029e0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00002a00 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a |----------.| 00002a0b