Changeset 1916 for trunk/MagicSoft/Mars/mdatacheck/MGDisplayAdc.cc
- Timestamp:
- 04/07/03 18:30:43 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mdatacheck/MGDisplayAdc.cc
r1654 r1916 26 26 #include "MGDisplayAdc.h" 27 27 28 #include <stdlib.h> // mkstemp 28 29 #include <iostream.h> // cout for debugging 29 30 31 #include <TSystem.h> // gSystem 32 #include <TCanvas.h> // TCanvas.h 33 #include <TGSlider.h> // TGVSlider 30 34 #include <TGButton.h> // TGTextButton 31 #include <TCanvas.h> // TCanvas.h32 35 #include <TGMsgBox.h> // TGMsgBox 33 36 #include <TGListBox.h> // TGListBox 34 #include <TGSlider.h> // TGVSlider35 37 #include <TGButtonGroup.h> // TGVButtonGroup 36 38 #include <TRootEmbeddedCanvas.h> // TRootEmbeddedCanvas … … 302 304 303 305 for (Int_t i=0; i<nhi; i++) 304 fHistoList->AddEntry(fHists->GetHistHi(i)->GetName(), i+1); 306 if (fHists->Exists(i)) 307 fHistoList->AddEntry(fHists->GetHistHi(i)->GetName(), i+1); 305 308 306 309 fHistoList->MapSubwindows(); … … 323 326 324 327 fCanvas->Clear(); 328 329 if (!fHists->Exists(selected-1)) 330 return; 325 331 326 332 const Int_t type = fHists->HasLo(selected-1) ? fHistoType : M_RADIO_HI; … … 372 378 { 373 379 case M_BUTTON_SAVE: 374 cout << "Sorry, not yet implemented!" << endl; 380 fCanvas->SaveAs(); 381 cout << "Sorry, no well implemented!" << endl; 375 382 return kTRUE; 376 383 377 384 case M_BUTTON_PRINT: 378 cout << "Sorry, not yet implemented!" << endl; 385 { 386 char *txt = (char*)"canvasXXXXXX"; 387 mkstemp(txt); 388 TString name = txt; 389 name += ".ps"; 390 fCanvas->SaveAs(name); 391 cout << "Calling 'lpr " << name << ".ps'" << endl; 392 gSystem->Exec(TString("lpr ")+name+".ps"); 393 gSystem->Exec(TString("rm ")+name+".ps"); 394 } 395 cout << "Sorry, not well implemented!" << endl; 379 396 return kTRUE; 380 397 … … 426 443 return kTRUE; 427 444 428 // Check for the slider movement and s icronise with TGListBox445 // Check for the slider movement and synchronise with TGListBox 429 446 if (parm2<1 || parm2>577) 430 447 return kTRUE;
Note:
See TracChangeset
for help on using the changeset viewer.