13 #ifndef _OBJECTLINE_H_
14 #define _OBJECTLINE_H_
55 void InitLine(
double x0,
double y0,
double x1,
double y1 );
59 virtual std::vector<float>
GetValues(
int px,
int py, time_t &date )
const;
70 ObjectLine(
double x0,
double y0,
double x1,
double y1 );
74 std::cout <<
"Destructor ObjectLine" << std::endl;
107 virtual void SetValues(
unsigned int, std::vector<double>,
double,
double, time_t, UInt_t=0) {}
143 #ifdef DEBUG_OBJSTOCK
144 std::cout <<
"ObjectLine::Resize to nothing" << std::endl;
158 virtual void Paint(
const Option_t* =
"");
198 #ifdef DEBUG_OBJSTOCK
199 std::cout <<
"ObjectLineIndicator::ClearObjectStock, do nothing " << std::endl;
208 #ifdef DEBUG_OBJSTOCK
209 std::cout <<
"ObjectLineIndicator::ExecuteEvent, do nothing " << std::endl;
273 void SetOrigin (
double & x,
double & y );
297 #ifdef DEBUG_OBJSTOCK
298 std::cout <<
"ObjectLineTendance::ClearObjectStock" << std::endl;
302 void virtual Paint(
const Option_t* =
"");
306 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py);
317 #endif //_OBJECTLINE_H_
virtual Int_t GetModeLine() const
double coeff_d
most general for drawing a line, y = ax + b and moving as well, rotate a, translate b ! a and b not f...
virtual void SetLineStyle(Style_t lstyle)
virtual Color_t GetLineColor() const
virtual void ClearObjectStock()
general function called when drawing
virtual std::string GetNameObject() const
pure-virtual access
time_t GetTimeBegin() const
ObjectLineIndicator()
constructors
virtual TypeLine GetTypeLine() const
virtual void SetModekLine()
virtual std::vector< float > GetValues(int px, int py, time_t &date) const
used by MakeStringForStatusBar only base in ObjectLine should be very simple
virtual void GetExtrema(double &, double &) const
virtual void SetObjectStock(ListDataStockBase *, CommonXAxis *, Hparam_stock_t &)
implements a easy way for this case only set to xmin xmax
time_t GetTimeEnd() const
ClassDef(ObjectLineIndicator, 1)
ModeLine fModeLine
kLine, kSegment, kHalfSegment0, kHalfSegment1
Define Base classes for ObjectStock.
virtual void ExecuteEvent(Int_t, Int_t, Int_t)
virtual bool IsHalfLine1()
virtual bool IsTendance() const
double valueY0
save initial values, y's overridden if Lines Y initial values , no overloaded by line->SetY, here stay constant associated to fbin_begin/fend
virtual Style_t GetLineStyle() const
TLine * fline
use composition TLine*, valable for all derived class
void SetBins(Int_t bin_x0, Int_t bin_x1)
virtual ~ObjectLineIndicator()
virtual void SetValues(unsigned int, std::vector< double >, double, double, time_t, UInt_t=0)
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py, AbstractObjectStock **obj)
virtual Width_t GetLineWidth() const
virtual void SetLineWidth(Width_t lwidth)
virtual void SetModekHalfLine2()
void InitCoeff_origin(double x0, double x1, double y0, double y1)
virtual void SetNameObject(std::string &name)
virtual void SetModekSegment()
void SetCoeffD(double &new_coeff)
virtual void Paint(const Option_t *="")
Paint the objet, to overide.
virtual void MoveObjectLine(bool kdir)
pass the direction ( positive, negative ) to extend
double GetCoeffD() const
member functions specific
void SetTimeT1(time_t end)
virtual std::vector< std::string > MakeStringForStatusBar(int px, int py) const
specific output for ObjectLineIndicator
double GetX0() const
wrapper functions to fline, need public for all ??
virtual void ExecuteEvent(Int_t, Int_t, Int_t)
virtual ~ObjectLineTendance()
virtual void SetObjectStock(ListDataStockBase *, CommonXAxis *, Hparam_stock_t &)
used for from the listdata
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Make all drawable modification, move by mouse and arrow.
void SetBinEnd(Int_t bin_x1)
virtual bool IsSupport() const
void InitLine(double x0, double y0, double x1, double y1)
virtual void ClearObjectStock()
for the moment do nothing
virtual void Paint(const Option_t *="")
Paint the objet, to overide.
virtual void SetLineColor(Color_t color)
virtual void SetTimes(time_t begin, time_t end)
time_t ftbegin
set up once fbegin/fend, for update/save may be used
TypeLine fTypeLine
TypeLine, enum : kNone, kSupport, kTendance, kFibo.
virtual double GetXBorder(double y) const
specific for extrapolation return X value where border is crossed
void SetOrigin(double &x, double &y)
virtual double ExtrapolateYPad(double) const
extrapolate y fom line equation
virtual void Resize(unsigned int)
void SetBinBegin(Int_t bin_x0)
Used for free drawing of support/tendance Add a general line description with coeef_d and origin : y ...
virtual std::vector< std::string > MakeStringForStatusBar(int px, int py) const
create the string for the StatusBar
void FinaliseDrawableLine(CommonXAxis *fcommon_xaxis_th)
set up all data member after drawing.
Abstract base class for the ListDataStock, for storing base pointers in vectors.
virtual void SetObjectStock(ListDataStockBase *, CommonXAxis *, Hparam_stock_t &)
used for from the listdata
std::string name_line
add a name, absent in AbstractObjectStock
virtual int DistancetoPoint(int, int, double &, int=-1) const
called by THStock for anchoring.
virtual ~ObjectLine()
destructor, should delete TLine explicitely
void SetTimeT0(time_t begin)
ClassDef(ObjectLineTendance, 1)
virtual bool IsHalfLine2()
virtual void SetModekHalfLine1()
Define an abstract base class for all objects to be painted in a THStock.
Int_t GetBinBegin() const
virtual void GetExtrema(double &min, double &max) const
return a constant value, could be in base ObjectLine
TypeLine
c++ 11 style, used by both EditorObjectStock and ObjectLine cannot make dictionary with enum class ! ...
Line for drawing with indicator, eg, RSI 30-70 Could be in Collection or in THStock They are fixed : ...
void RecalcCoeff_origin(double x0, double x1)
mathematical functions
ObjectLineTendance()
default constructor
int fbin_begin
memorize bin_x0, bin_x1, easier with slide