home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / powergui / cnr / treedet / treedetc.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-29  |  3.2 KB  |  120 lines

  1. #ifndef _TREEDETC_
  2. #define _TREEDETC_
  3. //************************************************************
  4. // Container - Combined Tree and Details View
  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 <icnrctl.hpp>
  11. #include <icnrobj.hpp>
  12.  
  13.  
  14. class DetailsTreeContainer : public IContainerControl
  15. {
  16. typedef IContainerControl
  17.   Inherited;
  18.  
  19. public:
  20.   DetailsTreeContainer( unsigned long     id,
  21.                       IWindow*          parent,
  22.                       IWindow*          owner);
  23.   ~DetailsTreeContainer( );
  24.  
  25. DetailsTreeContainer
  26.  &setDetailsContainer (IContainerControl* container);
  27.  
  28. IContainerControl  
  29.  &detailsContainer    ( );
  30.  
  31. virtual DetailsTreeContainer
  32.  &setFont        (const IFont& fm );
  33.  
  34. virtual DetailsTreeContainer
  35.  &addObject             ( const IContainerObject* newObject,
  36.                                 IContainerObject* parentObject = 0),
  37.  &addObjectAfter        ( const IContainerObject* newObject,
  38.                           const IContainerObject* afterObject,
  39.                                 IContainerObject* parentObject = 0),
  40.   /* remove does not delete the object */
  41.  &removeObject          ( IContainerObject* object,
  42.                           Boolean fAllContainers = false),
  43.  &removeObjectAt        ( IContainerControl::ObjectCursor& cursor),
  44.  &removeObjectAt        ( IContainerControl::TextCursor& cursor),
  45.  &removeSelectedObjects ( ),
  46.  &removeAllObjects      ( );
  47.  
  48. protected:
  49. DetailsTreeContainer
  50.  &setScrollStarted      ( Boolean scrollBegun=true),
  51.  &setCursorMoveStarted  ( Boolean cursorMoved=true),
  52.  &setFontChangeStarted  ( Boolean changeStarted=true);
  53.  
  54. Boolean
  55.  scrollStarted         ( ) const,
  56.  cursorMoveStarted     ( ) const,
  57.  fontChangeStarted     ( ) const;
  58.  
  59. private:
  60. friend class DetailsTreeHandler;
  61.  
  62.  
  63. IContainerControl
  64.  *detailsCnr;
  65. Boolean
  66.   scrollBegun,
  67.   cursorMoved,
  68.   fontChanged;
  69. DetailsTreeContainer( const DetailsTreeContainer&);
  70. DetailsTreeContainer& operator=( const DetailsTreeContainer&);
  71. };
  72.  
  73.  
  74. inline DetailsTreeContainer& DetailsTreeContainer :: setDetailsContainer (
  75.                                   IContainerControl* container)
  76. {
  77.   this->detailsCnr = container;
  78.   return *this;
  79. }
  80.  
  81. inline IContainerControl& DetailsTreeContainer :: detailsContainer ( )
  82. {
  83.   return *detailsCnr;
  84. }
  85.  
  86. inline DetailsTreeContainer& DetailsTreeContainer :: setScrollStarted (Boolean scrollStarted)
  87. {
  88.   this->scrollBegun = scrollStarted;
  89.   return *this;
  90. }
  91.  
  92. inline Boolean DetailsTreeContainer :: scrollStarted ( ) const
  93. {
  94.   return this->scrollBegun;
  95. }
  96.  
  97. inline DetailsTreeContainer& DetailsTreeContainer :: setCursorMoveStarted (Boolean cursorMoveStarted)
  98. {
  99.   this->cursorMoved = cursorMoveStarted;
  100.   return *this;
  101. }
  102.  
  103. inline Boolean DetailsTreeContainer :: cursorMoveStarted ( ) const
  104. {
  105.   return this->cursorMoved;
  106. }
  107.  
  108. inline DetailsTreeContainer& DetailsTreeContainer :: setFontChangeStarted (Boolean fontChangeStarted)
  109. {
  110.   this->fontChanged = fontChangeStarted;
  111.   return *this;
  112. }
  113.  
  114. inline Boolean DetailsTreeContainer :: fontChangeStarted ( ) const
  115. {
  116.   return this->fontChanged;
  117. }
  118.  
  119. #endif // _TREEDETC_
  120.