Changeset 8376 for trunk/MagicSoft/Cosy/gui/MGCoordinate.cc
- Timestamp:
- 03/14/07 19:12:17 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/gui/MGCoordinate.cc
r7794 r8376 8 8 9 9 #include <stdlib.h> // atoi 10 #include <iostream .h> // cout10 #include <iostream> // cout 11 11 12 12 #include <TSystem.h> … … 18 18 19 19 ClassImp(MGCoordinate); 20 21 using namespace std; 20 22 21 23 enum { … … 25 27 }; 26 28 27 MGCoordinate::MGCoordinate(const TGWindow* p, const Int_t type =kETypeDeg,29 MGCoordinate::MGCoordinate(const TGWindow* p, const Int_t type, 28 30 const Int_t flag, const char *txt, 29 31 const Int_t deg, const UInt_t min, const UInt_t sec) … … 91 93 TGLabel *label; 92 94 93 const char * deg = type==kETypeDeg ? "\xb0" : "h";94 const char * min = type==kETypeDeg ? "'" : "m";95 const char *s ec = type==kETypeDeg ? "\"" : "s";95 const char *sdeg = type==kETypeDeg ? "\xb0" : "h"; 96 const char *smin = type==kETypeDeg ? "'" : "m"; 97 const char *ssec = type==kETypeDeg ? "\"" : "s"; 96 98 97 99 if (flag==1) 98 100 { 99 label = new TGLabel(this, deg);101 label = new TGLabel(this, sdeg); 100 102 label->SetTextJustify(kTextLeft); 101 103 label->Move(37, 29-offset); … … 103 105 fList->Add(label); 104 106 105 label = new TGLabel(this, min);107 label = new TGLabel(this, smin); 106 108 label->SetTextJustify(kTextLeft); 107 109 label->Move(71, 29-offset); … … 109 111 fList->Add(label); 110 112 111 label = new TGLabel(this, s ec);113 label = new TGLabel(this, ssec); 112 114 label->SetTextJustify(kTextLeft); 113 115 label->Move(107, 29-offset); … … 116 118 } 117 119 118 label = new TGLabel(this, deg);120 label = new TGLabel(this, sdeg); 119 121 label->SetTextJustify(kTextLeft); 120 122 label->Move(39, ypos); … … 122 124 fList->Add(label); 123 125 124 label = new TGLabel(this, min);126 label = new TGLabel(this, smin); 125 127 label->SetTextJustify(kTextLeft); 126 128 label->Move(73, ypos); … … 128 130 fList->Add(label); 129 131 130 label = new TGLabel(this, s ec);132 label = new TGLabel(this, ssec); 131 133 label->SetTextJustify(kTextLeft); 132 134 label->Move(107, ypos); … … 149 151 } 150 152 151 void MGCoordinate::Print( )153 void MGCoordinate::Print(Option_t *o) const 152 154 { 153 155 if (fLabel)
Note:
See TracChangeset
for help on using the changeset viewer.