Changeset 1108 for trunk/MagicSoft/Mars/mmain/MMars.cc
- Timestamp:
- 12/11/01 15:22:10 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mmain/MMars.cc
r1082 r1108 26 26 #include "MMars.h" 27 27 28 #include <iostream.h> 29 28 30 #include <TApplication.h> // gROOT->GetApplication()->... 29 31 … … 35 37 #include <TG3DLine.h> // TGHorizontal3DLine 36 38 39 #include "MGList.h" 37 40 #include "MEvtDisp.h" 38 41 #include "MAnalysis.h" … … 85 88 void MMars::CreateTopFrame(TGHorizontalFrame *top) 86 89 { 87 fPic1 = gClient->GetPicture("magiclogo.xpm"); 88 fPic2 = gClient->GetPicture("marslogo.xpm"); 89 90 TGPictureButton *magic = new TGPictureButton(top, fPic1, kPicMagic); 91 TGPictureButton *mars = new TGPictureButton(top, fPic2, kPicMars); 92 93 fList->Add(magic); 94 fList->Add(mars); 95 96 magic->Associate(this); 97 mars->Associate(this); 98 99 TGLayoutHints *lay1 = new TGLayoutHints(kLHintsLeft, 10., 10., 20., 10.); 100 TGLayoutHints *lay2 = new TGLayoutHints(kLHintsRight, 10., 10., 10., 10.); 101 102 fList->Add(lay1); 103 fList->Add(lay2); 104 105 top->AddFrame(magic, lay1); 106 top->AddFrame(mars, lay2); 90 const TGPicture *pic1 = fList->GetPicture("magiclogo.xpm"); 91 if (pic1) 92 { 93 TGPictureButton *magic = new TGPictureButton(top, pic1, kPicMagic); 94 fList->Add(magic); 95 magic->Associate(this); 96 TGLayoutHints *lay1 = new TGLayoutHints(kLHintsLeft, 10., 10., 20., 10.); 97 fList->Add(lay1); 98 top->AddFrame(magic, lay1); 99 } 100 101 const TGPicture *pic2 = fList->GetPicture("marslogo.xpm"); 102 if (pic2) 103 { 104 TGPictureButton *mars = new TGPictureButton(top, pic2, kPicMars); 105 fList->Add(mars); 106 mars->Associate(this); 107 TGLayoutHints *lay2 = new TGLayoutHints(kLHintsRight, 10., 10., 10., 10.); 108 fList->Add(lay2); 109 top->AddFrame(mars, lay2); 110 } 107 111 } 108 112 … … 176 180 // Create the deletion list 177 181 // 178 fList = new TList;182 fList = new MGList; 179 183 fList->SetOwner(); 180 184 … … 230 234 MMars::~MMars() 231 235 { 232 gClient->FreePicture(fPic1);233 gClient->FreePicture(fPic2);234 235 236 delete fList; 236 237 }
Note:
See TracChangeset
for help on using the changeset viewer.