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

  1. #ifndef _ILBDIEVT_
  2. #define _ILBDIEVT_
  3. /*******************************************************************************
  4. * FILE NAME: ilbdievt.hpp                                                      *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the class(es):                                              *
  8. *     IListBoxDrawItemEvent - list-box owner-draw item 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. #ifndef  _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 IListBoxDrawItemHandler;
  29.  
  30. class IListBoxDrawItemEvent : public IDrawItemEvent {
  31. typedef IDrawItemEvent Inherited;
  32. /*******************************************************************************
  33. * The IListboxDrawItemEvent class provides the owner-item event information    *
  34. * for an owner-draw list-box.                                                  *
  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.   IListBoxDrawItemEvent(IEvent& evt);
  42.  
  43.   virtual ~IListBoxDrawItemEvent();
  44.  
  45. /*-------------------------------- Testing -------------------------------------
  46. | This function provides a means of testing if the list item about to be       |
  47. | drawn is selected.  You would use this only if you intend to do your own     |
  48. | drawing for the selected display attribute of a list item.  Most             |
  49. | applications can use the system default behavior of inverting the bits in a  |
  50. | selected item.  This function is only meant be be called from within an      |
  51. | overridden version of IListBoxDrawItemHandler::draw().                       |
  52. |   isSelected - Returns true if the list item is selected.                    |
  53. ------------------------------------------------------------------------------*/
  54. Boolean
  55.   isSelected() const;
  56.  
  57. private: /*------------------------ PRIVATE ----------------------------------*/
  58. friend IListBoxDrawItemHandler;
  59.  
  60. Boolean
  61.   isDrawItem() const,
  62.   isSetHighlight() const,
  63.   isRemoveHighlight() const;
  64. };
  65.  
  66. /*----------------------------------------------------------------------------*/
  67. /* Resume compiler default packing.                                           */
  68. /*----------------------------------------------------------------------------*/
  69. #pragma pack()
  70.  
  71. #endif /* _ILBDIEVT_ */
  72.