ROOT_Application  2.0
C++ Core modules and GUIStock
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TPadStock.h
Go to the documentation of this file.
1 
12 #ifndef _TPADSTOCK_H_
13 #define _TPADSTOCK_H_
14 
15 #include <iostream>
16 #include <TPad.h>
17 
18 // forward declaration
19 class ObjectLine;
20 class THStock;
21 
31 class TPadStock : public TPad {
32 
33  public :
34  TPadStock() : TPad() {
35 #ifdef DEBUG_OBJSTOCK
36  std::cout << "Constructor::TPadStock default" << std::endl;
37 #endif
38  }
48  TPadStock (const char* name, const char* title, Double_t xlow, Double_t ylow, Double_t xup, Double_t yup,
49  Color_t color = -1, Short_t bordersize = -1, Short_t bordermode = -2);
51 #ifdef DEBUG_OBJSTOCK
52  std::cout << "Destructor::TPadStock" << std::endl;
53 #endif
54  }
55 
58  THStock * GetTHStock() const;
59 
66  virtual void AddToTHStock ( ObjectLine * );
67 
78  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
79 
80  //could overload PaintPadFrame ??
81  void PaintPadFrameStock(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax);
82  //virtual void PaintPadFrame(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax);
83 
94  virtual void ExecuteEvent( Int_t event, Int_t px, Int_t py );
95 };
96 #endif /* _TPADSTOCK_H_ */
Derive from TH1 will draw the graph.
Definition: THStock.h:59
void PaintPadFrameStock(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax)
Definition: TPadStock.cxx:124
Overload TPad Because ExecuteEvent not overloaded by CanvasStock.
Definition: TPadStock.h:31
TPadStock()
Definition: TPadStock.h:34
~TPadStock()
Definition: TPadStock.h:50
THStock * GetTHStock() const
Loop over the ListOfPrimitives of TPad.
Definition: TPadStock.cxx:36
virtual void AddToTHStock(ObjectLine *)
Add an ObjectStock to THStock.
Definition: TPadStock.cxx:56
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a box.
Definition: TPadStock.cxx:69
for all ObjectLines
Definition: ObjectLine.h:33
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Called if TPadStock::DistancetoPrimitive return the smallest distance Called only if not candle or an...
Definition: TPadStock.cxx:159