14 #ifndef _AxisModelBase_H_
15 #define _AxisModelBase_H_
112 void startDragging (
bool dragging );
131 void setTickStep(
const double & t_step );
135 double getTickStep()
const;
138 void setFirstTick(
const double & first_tick );
141 double getFirstTick()
const;
144 double getMaxTicks()
const;
147 void setRMag (
const double & rmag );
150 double getRMag()
const;
153 void setPMag(
const double & pmag );
156 double getPMag()
const;
160 void setRange (
double low,
double high,
double pos );
165 void setRange (
const Range &,
bool scaled =
false );
168 void setIntersectRange (
const Range &,
const Range & );
171 void setRangePos (
double );
176 void setUnionRange (
const Range & range );
187 const Range & getRange (
bool scaled )
const;
190 void setAutoRanging (
bool flag );
194 bool isAutoRanging ( )
const;
197 void setScaleFactor (
double );
201 double getScaleFactor ()
const;
206 bool isScaling ()
const;
209 void setScaling (
bool on =
true );
220 virtual bool needPMag ()
const;
223 virtual void setUsePMag(
const bool & use_p_mag );
228 virtual bool isLog()
const = 0;
230 AxisLoc getLabelLocation()
const;
231 AxisLoc getScaleLocation()
const;
234 void setTicks(
const std::vector<AxisTick> & ticks);
239 const std::vector<AxisTick> & getTicks()
const;
249 void setAutoTicks (
bool yes );
254 bool isAutoTicks ()
const;
258 virtual const Range & adjustValues (
const Range & limit ) = 0;
261 virtual const Range & adjustLogValues() = 0;
269 virtual Range calcLow (
int parm,
bool dragging =
false ) = 0;
277 virtual Range calcHigh (
int parm,
bool dragging =
false ) = 0;
283 #endif // _AxisModel_H_
#define MDL_HIPPOPLOT_API
const int m_max_ticks
The maximum number of ticks.
double m_rmag
The value of the power of ten of the range to be used to determine how many decimal places are needed...
bool m_is_dragging
The current dragging state.
std::vector< AxisTick > m_ticks
The list of generated ticks.
std::vector< AxisTick > m_ticks_in_range
Only work for non auto_ticks.
bool m_empty
A flag to indicate whether the range is empty.
Range m_start_range
The starting range before start of dragging events.
bool m_auto_range
The auto-range flag.
double m_first_tick
The position of the first tick.
AxisLoc
The base class for the binner hierarchy.
numeric::array clone(numeric::array arr)
The AxisModelBase class maintains the Range and scaling of an axis.
bool m_scaling_on
If true, the axis is being scaled.
double m_tick_step
The distance between two consecutive ticks.
Range m_scaled_range
The scaled range.
double m_pmag
The value of the power of ten to be used to multiply the tick labels.
bool m_use_pmag
A flag to indicate that one will using scientific notation.
hippodraw::Range class interface
Expresses a range of values.
Range m_range
The current range of the axis.
bool m_auto_ticks
A flag set to true if ticks are being automatically generated.
double m_scale_factor
The scale factor.