Changeset 959 for trunk/MagicSoft/Mars/mmain/MMars.cc
- Timestamp:
- 10/02/01 14:46:56 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mmain/MMars.cc
r949 r959 34 34 #include <TG3DLine.h> // TGHorizontal3DLine 35 35 // use TGSplitter.h for root<3.00 36 37 36 #include "MEvtDisp.h" 38 37 #include "MAnalysis.h" 39 38 #include "MDataCheck.h" 40 39 #include "MMonteCarlo.h" 41 42 #include "MGPrototyp.h" 40 #include "MCameraDisplay.h" 43 41 44 42 ClassImp(MMars) 45 43 46 44 enum { 47 M_FILE_EXIT, 48 M_FILE_ABOUT, 49 50 M_PICTURE_MAGIC, 51 M_PICTURE_MARS, 52 53 M_BUTTON_EVTDISP, 54 M_BUTTON_DATACHECK, 55 M_BUTTON_ANALYSE, 56 M_BUTTON_MONTECARLO 45 M_FILE_EXIT, 46 M_FILE_ABOUT, 47 48 M_PICTURE_MAGIC, 49 M_PICTURE_MARS, 50 51 M_BUTTON_EVTDISP, 52 M_BUTTON_DATACHECK, 53 M_BUTTON_ANALYSE, 54 M_BUTTON_MONTECARLO, 55 M_BUTTON_CAMDISPLAY 57 56 }; 58 57 … … 97 96 mars->Associate(this); 98 97 99 TGLayoutHints *lay1 = new TGLayoutHints(kLHintsLeft, 10., 10., 20., 10.);100 TGLayoutHints *lay2 = new TGLayoutHints(kLHints Left, 10., 10., 10., 10.);98 TGLayoutHints *lay1 = new TGLayoutHints(kLHintsLeft, 10., 10., 20., 10.); 99 TGLayoutHints *lay2 = new TGLayoutHints(kLHintsRight, 10., 10., 10., 10.); 101 100 102 101 fList->Add(lay1); … … 105 104 top->AddFrame(magic, lay1); 106 105 top->AddFrame(mars, lay2); 106 } 107 108 void MMars::CreateTextButton(TGVerticalFrame *tab, const char *text, 109 const UInt_t id, TGLayoutHints *hints) const 110 { 111 // 112 // Create the button 113 // 114 TGTextButton *button = new TGTextButton(tab, text, id); 115 116 // 117 // Add button for 'auto-delete' 118 // 119 fList->Add(button); 120 121 // 122 // Send button events (meesages) to this object (s. ProcessMessage) 123 // 124 button->Associate(this); 125 126 // 127 // Add button with corresponding layout to containing frame 128 // 129 tab->AddFrame(button, hints); 107 130 } 108 131 … … 136 159 tf->AddFrame(tab2, laytabx); 137 160 138 TGTextButton *evtdisp = new TGTextButton(tab2, "EventDisplay", M_BUTTON_EVTDISP); 139 TGTextButton *datacheck = new TGTextButton(tab2, "Data Check", M_BUTTON_DATACHECK); 140 TGTextButton *analysis = new TGTextButton(tab2, "Analysis", M_BUTTON_ANALYSE); 141 TGTextButton *montecarlo = new TGTextButton(tab2, "MonteCarlo", M_BUTTON_MONTECARLO); 142 143 fList->Add(evtdisp); 144 fList->Add(datacheck); 145 fList->Add(analysis); 146 fList->Add(montecarlo); 147 148 evtdisp ->Associate(this); 149 datacheck ->Associate(this); 150 analysis ->Associate(this); 151 montecarlo->Associate(this); 152 153 TGLayoutHints *laybut = new TGLayoutHints(kLHintsTop|kLHintsCenterX , 10, 10, 10, 10); 161 TGLayoutHints *laybut = new TGLayoutHints(kLHintsTop|kLHintsCenterX, 10, 10, 10, 10); 154 162 fList->Add(laybut); 155 163 156 tab2->AddFrame(evtdisp, laybut); 157 tab2->AddFrame(datacheck, laybut); 158 tab2->AddFrame(analysis, laybut); 159 tab2->AddFrame(montecarlo, laybut); 164 CreateTextButton(tab2, "Event Display", M_BUTTON_EVTDISP, laybut); 165 CreateTextButton(tab2, "Data Check", M_BUTTON_DATACHECK, laybut); 166 CreateTextButton(tab2, "Analysis", M_BUTTON_ANALYSE, laybut); 167 CreateTextButton(tab2, "Monte Carlo", M_BUTTON_MONTECARLO, laybut); 168 CreateTextButton(tab2, "Camera Display", M_BUTTON_CAMDISPLAY, laybut); 160 169 } 161 170 162 171 MMars::MMars(/*const TGWindow *p,*/ UInt_t w, UInt_t h) 163 : TGMainFrame(gClient->GetRoot(), w, h) 172 : TGMainFrame(gClient->GetRoot(), w, h) 173 //: MBrowser (gClient->GetRoot(), gClient->GetRoot(), w, h) 164 174 { 165 175 // … … 196 206 AddFrame(low, layout); 197 207 208 // CreateTopFrame(fTop2); 209 // CreateBottomFrame(fTop3); 210 198 211 // 199 212 // Map the window, set up the layout, etc. 200 213 // 201 SetWMSizeHints(400, 380, 400, 380, 10, 10); // set the smallest and biggest size of the Main frame214 SetWMSizeHints(400, 410, 400, 410, 10, 10); // set the smallest and biggest size of the Main frame 202 215 203 216 MapSubwindows(); … … 271 284 return kTRUE; 272 285 286 case M_BUTTON_CAMDISPLAY: 287 new MCameraDisplay(this); 288 return kTRUE; 289 273 290 case M_PICTURE_MAGIC: 274 DisplWarning("Please open a Netscape to the MAGIC homepage"); 291 DisplWarning("Please open a Netscape to the MAGIC homepage\n" 292 "http://hegra1.mppmu.mpg.de/MAGICWeb/"); 275 293 return kTRUE; 276 294 277 295 case M_PICTURE_MARS: 278 DisplWarning("Please open a Netscape to the MARS homepage ");279 return kTRUE;280 296 DisplWarning("Please open a Netscape to the MARS homepage\n" 297 "http://magic.uni-sw.gwdg.de/mars/"); 298 return kTRUE; 281 299 } 282 300
Note:
See TracChangeset
for help on using the changeset viewer.