00001
00002
00003
00004
00005
00006 #ifndef __BDSPad__
00007 #define __BDSPad__
00008
00009 #ifndef ROOT_TClass
00010 #include "TClass.h"
00011 #endif
00012
00013 #ifndef ROOT_TPad
00014 #include "TPad.h"
00015 #endif
00016 #include "parser/gmad.h"
00017
00018 #ifndef ROOT_TClassMenuItem
00019 #include "TClassMenuItem.h"
00020 #endif
00021
00022 #ifndef ROOT_TList
00023 #include "TList.h"
00024 #endif
00025
00026 #define MAX 1000
00027 class BDSCanvas;
00028 class BDSAxis;
00029 class BDSPad : public TPad
00030 {
00031 public:
00032 BDSPad(BDSCanvas *_browser,const char* name, const char* title, Double_t xlow, Double_t ylow,
00033 Double_t xup, Double_t yup, Color_t color);
00034 ~BDSPad();
00035
00036 BDSAxis* GetAxis(){return axis;}
00037
00038 static Double_t get_xmin_axis(){return xmin_axis;}
00039 static Double_t get_xmax_axis(){return xmax_axis;}
00040
00041 void BDSPad::ExecuteEvent(Int_t event, Int_t px, Int_t py);
00042 void UnZoom();
00043 void AddBDSBox(Element _item, Double_t s);
00044 void Begin();
00045 void End();
00046 void UpdateLine(Double_t xmin, Double_t xmax);
00047
00048 void BoxClicked();
00049 static Double_t xmin_axis;
00050 static Double_t xmax_axis;
00051
00052 private:
00053 BDSCanvas *browser;
00054 BDSAxis *axis;
00055 Double_t xmin, xmax;
00056 Int_t px1old, py1old, px2old, py2old;
00057
00058 Int_t i;
00059
00060 TList box_list;
00061 TList *li_line;
00062 TClassMenuItem *n_line;
00063 TClass *cl_line;
00064
00065 public:
00066 ClassDef(BDSPad,1)
00067 };
00068 #endif