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

Last change on this file since 5059 was 4104, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 3.1 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;
30class MCeCoCom;
31
32class MGList;
33class MGImage;
34class MGAccuracy;
35class MGAccuracyTime;
36class MGVelocity;
37class MGCoordinates;
38class MGSkyPosition;
39
40class MGCosy : public TGMainFrame
41{
42private:
43 const MObservatory::LocationName_t fObservatory;
44
45 //
46 // Create a main frame with a number of different buttons.
47 //
48 MGList *fList;
49
50 TGLabel *fLabel1;
51 TGLabel *fLabel2;
52 TGLabel *fLabel3;
53
54 // TGLabel *fOffsetZd;
55 // TGLabel *fOffsetAz;
56
57 TGLabel *fRaEst;
58 TGLabel *fDecEst;
59
60 TGLabel *fRaSoll;
61 TGLabel *fDecSoll;
62
63 TGLabel *fZdSoll;
64 TGLabel *fAzSoll;
65
66 TGLabel *fUtc;
67 TGLabel *fMjd;
68
69 TGLabel *fWeather;
70
71 MStarList fPreDefList;
72 MStarList fStarList;
73
74 MGCoordinates *fCZdAz;
75 MGCoordinates *fCRaDec;
76 MGCoordinates *fCCalib;
77
78 MGSkyPosition *fSkyPosition;
79 MGAccuracy *fAccuracy;
80 //MGAccuracyTime *fAccuracyTime;
81 MGVelocity *fVelocity;
82 MGVelocity *fOffset;
83
84 MGImage *fImage;
85
86 MsgQueue *fQueue;
87
88 TGTab *fTab;
89
90 TGLabel *fError;
91 TGLabel *fMoving;
92 TGLabel *fTracking;
93 TGLabel *fStopping;
94 TGLabel *fStopped;
95 TGLabel *fAvailMac1;
96 TGLabel *fAvailMac2;
97 TGLabel *fAvailMac3;
98 TGLabel *fAvailSe1;
99 TGLabel *fAvailSe2;
100 TGLabel *fAvailSe3;
101
102 TGTextView *fLog;
103
104 FontStruct_t fFont;
105
106 void CreateMenu();
107 void CreateLabel(TGCompositeFrame *f);
108 void CreateTabs();
109 void CreatePredefinedPos(TGCompositeFrame *tf1);
110 void CreateStarList(TGCompositeFrame *tf1);
111
112 void StartPos();
113 void StartTrack(bool track);
114 void StartTrackPos(Long_t mp1=0);
115 void StartDemo();
116 //void StartCalib();
117 void StartTPoint();
118
119 void EnableLabel(TGLabel *label, Bool_t stat);
120 void SetLabelColor(TGLabel *label, Bool_t col);
121 //void UpdateOffset(ZdAz &off);
122 void UpdateZdAz(ZdAz &off);
123 void UpdateRaDec(ZdAz &pos, double mjd, RaDec &radec);
124 double UpdateTime();
125
126public:
127 MGCosy(MObservatory::LocationName_t key, MsgQueue *q, const TGWindow *p, UInt_t w, UInt_t h);
128 ~MGCosy();
129
130 void CloseWindow();
131
132 TGLabel *GetLabel1() const { return fLabel1; }
133 TGLabel *GetLabel2() const { return fLabel2; }
134 TGLabel *GetLabel3() const { return fLabel3; }
135
136 TGTextView *GetLog() const { return fLog; }
137 MGImage *GetImage() { return fImage; }
138
139 void Update(ZdAz pos, ZdAz acc, ZdAz vel, /*ZdAz off,*/ RaDec radec, ZdAz soll, UInt_t stat, UInt_t stat2);
140 void UpdateWeather(const MCeCoCom &com);
141
142 Bool_t ProcessMessage(Long_t msg, Long_t mp1, Long_t mp2);
143
144 ClassDef(MGCosy, 0)
145};
146
147#endif
148
149
Note: See TracBrowser for help on using the repository browser.