"Fossies" - the Fresh Open Source Software Archive

Member "ivtools-ivtools-2.0.4/src/include/InterViews/adjust.h" (9 Oct 2020, 3017 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 "adjust.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (c) 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  * Adjustable - object to scroll and/or zoom
   27  */
   28 
   29 #ifndef iv_adjust_h
   30 #define iv_adjust_h
   31 
   32 #include <InterViews/geometry.h>
   33 
   34 #include <InterViews/_enter.h>
   35 
   36 class Observable;
   37 class Observer;
   38 
   39 struct AdjustableImpl;
   40 
   41 //: handles request to modify its viewing editor.
   42 // <a href=../refman3.1/refman.html#PAGE27>in reference manual</a>.
   43 class Adjustable {
   44 public:
   45     Adjustable();
   46     virtual ~Adjustable();
   47 
   48     virtual Observable* observable(DimensionName) const;
   49 
   50     virtual void attach(DimensionName, Observer*);
   51     virtual void detach(DimensionName, Observer*);
   52 
   53     virtual Coord lower(DimensionName) const;
   54     virtual Coord upper(DimensionName) const;
   55     virtual Coord length(DimensionName) const;
   56     virtual Coord cur_lower(DimensionName) const;
   57     virtual Coord cur_upper(DimensionName) const;
   58     virtual Coord cur_length(DimensionName) const;
   59 
   60     virtual void small_scroll(DimensionName, Coord);
   61     virtual Coord small_scroll(DimensionName) const;
   62     virtual void large_scroll(DimensionName, Coord);
   63     virtual Coord large_scroll(DimensionName) const;
   64 
   65     virtual void begin_adjustment(DimensionName);
   66     virtual void commit_adjustment(DimensionName);
   67     virtual void abort_adjustment(DimensionName);
   68 
   69     virtual void scroll_forward(DimensionName);
   70     virtual void scroll_backward(DimensionName);
   71     virtual void page_forward(DimensionName);
   72     virtual void page_backward(DimensionName);
   73 
   74     virtual void scroll_to(DimensionName, Coord lower);
   75     virtual void scale_to(DimensionName, float fraction_visible);
   76     virtual void zoom_to(float magnification);
   77 
   78     virtual void constrain(DimensionName, Coord& lower) const;
   79     virtual void notify(DimensionName) const;
   80     virtual void notify_all() const;
   81 private:
   82     AdjustableImpl* impl_;
   83 };
   84 
   85 #include <InterViews/_leave.h>
   86 
   87 #endif