NEURON
axis.h
Go to the documentation of this file.
1 #ifndef axis_h
2 #define axis_h
3 
4 #include <InterViews/observe.h>
5 #include <InterViews/glyph.h>
6 
7 class Scene;
8 
9 class Axis : public Glyph, public Observer {
10 public:
12  Axis(Scene*, DimensionName, Coord x1, Coord x2);
13  Axis(Scene*, DimensionName, Coord x1, Coord x2, Coord pos,
14  int ntic = 1, int nminor = 0,
15  int invert=0, bool number=true);
16  virtual ~Axis();
17  virtual void save(ostream&);
18  virtual void update(Observable*);
19  virtual void size(float&,float&);
20 private:
21  void init(Coord x1, Coord x2, Coord pos=0.,
22  int ntic = 1, int nminor = 0,
23  int invert=0, bool number=true);
24  bool set_range();
25  void install();
26  void location();
27 private:
31  double amin_, amax_;
32  int ntic_, nminor_;
33  int invert_;
34  bool number_;
36 };
37 
38 class BoxBackground : public Background {
39 public:
40  BoxBackground();
41  virtual ~BoxBackground();
42 
43  virtual void draw(Canvas*, const Allocation&) const;
44  virtual void print(Printer*, const Allocation&) const;
45 private:
46  void draw_help(Canvas*, const Allocation&) const;
47  void tic_label(Coord x, Coord y, Coord val,
48  float x_align, float y_align, Canvas*) const;
49 };
50 
51 class AxisBackground : public Background {
52 public:
54  virtual ~AxisBackground();
55 
56  virtual void draw(Canvas*, const Allocation&) const;
57  virtual void print(Printer*, const Allocation&) const;
58 private:
59  void draw_help(Canvas*, const Allocation&) const;
60  void tic_label(Coord x, Coord y, Coord val,
61  float x_align, float y_align, Canvas*) const;
62 };
63 
64 #endif
int nminor_
Definition: axis.h:32
void init(Coord x1, Coord x2, Coord pos=0., int ntic=1, int nminor=0, int invert=0, bool number=true)
void location()
virtual void update(Observable *)
#define Glyph
Definition: _defines.h:132
#define Coord
Definition: _defines.h:19
#define print
Definition: redef.h:109
Coord min_
Definition: axis.h:29
DimensionName d_
Definition: axis.h:30
int invert_
Definition: axis.h:33
#define Printer
Definition: _defines.h:211
int val
Definition: dll.cpp:167
Definition: axis.h:9
#define Canvas
Definition: _defines.h:65
Coord pos_
Definition: axis.h:35
Coord max_
Definition: axis.h:29
virtual void save(ostream &)
unsigned int DimensionName
Definition: geometry.h:40
void install()
Axis(Scene *, DimensionName)
virtual ~Axis()
virtual void size(float &, float &)
double amin_
Definition: axis.h:31
double amax_
Definition: axis.h:31
int ntic_
Definition: axis.h:32
#define Background
Definition: _defines.h:43
Scene * s_
Definition: axis.h:28
invert
Definition: extdef.h:3
bool set_range()
bool number_
Definition: axis.h:34