home *** CD-ROM | disk | FTP | other *** search
- 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
- EvntShell$Path (usually inside !EvntShell).
-
- 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()
- => str menu title (11 characters max)
- str menu identifier (for
- future use)
- int nr of items in this menu
- (approximate only, needed
- to overcome a MenuUtils bug)
-
- <= 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
-
- --------------------------------------------------------
-
- PROCshell_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()
- => int menu item handle
- int foreground colour (0-15)
- int background colour (0-15)
-
- Sets the foreground and background colours
- of the item given. Note that the default
- colours are set out in the Style Guide.
-
- --------------------------------------------------------
-
- FNshell_MenuMakeFromFile()
- Params =>
- str menu title
- str menu identifier (for future use)
- 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. The command file consists
- solely of menu text items.
-
- Example Command File..
-
- Adachi
- Fuji HQ
- Panasonic HQ
- Sony
-
-
- --------------------------------------------------------
-
- 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.
-
- --------------------------------------------------------
-
- PROCshell_AttachColourPopupMenu()
- Params =>
- int window handle
- int menu icon handle
- int display icon handle
- int menu handle
- str user function (optional)
-
- Provides for automatic updating of a display
- icon when a selection is made from the
- attached colour menu. If a user function name
- is not supplied then the display icon shows
- the selected menu item background colour.
-
- The button type of the menu icon is changed
- to 3 to ensure the menu opens when <SELECT>
- is used.
-
- User FN (AttachColourPopupMenu)
- Params =>
- int window handle
- int display icon handle
- str menu text of selected item
-
- <=
- bool TRUE if display icon should be
- automatically updated, FALSE
- otherwise
-
-
- --------------------------------------------------------
-
- PROCshell_AttachPopupMenu()
- Params =>
- int window handle
- int menu icon handle
- int display icon handle (optional,
- may be -1)
- int menu handle
- str user function (optional, may be "")
-
- Provides for automatic updating of a display
- icon when a selection is made from the
- attached menu if a user function name is
- not supplied.
-
- The button type of the menu icon is changed
- to 3 to ensure the menu opens when <SELECT>
- is used.
-
- User FN (AttachPopupMenu)
- Params =>
- int window handle
- int display icon handle
- str menu text of selected item
-
- <=
- bool TRUE if text should be inserted
- in the display icon, FALSE
- otherwise
- --------------------------------------------------------
-
- PROCshell_MenuDelete()
- Params =>
- int menu or menu item handle
-
- Deletes a menu item or a whole menu if
- a menu handle is specified. Note that if
- a menu is deleted any menu events are also
- deleted - so if you are deleting and then
- re-creating a menu you must also attach
- the new menu again.
-
- --------------------------------------------------------
-
- FNshell_MenuGetItemHandle()
- => int menu handle
- int address of menu selection block
-
- <= int item handle
-
- Returns 0 if item cannot be found, or if item belongs
- to a menu that was not created with the MenuUtils module
-
- --------------------------------------------------------
-
- FNshell_MenuGetItemHandler()
- Params =>
- int menu handle
- int item number
-
- <=
- str item handler FN
-
- --------------------------------------------------------
-
- FNshell_MenuGetItemHeight()
- Params =>
- int menu handle
-
- <=
- int item height (os units)
-
- --------------------------------------------------------
-
- FNshell_MenuCalculateHeight()
- Params =>
- int menu handle
-
- <=
- int height of menu (OS units)
-
- --------------------------------------------------------
-
- FNshell_MenuGetItemText()
- Params =>
- int menu handle
- int item handle
-
- <=
- str text of menu item
-
- --------------------------------------------------------
-
- FNshell_MenuGetNrDotted()
- Params =>
- int menu handle
-
- <=
- int nr of items that have a dotted line
- under them
-
- --------------------------------------------------------
-
- FNshell_MenuGetNrItems()
- Params =>
- int menu handle
-
- <=
- int nr of items in menu
-
- --------------------------------------------------------