Changeset 3825 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
04/23/04 15:12:33 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3819 r3825  
    2323 2004/04/23: Markus Gaug
    2424
    25   * mcalib/MHCalibrationCam.cc
    26     - fixed a bug in the ReInit() for the number of average events in
    27       each area index and sector
     25   * mcalib/MHCalibrationCam.cc
     26     - fixed a bug in the ReInit() for the number of average events in
     27       each area index and sector
     28
    2829
    2930
    3031 2004/04/23: Thomas Bretz
    3132
    32   * */Makefile:
    33     - added some more mpedestal
    34 
    35   * mreport/MReportRun.cc:
    36     - changed to work with the latest version of report-files
    37       --> This will make it incompatible with older report files
    38           (for this use older Mars versions for merpping)
     33   * */Makefile:
     34     - added some more mpedestal
     35
     36   * mreport/MReportRun.cc:
     37     - changed to work with the latest version of report-files
     38       --> This will make it incompatible with older report files
     39           (for this use older Mars versions for merpping)
     40
     41   * mbase/MStatusDisplay.[h,cc]:
     42     - added combo-box to surf through tabs in MARS-tab
    3943
    4044
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r3666 r3825  
    8686#include <TGButton.h>             // TGPictureButton
    8787#include <TGTextView.h>           // TGTextView
     88#include <TGComboBox.h>           // TGComboBox
    8889#include <TGStatusBar.h>          // TGStatusBar
    8990#include <TGFileDialog.h>         // TGFileDialog
     
    306307}
    307308
     309char *rot128(char *c)
     310{
     311    char *rc=c;
     312    while (*c) *c++ += 128;
     313    return rc;
     314}
     315
    308316// --------------------------------------------------------------------------
    309317//
     
    314322    // Create Tab1
    315323    TGCompositeFrame *f = fTab->AddTab("-=MARS=-");
     324
     325    // Add list of tabs
     326
     327    TGComboBox *filter = new TGComboBox(f, kTabs);
     328    fList->Add(filter);
     329    filter->Associate(this);
     330    filter->AddEntry("-=MARS=-", 0);
     331    filter->Select(0);
     332
     333    TGLayoutHints *lay3 = new TGLayoutHints(kLHintsCenterX|kLHintsTop, 10, 10, 10, 5);
     334    fList->Add(lay3);
     335    f->AddFrame(filter, lay3);
    316336
    317337    // Add MARS version
    318338    TGLabel *l = new TGLabel(f, Form("Official Release: V%s", MARSVER));
    319339    fList->Add(l);
     340
     341    filter->SetWidth(l->GetWidth());
     342    filter->SetHeight(4*l->GetHeight()/3);
    320343
    321344    TGLayoutHints *layb = new TGLayoutHints(kLHintsCenterX|kLHintsTop, 10, 10, 5, 5);
     
    358381    fList->Add(layc);
    359382
    360     l = new TGLabel(f, "<< Thomas Bretz >>");
     383    char *txt = "<< Thomas Bretz >>";
     384    l = new TGLabel(f, txt);
    361385    fList->Add(l);
    362386    f->AddFrame(l, layc);
     
    385409
    386410        // Create Tab1
    387         TGCompositeFrame *f = fTab->AddTab("-Logbook-");
     411        TGCompositeFrame *f = AddRawTab("-Logbook-");//fTab->AddTab("-Logbook-");
    388412
    389413        // Create Text View
     
    786810    TGCompositeFrame *f = fTab->AddTab(name);
    787811
     812    TGComboBox *box = (TGComboBox*)fList->FindWidget(kTabs);
     813    box->AddEntry(name, box->GetListBox()->GetNumberOfEntries());
     814
    788815    // layout and map new tab
    789816    Layout();
     
    868895    c.Connect("ProcessedEvent(Int_t,Int_t,Int_t,TObject*)",
    869896              "MStatusDisplay", this, "EventInfo(Int_t,Int_t,Int_t,TObject*)");
     897
     898    TGComboBox *box = (TGComboBox*)fList->FindWidget(kTabs);
     899    box->AddEntry(name, box->GetListBox()->GetNumberOfEntries());
    870900
    871901    // layout and map new tab
     
    10391069    fTab->RemoveTab(i);
    10401070    fTab->SetTab(0);
     1071
     1072    TGComboBox *box = (TGComboBox*)fList->FindWidget(kTabs);
     1073    box->RemoveEntry(i);
     1074    for (int j=i; j<box->GetListBox()->GetNumberOfEntries(); j++)
     1075    {
     1076        TGTextLBEntry *entry = (TGTextLBEntry *)box->GetListBox()->Select(j+1, kFALSE);
     1077        box->AddEntry(entry->GetText()->GetString(), j);
     1078        box->RemoveEntry(j+1);
     1079    }
     1080    box->GetListBox()->Select(0);
    10411081
    10421082    // Looks strange...
     
    12831323        */
    12841324        return kTRUE;
     1325    case kCM_COMBOBOX: // 7
     1326        if (mp1==kTabs)
     1327            fTab->SetTab(mp2);
     1328        return kTRUE;
    12851329#ifdef DEBUG
    12861330    case kCM_MENUSELECT: // 2
     
    13021346    case kCM_LISTBOX: // 6
    13031347        cout << "Command-Listbox #" << mp1 << " (LineId #" << mp2 << ")" << endl;
    1304         return kTRUE;
    1305 
    1306     case kCM_COMBOBOX: // 7
    1307         cout << "Command-ComboBox." << endl;
    13081348        return kTRUE;
    13091349    default:
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.h

    r3507 r3825  
    5151        // kPic
    5252        kPicMagic, kPicMars,
    53         // kPic
    54         kSearch
     53        // kGui
     54        kSearch, kTabs
    5555    } Status_t;
    5656
Note: See TracChangeset for help on using the changeset viewer.