00001
00002
00014 #ifndef _CutPlotter_H_
00015 #define _CutPlotter_H_
00016
00017 #include "XyPlotter.h"
00018
00019 namespace hippodraw {
00020
00021 class Color;
00022 class DataSource;
00023 class TupleCut;
00024 class PointRepBase;
00025
00043 class MDL_HIPPOPLOT_API CutPlotter: public XyPlotter
00044 {
00045
00046 protected:
00047
00050 CutPlotter ( const std::string & name );
00051
00054 typedef std::list < hippodraw::DataRep * > TargetList_t;
00055
00058 TargetList_t m_targets;
00059
00062 hippodraw::DataRep * m_datarep;
00063
00066 void updateTargets ();
00067
00069 void removeFromTargets ( );
00070
00071 public:
00072
00074 CutPlotter ( );
00075
00077 CutPlotter ( const CutPlotter & plotter );
00078
00080 virtual ~CutPlotter ();
00081
00089 void addCutTarget ( DataRep * rep );
00090
00092 bool isTarget ( DataRep * ) const;
00093
00095 const std::list < DataRep * > & getCutTargets () const;
00096
00098 void removeFromTarget ( DataRep * rep );
00099
00105 virtual void willDelete ( const Observable * observable );
00106
00109 const std::vector < TupleCut > & getCuts () const;
00110
00113 void setCuts ( const std::vector < const TupleCut * > & cuts );
00114
00116 virtual bool hasNTupleBindings () const;
00117
00119 void clearCutTargets ();
00120
00123 virtual void setAxisBinding ( const std::vector < std::string > & bindings );
00124
00126 void setCutColor ( const Color & );
00127
00129 const Color & getCutColor () const;
00130
00132 virtual void setCutRangeAt ( const Range & range, unsigned int index );
00133
00139 virtual void setCutRange ( double low, double high );
00140
00146 virtual void setCutRangeFull () = 0;
00147
00152 void setActive ( bool yes );
00153
00155 void setNTuple ( const DataSource * ntuple );
00156
00158 virtual void toggleInverted ( ) = 0;
00159
00162 void setEnabled ( bool yes = true );
00163
00168 virtual void update ( const Observable * object );
00169
00171 virtual void addTupleCut ( DataRep * rep );
00172
00176 virtual bool isImageConvertable () const;
00177
00178 };
00179
00180 }
00181
00182 #endif // _CutPlotter_H_