Changeset 587 for trunk/MagicSoft/Mars
- Timestamp:
- 01/23/01 10:43:18 (24 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r586 r587 1 1 -*-*- END -*-*- 2 3 2000/01/23: Harald Kornmayer 4 5 * the integration of the class FadcDisp in the mars enviroment 6 and further developments in the display 7 8 changed: 9 meventdisp/MGFadcDisp.h 10 meventdisp/MGFadcDisp.cc 11 mgui/GuiIncl.h 12 mgui/GuiLinkDef.h 13 mgui/MGMarsMain.cc 14 mgui/MGPrototyp.cc 15 mgui/MGPrototyp.h 16 mgui/Makefile 17 18 added: 19 mgui/MGEventDispMain.h 20 mgui/MGEventDispMain.cc 21 22 2 23 2000/01/22: Harald Kornmayer 3 24 -
trunk/MagicSoft/Mars/meventdisp/MGFadcDisp.cc
r586 r587 83 83 fTop2->AddFrame( fLabelEvtNr, new TGLayoutHints (kLHintsLeft, 10, 10, 10, 10)) ; 84 84 85 fTxtEvtNr = new TGTextEntry(fTop2, fTxtBufEvtNr = new TGTextBuffer(100), 9999);85 fTxtEvtNr = new TGTextEntry(fTop2, fTxtBufEvtNr = new TGTextBuffer(100), M_EVTNUMBER); 86 86 fTxtEvtNr->Resize(60, fTxtEvtNr->GetDefaultHeight()); 87 fTxtEvtNr->Associate(this) ; 87 88 fTop2->AddFrame(fTxtEvtNr, new TGLayoutHints(kLHintsTop | kLHintsLeft, 88 89 5, 5, 5, 5)); … … 171 172 172 173 173 fButtonPrint = new TGTextButton(fFrameLow, "Print", 9999) ; 174 fButtonPrint = new TGTextButton(fFrameLow, "Print", M_PRINT) ; 175 fButtonPrint->Associate(this) ; 174 176 fFrameLow->AddFrame( fButtonPrint, new TGLayoutHints(kLHintsLeft , 10, 10, 10, 10 ) ) ; 175 177 176 fButtonClose = new TGTextButton(fFrameLow, "Close", 9999) ; 178 fButtonClose = new TGTextButton(fFrameLow, "Close", M_CLOSE) ; 179 fButtonClose->Associate(this) ; 177 180 fFrameLow->AddFrame( fButtonClose, new TGLayoutHints(kLHintsLeft, 10, 10, 10, 10 ) ) ; 178 181 … … 210 213 MGFadcDisp::~MGFadcDisp() 211 214 { 215 // close the file 216 217 readin->PostProcess() ; 218 219 delete runheader ; 220 delete evtheader ; 221 delete evttime ; 222 delete evtdata ; 223 delete evtcrate ; 224 225 delete plist ; 226 227 delete readin ; 228 229 // destruct the graphical members 212 230 213 231 delete fButtonPrint ; 214 232 delete fButtonClose ; 215 216 delete fCan ;233 234 // delete fCan ; 217 235 delete fECanDigScope ; 218 236 delete fTabDisplay ; 219 237 220 238 delete fPixSlider ; 221 239 delete fButtonPrevPix ; … … 224 242 delete fPixelList; 225 243 delete fTabControl ; 226 244 227 245 delete fLabelEvtNr ; 228 246 delete fLabelTotNr ; 247 //delete fTxtBufEvtNr ; 229 248 delete fTxtEvtNr ; 230 delete fTxtBufEvtNr ;231 249 delete fButtonNextEvt ; 232 250 delete fButtonPrevEvt ; … … 237 255 delete fTop2 ; 238 256 delete fTop1 ; 239 257 240 258 delete fFrameLow ; 241 259 delete fLineSep2 ; … … 246 264 247 265 266 void MGFadcDisp::CloseWindow() 267 { 268 // Got close message for this MainFrame. Calls parent CloseWindow() 269 // (which destroys the window) and terminate the application. 270 // The close message is generated by the window manager when its close 271 // window menu item is selected. 272 273 delete this ; 274 } 275 276 248 277 void MGFadcDisp::CreatePixelList() { 249 278 // … … 260 289 redraw = fPixelList->GetSelected() ; 261 290 262 cout << "redraw: " << redraw << endl ;263 264 291 fPixelList->RemoveEntries(0, fPixelsinList) ; 265 292 fPixelsinList = 0 ; … … 338 365 "The event number is out of range!!!", 339 366 kMBIconExclamation, buttons, &retval); 367 UpdateEventCounter() ; 340 368 return ; 341 369 } … … 364 392 //------------------------------------------------------------------ 365 393 char wortdummy[256] ; 394 Int_t buttons = 4, retval = 0 ; 366 395 367 396 switch(GET_MSG(msg)) … … 387 416 388 417 break; 418 419 420 case M_PRINT: 421 new TGMsgBox(fClient->GetRoot(), this, 422 "INFORMATION!", 423 "Your are invited to program that!!", 424 kMBIconExclamation, buttons, &retval); 389 425 426 break ; 427 case M_CLOSE: 428 429 CloseWindow() ; 430 break; 431 390 432 } 391 433 … … 410 452 411 453 } 454 455 case kC_TEXTENTRY: 456 457 switch(GET_SUBMSG(msg)) 458 { 459 case kTE_TEXTCHANGED: 460 461 break ; 462 case kTE_ENTER: 463 464 sprintf(wortdummy, "%s", fTxtEvtNr->GetText()) ; 465 cout << wortdummy<< endl ; 466 467 cout << atoi(wortdummy) << endl ; 468 469 470 ReadinEvent( atoi(wortdummy) ) ; 471 472 break; 473 } 474 475 break; 476 412 477 default: 413 478 break; -
trunk/MagicSoft/Mars/meventdisp/MGFadcDisp.h
r586 r587 34 34 M_PIXELLIST = 4201 , 35 35 M_PREVEVT, 36 M_NEXTEVT 36 M_NEXTEVT, 37 M_EVTNUMBER, 38 39 M_PREVPIXEL, 40 M_NEXTPIXEL, 41 42 M_PRINT, 43 M_CLOSE 37 44 38 45 … … 104 111 ~MGFadcDisp() ; 105 112 113 void CloseWindow() ; 114 106 115 void CreatePixelList() ; 107 116 void UpdateEventCounter() ; -
trunk/MagicSoft/Mars/mgui/GuiIncl.h
r461 r587 9 9 #include <TGSplitter.h> // TGHorizontal3DLine 10 10 #include <TGFSContainer.h> // TGFileContainer 11 #include <TGLabel.h> // TGLabel 12 #include <TGTextEntry.h> 13 11 14 12 15 #endif // __CINT__ -
trunk/MagicSoft/Mars/mgui/GuiLinkDef.h
r571 r587 6 6 7 7 #pragma link C++ class MGMarsMain; 8 #pragma link C++ class MGEventDispMain; 8 9 #pragma link C++ class MGDataCheckMain; 9 10 #pragma link C++ class MGMonteCarloMain; -
trunk/MagicSoft/Mars/mgui/MGMarsMain.cc
r571 r587 9 9 #include <TGSplitter.h> // TGHorizontal3DLine 10 10 11 #include "MGEventDispMain.h" 11 12 #include "MGDataCheckMain.h" 12 13 #include "MGMonteCarloMain.h" … … 193 194 194 195 case M_BUTTON_EVTDISP: 195 196 new TGMsgBox(fClient->GetRoot(), this, 197 "WARNING!", 198 "EventDisplay not yet implemented!", 199 kMBIconExclamation, buttons, &retval); 196 197 new MGEventDispMain (fClient->GetRoot(), this, 400, 650 ) ; 200 198 break ; 201 199 … … 205 203 206 204 case M_BUTTON_ANALYSE: 207 new TGMsgBox(fClient->GetRoot(), this, 205 //new MGPrototyp(fClient->GetRoot(), this, 400, 650 ) ; 206 207 new TGMsgBox(fClient->GetRoot(), this, 208 208 "WARNING!", 209 209 "Analysis not yet implemented!", -
trunk/MagicSoft/Mars/mgui/MGPrototyp.cc
r571 r587 9 9 #include <TGListBox.h> // TGListBox 10 10 #include <TGFSContainer.h> // TGFileContainer 11 #include <TGSplitter.h> // TGHorizontal3DLine 12 #include <TGTextEntry.h> 13 #include <TGLabel.h> // TGLabel 14 11 15 12 16 // FIXME: Move to MAGIC.h … … 15 19 ClassImp(MGPrototyp) 16 20 17 enum Command DataChecker{21 enum CommandPrototyp { 18 22 M_FILE_CLOSE , 19 23 M_BUTTON_ACTION, 20 24 25 M_FILERESET, 21 26 M_PBUTTON_CDIR_UP, 22 27 M_PBUTTON_LIST_MODE, … … 58 63 AddFrame(fMenuBar, fLayMenuBar ) ; 59 64 65 fLineSep1 = new TGHorizontal3DLine(this) ; 66 AddFrame(fLineSep1, new TGLayoutHints(kLHintsTop | kLHintsExpandX) ); 67 68 60 69 // 61 70 // Create the top window with a lot of buttons … … 74 83 AddFrame(fFrameTop, new TGLayoutHints (kLHintsTop ) ) ; 75 84 85 // a line between top and low frame 86 87 fLineSep2 = new TGHorizontal3DLine(this) ; 88 AddFrame(fLineSep2, new TGLayoutHints(kLHintsTop | kLHintsExpandX) ); 76 89 77 90 // … … 92 105 // tf->AddFrame(fTabF1, fLayTab ) ; 93 106 94 95 107 fTabF1a = new TGCompositeFrame (tf, 100, 100, kHorizontalFrame) ; 96 108 tf->AddFrame(fTabF1a, new TGLayoutHints ( kLHintsTop | kLHintsLeft | kLHintsExpandX, 5, 5, 5, 5 ) ) ; 97 109 98 fTabF1b = new TGCompositeFrame (tf, 100, 100, kVerticalFrame) ; 99 // tf->AddFrame(fTabF1b, new TGLayoutHints ( kLHintsTop | kLHintsLeft | kLHintsExpandX | kLHintsExpandY , 5, 5, 5, 5 ) ) ; 100 tf->AddFrame(fTabF1b, new TGLayoutHints ( kLHintsExpandX | kLHintsExpandY , 5, 5, 5, 5 ) ) ; 101 102 103 fDir = new TGListBox(fTabF1a, -1) ; 110 fTabF1b = new TGCompositeFrame (tf, 100, 100, kHorizontalFrame) ; 111 tf->AddFrame(fTabF1b, new TGLayoutHints ( kLHintsTop | kLHintsLeft | kLHintsExpandX, 5, 5, 5, 5 ) ) ; 112 113 fTabF1c = new TGCompositeFrame (tf, 100, 100, kVerticalFrame) ; 114 // tf->AddFrame(fTabF1c, new TGLayoutHints ( kLHintsTop | kLHintsLeft | kLHintsExpandX | kLHintsExpandY , 5, 5, 5, 5 ) ) ; 115 tf->AddFrame(fTabF1c, new TGLayoutHints ( kLHintsExpandX | kLHintsExpandY , 5, 5, 5, 5 ) ) ; 116 117 // the items in the first subframe 118 119 fLabFileName = new TGLabel(fTabF1a, new TGString("selected File:") ); 120 fTabF1a->AddFrame( fLabFileName, new TGLayoutHints (kLHintsLeft, 10, 10, 10, 10)) ; 121 122 fTxtFileName = new TGTextEntry(fTabF1a, fTxtBufFileName = new TGTextBuffer(256) ); 123 fTxtFileName->Resize(60, fTxtFileName->GetDefaultHeight()); 124 fTabF1a->AddFrame(fTxtFileName, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 5, 5, 5, 5)); 125 126 fButFileReset = new TGTextButton (fTabF1a, "Reset", M_FILERESET ) ; 127 fButFileReset->Associate(this) ; 128 fTabF1a->AddFrame (fButFileReset, new TGLayoutHints (kLHintsRight, 10, 10, 10, 10 ) ) ; 129 130 131 132 // the items in the second subfraem 133 134 fLabDir = new TGLabel(fTabF1b, new TGString("Directory:") ); 135 fTabF1b->AddFrame( fLabDir, new TGLayoutHints (kLHintsLeft, 10, 10, 10, 10)) ; 136 137 fDir = new TGListBox(fTabF1b, -1) ; 104 138 fDir->Resize(350,20) ; 105 139 char temp[100] ; … … 107 141 sprintf ( temp, "%s", gSystem->WorkingDirectory() ) ; 108 142 fDir->AddEntry(temp, 1) ; 109 fTabF1 a->AddFrame( fDir, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 5, 5, 5, 5 ) ) ;143 fTabF1b->AddFrame( fDir, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 5, 5, 5, 5 ) ) ; 110 144 111 145 112 146 fPicCdup = fClient->GetPicture("tb_uplevel.xpm") ; 113 fCdup = new TGPictureButton(fTabF1 a, fPicCdup, M_PBUTTON_CDIR_UP ) ;147 fCdup = new TGPictureButton(fTabF1b, fPicCdup, M_PBUTTON_CDIR_UP ) ; 114 148 fCdup->SetToolTipText("One Level up!") ; 115 149 fCdup->Associate(this) ; 116 fTabF1 a->AddFrame (fCdup, new TGLayoutHints(kLHintsLeft | kLHintsTop, 5, 5, 5, 5) ) ;150 fTabF1b->AddFrame (fCdup, new TGLayoutHints(kLHintsLeft | kLHintsTop, 5, 5, 5, 5) ) ; 117 151 118 152 fPicList = fClient->GetPicture("tb_list.xpm") ; 119 fListMode = new TGPictureButton(fTabF1 a, fPicList, M_PBUTTON_LIST_MODE ) ;153 fListMode = new TGPictureButton(fTabF1b, fPicList, M_PBUTTON_LIST_MODE ) ; 120 154 fListMode->SetToolTipText("List Mode") ; 121 155 fListMode->Associate(this) ; 122 156 fListMode->SetState(kButtonUp) ; 123 157 fListMode->AllowStayDown(kTRUE) ; 124 fListMode->AllowStayDown(kTRUE) ; fTabF1 a->AddFrame (fListMode, new TGLayoutHints(kLHintsLeft | kLHintsTop, 5, 5, 5, 5) ) ;158 fListMode->AllowStayDown(kTRUE) ; fTabF1b->AddFrame (fListMode, new TGLayoutHints(kLHintsLeft | kLHintsTop, 5, 5, 5, 5) ) ; 125 159 126 160 fPicDetail = fClient->GetPicture("tb_details.xpm") ; 127 fDetail = new TGPictureButton(fTabF1 a, fPicDetail, M_PBUTTON_DETAIL_MODE ) ;161 fDetail = new TGPictureButton(fTabF1b, fPicDetail, M_PBUTTON_DETAIL_MODE ) ; 128 162 fDetail->SetToolTipText("Details Mode") ; 129 163 fDetail->Associate(this) ; 130 164 fDetail->SetState(kButtonEngaged) ; 131 165 fDetail->AllowStayDown(kTRUE) ; 132 fTabF1a->AddFrame (fDetail, new TGLayoutHints(kLHintsLeft | kLHintsTop, 5, 5, 5, 5) ) ; 133 134 135 fFileView = new TGListView(fTabF1b, 540, 380 ) ; 166 fTabF1b->AddFrame (fDetail, new TGLayoutHints(kLHintsLeft | kLHintsTop, 5, 5, 5, 5) ) ; 167 168 // the items in the third subframe 169 170 fFileView = new TGListView(fTabF1c, 540, 380 ) ; 136 171 fFileCont = new TGFileContainer(fFileView->GetViewPort(), 100, 100, 137 172 kVerticalFrame, fgWhitePixel) ; … … 146 181 fFileCont->Sort(kSortByName) ; 147 182 148 fTabF1 b->AddFrame(fFileView, new TGLayoutHints(kLHintsTop | kLHintsExpandX | kLHintsExpandY, 5, 5, 5, 5) ) ;183 fTabF1c->AddFrame(fFileView, new TGLayoutHints(kLHintsTop | kLHintsExpandX | kLHintsExpandY, 5, 5, 5, 5) ) ; 149 184 150 185 tf->AddFrame(fTabF1, fLayTab) ; … … 187 222 delete fDetail; 188 223 delete fDir ; 224 delete fLabDir ; 225 226 delete fButFileReset ; 227 delete fTxtFileName ; 228 delete fLabFileName ; 229 230 delete fTabF1c; 189 231 delete fTabF1b; 190 232 delete fTabF1a; … … 193 235 delete fTop1; 194 236 delete fTab; 237 195 238 delete fFrameTop; 196 239 delete fFrameLow; 240 delete fLineSep2 ; 241 delete fLineSep1 ; 242 197 243 delete fFileMenu; 198 244 delete fMenuBar; … … 269 315 270 316 break ; 271 317 318 319 case M_FILERESET: 320 321 sprintf ( fInputFile, "\n" ) ; 322 fTxtFileName->SetText( fInputFile ) ; 323 324 break; 272 325 case M_PBUTTON_CDIR_UP : 273 326 … … 375 428 else if ( ! strcmp(extens, "root") ) { // root file 376 429 sprintf ( fInputFile, "%s/%s" , gSystem->WorkingDirectory(), wort ) ; 377 378 printf (" %s \n", fInputFile ) ; 430 fTxtFileName->SetText( fInputFile ) ; 431 379 432 break ; 380 433 } -
trunk/MagicSoft/Mars/mgui/MGPrototyp.h
r571 r587 19 19 class TGFileContainer; 20 20 class TGListView; 21 class TGHorizontal3DLine; 22 class TGLabel ; 23 class TGTextEntry ; 24 class TGTextBuffer; 21 25 22 26 class MGPrototyp : public TGTransientFrame { … … 35 39 TGMenuBar *fMenuBar ; 36 40 TGPopupMenu *fFileMenu ; 41 TGHorizontal3DLine *fLineSep1, *fLineSep2 ; 42 37 43 38 44 // divide the Window in two different parts … … 53 59 54 60 TGCompositeFrame *fTabF1 ; // first tab of low part 55 TGCompositeFrame *fTabF1a, *fTabF1b ; // subpart of the file selector in low window 61 TGCompositeFrame *fTabF1a, *fTabF1b, *fTabF1c ; // subpart of the file selector in low window 62 63 TGLabel *fLabFileName ; 64 TGTextEntry *fTxtFileName ; 65 TGTextBuffer *fTxtBufFileName ; //! 66 TGTextButton *fButFileReset ; 67 68 TGLabel *fLabDir ; 56 69 TGListBox *fDir ; 57 70 TGPictureButton *fCdup, *fListMode, *fDetail ; -
trunk/MagicSoft/Mars/mgui/Makefile
r571 r587 27 27 # connect the include files defined in the config.mk file 28 28 # 29 INCLUDES = -I. -I../mbase -I../mraw -I../mdatacheck 29 INCLUDES = -I. -I../mbase -I../mraw -I../mdatacheck -I../meventdisp 30 30 31 31 # … … 53 53 54 54 SRCFILES = MGMarsMain.cc \ 55 MGEventDispMain.cc \ 55 56 MGDataCheckMain.cc \ 56 57 MGMonteCarloMain.cc \
Note:
See TracChangeset
for help on using the changeset viewer.