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

  1. #ifndef __OOL_XMENUITEM_H__
  2. #define __OOL_XMENUITEM_H__
  3.  
  4. /*===========================================================================*/
  5. /* OOL ------------------- the Open Object Library ------------------- r 1.0 */
  6. /*===========================================================================*/
  7. /*                              class: XMenuItem                             */
  8. /*                       derived from: XMenu                                 */
  9. /*                        last update: 10/96                                 */
  10. /*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
  11. /*===========================================================================*/
  12.  
  13.  
  14.  
  15. #include "xobject.h"
  16. #include "xmenu.h"
  17.  
  18. class XString;
  19.  
  20. #ifdef OOL_FOR_OS2_X86
  21.    //styles
  22.    #define MENS_TEXT               0x0001
  23.    #define MENS_BITMAP            0x0002
  24.    #define MENS_SEPARATOR         0x0004
  25.    #define MENS_OWNERDRAW         0x0008
  26.    #define MENS_SUBMENU            0x0010
  27.    #define MENS_MULTMENU         0x0020
  28.    #define MENS_SYSCOMMAND         0x0040
  29.    #define MENS_HELP               0x0080
  30.    #define MENS_STATIC            0x0100
  31.    #define MENS_BUTTONSEPARATOR  0x0200
  32.    #define MENS_BREAK            0x0400
  33.    #define MENS_BREAKSEPARATOR   0x0800
  34.    #define MENS_GROUP            0x1000
  35.    #define MENS_SINGLE            0x2000
  36.    //attributes
  37.    #define MENA_NODISMISS         0x0020
  38.    #define MENA_FRAMED            0x1000
  39.    #define MENA_CHECKED            0x2000
  40.    #define MENA_DISABLED         0x4000
  41.    #define MENA_HILITED            0x8000
  42. #endif
  43.  
  44. class _export_ XMenuItem: public XMenu
  45. {
  46.       friend class XMenu;
  47.    private:
  48.       char * t;
  49.       MENUITEM item;
  50.    public:
  51.       XMenuItem();
  52.       XMenuItem( const char* text, const SHORT id, const LONG style = MIS_TEXT, const LONG position = MIT_END, const BOOL isSeparator = FALSE);
  53.       virtual ~XMenuItem();
  54.       void GetText( XString * buffer)  const;
  55.       ULONG GetAttribute(void) const { return item.afAttribute; }
  56.       ULONG GetID( void ) const { return item.id; }
  57.       ULONG GetPosition(void) const { return item.iPosition; }
  58.       ULONG GetStyle(void) const { return item.afStyle; }
  59.       void SetID( const SHORT id) { item.id = id; }
  60.       void SetAttribute( const LONG attr) { item.afAttribute = attr; }
  61.       void SetPosition( const SHORT pos ) { item.iPosition = pos; }
  62.       void SetStyle( const ULONG style) { item.afStyle = style; }
  63.       void SetText( const char * p);
  64. };
  65.  
  66.  
  67. #endif
  68.