Changeset 587 for trunk/MagicSoft/Mars/meventdisp
- Timestamp:
- 01/23/01 10:43:18 (24 years ago)
- Location:
- trunk/MagicSoft/Mars/meventdisp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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() ;
Note:
See TracChangeset
for help on using the changeset viewer.