home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / powergui / listctls / drawlist / listdhdr.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-29  |  1.5 KB  |  52 lines

  1. #ifndef _LISTDHDR_
  2. #define _LISTDHDR_
  3. /************************************************************
  4. / List Controls - List Box Custom Drawing
  5. /
  6. / Copyright (C) 1994, Law, Leong, Love, Olson, Tsuji.
  7. / Copyright (c) 1997 John Wiley & Sons, Inc.
  8. / All Rights Reserved.
  9. ************************************************************/
  10. #include <ihandle.hpp>
  11. #include <ilbdihdr.hpp>
  12. #include <istring.hpp>
  13.  
  14. class IGBitmap;
  15. // This is the handler to draw the item.  The handler
  16. // is preloaded with the amount to indent each
  17. // item, and containes the bitmaps necessary
  18. // to indicate whether an item is expanded or
  19. // collapsed.  The handler processes all requests
  20. // for drawing by routing them to the private
  21. // function drawListItem with an indication of whether
  22. // selection needs to be drawn.
  23. class DrawHandler : public IListBoxDrawItemHandler {
  24. public:
  25.   DrawHandler ( unsigned long indentBits=18 );
  26.  
  27. protected:
  28. virtual Boolean
  29.   setItemSize   ( IListBoxSizeItemEvent& event ),
  30.   drawItem      ( IListBoxDrawItemEvent& event ),
  31.   selectItem    ( IListBoxDrawItemEvent& event ),
  32.   deselectItem  ( IListBoxDrawItemEvent& event ),
  33.   drawListItem  ( IListBoxDrawItemEvent& event,
  34.                   Boolean                selected);
  35.  
  36. private:
  37. unsigned long
  38.   fIndent,
  39.   fBitmapIndent,
  40.   fMaxCharHeight,
  41.   fInternalLeading,
  42.   fExternalLeading;
  43. ISystemBitmapHandle
  44.   fExpandHandle,
  45.   fCollapseHandle;
  46. IGBitmap
  47.  *fExpandBitmap,
  48.  *fCollapseBitmap;
  49. };
  50.  
  51. #endif // _LISTDHDR_
  52.