Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CompositePlotter.h

Go to the documentation of this file.
00001 /* -*- mode: c++ -*- */
00002 
00014 #ifndef _CompositePlotter_H_
00015 #define _CompositePlotter_H_
00016 
00017 #include "axes/AxesType.h"
00018 #include "pattern/libhippo.h"
00019 
00020 #include <vector>
00021 
00022 class AxisRepBase;
00023 class AxisModelBase;
00024 class AxisTick;
00025 class BinToColor;
00026 class Color;
00027 class DataRep;
00028 class HippoRectangle;
00029 class NTuple;
00030 class ProjectorBase;
00031 class Range;
00032 class RepBase;
00033 class TransformBase;
00034 class TupleCut;
00035 class ViewBase;
00036 
00053 class MDL_HIPPOPLOT_API CompositePlotter
00054 {
00055 
00056 protected:
00057 
00061   CompositePlotter( const CompositePlotter & plotter );
00062 
00071   AxisModelBase * m_x_axis;
00072   
00077   AxisModelBase * m_y_axis;
00078   
00083   AxisModelBase * m_z_axis;
00084   
00090   std::string m_x_label;
00091   
00094   std::string m_y_label;
00095   
00098   std::string m_z_label;
00099   
00102   TransformBase * m_transform;
00103   
00107   int m_datarep_index;
00108 
00111   typedef std::vector < DataRep * > DataRepList_t;
00112 
00114   DataRepList_t m_datareps;
00115 
00119   bool m_has_autoscaled;
00120   
00124   bool m_has_z;
00125 
00128   bool isDirty () const;
00129 
00135   virtual double getZValue ( double x, double y, bool scaled = true ) const;
00136 
00138   void push_back ( DataRep * );
00139 
00140   virtual void setRangePrivate ( hippodraw::Axes::Type axis, 
00141                                  const Range & range,
00142                                  bool scaled = false, 
00143                                  bool adjust_width = true );
00144 
00145 public:
00146 
00149   CompositePlotter ( );
00150 
00153   virtual ~CompositePlotter ();
00154 
00157   CompositePlotter * clone ();
00158 
00164   virtual void setAllAxisModels ();
00165 
00169   bool  checkAutoScale ();
00170 
00176   virtual void autoScale ( );
00177 
00180   void autoScale ( hippodraw::Axes::Type axis );
00181 
00185   void autoScaleZ ();
00186 
00187   virtual void setRange ( hippodraw::Axes::Type, const Range &, 
00188                           bool scaled, bool adjust_width );
00189 
00190   virtual void setNumberOfBins ( hippodraw::Axes::Type axis, 
00191                                  unsigned int number );
00192 
00195   virtual void setRepresentation ( RepBase * pointrep );
00196 
00199   virtual RepBase * representation ( ) const;
00200 
00201   virtual const BinToColor * getValueRep () const;
00202 
00206   virtual void setValueRep ( BinToColor * rep );
00207 
00209   virtual ProjectorBase * activeProjector () const;
00210 
00213   virtual ProjectorBase * getProjector (int i) const;
00214 
00216   virtual int getNumDataReps () const;
00217 
00220   virtual DataRep * getParentDataRep ( int index ) const;
00221   
00223   virtual DataRep * getParentDataRep () const;
00224   
00227   virtual void setParentDataRep ( int index, DataRep * parent );
00228 
00230   virtual void setParentDataRep ( DataRep * parent );
00231   
00232   virtual DataRep * getDataRep ( int index ) const;
00233 
00234   virtual DataRep * selectedDataRep () const;
00235 
00238   virtual DataRep * mouseSelectedDataRep () const;
00239 
00243   virtual void addDataRep ( DataRep * rep );
00244 
00248   virtual bool hasNTupleBindings () const;
00249 
00253   virtual bool hasZoomY () const;
00254 
00255 
00262   virtual int setActivePlot( int index, bool redraw );
00263 
00269   virtual int activePlotIndex () const;
00270 
00272   virtual void removeDataRep ( DataRep * );
00273 
00276   virtual void setAxisModel ( AxisModelBase * , hippodraw::Axes::Type );
00277 
00280   virtual void setAutoRanging ( bool flag );
00281 
00285   virtual void setErrorDisplay ( hippodraw::Axes::Type axis, bool );
00286 
00290   virtual bool errorDisplay ( hippodraw::Axes::Type axis ) const;
00291 
00292   virtual void matrixTranspose ( bool yes );
00293 
00296   virtual void setRepColor ( const Color & );
00297 
00301   virtual const Color & repColor () const;
00302 
00310   virtual double getBinWidth (hippodraw::Axes::Type axis) const;
00311 
00312   virtual void setOffset ( hippodraw::Axes::Type axis, double offset );
00313 
00317   virtual void setBinWidth ( hippodraw::Axes::Type axis, double width );
00318 
00320   virtual void reset ();
00321 
00322   virtual double getOffset (hippodraw::Axes::Type axis) const;
00323 
00328   virtual int getNumberOfEntries () const;
00329 
00331   virtual double getPosRange ( hippodraw::Axes::Type axis ) const;
00332 
00342   virtual void setTransform ( TransformBase * );
00343 
00344   virtual void toUserXY ( double mx, double my, bool scaled, 
00345                                 double & ux, double & uy ) const;
00346 
00351   virtual NTuple * createNTuple () const;
00352 
00365   virtual NTuple * createPickTuple ();
00366 
00381   virtual void fillPickedPoint ( double mx, double my, 
00382                                  std::vector < double > & picked ) const;
00383 
00385   double processReturnValue ( double retval, 
00386                               hippodraw::Axes::Type axis, 
00387                               bool scaled ) const;
00388 
00394   virtual void addValues ( const std::vector < double > &  v );
00395 
00396   virtual void update ();
00397 
00400   virtual void setAutoTicks ( hippodraw::Axes::Type axis, bool yes );
00401 
00402   virtual void setTicks ( hippodraw::Axes::Type axis, 
00403                           const std::vector < AxisTick > & ticks );
00404 
00405   virtual bool isTargetable () const;
00406   virtual DataRep * getTarget () const;
00407   virtual int indexOf ( const DataRep * rep ) const;
00408   virtual bool hasAxis ( hippodraw::Axes::Type axis ) const;
00409   virtual bool isAxisScaled ( hippodraw::Axes::Type axis ) const;
00410   virtual AxisModelBase * getAxisModel ( hippodraw::Axes::Type axis ) const;
00411 
00416   virtual void setAutoRanging ( hippodraw::Axes::Type axis, bool flag );
00417 
00418   virtual bool isAutoRanging ( hippodraw::Axes::Type axis ) const;
00419 
00422   virtual void setLowRange ( hippodraw::Axes::Type axis, int parm, 
00423                              bool dragging );
00424 
00427   virtual void setHighRange ( hippodraw::Axes::Type axis, int parm, 
00428                               bool dragging );
00429 
00430   virtual const Range & getRange ( hippodraw::Axes::Type axis, 
00431                                    bool scaled ) const;
00432   virtual void setScaleFactor ( hippodraw::Axes::Type  axis, double factor );
00433 
00436   virtual void setScaling ( hippodraw::Axes::Type  axis, bool on = true );
00437 
00442   void setTitle ( const std::string & title );
00443 
00448   const std::string & getTitle () const;
00449 
00450   virtual void setLabel ( hippodraw::Axes::Type, const std::string & value );
00451   virtual const std::string & getLabel ( hippodraw::Axes::Type ) const;
00452   virtual const std::string &
00453   getInternalLabel ( hippodraw::Axes::Type axis ) const;
00454 
00455   virtual TransformBase * getTransform () const;
00456 
00463   virtual double getAspectRatio () const;
00464 
00467   bool hasAutoScaled () const;
00468 
00471   virtual void prepareToDraw ();
00472 
00475   HippoRectangle calcUserRectangle () const;
00476 
00482   virtual void drawProjValues( ViewBase * view );
00483 
00489   void drawAxisRep ( AxisRepBase * rep, ViewBase * view,
00490                      bool do_y, bool do_z );
00491 
00494   virtual void checkAxisScaling ();
00495 
00498   void setEnableZ ( bool yes );
00499 
00502   void setAutoScaled ( bool flag = true );
00503 
00505   void autoScale ( AxisModelBase * model, hippodraw::Axes::Type axis );
00506 
00510   void fillCutList ( std::vector < const TupleCut * > & cuts ) const;
00511 
00515   virtual void setCutRangeAt ( const Range & range, unsigned int index );
00516 
00517 };
00518 
00519 #endif // _CompositePlotter_H_

Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3