home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / IBMCLASS / IMNDIEVT.HPP < prev    next >
C/C++ Source or Header  |  1993-10-22  |  4KB  |  76 lines

  1. #ifndef _IMNDIEVT_
  2. #define _IMNDIEVT_
  3. /*******************************************************************************
  4. * FILE NAME: imndievt.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the class(es):                                              *
  8. *     IMenuDrawItemEvent - The owner-draw menu event information class         *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   Licensed Materials - Property of IBM                                       *
  12. *   (C) Copyright IBM Corporation 1992, 1993                                   *
  13. *   All Rights Reserved                                                        *
  14. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  15. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  16. *                                                                              *
  17. *******************************************************************************/
  18. #if !defined( _IDIEVT_ )
  19.   #include <idievt.hpp>
  20. #endif
  21.  
  22. /*----------------------------------------------------------------------------*/
  23. /* Align classes on four byte boundary.                                       */
  24. /*----------------------------------------------------------------------------*/
  25. #pragma pack(4)
  26.  
  27. // Forward declarations for other classes:
  28. class IMenuDrawItemHandler;
  29.  
  30. class IMenuDrawItemEvent : public IDrawItemEvent {
  31. typedef IDrawItemEvent Inherited;
  32. /*******************************************************************************
  33. * The IMenuDrawItemEvent class provides the draw item event information for    *
  34. * the draw item menu items.                                                    *
  35. *******************************************************************************/
  36. public:
  37. /*------------------------ Constructor -----------------------------------------
  38. | The only way to construct instances of this class is from an instance of     |
  39. | the IEvent class.                                                            |
  40. ------------------------------------------------------------------------------*/
  41.   IMenuDrawItemEvent(IEvent& evt)
  42.     : Inherited(evt) {}
  43.  
  44. /*-------------------------------- Testing -------------------------------------
  45. | These functions provide a means of testing the display attributes of a       |
  46. | menu item about to be drawn.  You would use these only if you intend to do   |
  47. | your own drawing for the selected, checked, or disabled display attributes   |
  48. | of a menu item.  These functions are only meant be be called from within an  |
  49. | overridden version of IMenuDrawItemHandler::draw().                          |
  50. |   isSelected - Returns true if the menu item is selected.                    |
  51. |   isChecked  - Returns true if the menu item is checked.                     |
  52. |   isDisabled - Returns true if the menu item is disabled.                    |
  53. ------------------------------------------------------------------------------*/
  54. Boolean
  55.   isSelected() const,
  56.   isChecked() const,
  57.   isDisabled() const;
  58.  
  59.  
  60. private: /*------------------------ PRIVATE ----------------------------------*/
  61. friend IMenuDrawItemHandler;
  62.  
  63. Boolean
  64.   isDrawItem() const,
  65.   isSetHighlight() const,
  66.   isRemoveHighlight() const;
  67.  
  68. };
  69.  
  70. /*----------------------------------------------------------------------------*/
  71. /* Resume compiler default packing.                                           */
  72. /*----------------------------------------------------------------------------*/
  73. #pragma pack()
  74.  
  75. #endif /* _IMNDIEVT_ */
  76.