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

Last change on this file since 8948 was 8823, checked in by tbretz, 17 years ago
*** empty log message ***
File size: 2.0 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
32 MGList *fList;
33
34 TList fOriginal;
35 TList fCoordinates;
36 TList fLabel;
37
38 MPointing fBending;
39
40 TString fFileNameStars;
41
42 FontStruct_t fFont;
43
44 Bool_t fExitLoopOnClose;
45
46 void Fcn(Int_t &/*npar*/, Double_t */*gin*/, Double_t &f, Double_t *par, Int_t /*iflag*/);
47 static void fcn(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag);
48
49 void AddTextButton(TGCompositeFrame *f, TString txt, Int_t id=-1, TGLayoutHints *h=0);
50 void AddCheckButton(TGCompositeFrame *f, TString txt, Int_t id=-1, TGLayoutHints *h=0);
51 void AddResetButton(TGCompositeFrame *f, Int_t id, TGLayoutHints *h, Int_t height);
52 TGLabel *AddLabel(TGCompositeFrame *f, TString txt, TGLayoutHints *h=0);
53
54 void DisplayBending();
55 void DisplayData();
56 void DisplayResult(Double_t before, Double_t after, Double_t backw);
57
58 void DrawMarker(TVirtualPad *pad, Double_t r0, Double_t phi0);
59 void DrawPolLine(TVirtualPad *pad, Double_t r0, Double_t phi0, Double_t r1, Double_t phi1);
60 void DrawSet(TVirtualPad *pad, TPointStar &set, Float_t scale=-1, Float_t angle=0);
61 void DrawHorizon(TVirtualPad *pad, const char *fname="horizon.dat") const;
62
63 TString OpenDialog(EFileDialogMode mode=kFDOpen);
64
65 void LoadCollection(TString fname);
66 void LoadStars(TString fname="tpoint.txt");
67
68 Bool_t ProcessMessage(Long_t msg, Long_t mp1, Long_t);
69
70 void Fit(Double_t &before, Double_t &after, Double_t &backw);
71
72public:
73 TPointGui(const char *fname=NULL);
74 ~TPointGui();
75
76 void SetExitLoopOnClose(Bool_t b=kTRUE) { fExitLoopOnClose=b; }
77
78 ClassDef(TPointGui, 0)
79};
80
81#endif
Note: See TracBrowser for help on using the repository browser.