FACT++  1.0
void MStarguider::InitGui ( Int_t  channel)
private

Definition at line 74 of file MStarguider.cc.

References IDM_kCaosFilter, IDM_kFilter, IDM_kFindStar, IDM_kInterpol1, IDM_kInterpol10, IDM_kInterpol125, IDM_kInterpol2, IDM_kInterpol25, IDM_kInterpol250, IDM_kInterpol5, IDM_kInterpol50, and IDM_kStretch.

Referenced by MStarguider().

75 {
76  //fList = new MGList;
77  //fList->SetOwner();
78 
79 /*
80  const TGWindow *p=gClient->GetRoot();
81 
82  fChannel = new TGPopupMenu(p);
83  fChannel->AddEntry("Starfield Camera", IDM_kChannel1);
84  fChannel->AddEntry("TPoint Camera", IDM_kChannel2);
85  //fChannel->AddEntry("Read from File", IDM_kChannel3);
86  //if (channel<0)
87  // fChannel->CheckEntry(IDM_kChannel3);
88  //else
89  fChannel->CheckEntry(channel==0?IDM_kChannel1:IDM_kChannel2);
90  fChannel->Associate(this);
91  fList->Add(fChannel);
92 
93  fFileType = new TGPopupMenu(p);
94  fFileType->AddEntry("PP&M", IDM_kPPM);
95  fFileType->AddEntry("&PNG", IDM_kPNG);
96  fFileType->CheckEntry(IDM_kPNG);
97  fFileType->Associate(this);
98  fList->Add(fFileType);
99 
100  fWriteType = new TGPopupMenu(p);
101  fWriteType->AddEntry("&Once", IDM_kOnce);
102  fWriteType->AddEntry("&Continous", IDM_kContinous);
103  fWriteType->CheckEntry(IDM_kOnce);
104  fWriteType->Associate(this);
105  fList->Add(fWriteType);
106 
107  fWriteRate = new TGPopupMenu(p);
108  fWriteRate->AddEntry("25/s", IDM_kRate25ps);
109  fWriteRate->AddEntry("5/s", IDM_kRate5ps);
110  fWriteRate->AddEntry("1s", IDM_kRate1s);
111  fWriteRate->AddEntry("5s", IDM_kRate5s);
112  fWriteRate->AddEntry("30s", IDM_kRate30s);
113  fWriteRate->AddEntry("1min", IDM_kRate1m);
114  fWriteRate->AddEntry("5min", IDM_kRate5m);
115  fWriteRate->CheckEntry(IDM_kRate1m);
116  fWriteRate->Associate(this);
117  fList->Add(fWriteRate);
118 
119  fWrtRate = 25*60;
120 
121  fLimMag = new TGPopupMenu(p);
122  fLimMag->AddEntry("3", IDM_kLimMag3);
123  fLimMag->AddEntry("4", IDM_kLimMag4);
124  fLimMag->AddEntry("5", IDM_kLimMag5);
125  fLimMag->AddEntry("6", IDM_kLimMag6);
126  fLimMag->AddEntry("7", IDM_kLimMag7);
127  fLimMag->AddEntry("8", IDM_kLimMag8);
128  fLimMag->AddEntry("9", IDM_kLimMag9);
129  fLimMag->CheckEntry(IDM_kLimMag9);
130  fLimMag->Associate(this);
131  fList->Add(fLimMag);
132  */
133  //fSao->SetLimitMag(9.0);
134 
135  const TGWindow *p=gClient->GetRoot();
136 
137  fInterpol = new TGPopupMenu(p);
138  fInterpol->AddEntry("250", IDM_kInterpol250);
139  fInterpol->AddEntry("125", IDM_kInterpol125);
140  fInterpol->AddEntry("50", IDM_kInterpol50);
141  fInterpol->AddEntry("25", IDM_kInterpol25);
142  fInterpol->AddEntry("10", IDM_kInterpol10);
143  fInterpol->AddEntry("5", IDM_kInterpol5);
144  fInterpol->AddEntry("2", IDM_kInterpol2);
145  fInterpol->AddEntry("Off", IDM_kInterpol1);
146  fInterpol->Associate(this);
147  //fList->Add(fInterpol);
148 
149  TString disp=gVirtualX->DisplayName();
150  cout << "Display: " << disp << endl;
151  if (disp.First(':')>=0)
152  disp=disp(0, disp.First(':'));
153 
154  if (disp.IsNull() || disp==(TString)"localhost")
155  {
156  fInterpol->CheckEntry(IDM_kInterpol25);
157  fIntRate = 25;
158  }
159  else
160  {
161  fInterpol->CheckEntry(IDM_kInterpol125);
162  fIntRate = 125;
163  }
164 
165 /*
166  fCaosPrint = new TGPopupMenu(p);
167  fCaosPrint->AddEntry("&Leds", IDM_kCaosPrintLeds);
168  fCaosPrint->AddEntry("&Rings", IDM_kCaosPrintRings);
169  fCaosPrint->Associate(this);
170  fList->Add(fCaosPrint);
171 
172  fCaosWrite = new TGPopupMenu(p);
173  fCaosWrite->AddEntry("&Start", IDM_kCaosWriteStart);
174  fCaosWrite->AddEntry("Sto&p", IDM_kCaosWriteStop);
175  fCaosWrite->DisableEntry(IDM_kCaosWriteStop);
176  fCaosWrite->Associate(this);
177  fList->Add(fCaosWrite);
178 
179  fCaosAnalyse = new TGPopupMenu(p);
180  fCaosAnalyse->AddEntry("S&tart Analysis", IDM_kCaosAnalStart);
181  fCaosAnalyse->AddEntry("St&op Analysis", IDM_kCaosAnalStop);
182  fCaosAnalyse->DisableEntry(IDM_kCaosAnalStop);
183  fCaosAnalyse->Associate(this);
184  fList->Add(fCaosAnalyse);
185 */
186  fMenu = new TGMenuBar(this, 0, 0, kHorizontalFrame);
187  fDisplay = fMenu->AddPopup("&Display");
188  //fMode = fMenu->AddPopup("&Mode");
189  //fWritePictures = fMenu->AddPopup("&WritePics");
190  fSetup = fMenu->AddPopup("&Setup");
191  //fOperations = fMenu->AddPopup("&Operations");
192  fMenu->Resize(fMenu->GetDefaultSize());
193  AddFrame(fMenu);
194 
195  //
196  // Create Menu for MStarguider Display
197  //
198  //fDisplay = new MMGPopupMenu(p);
199  fDisplay->AddEntry("&Filter", IDM_kFilter);
200  fDisplay->AddEntry("Stretch", IDM_kStretch);
201  fDisplay->AddSeparator();
202  fDisplay->AddEntry("Find &Star", IDM_kFindStar);
203  fDisplay->AddEntry("C&aos Filter", IDM_kCaosFilter);
204  //fDisplay->AddSeparator();
205  //if (channel>=0)
206  // fDisplay->AddPopup("&Input", fChannel);
207  // fDisplay->CheckEntry(IDM_kStretch);
208  fDisplay->CheckEntry(IDM_kFindStar);
209  fDisplay->CheckEntry(IDM_kCaosFilter);
210  fDisplay->Associate(this);
211 
212  //fMode->AddEntry("Tpoint", IDM_kTpointMode);
213  //fMode->Associate(this);
214 /*
215  fWritePictures->AddEntry("&Start", IDM_kStart);
216  fWritePictures->AddEntry("Sto&p", IDM_kStop);
217  fWritePictures->AddSeparator();
218  //fWritePictures->AddPopup("File &Type", fFileType);
219  fWritePictures->AddPopup("&Write Type", fWriteType);
220  fWritePictures->AddPopup("Write &Rate", fWriteRate);
221  fWritePictures->DisableEntry(IDM_kStop);
222  fWritePictures->Associate(this);
223  */
224  fSetup->AddPopup("Disp. &Interpolation", fInterpol);
225  fSetup->Associate(this);
226 
227 /*
228  fCaOs = new TGPopupMenu(p);
229  //fCaOs->AddPopup("&Write", fCaosWrite);
230  fCaOs->AddPopup("&Print", fCaosPrint);
231  //fCaOs->AddPopup("&Analyse", fCaosAnalyse);
232  fCaOs->Associate(this);
233  fList->Add(fCaOs);
234 */
235  //RA,Dec for catalog
236  /*
237  fCRaDec = new MGCoordinates(this, kETypeRaDec);
238  fCRaDec->Move(4, fMenu->GetDefaultHeight()+584);
239  AddFrame(fCRaDec);
240 
241  //telescope position
242  fCZdAz = new MGCoordinates(this, kETypeZdAz, 2);
243  fCZdAz->Move(240+12+28, fMenu->GetDefaultHeight()+597);
244  AddFrame(fCZdAz);
245 
246  //starguider position
247  fPZdAz = new MGCoordinates(this, kETypeZdAz, 2);
248  fPZdAz->Move(240+12+28, fMenu->GetDefaultHeight()+640);
249  AddFrame(fPZdAz);
250 
251  //mispointing
252  fDZdAz = new MGCoordinates(this, kETypeZdAz, 2);
253  fDZdAz->Move(240+12+28, fMenu->GetDefaultHeight()+683);
254  AddFrame(fDZdAz);
255 
256  fSZdAz = new MGCoordinates(this, kETypeZdAz, 2);
257  fSZdAz->Move(240+12+28, fMenu->GetDefaultHeight()+795);
258  AddFrame(fSZdAz);
259 
260  fGNumStars = new MGNumStars(this, 235);
261  fGNumStars->DrawText("Number of stars");
262  fGNumStars->Move(278, fMenu->GetDefaultHeight()+713);
263  fList->Add(fGNumStars);
264 
265  fTPoint = new TGTextButton(this, "TPoint");
266  //fTPoint->Move(4, fMenu->GetDefaultHeight()+785);
267  fTPoint->Move(170, fMenu->GetDefaultHeight()+785);
268  fTPoint->AllowStayDown(kTRUE);
269  AddFrame(fTPoint);
270 
271  fStargTPoint = new TGTextButton(this, "StargTPoint");
272  fStargTPoint->Move(170, fMenu->GetDefaultHeight()+785);
273  fStargTPoint->AllowStayDown(kTRUE);
274  AddFrame(fStargTPoint);
275 
276  fFps = new TGLabel(this, "---fps");
277  fFps->SetTextJustify(kTextRight);
278  fFps->Move(650-495, fMenu->GetDefaultHeight()+714+23);
279  AddFrame(fFps);
280 
281  fPosZoom = new TGLabel(this, "(----, ----) ----.--d/----.--d");
282  fPosZoom->SetTextJustify(kTextLeft);
283  fPosZoom->Move(4, fMenu->GetDefaultHeight()+765);
284  AddFrame(fPosZoom);
285 
286  fSkyBright = new TGLabel(this, "Sky Brightness: --- ");
287  fSkyBright->SetTextJustify(kTextLeft);
288  fSkyBright->Move(4, fMenu->GetDefaultHeight()+785);
289  AddFrame(fSkyBright);
290 
291  TGLabel *l = new TGLabel(this, "deg");
292  l->SetTextJustify(kTextLeft);
293  l->Move(606-412, fMenu->GetDefaultHeight()+669);
294  AddFrame(l);
295 
296  l = new TGLabel(this, "arcsec/pix");
297  l->SetTextJustify(kTextLeft);
298  l->Move(606-412, fMenu->GetDefaultHeight()+692);
299  AddFrame(l);
300 
301  l = new TGLabel(this, "sigma");
302  l->SetTextJustify(kTextLeft);
303  l->Move(606-412, fMenu->GetDefaultHeight()+715);
304  AddFrame(l);
305 
306  fCZdAzText = new TGLabel(this, "Zd/Az telescope pointing at");
307  fCZdAzText->SetTextJustify(kTextLeft);
308  fCZdAzText->Move(240+12+20+7, fMenu->GetDefaultHeight()+584-5);
309  AddFrame(fCZdAzText);
310 
311  fPZdAzText = new TGLabel(this, "Zd/Az starguider pointing at");
312  fPZdAzText->SetTextJustify(kTextLeft);
313  fPZdAzText->Move(240+12+20+7, fMenu->GetDefaultHeight()+630+20-5-23);
314  AddFrame(fPZdAzText);
315 
316  fDZdAzText = new TGLabel(this, "Zd/Az mispointing");
317  fDZdAzText->SetTextJustify(kTextLeft);
318  fDZdAzText->Move(240+12+20+7, fMenu->GetDefaultHeight()+676+2*20-5-46);
319  AddFrame(fDZdAzText);
320 */
321  // Set input box for rotation angle
322  /*
323  fAngle = new TGTextEntry(this, " ", IDM_kAngle);
324  fAngle->SetAlignment(kTextCenterX);
325  fAngle->Move(547-410, fMenu->GetDefaultHeight()+667);
326  AddFrame(fAngle);
327 
328  //SetRotationAngle(-0.2);
329 
330  // Set input box for pixel size
331  fPixSize = new TGTextEntry(this, " ", IDM_kPixSize);
332  fPixSize->SetAlignment(kTextCenterX);
333  fPixSize->Move(547-410, fMenu->GetDefaultHeight()+690);
334  AddFrame(fPixSize);
335  */
336  //SetPixSize(48.9);
337 
338  // Set input box for cleaning cut
339  //fCut = new TGTextEntry(this, " ", IDM_kCut);
340  //fCut->SetAlignment(kTextCenterX);
341  //fCut->Move(547-410, fMenu->GetDefaultHeight()+713);
342  //AddFrame(fCut);
343 
344  //SetCut(3.0);
345 
346  // TGHorizontal3DLine *fLineSep = new TGHorizontal3DLine(this);
347  // AddFrame(fLineSep, new TGLayoutHints (kLHintsNormal | kLHintsExpandX));
348  // fList->Add(fLineSep);
349 
350  //
351  // Create Image Display
352  /*
353  fZoomImage = new MGImage(this, kZOOM, kZOOM);
354  // fZoomImage->Move(768-kZOOM-2, 700-kZOOM-2);
355  fZoomImage->Move(4, 700-kZOOM-2+85);
356  AddFrame(fZoomImage);
357  */
358  fImage = new MGImage(this, 768, 576);
359  fImage->Move(0, fMenu->GetDefaultHeight());
360  AddFrame(fImage);
361 
362  const Int_t w = 768;
363  const Int_t h = 576;
364  SetWMSizeHints(w, h, w, h, 1, 1); // set the smallest and biggest size of the Main frame
365 
366  //
367  // Make everything visible
368  //
369  SetWindowName("TPoint Main Window");
370  SetIconName("TPoint");
371 
372  MapSubwindows();
373  //fTPoint->UnmapWindow();
374  //fStargTPoint->UnmapWindow();
375  //fGStarg->UnmapWindow();
376  //fGNumStars->UnmapWindow();
377  //fCRaDec->UnmapWindow();
378  //fCZdAz->UnmapWindow();
379  //fCZdAzText->UnmapWindow();
380  //fPZdAz->UnmapWindow();
381  //fPZdAzText->UnmapWindow();
382  //fDZdAz->UnmapWindow();
383  //fDZdAzText->UnmapWindow();
384  //fSZdAz->UnmapWindow();
385  //fSkyBright->UnmapWindow();
386  MapWindow();
387 
388 
389  //IconifyWindow();
390 
391  //------------------------------------------------------------
392  // XY xy(3.819444, 24.05333);
393  // fCRaDec->SetCoordinates(xy);
394  // fRaDec->Set(xy.X()*360/24, xy.Y());
395  //------------------------------------------------------------
396 }
byte fIntRate
Definition: MStarguider.h:54
TGPopupMenu * fSetup
Definition: MStarguider.h:39
TGMenuBar * fMenu
Definition: MStarguider.h:35
MGImage * fImage
Definition: MStarguider.h:36
TGPopupMenu * fDisplay
Definition: MStarguider.h:38
TGPopupMenu * fInterpol
Definition: MStarguider.h:40

+ Here is the caller graph for this function: