home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / powergui / listctls / drawlist / listitem.hpp < prev    next >
Text File  |  1996-10-29  |  1KB  |  52 lines

  1. #ifndef _LISTITEM_
  2. #define _LISTITEM_
  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 <ibase.hpp>
  11. #include <istring.hpp>
  12.  
  13. // ListItem represents the data for each item
  14. // in the listbox.  This includes:
  15. //  1) the class name
  16. //  2) the number of inherited classes
  17. //  3) the existence of inheriting classes
  18. //  4) an indication that inheriting classes
  19. //     are collapsed or showing
  20. class ListItem : public IBase
  21. {
  22. public:
  23.  ListItem (const char*   className,
  24.            unsigned long inheritedClasses=0,
  25.            Boolean       children=true,
  26.            Boolean       collapsedTree=false)
  27.         : _text (className),
  28.           _inheritedClasses(inheritedClasses),
  29.           _children(children),
  30.           _collapsed (collapsedTree) {}
  31.  
  32. IString
  33.   text             ( ) { return _text;}
  34. unsigned long
  35.   inheritedClasses ( ) { return _inheritedClasses;}
  36. Boolean
  37.   collapsed        ( ) { return _collapsed;  }
  38. Boolean
  39.   children         ( ) { return _children;  }
  40.  
  41. private:
  42. unsigned long 
  43.   _inheritedClasses;
  44. IString
  45.   _text;
  46. Boolean
  47.   _collapsed,
  48.   _children;
  49. };
  50.  
  51. #endif // _LISTITEM_
  52.