NEURON
shapeplt.h
Go to the documentation of this file.
1 #ifndef shapeplot_h
2 #define shapeplot_h
3 
4 
5 #if HAVE_IV
6 #include "shape.h"
7 #endif
8 
9 struct Symbol;
10 class ShapePlotImpl;
11 class SectionList;
12 
13 
15 public:
16  virtual void scale(float min, float max) = 0;
17  virtual const char* varname() const = 0;
18  virtual void* varobj() const = 0;
19  virtual void varobj(void* obj) = 0;
20  virtual void variable(Symbol*) = 0;
21  virtual float low() = 0;
22  virtual float high() = 0;
23  virtual Object* neuron_section_list() = 0;
24  virtual bool has_iv_view() = 0;
25 };
26 
28 public:
30  virtual ~ShapePlotData();
31  virtual void scale(float min, float max);
32  virtual const char* varname() const;
33  virtual void* varobj() const;
34  virtual void varobj(void* obj);
35  virtual void variable(Symbol*);
36  virtual float low();
37  virtual float high();
38  virtual Object* neuron_section_list();
39  virtual bool has_iv_view();
40 
41 private:
43  float lo, hi;
45  void* py_var_;
46 };
47 
48 #if HAVE_IV
49 class ShapePlot : public ShapeScene, public ShapePlotInterface {
50 public:
51  enum {TIME=ShapeScene::EXTRASHAPETOOL, SPACE, SHAPE};
52  ShapePlot(Symbol* = NULL, SectionList* = NULL);
53  virtual ~ShapePlot();
54  virtual void observe(SectionList* = NULL);
55  virtual void erase_all();
56  virtual void draw(Canvas*, const Allocation&) const;
57  virtual void variable(Symbol*);
58  virtual const char* varname()const;
59  virtual void* varobj() const;
60  virtual void varobj(void* obj);
61 
62  virtual void scale(float min, float max);
63  virtual void save_phase1(std::ostream&);
64 
65  virtual void shape_plot();
66 
67  virtual void make_time_plot(Section*, float x);
68  virtual void make_space_plot(Section* s1, float x1, Section* s2, float x2);
69  virtual void flush();
70  virtual void fast_flush();
71  virtual float low();
72  virtual float high();
73  virtual bool has_iv_view();
74  virtual Object* neuron_section_list();
75  void update_ptrs();
76  void has_iv_view(bool);
77 private:
78  ShapePlotImpl* spi_;
79  Object* sl_;
80  bool has_iv_view_;
81  void* py_var_;
82 
83 };
84 
85 class ColorValue : public Resource, public Observable{
86 public:
87  ColorValue();
88  virtual ~ColorValue();
89  void set_scale(float low, float high);
90  const Color* get_color(float) const;
91  const Color* no_value() const;
92  float low() const { return low_;}
93  float high() const { return high_;}
94  Glyph* make_glyph();
95  void colormap(int size, bool global = false);
96  void colormap(int index, int red, int green, int blue);
97 private:
98  float low_, high_;
99  int csize_;
100  const Color** crange_;
101 };
102 
103 class Hinton : public Observer, public FastShape {
104 public:
105  Hinton(double*, Coord xsize, Coord ysize, ShapeScene*);
106  virtual ~Hinton();
107  virtual void request(Requisition&) const;
108  virtual void allocate(Canvas*, const Allocation&, Extension&);
109  virtual void draw(Canvas*, const Allocation&) const;
110  virtual void fast_draw(Canvas*, Coord x, Coord y, bool) const;
111  virtual void update(Observable*);
112 private:
113  double* pd_;
114  const Color* old_;
115  Coord xsize_, ysize_;
116  ShapeScene* ss_;
117 };
118 #endif
119 #endif
Object * sl_
Definition: shapeplt.h:44
static double fast_flush(void *v)
Definition: shapeplt.cpp:60
double max(double a, double b)
Definition: geometry3d.cpp:22
virtual float high()=0
#define min(a, b)
Definition: matrix.h:157
#define Glyph
Definition: _defines.h:132
#define Coord
Definition: _defines.h:19
#define Color
Definition: _defines.h:74
static void update(NrnThread *)
Definition: fadvance.cpp:570
virtual void * varobj() const =0
virtual Object * neuron_section_list()=0
virtual void variable(Symbol *)=0
Symbol * sym_
Definition: shapeplt.h:42
#define Canvas
Definition: _defines.h:65
#define SPACE
Definition: fmenu.cpp:131
Definition: model.h:57
float lo
Definition: shapeplt.h:43
Definition: hocdec.h:226
virtual const char * varname() const =0
void * py_var_
Definition: shapeplt.h:45
virtual void scale(float min, float max)=0
virtual bool has_iv_view()=0
virtual float low()=0
return NULL
Definition: cabcode.cpp:461
short index
Definition: cabvars.h:11