Changeset 2054 for trunk/MagicSoft/Mars/mmain
- Timestamp:
- 05/02/03 12:46:43 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mmain
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mmain/MGMenu.cc
r1968 r2054 213 213 // was pressed close the popup. 214 214 // 215 if ( !rc || event->fCode==9/*ESC*/)216 {217 f.SetState(kFALSE); 218 gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE); // ungrab pointer219 fCurrent = 0;220 }221 215 if (rc && event->fCode!=9/*ESC*/) 216 return kTRUE; 217 218 f.SetState(kFALSE); 219 gVirtualX->GrabPointer(0, 0, 0, 0, kFALSE); // ungrab pointer 220 gVirtualX->SetKeyAutoRepeat(kTRUE); // set in TGMainFrame::HandleKey 221 fCurrent = 0; 222 222 return kTRUE; 223 223 } -
trunk/MagicSoft/Mars/mmain/MStatusDisplay.cc
r2053 r2054 80 80 #include <TGButton.h> // TGPictureButton 81 81 #include <TGListBox.h> // TGListBox 82 #include <TGStatusBar.h> // TGStatusBar 82 83 #include <TGProgressBar.h> // TGHProgressBar 83 84 … … 219 220 f->AddFrame(mars, lay2); 220 221 } 222 /* 223 TGShutter *s = new TGShutter(f); 224 fList->Add(s); 225 f->AddFrame(s, lay); 226 s->AddItem(new TGShutterItem(s, new TGHotString("Hallo1"))); 227 s->AddItem(new TGShutterItem(s, new TGHotString("Hallo2"))); 228 */ 221 229 222 230 // Add date and time … … 304 312 305 313 // Add fTab to Frame 306 TGLayoutHints *laytabs = new TGLayoutHints(kLHintsNormal|kLHintsExpandX|kLHintsExpandY, 5, 6, 5);314 TGLayoutHints *laytabs = new TGLayoutHints(kLHintsNormal|kLHintsExpandX|kLHintsExpandY, 5, 5, 5); 307 315 AddFrame(fTab, laytabs); 308 316 … … 317 325 void MStatusDisplay::AddProgressBar() 318 326 { 319 TGLayoutHints *laybar=new TGLayoutHints(kLHintsExpandX, 5, 6, 5, 5);327 TGLayoutHints *laybar=new TGLayoutHints(kLHintsExpandX, 5, 5, 5, 5); 320 328 fList->Add(laybar); 321 329 … … 329 337 // -------------------------------------------------------------------------- 330 338 // 331 // Adds the status lines to the GUI 332 // 333 void MStatusDisplay::AddStatusLines() 334 { 335 TGHorizontalFrame *hf = new TGHorizontalFrame(this, 1, 1); 336 337 TGCompositeFrame *f = new TGCompositeFrame(hf, 1, 1, kSunkenFrame); 338 339 fLine1 = new TGLabel(f, ""); 340 341 TGLayoutHints *lay = new TGLayoutHints(kLHintsNormal|kLHintsExpandX, 0, 5); 342 f->AddFrame(fLine1, lay); 343 hf->AddFrame(f, lay); 344 345 fList->Add(f); 346 fList->Add(fLine1); 347 fList->Add(lay); 348 349 f = new TGCompositeFrame(hf, 1, 1, kSunkenFrame); 350 351 fLine2 = new TGLabel(f, ""); 352 f->AddFrame(fLine2, lay); 353 hf->AddFrame(f, lay); 354 355 TGLayoutHints *layf = new TGLayoutHints(kLHintsNormal|kLHintsExpandX, 5, 0, 0, 3); 356 AddFrame(hf, layf); 357 358 fList->Add(layf); 359 fList->Add(f); 360 fList->Add(fLine2); 361 fList->Add(hf); 339 // Adds the status bar to the GUI 340 // 341 void MStatusDisplay::AddStatusBar() 342 { 343 fStatusBar = new TGStatusBar(this, 1, 1); 344 345 fStatusBar->SetParts(2); 346 347 TGLayoutHints *layb = new TGLayoutHints(kLHintsNormal|kLHintsExpandX, 5, 4, 0, 3); 348 AddFrame(fStatusBar, layb); 349 350 fList->Add(fStatusBar); 351 fList->Add(layb); 362 352 } 363 353 … … 368 358 void MStatusDisplay::SetStatusLine1(const char *txt) 369 359 { 370 f Line1->SetText(txt);371 gClient->ProcessEventsFor(f Line1);360 fStatusBar->SetText(txt, 0); 361 gClient->ProcessEventsFor(fStatusBar); 372 362 } 373 363 … … 378 368 void MStatusDisplay::SetStatusLine2(const char *txt) 379 369 { 380 f Line2->SetText(txt);381 gClient->ProcessEventsFor(f Line2);370 fStatusBar->SetText(txt, 1); 371 gClient->ProcessEventsFor(fStatusBar); 382 372 } 383 373 … … 404 394 // 405 395 MStatusDisplay::MStatusDisplay(Long_t t) 406 : TGMainFrame(gClient->GetRoot(), 1, 1), fTimer(this, t, kTRUE), f Log(&gLog), fLogIdx(-1), fLogTimer(this, 250, kTRUE), fLogBox(NULL)396 : TGMainFrame(gClient->GetRoot(), 1, 1), fTimer(this, t, kTRUE), fStatus(kLoopNone), fLog(&gLog), fLogIdx(-1), fLogTimer(this, 250, kTRUE), fLogBox(NULL) 407 397 { 408 398 gROOT->GetListOfSpecials()->Add(this); 399 gROOT->GetListOfCleanups()->Add(this); 400 409 401 410 402 // … … 434 426 AddTabs(); 435 427 AddProgressBar(); 436 AddStatus Lines();428 AddStatusBar(); 437 429 438 430 // … … 447 439 MapWindow(); 448 440 449 //lient->ProcessEventsFor(this);450 441 gSystem->ProcessEvents(); 451 452 //TSeqCollection *GetListOfCleanups() const {return fCleanups;}453 454 442 } 455 443 … … 466 454 467 455 gROOT->GetListOfSpecials()->Remove(this); 456 gROOT->GetListOfCleanups()->Remove(this); 468 457 } 469 458 -
trunk/MagicSoft/Mars/mmain/MStatusDisplay.h
r2052 r2054 23 23 24 24 class TGTab; 25 class TGLabel;26 25 class TGListBox; 26 class TGStatusBar; 27 27 class TGProgressBar; 28 28 class TGHProgressBar; … … 69 69 TTimer fTimer; 70 70 71 TGLabel *fLine1; 72 TGLabel *fLine2; 71 TGStatusBar *fStatusBar; 73 72 74 73 Status_t fStatus; … … 86 85 void AddLogTab(); 87 86 void AddTabs(); 88 void AddStatus Lines();87 void AddStatusBar(); 89 88 90 89 TCanvas *GetCanvas(TGCompositeFrame *f) const;
Note:
See TracChangeset
for help on using the changeset viewer.