shapeplt.h
Go to the documentation of this file.00001 #ifndef shapeplot_h
00002 #define shapeplot_h
00003
00004 #include "shape.h"
00005
00006 struct Symbol;
00007 class ShapePlotImpl;
00008 class SectionList;
00009
00010 class ShapePlot : public ShapeScene {
00011 public:
00012 enum {TIME=ShapeScene::EXTRASHAPETOOL, SPACE, SHAPE};
00013 ShapePlot(Symbol* = nil, SectionList* = nil);
00014 virtual ~ShapePlot();
00015 virtual void observe(SectionList* = nil);
00016 virtual void erase_all();
00017 virtual void draw(Canvas*, const Allocation&) const;
00018 void variable(Symbol*);
00019 const char* varname()const;
00020 virtual void scale(float min, float max);
00021 virtual void save_phase1(ostream&);
00022
00023 virtual void shape_plot();
00024
00025 virtual void make_time_plot(Section*, float x);
00026 virtual void make_space_plot(Section* s1, float x1, Section* s2, float x2);
00027 virtual void flush();
00028 virtual void fast_flush();
00029 void update_ptrs();
00030 private:
00031 ShapePlotImpl* spi_;
00032 };
00033
00034 class ColorValue : public Resource, public Observable{
00035 public:
00036 ColorValue();
00037 virtual ~ColorValue();
00038 void set_scale(float low, float high);
00039 const Color* get_color(float) const;
00040 const Color* no_value() const;
00041 float low() { return low_;}
00042 float high() { return high_;}
00043 Glyph* make_glyph();
00044 void colormap(int size, boolean global = false);
00045 void colormap(int index, int red, int green, int blue);
00046 private:
00047 float low_, high_;
00048 int csize_;
00049 const Color** crange_;
00050 };
00051
00052 class Hinton : public Observer, public FastShape {
00053 public:
00054 Hinton(double*, Coord xsize, Coord ysize, ShapeScene*);
00055 virtual ~Hinton();
00056 virtual void request(Requisition&) const;
00057 virtual void allocate(Canvas*, const Allocation&, Extension&);
00058 virtual void draw(Canvas*, const Allocation&) const;
00059 virtual void fast_draw(Canvas*, Coord x, Coord y, boolean) const;
00060 virtual void update(Observable*);
00061 private:
00062 double* pd_;
00063 const Color* old_;
00064 Coord xsize_, ysize_;
00065 ShapeScene* ss_;
00066 };
00067 #endif