home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / intrvews / xgrab.lha / xgrab / include / myadjuster.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-24  |  1.3 KB  |  57 lines

  1. /**
  2.    GRAB Graph Layout and Browser System
  3.  
  4.    Copyright (c) 1987, 1988, 1989 Stanford University
  5.    Copyright (c) 1989, Tera Computer Company
  6.  **/
  7.  
  8. /*
  9.  * My Adjuster - button-like interactors for incremental adjustment of an
  10.  * interactor's perspective.
  11.  * Just like the adjuster class in InterViews 2.5, except the zoom gradient
  12.  * can be set.
  13.  */
  14.  
  15. #ifndef myadjuster_h
  16. #define myadjuster_h
  17.  
  18. #include <InterViews/adjuster.h>
  19. #include <InterViews/interactor.h>
  20.  
  21. class Bitmap;
  22. class Shape;
  23.  
  24. class MyZoomer : public Adjuster {
  25. public:
  26.     MyZoomer(Interactor*, float factor);
  27.     MyZoomer(const char*, Interactor*, float factor);
  28.     MyZoomer(Interactor*, float factor, Painter*);
  29. protected:
  30.     float factor;
  31.     void AdjustView(Event&);
  32. private:
  33.     void Init(float);
  34. };
  35.  
  36. class MyEnlarger : public MyZoomer {
  37. public:
  38.     MyEnlarger(Interactor*, float zg = 2.0);
  39.     MyEnlarger(const char*, Interactor*, float zg = 2.0);
  40.     MyEnlarger(Interactor*, Painter*, float zg = 2.0);
  41.     void ChangeZGrad(float);
  42. private:
  43.     void Init();
  44. };
  45.  
  46. class MyReducer : public MyZoomer {
  47. public:
  48.     MyReducer(Interactor*, float zg = 0.5);
  49.     MyReducer(const char*, Interactor*, float zg = 0.5);
  50.     MyReducer(Interactor*, Painter*, float zg = 0.5);
  51.     void ChangeZGrad(float);
  52. private:
  53.     void Init();
  54. };
  55.  
  56. #endif
  57.