source: trunk/MagicSoft/Cosy/gui/MGCosy.h@ 2276

Last change on this file since 2276 was 2069, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 2.7 KB
Line 
1#ifndef MGCOSY_H
2#define MGCOSY_H
3
4#ifndef ROOT_TGFrame
5#include <TGFrame.h>
6#endif
7
8#ifndef MARS_MObservatory
9#include "MObservatory.h"
10#endif
11
12#ifndef COSY_MStarList
13#include "MStarList.h"
14#endif
15
16class TIterator;
17
18class TGTab;
19class TGLabel;
20class TGMenuBar;
21class TGTextView;
22class TGPopupMenu;
23class TGLayoutHints;
24class TGCompositeFrame;
25class TGHorizontal3DLine;
26
27class ZdAz;
28class RaDec;
29class MsgQueue;
30
31class MGList;
32class MGImage;
33class MGAccuracy;
34class MGVelocity;
35class MGCoordinates;
36class MGSkyPosition;
37
38class MGCosy : public TGMainFrame
39{
40private:
41 const MObservatory::LocationName_t fObservatory;
42
43 //
44 // Create a main frame with a number of different buttons.
45 //
46 MGList *fList;
47
48 TGLabel *fLabel1;
49 TGLabel *fLabel2;
50 TGLabel *fLabel3;
51
52 TGLabel *fOffsetZd;
53 TGLabel *fOffsetAz;
54
55 TGLabel *fRaEst;
56 TGLabel *fDecEst;
57
58 TGLabel *fRaSoll;
59 TGLabel *fDecSoll;
60
61 TGLabel *fZdSoll;
62 TGLabel *fAzSoll;
63
64 TGLabel *fUtc;
65 TGLabel *fMjd;
66
67 MStarList fStarList;
68
69 MGCoordinates *fCZdAz;
70 MGCoordinates *fCRaDec;
71 MGCoordinates *fCCalib;
72
73 MGSkyPosition *fSkyPosition;
74 MGAccuracy *fAccuracy;
75 MGVelocity *fVelocity;
76 MGVelocity *fOffset;
77
78 MsgQueue *fQueue;
79
80 TGTab *fTab;
81
82 TGLabel *fError;
83 TGLabel *fMoving;
84 TGLabel *fTracking;
85 TGLabel *fStopping;
86 TGLabel *fStopped;
87 TGLabel *fAvailMac1;
88 TGLabel *fAvailMac2;
89 TGLabel *fAvailMac3;
90 TGLabel *fAvailSe1;
91 TGLabel *fAvailSe2;
92 TGLabel *fAvailSe3;
93
94 TGTextView *fLog;
95
96 FontStruct_t fFont;
97
98 void CreateMenu();
99 void CreateLabel(TGCompositeFrame *f);
100 void CreateTabs(TGTab *fTab);
101 void CreatePredefinedPos(TGCompositeFrame *tf1);
102
103 void StartPos();
104 void StartTrack();
105 void StartTrackPos();
106 void StartDemo();
107 //void StartCalib();
108 void StartTPoint();
109
110 void EnableLabel(TGLabel *label, Bool_t stat);
111 void SetLabelColor(TGLabel *label, Bool_t col);
112 void UpdateOffset(ZdAz &off);
113 void UpdateZdAz(ZdAz &off);
114 void UpdateRaDec(ZdAz &pos, double mjd, RaDec &radec);
115 double UpdateTime();
116
117public:
118 MGCosy(MObservatory::LocationName_t key, MsgQueue *q, const TGWindow *p, UInt_t w, UInt_t h);
119 ~MGCosy();
120
121 void CloseWindow();
122
123 TGLabel *GetLabel1() const { return fLabel1; }
124 TGLabel *GetLabel2() const { return fLabel2; }
125 TGLabel *GetLabel3() const { return fLabel3; }
126
127 TGTextView *GetLog() const { return fLog; }
128
129 void Update(ZdAz pos, ZdAz acc, ZdAz vel, ZdAz off, RaDec radec, ZdAz soll, UInt_t stat, UInt_t stat2);
130
131 Bool_t ProcessMessage(Long_t msg, Long_t mp1, Long_t mp2);
132
133 ClassDef(MGCosy, 0)
134};
135
136#endif
137
138
Note: See TracBrowser for help on using the repository browser.