home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / DClap / DTracker.h < prev    next >
Encoding:
Text File  |  1996-07-05  |  1.7 KB  |  55 lines  |  [TEXT/R*ch]

  1. // DTracker.h
  2. // d.g.gilbert
  3. // mouse tracker, now used by DPanel and children
  4.  
  5.  
  6. #ifndef _DTRACKER_
  7. #define _DTRACKER_
  8.  
  9. #include <ncbi.h>
  10. #include "DCommand.h"
  11.  
  12. class DPanel;
  13.  
  14. class DTracker : public DCommand
  15. {
  16. public:
  17.     enum TrackPhase { trackNone, trackBegin, trackContinue, trackEnd };
  18.     TrackPhase     fTrackPhase;
  19.     Nlm_Boolean fTrackNonMovement, fMovedOnce;
  20.     Nlm_PoinT      fInitialPt, fAnchorPoint, fPreviousPoint, fNextPoint,
  21.                             fLastAnchorPoint, fLastPreviousPoint, fLastNextPoint;                            
  22.     DPanel        * fView;
  23.     DTracker  * fCurrentTracker;
  24.     
  25.     DTracker();
  26.     DTracker( long command, DTaskMaster* itsSource, char* itsTitle,
  27.                                Nlm_Boolean canUndo, Nlm_Boolean causesChange,
  28.                                DPanel* itsView);
  29.     virtual void ITracker( long command, DTaskMaster* itsSource, char* itsTitle,
  30.                                Nlm_Boolean canUndo, Nlm_Boolean causesChange,
  31.                                DPanel* itsView);
  32.     virtual void Reset();
  33.     virtual void SetTracker(DTracker* newTracker);
  34.  
  35.     virtual DTracker* TrackMouse( TrackPhase aTrackPhase,
  36.                                         Nlm_PoinT& anchorPoint, Nlm_PoinT& previousPoint,
  37.                                         Nlm_PoinT& nextPoint,    Nlm_Boolean mouseDidMove);
  38.     virtual void TrackFeedback(TrackPhase aTrackPhase,
  39.                                         const Nlm_PoinT& anchorPoint, const Nlm_PoinT& previousPoint,
  40.                                         const Nlm_PoinT& nextPoint, Nlm_Boolean mouseDidMove, Nlm_Boolean turnItOn);
  41.     virtual DTracker* Start( Nlm_PoinT mouse);
  42.     virtual DTracker* Continue( Nlm_PoinT mouse, Nlm_Boolean mouseMoved);
  43.     virtual DTracker* Finish( Nlm_PoinT mouse);
  44.     virtual Nlm_Boolean IsDoneTracking();
  45.     
  46.     virtual DTracker* TrackOnce( Nlm_Boolean didMouseMove);
  47.     virtual void FeedbackOnce( Nlm_Boolean mouseDidMove, Nlm_Boolean turnItOn);
  48.     virtual void BecomeTracker( DTracker* oldTracker);
  49. };
  50.  
  51.  
  52.  
  53. #endif
  54.  
  55.