Ignore:
Timestamp:
09/27/01 12:06:22 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mmain/MBrowser.cc

    r950 r951  
    105105    fDir->Resize(350, 20);
    106106
     107    //
     108    // Get the three picturs from the system (must be deleted by FreePicture)
     109    //
    107110    fPic1 = fClient->GetPicture("tb_uplevel.xpm");
    108111    fPic2 = fClient->GetPicture("tb_list.xpm");
    109112    fPic3 = fClient->GetPicture("tb_details.xpm");
    110113
     114    //
     115    // Create the corresponding picture buttons
     116    //
    111117    fCdup     = new TGPictureButton(frame, fPic1, M_PBUTTON_CDIR_UP);
    112118    fListMode = new TGPictureButton(frame, fPic2, M_PBUTTON_LIST_MODE);
    113119    fDetail   = new TGPictureButton(frame, fPic3, M_PBUTTON_DETAIL_MODE);
    114120
     121    //
     122    // setup the buttons
     123    //
    115124    fCdup    ->SetToolTipText("One Level up!");
    116125    fListMode->SetToolTipText("List Mode");
     
    123132    fDetail  ->AllowStayDown(kTRUE);
    124133
     134    //
     135    // send messages to 'this' object
     136    //
    125137    fDir     ->Associate(this);
    126138    fCdup    ->Associate(this);
     
    128140    fListMode->Associate(this);
    129141
     142    //
     143    // Add to list for 'automatic' deletion
     144    //
    130145    fList->Add(fDir);
    131146    fList->Add(fCdup);
     
    134149
    135150    //
    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);
    148164}
    149165
     
    239255    fInputFile[0] = '\0';
    240256
    241     fList = new TList;
    242257    fList->SetOwner();
    243258
     
    293308    fClient->FreePicture(fPic2);
    294309    fClient->FreePicture(fPic3);
    295 
    296     delete fList;
    297310}
    298311
Note: See TracChangeset for help on using the changeset viewer.