Changeset 2518 for trunk/MagicSoft/Cosy/gui/MGCosy.cc
- Timestamp:
- 11/17/03 13:50:48 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/gui/MGCosy.cc
r2514 r2518 53 53 kPB_CALCALTAZ, 54 54 kPB_TPOINT, 55 kPB_ENDSWITCH, 55 56 kPB_START, 56 57 kPB_DISPLAY1, … … 270 271 fStopped->SetBackgroundColor(color); 271 272 272 fError ->Move (10, 25);273 fMoving ->Move (10, 25+20);274 fTracking->Move (10, 25+40);275 fStopping->Move (10, 25+60);276 fStopped ->Move (10, 25+80);277 fAvailMac1->Move (10, 25+120);278 fAvailMac2->Move (10, 25+140);273 fError ->MoveResize(10, 25, 60, 20); 274 fMoving ->MoveResize(10, 25+20, 60, 20); 275 fTracking->MoveResize(10, 25+40, 60, 20); 276 fStopping->MoveResize(10, 25+60, 60, 20); 277 fStopped ->MoveResize(10, 25+80, 60, 20); 278 fAvailMac1->MoveResize(10, 25+120, 60, 20); 279 fAvailMac2->MoveResize(10, 25+140, 60, 20); 279 280 //fAvailMac3->Move(10, 25+160); 280 fAvailSe1->Move(10, 25+180); 281 fAvailSe2->Move(10, 25+200); 282 fAvailSe3->Move(10, 25+220); 283 284 fError ->Resize(60, 20); 285 fMoving ->Resize(60, 20); 286 fTracking->Resize(60, 20); 287 fStopping->Resize(60, 20); 288 fStopped ->Resize(60, 20); 289 fAvailMac1->Resize(60, 20); 290 fAvailMac2->Resize(60, 20); 291 //fAvailMac3->Resize(60, 20); 292 fAvailSe1->Resize(60, 20); 293 fAvailSe2->Resize(60, 20); 294 fAvailSe3->Resize(60, 20); 281 fAvailSe1->MoveResize(10, 25+200, 60, 20); 282 fAvailSe2->MoveResize(10, 25+220, 60, 20); 283 fAvailSe3->MoveResize(10, 25+180, 60, 20); 295 284 296 285 fList->Add(fError); … … 486 475 487 476 but= new TGTextButton(tf2, "Ra -", kPB_RAm); 488 but->Resize(50, 25); 489 but->Move(25, 210); 477 but->MoveResize(25, 210, 50, 25); 490 478 but->SetToolTipText("Right ascension -= 1'"); 491 479 but->Associate(this); 492 480 fList->Add(but); 493 481 but= new TGTextButton(tf2, "RA +", kPB_RAp); 494 but->Resize(50, 25); 495 but->Move(90, 210); 482 but->MoveResize(90, 210, 50, 25); 496 483 but->SetToolTipText("Right ascension += 1'"); 497 484 but->Associate(this); 498 485 fList->Add(but); 499 486 but= new TGTextButton(tf2, "DEC +", kPB_DECp); 500 but->Resize(50, 25); 501 but->Move(55, 185); 487 but->MoveResize(55, 185, 50, 25); 502 488 but->SetToolTipText("Declination += 1'"); 503 489 but->Associate(this); 504 490 fList->Add(but); 505 491 but= new TGTextButton(tf2, "DEC -", kPB_DECm); 506 but->Resize(50, 25); 507 but->Move(55, 235); 492 but->MoveResize(55, 235, 50, 25); 508 493 but->SetToolTipText("Declination -= 1'"); 509 494 but->Associate(this); … … 511 496 512 497 but = new TGTextButton(tf1, "Move'n'Track", kPB_TRACKPOS); 513 but->Resize(100, 25); 514 but->Move(25, 242); 498 but->MoveResize(25, 242, 100, 25); 515 499 but->SetToolTipText("Move telescope to a Zd/Az position and start tracking."); 516 500 but->Associate(this); … … 518 502 519 503 but= new TGTextButton(tf2, "Calc Zd/Az", kPB_CALCALTAZ); 520 but->Resize(80, 25); 521 but->Move(165, 197); 504 but->MoveResize(165, 197, 80, 25); 522 505 but->SetToolTipText("Calculate Zd/Az corresponding to Ra/Dec."); 523 506 but->Associate(this); … … 525 508 526 509 but = new TGTextButton(tf4, "TPoint", kPB_TPOINT); 527 but->Resize(50, 25); 528 but->Move(176/*231*/, 213); 510 but->MoveResize(139, 213, 62, 25); 529 511 but->SetToolTipText("Trigger writing a tpoint coordinate pair."); 512 but->Associate(this); 513 fList->Add(but); 514 515 but = new TGTextButton(tf4, "Endswitch", kPB_ENDSWITCH); 516 but->MoveResize(204, 213, 62, 25); 517 but->SetToolTipText("Print coordinates in 'Endswitch-Position' units."); 530 518 but->Associate(this); 531 519 fList->Add(but); … … 533 521 #ifdef EXPERT 534 522 but= new TGTextButton(tf1, "New Position", kPB_SavePreDef); 535 but->Resize(80, 25); 536 but->Move(165, 197); 523 but->MoveResize(165, 197, 80, 25); 537 524 but->SetToolTipText("Save new predefined position."); 538 525 but->Associate(this); … … 540 527 541 528 but= new TGTextButton(tf4, "New", kPB_SaveStar); 542 but->Resize(60, 23); 543 but->Move(211, 69); 529 but->MoveResize(211, 69, 60, 23); 544 530 but->SetToolTipText("Save new Source position."); 545 531 but->Associate(this); … … 547 533 548 534 but = new TGTextButton(tf5, "Display", kPB_DISPLAY1); 549 but->Resize(80, 25); 550 but->Move(160, 197); 535 but->MoveResize(160, 197, 80, 25); 551 536 but->SetToolTipText("Display Histogram."); 552 537 but->Associate(this); … … 554 539 555 540 but = new TGTextButton(tf6, "Display", kPB_DISPLAY2); 556 but->Resize(80, 25); 557 but->Move(160, 197); 541 but->MoveResize(160, 197, 80, 25); 558 542 but->SetToolTipText("Display Histogram."); 559 543 but->Associate(this); … … 561 545 562 546 but = new TGTextButton(tf4, "Load", kPB_LoadBending); 563 but->Resize(50, 25); 564 but->Move(151, 185); 547 but->ResizeMove(151, 185, 50, 25); 565 548 but->SetToolTipText("Load bending corrections from file 'bending.txt'"); 566 549 but->Associate(this); … … 568 551 569 552 but = new TGTextButton(tf4, "Reset", kPB_ResetBending); 570 but->Resize(50, 25); 571 but->Move(206, 185); 553 but->MoveResize(206, 185, 50, 25); 572 554 but->SetToolTipText("Reset bending correction (coefficients=0)"); 573 555 but->Associate(this); … … 575 557 576 558 but= new TGTextButton(tf4, "Zd -", kPB_ZDm); 577 but->Resize(50, 25); 578 but->Move(25, 210); 559 but->MoveResize(25, 210, 50, 25); 579 560 but->SetToolTipText("Zenith Distance -= 1SE"); 580 561 but->Associate(this); 581 562 fList->Add(but); 582 563 but= new TGTextButton(tf4, "Zd +", kPB_ZDp); 583 but->Resize(50, 25); 584 but->Move(90, 210); 564 but->MoveResize(90, 210, 50, 25); 585 565 but->SetToolTipText("Zenith Distance += 1SE"); 586 566 but->Associate(this); 587 567 fList->Add(but); 588 568 but= new TGTextButton(tf4, "Az +", kPB_AZp); 589 but->Resize(50, 25); 590 but->Move(55, 185); 569 but->MoveResize(55, 185, 50, 25); 591 570 but->SetToolTipText("Azimuth += 1SE"); 592 571 but->Associate(this); 593 572 fList->Add(but); 594 573 but= new TGTextButton(tf4, "Az -", kPB_AZm); 595 but->Resize(50, 25); 596 but->Move(55, 235); 574 but->MoveResize(55, 235, 50, 25); 597 575 but->SetToolTipText("Azimuth -= 1SE"); 598 576 but->Associate(this); … … 605 583 gClient->GetColorByName("Green", color); 606 584 but->SetBackgroundColor(color); 607 but->Move(147, 295); 608 but->Resize(62, 25); 585 but->MoveResize(147, 295, 62, 25); 609 586 but->SetToolTipText("Start a telescope movement."); 610 587 fList->Add(but); … … 614 591 gClient->GetColorByName("Red", color); 615 592 but->SetBackgroundColor(color); 616 but->Move(212, 295); 617 but->Resize(62, 25); 593 but->MoveResize(212, 295, 62, 25); 618 594 but->SetToolTipText("Stop any movement of telescope."); 619 595 fList->Add(but); … … 989 965 void MGCosy::UpdateZdAz(ZdAz &soll) 990 966 { 991 soll *= kRad2Deg;992 993 967 static Int_t zd=~0; 994 968 static Int_t az=~0; … … 996 970 char text[21]; 997 971 998 ZdAz test = soll*600; 999 972 UShort_t z, a; 973 Double_t zm, am; 974 Char_t sz, sa; 975 976 Slalib::Rad2Dm(soll.Zd(), sz, z, zm); 977 Slalib::Rad2Dm(soll.Az(), sa, a, am); 978 979 const ZdAz test = soll*kRad2Deg*600; 1000 980 if (zd!=(int)test.Zd()) 1001 981 { 1002 982 zd = (int)test.Zd(); 1003 sprintf(text, "%c%dd %.1fm", s oll.Zd()<0?'-':'+', abs((int)soll.Zd()), 0.1*(abs((int)test.Zd())%600));983 sprintf(text, "%c%dd %.1fm", sz, z, zm); 1004 984 fZdSoll->SetText(new TGString(text)); 1005 985 } … … 1007 987 { 1008 988 az = (int)test.Az(); 1009 sprintf(text, "%c%dd %.1fm", s oll.Az()<0?'-':'+' , abs((int)soll.Az()), 0.1*(abs((int)test.Az())%600));989 sprintf(text, "%c%dd %.1fm", sa, a, am); 1010 990 fAzSoll->SetText(new TGString(text)); 1011 991 } … … 1113 1093 // TGMainFrame::CloseWindow(); 1114 1094 cout << "Closing window - waiting until all nodes are stopped." << endl; 1115 fQueue->PostMsg(WM_QUIT , 0, 0);1095 fQueue->PostMsg(WM_QUIT); 1116 1096 cout << "Closing window - done." << endl; 1117 1097 // gApplication->Terminate(0); … … 1376 1356 StopDemo(); 1377 1357 #endif 1378 fQueue->PostMsg(WM_STOP , 0, 0);1358 fQueue->PostMsg(WM_STOP); 1379 1359 if (fTab->GetCurrent()==3) 1380 fQueue->Proc(WM_TESTSE , NULL);1360 fQueue->Proc(WM_TESTSE); 1381 1361 if (fTab->GetCurrent()==4) 1382 fQueue->Proc(WM_GEAR , NULL);1362 fQueue->Proc(WM_GEAR); 1383 1363 cout << "PostMsg (WM_Stop) returned." << endl; 1384 1364 return kTRUE; … … 1458 1438 StartTPoint(); 1459 1439 return kTRUE; 1440 1441 case kPB_ENDSWITCH: 1442 fQueue->Proc(WM_ENDSWITCH); 1443 return kTRUE; 1460 1444 /* 1461 1445 case kPB_CALIBSE: … … 1464 1448 */ 1465 1449 case kPB_LoadBending: 1466 fQueue->Proc(WM_LOADBENDING , NULL);1450 fQueue->Proc(WM_LOADBENDING); 1467 1451 return kTRUE; 1468 1452 case kPB_ResetBending: 1469 fQueue->Proc(WM_RESETBENDING , NULL);1453 fQueue->Proc(WM_RESETBENDING); 1470 1454 return kTRUE; 1471 1455 /* … … 1479 1463 case kPB_DISPLAY1: 1480 1464 case kPB_DISPLAY2: 1481 fQueue->PostMsg(WM_DISPLAY , 0, 0);1465 fQueue->PostMsg(WM_DISPLAY); 1482 1466 return kTRUE; 1483 1467 … … 1493 1477 case IDM_EXIT: 1494 1478 cout << "IDM_EXIT: Posting WM_QUIT." << endl; 1495 fQueue->PostMsg(WM_QUIT , 0, 0);1479 fQueue->PostMsg(WM_QUIT); 1496 1480 cout << "IDM_EXIT: WM_QUIT done." << endl; 1497 1481 //cout << "Idm_Exit." << endl;
Note:
See TracChangeset
for help on using the changeset viewer.