Changeset 8807
- Timestamp:
- 01/14/08 16:18:59 (17 years ago)
- Location:
- trunk/MagicSoft
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/Changelog
r8802 r8807 1 1 -*-*- END -*-*- 2 3 2008/01/14 Thomas Bretz 4 5 * tpoint/gui.C: 6 - added individual reset buttons 7 8 2 9 3 10 2008/01/09 Thomas Bretz -
trunk/MagicSoft/Cosy/tpoint/gui.C
r8802 r8807 1101 1101 } 1102 1102 1103 Bool_t ProcessMessage(Long_t msg, Long_t mp1, Long_t )1103 Bool_t ProcessMessage(Long_t msg, Long_t mp1, Long_t mp2) 1104 1104 { 1105 1105 // cout << "Msg: " << hex << GET_MSG(msg) << endl; … … 1148 1148 return kTRUE; 1149 1149 } 1150 1151 // In the default cas a reset button must have been pressed 1152 cout << "DEL! " << mp1-2*MPointing::GetNumPar() <<endl; 1153 1154 fBending[mp1-2*MPointing::GetNumPar()] = 0; 1155 DisplayBending(); 1156 1150 1157 return kTRUE; 1151 1158 } … … 1155 1162 } 1156 1163 1157 voidAddTextButton(TGCompositeFrame *f, TString txt, Int_t id=-1, TGLayoutHints *h=0)1164 TGButton *AddTextButton(TGCompositeFrame *f, TString txt, Int_t id=-1, TGLayoutHints *h=0) 1158 1165 { 1159 1166 TGButton *but = new TGTextButton(f, txt, id); … … 1161 1168 f->AddFrame(but, h); 1162 1169 fList->Add(but); 1163 1164 } 1165 1166 void AddCheckButton(TGCompositeFrame *f, TString txt, Int_t id=-1, TGLayoutHints *h=0) 1170 return but; 1171 1172 } 1173 1174 TGButton *AddCheckButton(TGCompositeFrame *f, TString txt, Int_t id=-1, TGLayoutHints *h=0) 1167 1175 { 1168 1176 TGButton *but = new TGCheckButton(f, txt, id); … … 1170 1178 f->AddFrame(but, h); 1171 1179 fList->Add(but); 1180 return but; 1181 } 1182 1183 TGButton *AddResetButton(TGCompositeFrame *f, Int_t id, TGLayoutHints *h, Int_t height) 1184 { 1185 // Move this to a AddResetButton function 1186 TGPictureButton *but = new TGPictureButton(f, "Totenkopf.xpm", id); 1187 but->SetHeight(height); // Offsets from TGLayout 1188 but->SetWidth(height); 1189 but->Associate(this); 1190 f->AddFrame(but, h); 1191 fList->Add(but); 1192 return but; 1172 1193 } 1173 1194 … … 1233 1254 fFont = gVirtualX->LoadQueryFont("7x13bold"); 1234 1255 1235 TGLayoutHints *hints0 = new TGLayoutHints(kLHintsExpandY, 7, 5, 5, 6);1256 TGLayoutHints *hints0 = new TGLayoutHints(kLHintsExpandY, 7, 5, 5, 0); 1236 1257 TGLayoutHints *hints1 = new TGLayoutHints(kLHintsExpandX|kLHintsExpandY, 5, 7, 5, 6); 1237 1258 TGLayoutHints *hints2 = new TGLayoutHints(kLHintsCenterX|kLHintsCenterY, 5, 5, 5, 5); … … 1267 1288 fList->Add(comp); 1268 1289 1269 TGLayoutHints *hints3 = new TGLayoutHints(kLHintsLeft|kLHintsTop, 0, 20, 5, 0);1290 TGLayoutHints *hints3 = new TGLayoutHints(kLHintsLeft|kLHintsTop, 0, 10, 5, 0); //20, 5, 0); 1270 1291 fList->Add(hints3); 1271 1292 1272 TGLabel *l;1273 1274 1293 TGVerticalFrame *vframe = new TGVerticalFrame(comp, 1, 1); 1294 for (int i=0; i<MPointing::GetNumPar(); i++) 1295 AddCheckButton(vframe, fBending.GetVarName(i), i); 1296 1297 TGButton *but = (TGButton*)fList->FindWidget(0); 1298 1299 1300 1275 1301 comp->AddFrame(vframe, hints3); 1276 1302 fList->Add(vframe); 1277 1278 for (int i=0; i<MPointing::GetNumPar(); i++)1279 AddCheckButton(vframe, fBending.GetVarName(i), i);1280 1303 1281 1304 vframe = new TGVerticalFrame(comp, 1, 1); … … 1283 1306 fList->Add(vframe); 1284 1307 1285 l = new TGLabel(vframe, "+000.0000"); 1308 hints3 = new TGLayoutHints(kLHintsLeft|kLHintsTop, 0, 7, 5, 0); 1309 fList->Add(hints3); 1310 1311 TGLabel *l = new TGLabel(vframe, "+000.0000"); 1286 1312 l->SetTextJustify(kTextRight); 1287 1313 fList->Add(l); 1288 1314 fLabel.Add(l); 1289 1315 1290 TGButton *but = (TGButton*)fList->FindWidget(0);1291 1292 1316 TGLayoutHints *h = new TGLayoutHints(kLHintsCenterY, 0, 0, but->GetHeight()-l->GetHeight()); 1293 1317 fList->Add(h); … … 1301 1325 comp->AddFrame(vframe, hints3); 1302 1326 fList->Add(vframe); 1303 1304 1327 for (int i=0; i<MPointing::GetNumPar(); i++) 1305 1328 AddLabel(vframe, "\xb1 00.0000\xb0", h)->SetTextJustify(kTextRight); 1329 1330 hints3 = new TGLayoutHints(kLHintsLeft|kLHintsTop, 0, 20, 5, 0); 1331 fList->Add(hints3); 1332 1333 TGLayoutHints *hreset = new TGLayoutHints(kLHintsNormal, 0, 0, 3, 1); 1334 fList->Add(hreset); 1335 1336 TGVerticalFrame *vframe2 = new TGVerticalFrame(comp, 1, 1); 1337 comp->AddFrame(vframe2, hints3); 1338 fList->Add(vframe2); 1339 for (int i=0; i<MPointing::GetNumPar(); i++) 1340 AddResetButton(vframe2, i+2*MPointing::GetNumPar(), hreset, 1341 but->GetHeight()-4); 1306 1342 1307 1343 vframe = new TGVerticalFrame(comp, 1, 1); 1308 1344 comp->AddFrame(vframe, hints3); 1309 1345 fList->Add(vframe); 1310 1311 1346 for (int i=0; i<MPointing::GetNumPar(); i++) 1312 1347 AddLabel(vframe, fBending.GetDescription(i), h); -
trunk/MagicSoft/Mars/Changelog
r8805 r8807 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2008/01/14 Thomas Bretz 22 23 * mpointing/MPointing.h: 24 - added enumeration operator[] 25 26 20 27 21 28 2008/01/11 Thomas Bretz -
trunk/MagicSoft/Mars/mpointing/MPointing.h
r8725 r8807 227 227 } 228 228 229 Double_t &operator[](UInt_t i) { return *fCoeff[i]; } 230 229 231 void SetMinuitParameters(TMinuit &m, Int_t n=-1) const; 230 232 void GetMinuitParameters(TMinuit &m, Int_t n=-1);
Note:
See TracChangeset
for help on using the changeset viewer.