home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool_main.zip / ool / include / xmenu.h < prev    next >
Text File  |  1997-08-12  |  2KB  |  45 lines

  1. #ifndef __OOL_XMENU_H__
  2. #define __OOL_XMENU_H__
  3.  
  4. /*===========================================================================*/
  5. /* OOL ------------------- the Open Object Library ------------------- r 1.0 */
  6. /*===========================================================================*/
  7. /*                              class: XMenu                                 */
  8. /*                       derived from: XWindow                               */
  9. /*                        last update: 12/96                                 */
  10. /*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
  11. /*===========================================================================*/
  12.  
  13. #include "xwindow.h"
  14.  
  15. class XMenuItem;
  16.  
  17. class _export_ XMenu: public XWindow
  18. {
  19.       friend MRESULT HandleFrameDefault( XFrameWindow * w, ULONG msg, MPARAM mp1, MPARAM mp2, BOOL& handled);
  20.    protected:
  21.       virtual BOOL IsPopup(void) const { return FALSE; }
  22.    public:
  23.       XMenu( const XMenu * m = NULL);
  24.       virtual ~XMenu() {;}
  25.       void CascadeItem( const SHORT itemID);
  26.       void CheckItem( const SHORT id, const BOOL check = TRUE );
  27.       void DeleteItem( const SHORT id) const ;
  28.       void EnableItem( const SHORT id, const BOOL enable = TRUE );
  29.       void InsertItem( const XMenuItem * ins, XMenuItem * subMenu = NULL);
  30.       USHORT GetDefaultItemID( void ) const ;
  31.       BOOL GetItem( XMenuItem *itm, const SHORT id);
  32.       void GetItemText( const USHORT itemID, XString * buffer);
  33.       SHORT GetItemCount( void ) const ;
  34.       SHORT GetItemID( const SHORT pos) const ;
  35.       SHORT GetItemPos( const USHORT itemID) const ;
  36.       void RemoveItem( const SHORT id ) const ;
  37.       void SelectItem( const USHORT itemID) const ;
  38.       void SetDefaultItemID( const USHORT itemID ) const ;
  39.       void SetItemHandle( const USHORT itemID, const ULONG handle);
  40.       void SetItemText( const SHORT id, const char * text) const ;
  41.       BOOL UpdateItem( const XMenuItem *);
  42. };
  43.  
  44. #endif
  45.