"Fossies" - the Fresh Open Source Software Archive

Member "ivtools-ivtools-2.0.4/src/include/IV-2_6/InterViews/adjuster.h" (9 Oct 2020, 4135 Bytes) of package /linux/misc/ivtools-ivtools-2.0.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "adjuster.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (c) 1987, 1988, 1989, 1990, 1991 Stanford University
    3  * Copyright (c) 1991 Silicon Graphics, Inc.
    4  *
    5  * Permission to use, copy, modify, distribute, and sell this software and 
    6  * its documentation for any purpose is hereby granted without fee, provided
    7  * that (i) the above copyright notices and this permission notice appear in
    8  * all copies of the software and related documentation, and (ii) the names of
    9  * Stanford and Silicon Graphics may not be used in any advertising or
   10  * publicity relating to the software without the specific, prior written
   11  * permission of Stanford and Silicon Graphics.
   12  * 
   13  * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
   14  * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
   15  * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
   16  *
   17  * IN NO EVENT SHALL STANFORD OR SILICON GRAPHICS BE LIABLE FOR
   18  * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
   19  * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
   20  * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
   21  * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
   22  * OF THIS SOFTWARE.
   23  */
   24 
   25 /*
   26  * Adjuster - button-like interactors for incremental adjustment of an
   27  * interactor's perspective.
   28  */
   29 
   30 #ifndef ivlook2_6_adjuster_h
   31 #define ivlook2_6_adjuster_h
   32 
   33 #include <IV-2_6/InterViews/interactor.h>
   34 
   35 #include <IV-2_6/_enter.h>
   36 
   37 static const int NO_AUTOREPEAT = -1;
   38 
   39 class Bitmap;
   40 class Shape;
   41 
   42 //: manipulate a perspective using a pushbutton like interface (iv-2.6).
   43 // <a href=../man3.1/Adjuster.html>man page</a>
   44 class Adjuster : public Interactor {
   45 public:
   46     Adjuster(Interactor*, int = NO_AUTOREPEAT);
   47     Adjuster(const char*, Interactor*, int = NO_AUTOREPEAT);
   48     virtual ~Adjuster();
   49 
   50     void Handle(Event&);
   51     virtual void Highlight(boolean on);
   52     void Redraw(IntCoord, IntCoord, IntCoord, IntCoord);
   53     void Reshape(Shape&);
   54 protected:
   55     Interactor* view;
   56     Bitmap* plain;
   57     Bitmap* hit;
   58     Bitmap* mask;
   59     int delay;
   60     boolean timer;
   61     Perspective* shown;
   62     boolean highlighted;
   63 
   64     virtual void AdjustView(Event&);
   65     void AutoRepeat();
   66     void Flash();
   67     void HandlePress();
   68     void Invert();
   69     virtual void Reconfig();
   70     void TimerOn();
   71     void TimerOff();
   72 private:
   73     void Init(Interactor*, int);
   74 };
   75 
   76 class Zoomer : public Adjuster {
   77 public:
   78     Zoomer(Interactor*, float factor);
   79     Zoomer(const char*, Interactor*, float factor);
   80     virtual ~Zoomer();
   81 protected:
   82     void AdjustView(Event&);
   83 private:
   84     float factor;
   85 
   86     void Init(float);
   87 };
   88 
   89 class Enlarger : public Zoomer {
   90 public:
   91     Enlarger(Interactor*);
   92     Enlarger(const char*, Interactor*);
   93     virtual ~Enlarger();
   94 private:
   95     void Init();
   96 };
   97 
   98 class Reducer : public Zoomer {
   99 public:
  100     Reducer(Interactor*);
  101     Reducer(const char*, Interactor*);
  102     virtual ~Reducer();
  103 private:
  104     void Init();
  105 };
  106 
  107 class Mover : public Adjuster {
  108 public:
  109     Mover(Interactor*, int delay, int moveType);
  110     Mover(const char*, Interactor*, int delay, int moveType);
  111     virtual ~Mover();
  112 protected:
  113     int moveType;
  114     void AdjustView(Event&);
  115 private:
  116     void Init(int);
  117 };
  118 
  119 class LeftMover : public Mover {
  120 public:
  121     LeftMover(Interactor*, int delay = NO_AUTOREPEAT);
  122     LeftMover(const char*, Interactor*, int delay = NO_AUTOREPEAT);
  123     virtual ~LeftMover();
  124 private:
  125     void Init();
  126 };
  127 
  128 class RightMover : public Mover {
  129 public:
  130     RightMover(Interactor*, int delay = NO_AUTOREPEAT);
  131     RightMover(const char*, Interactor*, int delay = NO_AUTOREPEAT);
  132     virtual ~RightMover();
  133 private:
  134     void Init();
  135 };
  136 
  137 class UpMover : public Mover {
  138 public:
  139     UpMover(Interactor*, int delay = NO_AUTOREPEAT);
  140     UpMover(const char*, Interactor*, int delay = NO_AUTOREPEAT);
  141     virtual ~UpMover();
  142 private:
  143     void Init();
  144 };
  145 
  146 class DownMover : public Mover {
  147 public:
  148     DownMover(Interactor*, int delay = NO_AUTOREPEAT);
  149     DownMover(const char*, Interactor*, int delay = NO_AUTOREPEAT);
  150     virtual ~DownMover();
  151 private:
  152     void Init();
  153 };
  154 
  155 #include <IV-2_6/_leave.h>
  156 
  157 #endif