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

Last change on this file since 3664 was 2280, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 2.8 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 fPreDefList;
68 MStarList fStarList;
69
70 MGCoordinates *fCZdAz;
71 MGCoordinates *fCRaDec;
72 MGCoordinates *fCCalib;
73
74 MGSkyPosition *fSkyPosition;
75 MGAccuracy *fAccuracy;
76 MGVelocity *fVelocity;
77 MGVelocity *fOffset;
78
79 MsgQueue *fQueue;
80
81 TGTab *fTab;
82
83 TGLabel *fError;
84 TGLabel *fMoving;
85 TGLabel *fTracking;
86 TGLabel *fStopping;
87 TGLabel *fStopped;
88 TGLabel *fAvailMac1;
89 TGLabel *fAvailMac2;
90 TGLabel *fAvailMac3;
91 TGLabel *fAvailSe1;
92 TGLabel *fAvailSe2;
93 TGLabel *fAvailSe3;
94
95 TGTextView *fLog;
96
97 FontStruct_t fFont;
98
99 void CreateMenu();
100 void CreateLabel(TGCompositeFrame *f);
101 void CreateTabs();
102 void CreatePredefinedPos(TGCompositeFrame *tf1);
103 void CreateStarList(TGCompositeFrame *tf1);
104
105 void StartPos();
106 void StartTrack(bool track);
107 void StartTrackPos(Long_t mp1=0);
108 void StartDemo();
109 //void StartCalib();
110 void StartTPoint();
111
112 void EnableLabel(TGLabel *label, Bool_t stat);
113 void SetLabelColor(TGLabel *label, Bool_t col);
114 //void UpdateOffset(ZdAz &off);
115 void UpdateZdAz(ZdAz &off);
116 void UpdateRaDec(ZdAz &pos, double mjd, RaDec &radec);
117 double UpdateTime();
118
119public:
120 MGCosy(MObservatory::LocationName_t key, MsgQueue *q, const TGWindow *p, UInt_t w, UInt_t h);
121 ~MGCosy();
122
123 void CloseWindow();
124
125 TGLabel *GetLabel1() const { return fLabel1; }
126 TGLabel *GetLabel2() const { return fLabel2; }
127 TGLabel *GetLabel3() const { return fLabel3; }
128
129 TGTextView *GetLog() const { return fLog; }
130
131 void Update(ZdAz pos, ZdAz acc, ZdAz vel, /*ZdAz off,*/ RaDec radec, ZdAz soll, UInt_t stat, UInt_t stat2);
132
133 Bool_t ProcessMessage(Long_t msg, Long_t mp1, Long_t mp2);
134
135 ClassDef(MGCosy, 0)
136};
137
138#endif
139
140
Note: See TracBrowser for help on using the repository browser.