source: trunk/MagicSoft/Cosy/tpoint/TPointGui.h@ 9435

Last change on this file since 9435 was 8973, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 2.3 KB
Line 
1#ifndef COSY_TPointGui
2#define COSY_TPointGui
3
4#ifndef ROOT_TGFrame
5#include <TGFrame.h>
6#endif
7
8#ifndef ROOT_TGFileDialog
9#include <TGFileDialog.h>
10#endif
11
12#include "MPointing.h"
13
14class MGList; // To be removed!!!
15class TPointStar;
16
17class TGLabel;
18
19class TPointGui : public TGMainFrame
20{
21private:
22 enum {
23 kTbFit = 1024,
24 kTbLoad,
25 kTbSave,
26 kTbLoadStars,
27 kTbReset,
28 kTbResetStars,
29 kTbReloadStars,
30
31 kIdAzMin,
32 kIdAzMax,
33 kIdZdMin,
34 kIdZdMax,
35 kIdLimit,
36 };
37
38 MGList *fList;
39
40 TList fOriginal;
41 TList fCoordinates;
42 TList fLabel;
43
44 MPointing fBending;
45
46 TString fFileNameStars;
47
48 FontStruct_t fFont;
49
50 Bool_t fExitLoopOnClose;
51
52 Float_t fAzMin;
53 Float_t fAzMax;
54 Float_t fZdMin;
55 Float_t fZdMax;
56
57 Float_t fLimit;
58
59 void Fcn(Int_t &/*npar*/, Double_t */*gin*/, Double_t &f, Double_t *par, Int_t /*iflag*/);
60 static void fcn(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag);
61
62 void AddTextButton(TGCompositeFrame *f, TString txt, Int_t id=-1, TGLayoutHints *h=0);
63 void AddCheckButton(TGCompositeFrame *f, TString txt, Int_t id=-1, TGLayoutHints *h=0);
64 void AddResetButton(TGCompositeFrame *f, Int_t id, TGLayoutHints *h, Int_t height);
65 TGLabel *AddLabel(TGCompositeFrame *f, TString txt, TGLayoutHints *h=0);
66
67 void DisplayBending();
68 void DisplayData();
69 void DisplayResult(Double_t before, Double_t after, Double_t backw);
70
71 void DrawMarker(TVirtualPad *pad, Double_t r0, Double_t phi0);
72 void DrawPolLine(TVirtualPad *pad, Double_t r0, Double_t phi0, Double_t r1, Double_t phi1);
73 void DrawSet(TVirtualPad *pad, TPointStar &set, Float_t scale=-1, Float_t angle=0);
74 void DrawHorizon(TVirtualPad *pad, const char *fname="horizon.dat") const;
75
76 TString OpenDialog(EFileDialogMode mode=kFDOpen);
77
78 void LoadCollection(TString fname);
79 void LoadStars(TString fname="tpoint.txt");
80
81 Bool_t ProcessMessage(Long_t msg, Long_t mp1, Long_t);
82
83 void Fit(Double_t &before, Double_t &after, Double_t &backw);
84
85 Float_t GetFloat(Int_t id) const;
86
87public:
88 TPointGui(const char *fname=NULL, const char *mod=NULL);
89 ~TPointGui();
90
91 void SetExitLoopOnClose(Bool_t b=kTRUE) { fExitLoopOnClose=b; }
92
93 ClassDef(TPointGui, 0)
94};
95
96#endif
Note: See TracBrowser for help on using the repository browser.