CompositePlotter.h
Go to the documentation of this file.
1 /* -*- mode: c++ -*- */
2 
14 #ifndef _CompositePlotter_H_
15 #define _CompositePlotter_H_
16 
17 #include "axes/AxesType.h"
18 
19 #include <vector>
20 
21 namespace hippodraw {
22 
23 class AxisRepBase;
24 class AxisModelBase;
25 class AxisTick;
26 class BinToColor;
27 class DataRep;
28 class Color;
29 class NTuple;
30 class ProjectorBase;
31 class Range;
32 class Rect;
33 class RepBase;
34 class TransformBase;
35 class TupleCut;
36 class ViewBase;
37 
55 {
56 
57 protected:
58 
62  CompositePlotter( const CompositePlotter & plotter );
63 
73 
79 
85 
91  std::string m_x_label;
92 
95  std::string m_y_label;
96 
99  std::string m_z_label;
100 
104 
108 
113 
116  typedef std::vector < hippodraw::DataRep * > DataRepList_t;
117 
120 
125 
129 
133 
137  bool m_has_z;
138 
141  bool m_reverse;
142 
145  bool isDirty () const;
146 
152  virtual double getZValue ( double x, double y, bool scaled = true ) const;
153 
155  void push_back ( hippodraw::DataRep * );
156 
157  virtual void setRangePrivate ( hippodraw::Axes::Type axis,
158  const Range & range,
159  bool scaled = false,
160  bool adjust_width = true );
161 
162 public:
163 
166  CompositePlotter ( );
167 
170  virtual ~CompositePlotter ();
171 
174  CompositePlotter * clone ();
175 
181  virtual void setAllAxisModels ();
182 
186  bool checkAutoScale ();
187 
193  virtual void autoScale ( );
194 
197  void autoScale ( hippodraw::Axes::Type axis );
198 
202  void autoScaleZ ();
203 
204  virtual void setRange ( hippodraw::Axes::Type, const Range &,
205  bool scaled, bool adjust_width );
206 
207  virtual void setNumberOfBins ( hippodraw::Axes::Type axis,
208  unsigned int number );
209 
212  virtual void setRepresentation ( RepBase * pointrep );
213 
216  virtual RepBase * representation ( ) const;
217 
218  virtual const BinToColor * getValueRep () const;
219 
223  virtual void setValueRep ( BinToColor * rep );
224 
226  virtual ProjectorBase * activeProjector () const;
227 
230  virtual ProjectorBase * getProjector (int i) const;
231 
233  virtual int getNumDataReps () const;
234 
237  virtual hippodraw::DataRep * getParentDataRep ( int index ) const;
238 
240  virtual hippodraw::DataRep * getParentDataRep () const;
241 
244  virtual void setParentDataRep ( int index, hippodraw::DataRep * parent );
245 
247  virtual void setParentDataRep ( hippodraw::DataRep * parent );
248 
249  virtual hippodraw::DataRep * getDataRep ( int index ) const;
250 
254  virtual hippodraw::DataRep * selectedDataRep () const;
255 
258  virtual hippodraw::DataRep * mouseSelectedDataRep () const;
259 
263  virtual void addDataRep ( hippodraw::DataRep * rep );
264 
268  virtual bool hasNTupleBindings () const;
269 
273  virtual bool hasZoomY () const;
274 
275 
282  virtual int setActivePlot( int index, bool redraw );
283 
289  virtual int activePlotIndex () const;
290 
293  virtual void removeDataRep ( hippodraw::DataRep * rep );
294 
297  virtual void setAxisModel ( AxisModelBase * , hippodraw::Axes::Type );
298 
301  virtual void setAutoRanging ( bool flag );
302 
305  virtual void setShowGrid ( bool flag );
306 
309  virtual bool getShowGrid ();
310 
313  virtual void setBoxEdge( bool flag );
314 
317  virtual bool getBoxEdge();
318 
322  virtual void setErrorDisplay ( hippodraw::Axes::Type axis, bool );
323 
327  virtual bool errorDisplay ( hippodraw::Axes::Type axis ) const;
328 
329  virtual void matrixTranspose ( bool yes );
330 
333  virtual void setRepColor ( const Color & );
334 
338  virtual const Color & repColor () const;
339 
347  virtual double getBinWidth (hippodraw::Axes::Type axis) const;
348 
349  virtual void setOffset ( hippodraw::Axes::Type axis, double offset );
350 
354  virtual void setBinWidth ( hippodraw::Axes::Type axis, double width );
355 
357  virtual void reset ();
358 
359  virtual double getOffset (hippodraw::Axes::Type axis) const;
360 
365  virtual int getNumberOfEntries () const;
366 
368  virtual double getPosRange ( hippodraw::Axes::Type axis ) const;
369 
379  virtual void setTransform ( TransformBase * );
380 
382  virtual void setFitsTransform ( const std::string & );
383 
384  virtual void toUserXY ( double mx, double my, bool scaled,
385  double & ux, double & uy ) const;
386 
391  virtual NTuple * createNTuple () const;
392 
405  virtual NTuple * createPickTuple ();
406 
421  virtual void fillPickedPoint ( double mx, double my,
422  std::vector < double > & picked ) const;
423 
425  double processReturnValue ( double retval,
426  hippodraw::Axes::Type axis,
427  bool scaled ) const;
428 
434  virtual void addValues ( const std::vector < double > & v );
435 
436  virtual void update ();
437 
440  virtual void setAutoTicks ( hippodraw::Axes::Type axis, bool yes );
441 
442  virtual void setTicks ( hippodraw::Axes::Type axis,
443  const std::vector < AxisTick > & ticks );
444 
445  virtual bool isTargetable () const;
446  virtual hippodraw::DataRep * getTarget () const;
447  virtual int indexOf ( const hippodraw::DataRep * rep ) const;
448  virtual bool hasAxis ( hippodraw::Axes::Type axis ) const;
449 
452  virtual bool isAxisScaled ( hippodraw::Axes::Type axis ) const;
453 
454  virtual AxisModelBase * getAxisModel ( hippodraw::Axes::Type axis ) const;
455 
460  virtual void setAutoRanging ( hippodraw::Axes::Type axis, bool flag );
461 
462  virtual bool isAutoRanging ( hippodraw::Axes::Type axis ) const;
463 
466  virtual void setReverse ( bool flag );
467 
468  virtual bool isReverse ( ) const;
469 
472  virtual void setLowRange ( hippodraw::Axes::Type axis, int parm,
473  bool dragging );
474 
477  virtual void setHighRange ( hippodraw::Axes::Type axis, int parm,
478  bool dragging );
479 
480  virtual const Range & getRange ( hippodraw::Axes::Type axis,
481  bool scaled ) const;
482  virtual void setScaleFactor ( hippodraw::Axes::Type axis, double factor );
483 
486  virtual void setScaling ( hippodraw::Axes::Type axis, bool on = true );
487 
492  void setTitle ( const std::string & title );
493 
498  const std::string & getTitle () const;
499 
500  virtual void setLabel ( hippodraw::Axes::Type, const std::string & value );
501  virtual const std::string & getLabel ( hippodraw::Axes::Type ) const;
502  virtual const std::string &
503  getInternalLabel ( hippodraw::Axes::Type axis ) const;
504 
505  virtual TransformBase * getTransform () const;
506 
507  virtual TransformBase * getFitsTransform () const;
508 
515  virtual double getAspectRatio () const;
516 
519  bool hasAutoScaled () const;
520 
523  virtual void prepareToDraw ();
524 
527  Rect calcUserRectangle () const;
528 
531  Rect calcRawRectangle() const;
532 
538  virtual void drawProjValues( ViewBase * view );
539 
545  void drawAxisRep ( AxisRepBase * rep, ViewBase * view,
546  bool do_y, bool do_z );
547 
550  virtual void checkAxisScaling ();
551 
554  void setEnableZ ( bool yes );
555 
558  void setAutoScaled ( bool flag = true );
559 
561  void autoScale ( AxisModelBase * model, hippodraw::Axes::Type axis );
562 
566  void fillCutList ( std::vector < const TupleCut * > & cuts ) const;
567 
571  virtual void setCutRangeAt ( const Range & range, unsigned int index );
572 
575  virtual void setMinEntries( int entries );
576 
577 
580  virtual int getMinEntries ();
581 
586  bool isImageConvertable () const;
587 
590  double getScaleFactor ( Axes::Type axis ) const;
591 
592 
593 private:
594 
598  void toggleBoxEdge(DataRep* datarep);
599 
600 
601 };
602 
603 } // namespace hippodraw
604 
605 #endif // _CompositePlotter_H_

Generated for HippoDraw Class Library by doxygen