axis.h

Go to the documentation of this file.
00001 #ifndef axis_h
00002 #define axis_h
00003 
00004 #include <InterViews/observe.h>
00005 #include <InterViews/glyph.h>
00006 
00007 class Scene;
00008 
00009 class Axis : public Glyph, public Observer {
00010 public:
00011    Axis(Scene*, DimensionName);
00012    Axis(Scene*, DimensionName, Coord x1, Coord x2);
00013    Axis(Scene*, DimensionName, Coord x1, Coord x2, Coord pos,
00014       int ntic = 1, int nminor = 0,
00015       int invert=0, boolean number=true);
00016    virtual ~Axis();
00017    virtual void save(ostream&);
00018    virtual void update(Observable*);
00019    virtual void size(float&,float&);
00020 private:
00021    void init(Coord x1, Coord x2, Coord pos=0.,
00022       int ntic = 1, int nminor = 0,
00023       int invert=0, boolean number=true);
00024    boolean set_range();
00025    void install();
00026    void location();
00027 private:
00028    Scene* s_;
00029    Coord min_, max_;
00030    DimensionName d_;
00031    double amin_, amax_;
00032    int ntic_, nminor_;
00033    int invert_;
00034    boolean number_;
00035    Coord pos_;
00036 };
00037 
00038 class BoxBackground : public Background {
00039 public:
00040    BoxBackground();
00041    virtual ~BoxBackground();
00042    
00043    virtual void draw(Canvas*, const Allocation&) const;
00044    virtual void print(Printer*, const Allocation&) const;
00045 private:
00046    void draw_help(Canvas*, const Allocation&) const;
00047    void tic_label(Coord x, Coord y, Coord val,
00048       float x_align, float y_align, Canvas*) const;
00049 };
00050 
00051 class AxisBackground : public Background {
00052 public:
00053    AxisBackground();
00054    virtual ~AxisBackground();
00055    
00056    virtual void draw(Canvas*, const Allocation&) const;
00057    virtual void print(Printer*, const Allocation&) const;
00058 private:
00059    void draw_help(Canvas*, const Allocation&) const;
00060    void tic_label(Coord x, Coord y, Coord val,
00061       float x_align, float y_align, Canvas*) const;
00062 };
00063 
00064 #endif
Generated on Mon Jun 13 08:10:23 2011 for NEURON by  doxygen 1.6.3