home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12otk1.exe / include / MenuAdO.idl < prev    next >
Text File  |  1997-04-02  |  6KB  |  199 lines

  1. /* @(#)Z 1.2 os2/src/ui/idl/MenuAdO.idl, odui, od96os2, odos29712d 97/03/21 17:47:47 (96/09/29 16:02:47) */
  2. //#====START_GENERATED_PROLOG======================================
  3. //#
  4. //#
  5. //#   COMPONENT_NAME: odui
  6. //#
  7. //#   CLASSES: none
  8. //#
  9. //#   ORIGINS: 82,27
  10. //#
  11. //#
  12. //#   (C) COPYRIGHT International Business Machines Corp. 1995,1996
  13. //#   All Rights Reserved
  14. //#   Licensed Materials - Property of IBM
  15. //#   US Government Users Restricted Rights - Use, duplication or
  16. //#   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  17. //#       
  18. //#   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  19. //#   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  20. //#   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  21. //#   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  22. //#   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  23. //#   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  24. //#   OR PERFORMANCE OF THIS SOFTWARE.
  25. //#
  26. //#====END_GENERATED_PROLOG========================================
  27.  
  28. #ifndef _OS2MENUADAPTER_
  29. #define _OS2MENUADAPTER_
  30.  
  31. #include "Part.idl"
  32.  
  33. //=============================================================================
  34. // Classes defined in this interface
  35. //=============================================================================
  36.  
  37. interface  ODOS2MenuAdapter;
  38.  
  39. struct ODOS2MenuItemAdapter {
  40.     ODMenuItemID        id;
  41.     ODOS2MenuAdapter*   parentAdapter;
  42.     ODOS2MenuAdapter*   subMenuAdapter;
  43.  
  44.     ODBoolean           enabled;
  45.     ODBoolean           hidden;
  46.     ODBoolean           checked;
  47.     ODBoolean           separator;
  48.     string              text;
  49. };
  50.  
  51. //=============================================================================
  52. // Classes used by this interface
  53. //=============================================================================
  54.  
  55.  
  56. //=============================================================================
  57. // Class ODOS2MenuAdapter
  58. //=============================================================================
  59.  
  60. interface ODOS2MenuAdapter : ODObject
  61. {
  62.     void Init            (in ODMenuID id,
  63.                  in HWND parentHWND);
  64.  
  65.     void AddItemsFromPlatMenu    (in ODPlatformMenu platMenu);
  66.  
  67.     ODMenuID MenuID        ();
  68.  
  69.     ODBoolean IsMenuEnabled    ();
  70.  
  71.     void DisableMenu        ();
  72.  
  73.     void EnableMenu        ();
  74.  
  75.     ODUShort GetMenuText    (out string menuString);
  76.  
  77.     ODBoolean SetMenuText    (in string menuString);
  78.  
  79.     ODUShort GetMenuItemText    (in ODMenuItemID menuItemID,
  80.                  out string menuItemString);
  81.  
  82.     ODBoolean SetMenuItemText    (in ODMenuItemID menuItemID,
  83.                  in string menuItemString);
  84.  
  85.     ODBoolean SetHideMenuItem    (in ODMenuItemID menuItemID);
  86.  
  87.     ODBoolean SetShowMenuItem    (in ODMenuItemID menuItemID);
  88.  
  89.     ODBoolean CheckMenuItem    (in ODMenuItemID menuItemID,
  90.                  in ODBoolean check);
  91.  
  92.     ODBoolean EnableMenuItem    (in ODMenuItemID menuItemID,
  93.                  in ODBoolean enable);
  94.  
  95.     ODBoolean AddMenuItemBefore    (in ODMenuItemID itemID,
  96.                  in ODPlatformMenuItem item,
  97.                  in ODMenuItemID beforeID);
  98.  
  99.     ODBoolean AddMenuItemLast    (in ODMenuItemID itemID,
  100.                  in ODPlatformMenuItem item);
  101.  
  102.     ODBoolean AddSubMenuBefore    (in ODMenuID subMenuID,
  103.                  in ODPlatformMenu subMenu,
  104.                  in ODMenuItemID beforeID);
  105.  
  106.     ODBoolean AddSubMenuLast    (in ODMenuID subMenuID,
  107.                  in ODPlatformMenu subMenu);
  108.  
  109.     ODPlatformMenu GetSubMenu    (in ODMenuID subMenuID);
  110.  
  111.     ODBoolean ItemExists    (in ODMenuItemID menuItemID);
  112.  
  113.     ODBoolean IsItemEnabled    (in ODMenuItemID menuItemID);
  114.  
  115.     ODBoolean IsItemChecked    (in ODMenuItemID menuItemID);
  116.  
  117.     ODBoolean IsItemHidden    (in ODMenuItemID menuItemID);
  118.  
  119.     ODBoolean RemoveMenuItem    (in ODMenuItemID menuItemID);
  120.  
  121.     ODBoolean GetPlatMenuItem    (in ODOS2MenuItemAdapter* itemAd,
  122.                  out ODPlatformMenuItem platMenuItem);
  123.  
  124.     ODBoolean GetPlatMenu    (out ODPlatformMenu platMenu);
  125.  
  126.     ODBoolean GetSubMenuAdapter(in ODMenuID subMenuID,
  127.                 out ODOS2MenuAdapter subMenuAd);
  128.  
  129.     void GetParentAdapter    (out ODOS2MenuAdapter parentAd);
  130.  
  131.     void SetParentAdapter    (in ODOS2MenuAdapter parentAd);
  132.  
  133.  
  134. #ifdef __SOMIDL__
  135.     implementation
  136.     {
  137.     majorversion   = 1; minorversion = 0;
  138.     functionprefix = ODOS2MenuAdapter;
  139.  
  140.     override: somInit, somUninit;
  141.  
  142.     passthru C_xh_before =
  143.         "typedef struct ODOS2MenuItemAdapter {"
  144.         "    ODMenuItemID        id;"
  145.         "    ODOS2MenuAdapter*   parentAdapter;"
  146.         "    ODOS2MenuAdapter*   subMenuAdapter;"
  147.         ""
  148.         "    ODBoolean           enabled;"
  149.         "    ODBoolean           hidden;"
  150.         "    ODBoolean           checked;"
  151.         "    ODBoolean           separator;"
  152.         "    string              text;"
  153.         "};"
  154.         ""
  155.         "";
  156.  
  157.     releaseorder:
  158.         Init,
  159.         AddItemsFromPlatMenu,
  160.         MenuID,
  161.         IsMenuEnabled,
  162.         DisableMenu,
  163.         EnableMenu,
  164.         GetMenuText,
  165.         SetMenuText,
  166.         GetMenuItemText,
  167.         SetMenuItemText,
  168.         SetHideMenuItem,
  169.         SetShowMenuItem,
  170.         CheckMenuItem,
  171.         EnableMenuItem,
  172.         AddMenuItemBefore,
  173.         AddMenuItemLast,
  174.         AddSubMenuBefore,
  175.         AddSubMenuLast,
  176.         GetSubMenu,
  177.         ItemExists,
  178.         IsItemEnabled,
  179.         IsItemChecked,
  180.         IsItemHidden,
  181.         RemoveMenuItem,
  182.         GetPlatMenuItem,
  183.         GetPlatMenu,
  184.         GetSubMenuAdapter,
  185.         GetParentAdapter,
  186.         SetParentAdapter,
  187.         reserved1,
  188.         reserved2,
  189.         reserved3,
  190.         reserved4;
  191.  
  192.  
  193.     };
  194. #endif // __SOMIDL__
  195.  
  196. }; // end class ODOS2MenuAdapter
  197.  
  198. #endif //  _OS2MENUADAPTER_
  199.