Changeset 951 for trunk/MagicSoft/Mars/mmain/MBrowser.cc
- Timestamp:
- 09/27/01 12:06:22 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mmain/MBrowser.cc
r950 r951 105 105 fDir->Resize(350, 20); 106 106 107 // 108 // Get the three picturs from the system (must be deleted by FreePicture) 109 // 107 110 fPic1 = fClient->GetPicture("tb_uplevel.xpm"); 108 111 fPic2 = fClient->GetPicture("tb_list.xpm"); 109 112 fPic3 = fClient->GetPicture("tb_details.xpm"); 110 113 114 // 115 // Create the corresponding picture buttons 116 // 111 117 fCdup = new TGPictureButton(frame, fPic1, M_PBUTTON_CDIR_UP); 112 118 fListMode = new TGPictureButton(frame, fPic2, M_PBUTTON_LIST_MODE); 113 119 fDetail = new TGPictureButton(frame, fPic3, M_PBUTTON_DETAIL_MODE); 114 120 121 // 122 // setup the buttons 123 // 115 124 fCdup ->SetToolTipText("One Level up!"); 116 125 fListMode->SetToolTipText("List Mode"); … … 123 132 fDetail ->AllowStayDown(kTRUE); 124 133 134 // 135 // send messages to 'this' object 136 // 125 137 fDir ->Associate(this); 126 138 fCdup ->Associate(this); … … 128 140 fListMode->Associate(this); 129 141 142 // 143 // Add to list for 'automatic' deletion 144 // 130 145 fList->Add(fDir); 131 146 fList->Add(fCdup); … … 134 149 135 150 // 136 // Layout Dir-Listbox and buttons 137 // 138 TGLayoutHints *laydir = new TGLayoutHints(kLHintsTop|kLHintsLeft|kLHintsExpandX, 5, 5, 5, 5); 139 TGLayoutHints *laybut = new TGLayoutHints(kLHintsLeft|kLHintsTop, 5, 5, 5, 5); 140 141 fList->Add(laydir); 142 fList->Add(laybut); 143 144 frame->AddFrame(fDir, laydir); 145 frame->AddFrame(fCdup, laybut); 146 frame->AddFrame(fListMode, laybut); 147 frame->AddFrame(fDetail, laybut); 151 // Layout Dir-Listbox and buttons in one row (frame) 152 // 153 // - layout: 154 // alignment: top, left 155 // padding: 5, 5, 5, 5 156 // 157 TGLayoutHints *layout = new TGLayoutHints(kLHintsNormal, 5, 5, 5, 5); 158 fList->Add(layout); 159 160 frame->AddFrame(fDir, layout); 161 frame->AddFrame(fCdup, layout); 162 frame->AddFrame(fListMode, layout); 163 frame->AddFrame(fDetail, layout); 148 164 } 149 165 … … 239 255 fInputFile[0] = '\0'; 240 256 241 fList = new TList;242 257 fList->SetOwner(); 243 258 … … 293 308 fClient->FreePicture(fPic2); 294 309 fClient->FreePicture(fPic3); 295 296 delete fList;297 310 } 298 311
Note:
See TracChangeset
for help on using the changeset viewer.