home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C++ / Applications / Nuntius 1.2 / src / Nuntius / UGroupTreeCmds.h < prev    next >
Encoding:
Text File  |  1994-03-06  |  3.1 KB  |  125 lines  |  [TEXT/MPS ]

  1. // Copyright © 1992 Peter Speck, speck@dat.ruc.dk. All rights reserved.
  2. // UGroupTreeCmds.h
  3.  
  4. #define __UGROUPTREECMDS__
  5.  
  6. class TGroupTreeView;
  7. class TGroupTree;
  8. class TGroupTreeDoc;
  9.  
  10. #ifndef __UGRIDVIEW__
  11. #include <UGridView.h>
  12. #endif
  13.  
  14. #ifndef __UGROUPVIEWCMDS__
  15. #include "UGroupViewCmds.h"
  16. #endif
  17.  
  18. class TExpandGroupTracker : public TTracker
  19. {
  20.     public:
  21.         pascal void DoIt(); // Override
  22.             
  23.         pascal void TrackFeedback(TrackPhase aTrackPhase,
  24.                                         const VPoint &anchorPoint,
  25.                                         const VPoint &previousPoint,
  26.                                         const VPoint &nextPoint,
  27.                                         Boolean mouseDidMove,
  28.                                         Boolean turnItOn); // Override
  29.             
  30.         pascal TTracker *TrackMouse(TrackPhase aTrackPhase,
  31.                                              VPoint &anchorPoint,
  32.                                              VPoint &previousPoint,
  33.                                              VPoint &nextPoint,
  34.                                              Boolean mouseDidMove); // Override
  35.  
  36.         TExpandGroupTracker();
  37.         pascal void Initialize();
  38.         pascal void IExpandGroupTracker(
  39.                                                 TGroupTreeView *groupTreeView,
  40.                                                 const VPoint &itsMouse,
  41.                                                 GridCell cell,
  42.                                                 Boolean isExpanded,
  43.                                                 Boolean wayDown,
  44.                                                 const Rect &cellRect);
  45.     protected:
  46.         TGroupTreeView *fGroupTreeView;
  47.         GridCell fCell;
  48.         Boolean fWasExpanded;
  49.         CRect fCellRect;
  50.         Boolean fLastHighlighted;
  51.         Boolean fWayDown;
  52. };
  53.  
  54. class TSubscribeGroupTracker : public TGroupTracker
  55. {    
  56.     public:
  57.             
  58.         TSubscribeGroupTracker();
  59.         virtual pascal void Initialize();
  60.         virtual pascal void ISubscribeGroupTracker(
  61.                                                 TGroupTreeView *groupTreeView,
  62.                                                 const VPoint &localMouse,
  63.                                                 Boolean makingCopy);
  64.         virtual pascal void Free();
  65.     protected:
  66.         virtual void MakeGrayPict();
  67.         virtual void CreateListOfDraggedGroups();
  68.  
  69.     private:
  70.         TGroupTreeView *fGroupTreeView;
  71.         Boolean fHasPrevCell;
  72.         long fPrevLevel;
  73.         ArrayIndex fPrevIndex;
  74.         CRect fPrevIconRect;
  75.         
  76.         void DrawGroupIcon(ArrayIndex line, long level, CRect textRect, CRect iconRect);
  77. };
  78.  
  79. class TTreeTypeName : public TGroupViewTypeNameCommand
  80. {
  81.     public:
  82.         TTreeTypeName();
  83.         virtual pascal void Initialize();
  84.         void ITreeTypeName(TGroupTreeView *gtv, TLongintList *expandData, ArrayIndex windowFolderIndex, TToolboxEvent *event);
  85.         virtual pascal void Free();
  86.     protected:
  87.         TGroupTreeView *fGroupTreeView;
  88.         TGroupTree *fGroupTree;
  89.         TLongintList *fExpandData;
  90.         ArrayIndex fWindowFolderIndex;
  91.  
  92.         virtual void SetUp();
  93.         virtual void SetDown();
  94.         virtual void GetLineText(ArrayIndex line, CStr255 &text);
  95. };
  96.  
  97. class TTreeTabKeyCommand : public TGroupViewTabKeyCommand
  98. {
  99.     public:
  100.         TTreeTabKeyCommand();
  101.         virtual pascal void Initialize();
  102.         void ITreeTabKeyCommand(TGroupTreeView *gtv, TLongintList *expandData, ArrayIndex windowFolderIndex, Boolean forward);
  103.         virtual pascal void Free();
  104.     protected:
  105.         TGroupTreeView *fGroupTreeView;
  106.         TGroupTree *fGroupTree;
  107.         TLongintList *fExpandData;
  108.         ArrayIndex fWindowFolderIndex;
  109.  
  110.         virtual void GetLineText(ArrayIndex line, CStr255 &text);
  111. };
  112.  
  113. class TUpdateListOfAllGroupsCommand : public TCommand
  114. {
  115.     public:
  116.         pascal void DoIt();
  117.         
  118.         pascal void Initialize();
  119.         void IUpdateListOfAllGroupsCommand(TGroupTreeDoc *gtd, Boolean rebuild);
  120.         pascal void Free();
  121.     private:
  122.         TGroupTreeDoc *fGroupTreeDoc;
  123.         Boolean fRebuild;
  124. };
  125.