home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Clean 1.2.4 / IOInterface / deltaMenu.dcl < prev    next >
Encoding:
Modula Definition  |  1995-02-23  |  2.7 KB  |  67 lines  |  [TEXT/3PRM]

  1. definition module deltaMenu;
  2.  
  3. //    Version 0.8 to 1.0
  4.  
  5. //
  6. //    Operations on menus. 
  7. //
  8.  
  9. import    deltaIOSystem;
  10. from    ioState import IOState;
  11.  
  12.  
  13. //    Operations on unknown MenuIds/MenuItemIds are ignored.
  14.  
  15. EnableMenuSystem    :: !(IOState s) -> IOState s;
  16. DisableMenuSystem    :: !(IOState s) -> IOState s;
  17.  
  18. /*    Enabling and Disabling of the MenuSystem. When the menu system is enabled
  19.     the previously selectable menus and menu items will become selectable again.
  20.     Operations on a disabled menu system take effect when the menu system is
  21.     re-enabled. */
  22.  
  23. EnableMenus            :: ![MenuId] !(IOState s) -> IOState s;
  24. DisableMenus        :: ![MenuId] !(IOState s) -> IOState s;
  25.  
  26. /*    Enabling and disabling of PullDownMenus only. Disabling a menu causes its
  27.     contents to be unselectable. Enabling a disabled menu which
  28.     contents was partially selectable before disabling causes all
  29.     items to become selectable again. */
  30.  
  31. InsertMenuItems        :: !MenuItemGroupId !Int ![MenuElement s (IOState s)]
  32.     !(IOState s) -> IOState s;
  33. AppendMenuItems        :: !MenuItemGroupId !Int ![MenuElement s (IOState s)]
  34.     !(IOState s) -> IOState s;
  35. RemoveMenuItems        :: ![MenuItemId] !(IOState s) -> IOState s;
  36. RemoveMenuGroupItems:: !MenuItemGroupId ![Int] !(IOState s) -> IOState s;
  37.  
  38. /*    Addition and removal of menu items in MenuItemGroups.
  39.     InsertMenuItems inserts menu items before the item with the specified
  40.     index, AppendMenuItems inserts them after that item. Items are
  41.     numbered starting from one. Indices smaller than one resp. greater
  42.     than the number of items in the group cause the elements to be
  43.     inserted before the first resp. after the last item of the group.
  44.     Only (Check)MenuItems and MenuSeparators are added to a MenuItemGroup.
  45.     RemoveMenu(Group)Items only works on items that are in a MenuItemGroup.
  46.     RemoveMenuGroupItems removes those items of the specified MenuItemGroup
  47.     given the indices. Indices are numbered starting from one. If an index
  48.     is invalid (less than one or larger than the amount of items), no item
  49.     is removed for that index. */
  50.  
  51. SelectMenuRadioItem        :: !MenuItemId        !(IOState s) -> IOState s;
  52.  
  53. /*    SelectMenuRadioItem marks the indicated MenuRadioItem and unmarks the
  54.     currently marked MenuRadioItem in the group. */
  55.  
  56. EnableMenuItems            :: ![MenuItemId]    !(IOState s) -> IOState s;
  57. DisableMenuItems        :: ![MenuItemId]    !(IOState s) -> IOState s;
  58. MarkMenuItems            :: ![MenuItemId]    !(IOState s) -> IOState s;
  59. UnmarkMenuItems            :: ![MenuItemId]    !(IOState s) -> IOState s;
  60. ChangeMenuItemTitles    :: ![(MenuItemId, ItemTitle)]
  61.                                             !(IOState s) -> IOState s;
  62. ChangeMenuItemFunctions    :: ![(MenuItemId, MenuFunction s (IOState s))]
  63.                                             !(IOState s) -> IOState s;
  64.  
  65. /*    Enable, disable, mark, unmark and change titles and functions of
  66.     MenuElements (including SubMenuItems). */
  67.