MINFGUIPanel Class Reference

#include <MINFGUIPanel.h>

List of all members.

Public Member Functions

 MINFGUIPanel (const char *name, UInt_t width, UInt_t height)
virtual ~MINFGUIPanel ()
TCanvas * GetCanvas () const
void ShowMenuBar (Bool_t show=kTRUE)
void ShowStatusBar (Bool_t show=kTRUE)
void CloseWindow ()
Bool_t ProcessMessage (Long_t msg, Long_t parm1, Long_t parm2)

Private Attributes

TGMenuBar * fMenuBar
TGPopupMenu * fFileMenu
TGPopupMenu * fEditMenu
TGPopupMenu * fViewMenu
TGPopupMenu * fOptionMenu
TGPopupMenu * fInspectMenu
TGPopupMenu * fClassesMenu
TGPopupMenu * fHelpMenu
TGLayoutHints * fMenuBarLayout
TGLayoutHints * fMenuBarItemLayout
TGLayoutHints * fMenuBarHelpLayout
TGHorizontalFrame * fHorizFrame
TGLayoutHints * fHorizLayout
MINFControlFramefControlFrame
TGLayoutHints * fControlLayout
MINFDisplayFramefDisplayFrame
TGLayoutHints * fDisplayLayout
Bool_t fAutoFit
Int_t fButton
Bool_t fShowEventStatus

Detailed Description

Definition at line 26 of file MINFGUIPanel.h.


Constructor & Destructor Documentation

MINFGUIPanel::MINFGUIPanel ( const char *  name,
UInt_t  width,
UInt_t  height 
)

Definition at line 113 of file MINFGUIPanel.cxx.

References kClassesTree, kEditClearCanvas, kEditClearPad, kEditEditor, kEditUndo, kFileCloseCanvas, kFileNewCanvas, kFileOpen, kFilePrint, kFileQuit, kFileSaveAs, kFileSaveAsC, kFileSaveAsEPS, kFileSaveAsGIF, kFileSaveAsPS, kFileSaveAsRoot, kHelpAbout, kHelpOnBrowser, kHelpOnCanvas, kHelpOnGraphicsEd, kHelpOnMenus, kHelpOnObjects, kHelpOnPS, kInspectBrowser, kInspectRoot, kInterrupt, kOptionAutoResize, kOptionCanEdit, kOptionEventStatus, kOptionFitParams, kOptionHistTitle, kOptionMoveOpaque, kOptionRefresh, kOptionResizeCanvas, kOptionResizeOpaque, kOptionStatistics, kViewColors, kViewFonts, kViewIconify, kViewMarkers, kViewOpenGL, and kViewX3D.

00114                                                                        :
00115   TGMainFrame(gClient->GetRoot(),
00116                              width, height, kMainFrame | kVerticalFrame)
00117 , fMenuBar(0)
00118 , fFileMenu(0)
00119 , fEditMenu(0)
00120 , fViewMenu(0)
00121 , fOptionMenu(0)
00122 , fInspectMenu(0)
00123 , fClassesMenu(0)
00124 , fHelpMenu(0)
00125 , fMenuBarLayout(0)
00126 , fMenuBarItemLayout(0)
00127 , fMenuBarHelpLayout(0)
00128 , fHorizFrame(0)
00129 , fHorizLayout(0)
00130 , fControlFrame(0)
00131 , fControlLayout(0)
00132 , fDisplayFrame(0)
00133 , fDisplayLayout(0)
00134 {
00135    fButton  = 0;
00136    fAutoFit = kTRUE;   // check also menu entry
00137    fShowEventStatus = kFALSE;
00138 
00139 // Create menus
00140    fFileMenu = new TGPopupMenu(gClient->GetRoot());
00141    fFileMenu->AddEntry("&New Canvas",         kFileNewCanvas);
00142    fFileMenu->AddEntry("&Open...",            kFileOpen);
00143    fFileMenu->AddSeparator();
00144    fFileMenu->AddEntry("Save As...",          kFileSaveAs);
00145    fFileMenu->AddEntry("Save As canvas.ps",   kFileSaveAsPS);
00146    fFileMenu->AddEntry("Save As canvas.eps",  kFileSaveAsEPS);
00147    fFileMenu->AddEntry("Save As canvas.gif",  kFileSaveAsGIF);
00148    fFileMenu->AddEntry("Save As canvas.C",    kFileSaveAsC);
00149    fFileMenu->AddEntry("Save As canvas.root", kFileSaveAsRoot);
00150    fFileMenu->AddSeparator();
00151    fFileMenu->AddEntry("&Print...",           kFilePrint);
00152    fFileMenu->AddSeparator();
00153    fFileMenu->AddEntry("&Close Canvas",       kFileCloseCanvas);
00154    fFileMenu->AddSeparator();
00155    fFileMenu->AddEntry("&Quit ROOT",          kFileQuit);
00156 
00157 // fFileMenu->DefaultEntry(kFileNewCanvas);
00158 // fFileMenu->DisableEntry(kFileOpen);
00159 
00160    fEditMenu = new TGPopupMenu(gClient->GetRoot());
00161    fEditMenu->AddEntry("&Editor",             kEditEditor);
00162    fEditMenu->AddEntry("&Undo",               kEditUndo);
00163    fEditMenu->AddEntry("Clear &Pad",          kEditClearPad);
00164    fEditMenu->AddEntry("&Clear Canvas",       kEditClearCanvas);
00165 
00166    fEditMenu->DisableEntry(kEditUndo);
00167 
00168    fViewMenu = new TGPopupMenu(gClient->GetRoot());
00169    fViewMenu->AddEntry("&Colors",             kViewColors);
00170    fViewMenu->AddEntry("&Fonts",              kViewFonts);
00171    fViewMenu->AddEntry("&Markers",            kViewMarkers);
00172    fViewMenu->AddSeparator();
00173    fViewMenu->AddEntry("&Iconify",            kViewIconify);
00174    fViewMenu->AddSeparator();
00175    fViewMenu->AddEntry("&View with X3D",      kViewX3D);
00176    fViewMenu->AddEntry("View with &OpenGL",   kViewOpenGL);
00177    fViewMenu->AddSeparator();
00178    fViewMenu->AddEntry("Interrupt",           kInterrupt);
00179 
00180    fOptionMenu = new TGPopupMenu(gClient->GetRoot());
00181    fOptionMenu->AddEntry("&Event Status",         kOptionEventStatus);
00182    fOptionMenu->AddSeparator();
00183    fOptionMenu->AddEntry("&Auto Resize Canvas",   kOptionAutoResize);
00184    fOptionMenu->AddEntry("&Resize Canvas",        kOptionResizeCanvas);
00185    fOptionMenu->AddEntry("&Move Opaque",          kOptionMoveOpaque);
00186    fOptionMenu->AddEntry("Resize &Opaque",        kOptionResizeOpaque);
00187    fOptionMenu->AddEntry("R&efresh",              kOptionRefresh);
00188    fOptionMenu->AddSeparator();
00189    fOptionMenu->AddEntry("Show &Statistics",      kOptionStatistics);
00190    fOptionMenu->AddEntry("Show &Histogram Title", kOptionHistTitle);
00191    fOptionMenu->AddEntry("Show &Fit Parameters",  kOptionFitParams);
00192    fOptionMenu->AddEntry("Can Edit Histograms",   kOptionCanEdit);
00193 
00194 // Opaque options initialized in InitWindow()
00195    fOptionMenu->CheckEntry(kOptionAutoResize);
00196    if (gStyle->GetOptStat())
00197       fOptionMenu->CheckEntry(kOptionStatistics);
00198    if (gStyle->GetOptTitle())
00199       fOptionMenu->CheckEntry(kOptionHistTitle);
00200    if (gStyle->GetOptFit())
00201       fOptionMenu->CheckEntry(kOptionFitParams);
00202    if (gROOT->GetEditHistograms())
00203       fOptionMenu->CheckEntry(kOptionCanEdit);
00204 
00205    fInspectMenu = new TGPopupMenu(gClient->GetRoot());
00206    fInspectMenu->AddEntry("&ROOT",              kInspectRoot);
00207    fInspectMenu->AddEntry("&Start Browser",     kInspectBrowser);
00208 
00209    fClassesMenu = new TGPopupMenu(gClient->GetRoot());
00210    fClassesMenu->AddEntry("&Class Tree",        kClassesTree);
00211 
00212    fHelpMenu = new TGPopupMenu(gClient->GetRoot());
00213    fHelpMenu->AddEntry("&About ROOT...",        kHelpAbout);
00214    fHelpMenu->AddSeparator();
00215    fHelpMenu->AddEntry("Help On Canvas...",     kHelpOnCanvas);
00216    fHelpMenu->AddEntry("Help On Menus...",      kHelpOnMenus);
00217    fHelpMenu->AddEntry("Help On Graphics Editor...", kHelpOnGraphicsEd);
00218    fHelpMenu->AddEntry("Help On Browser...",    kHelpOnBrowser);
00219    fHelpMenu->AddEntry("Help On Objects...",    kHelpOnObjects);
00220    fHelpMenu->AddEntry("Help On PostScript...", kHelpOnPS);
00221 
00222 // This main frame will process the menu commands
00223    fFileMenu->Associate(this);
00224    fEditMenu->Associate(this);
00225    fViewMenu->Associate(this);
00226    fOptionMenu->Associate(this);
00227    fInspectMenu->Associate(this);
00228    fClassesMenu->Associate(this);
00229    fHelpMenu->Associate(this);
00230 
00231 // Create menubar layout hints
00232    fMenuBarLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft | 
00233                                             kLHintsExpandX, 0, 0, 1, 1);
00234    fMenuBarItemLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft,
00235                                                             0, 4, 0, 0);
00236    fMenuBarHelpLayout = new TGLayoutHints(kLHintsTop | kLHintsRight);
00237 
00238 // Create menubar
00239    fMenuBar = new TGMenuBar(this, 1, 1, kHorizontalFrame);
00240    fMenuBar->AddPopup("&File",    fFileMenu,    fMenuBarItemLayout);
00241    fMenuBar->AddPopup("&Edit",    fEditMenu,    fMenuBarItemLayout);
00242    fMenuBar->AddPopup("&View",    fViewMenu,    fMenuBarItemLayout);
00243    fMenuBar->AddPopup("&Options", fOptionMenu,  fMenuBarItemLayout);
00244    fMenuBar->AddPopup("&Inspect", fInspectMenu, fMenuBarItemLayout);
00245    fMenuBar->AddPopup("&Classes", fClassesMenu, fMenuBarItemLayout);
00246    fMenuBar->AddPopup("&Help",    fHelpMenu,    fMenuBarHelpLayout);
00247 
00248    AddFrame(fMenuBar, fMenuBarLayout);
00249 
00250 // Create horizontal envelope frame
00251    fHorizFrame = new TGHorizontalFrame(this, width, height-15);
00252    fHorizLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft | 
00253                                     kLHintsExpandX | kLHintsExpandY,
00254                                                             0, 0, 1, 1);
00255    AddFrame(fHorizFrame, fHorizLayout);
00256 
00257 // Add MINFControlFrame
00258    fControlFrame = new MINFControlFrame(name, fHorizFrame, width,
00259                                                              height-20);
00260    fControlLayout = new TGLayoutHints(kLHintsLeft | kLHintsExpandY,
00261                                                             5, 5, 5, 5);
00262    fHorizFrame->AddFrame(fControlFrame, fControlLayout);
00263 
00264 // Add MINFDisplayFrame
00265    fDisplayFrame = new MINFDisplayFrame(name, fHorizFrame, width,
00266                                                              height-25);
00267    fDisplayLayout = new TGLayoutHints(kLHintsLeft | kLHintsExpandX |
00268                                             kLHintsExpandY, 5, 5, 5, 5);
00269    fHorizFrame->AddFrame(fDisplayFrame, fDisplayLayout);
00270 
00271 // Misc
00272    SetWindowName(name);
00273    SetIconName(name);
00274    SetClassHints("Canvas", "Canvas");
00275 
00276    SetMWMHints(kMWMDecorAll, kMWMFuncAll, kMWMInputModeless);
00277 
00278 // Final window setup
00279    MapSubwindows();
00280 
00281 // By default status bar is visible
00282    ShowStatusBar(kTRUE);
00283 
00284    Resize(GetDefaultSize());
00285    MapWindow();
00286 }

MINFGUIPanel::~MINFGUIPanel (  )  [virtual]

Definition at line 289 of file MINFGUIPanel.cxx.

References fClassesMenu, fControlFrame, fControlLayout, fDisplayFrame, fDisplayLayout, fEditMenu, fFileMenu, fHelpMenu, fHorizFrame, fHorizLayout, fInspectMenu, fMenuBar, fMenuBarHelpLayout, fMenuBarItemLayout, fMenuBarLayout, fOptionMenu, and fViewMenu.

00290 {
00291 
00292 // Delete ROOT basic canvas. Order is significant. Delete in reverse
00293 // order of creation.
00294    delete fFileMenu;
00295    delete fEditMenu;
00296    delete fViewMenu;
00297    delete fOptionMenu;
00298    delete fInspectMenu;
00299    delete fClassesMenu;
00300    delete fHelpMenu;
00301    delete fMenuBar;
00302    delete fMenuBarLayout;
00303    delete fMenuBarItemLayout;
00304    delete fMenuBarHelpLayout;
00305    delete fControlLayout;
00306    delete fControlFrame;
00307    delete fDisplayLayout;
00308    delete fDisplayFrame;
00309    delete fHorizFrame;
00310    delete fHorizLayout;
00311 }


Member Function Documentation

void MINFGUIPanel::CloseWindow (  ) 

Definition at line 314 of file MINFGUIPanel.cxx.

References kFileCloseCanvas.

00315 {
00316 
00317 // In case window is closed via WM we get here.
00318 // Forward message to central message handler as button event.
00319    SendMessage(this, MK_MSG(kC_COMMAND, kCM_BUTTON),
00320                                                    kFileCloseCanvas, 0);
00321 }

TCanvas * MINFGUIPanel::GetCanvas (  )  const
Bool_t MINFGUIPanel::ProcessMessage ( Long_t  msg,
Long_t  parm1,
Long_t  parm2 
)

Definition at line 330 of file MINFGUIPanel.cxx.

References fAutoFit, fDisplayFrame, fOptionMenu, fShowEventStatus, MINFDisplayFrame::GetCanvas(), GetCanvas(), MINFDisplayFrame::GetEmbeddedCanvas(), gMINFast, gSaveAsTypes, kClassesTree, kEditClearCanvas, kEditClearPad, kEditEditor, kEditUndo, kFileCloseCanvas, kFileNewCanvas, kFileOpen, kFilePrint, kFileQuit, kFileSaveAs, kFileSaveAsC, kFileSaveAsEPS, kFileSaveAsGIF, kFileSaveAsPS, kFileSaveAsRoot, kHelpAbout, kHelpOnBrowser, kHelpOnCanvas, kHelpOnGraphicsEd, kHelpOnMenus, kHelpOnObjects, kHelpOnPS, kInspectBrowser, kInspectRoot, kInterrupt, kOptionAutoResize, kOptionCanEdit, kOptionEventStatus, kOptionFitParams, kOptionHistTitle, kOptionMoveOpaque, kOptionRefresh, kOptionResizeCanvas, kOptionResizeOpaque, kOptionStatistics, kViewColors, kViewFonts, kViewIconify, kViewMarkers, kViewOpenGL, kViewX3D, Munits::m, MINFast::OpenRerootFile(), and ShowStatusBar().

00331 {
00332 
00333 // Handle menu and other command generated by the user.
00334    TRootHelpDialog *hd;
00335    TList *lc;
00336 
00337 //gmi Get rid of these 2 lines when updating for current ROOT versions:
00338 //gmi grr disable TViewerX3D *tvx3d;
00339 //gmi grr disable TViewerOpenGL *tvogl;
00340 
00341    switch (GET_MSG(msg)) {
00342 
00343       case kC_COMMAND:
00344 
00345          switch (GET_SUBMSG(msg)) {
00346 
00347             case kCM_BUTTON:
00348             case kCM_MENU:
00349 
00350                switch (parm1) {
00351 
00352 // Handle File menu items...
00353                   case kFileNewCanvas:
00354 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,15,3)
00355                      gROOT->MakeDefCanvas();
00356 #else
00357                      gROOT->GetMakeDefCanvas()();
00358 #endif
00359                      break;
00360                   case kFileOpen:
00361                      {
00362                         gMINFast->OpenRerootFile();
00363                      }
00364                      break;
00365                   case kFileSaveAs:
00366                      {
00367                         TGFileInfo fi;
00368                         fi.fFileTypes = gSaveAsTypes;
00369                         new TGFileDialog(fClient->GetRoot(), this,
00370                                                            kFDSave,&fi);
00371                         if (!fi.fFilename) return kTRUE;
00372                         if (strstr(fi.fFilename, ".root") ||
00373                             strstr(fi.fFilename, ".ps")   ||
00374                             strstr(fi.fFilename, ".eps")  ||
00375                             strstr(fi.fFilename, ".gif"))
00376                            GetCanvas()->SaveAs(fi.fFilename);
00377                         else if (strstr(fi.fFilename, ".C"))
00378                            GetCanvas()->SaveSource(fi.fFilename);
00379                         else
00380                            Warning("ProcessMessage",
00381                         "file cannot be saved with this extension (%s)",
00382                                                           fi.fFilename);
00383                      }
00384                      break;
00385                   case kFileSaveAsRoot:
00386                      GetCanvas()->SaveAs(".root");
00387                      break;
00388                   case kFileSaveAsC:
00389                      GetCanvas()->SaveSource();
00390                      break;
00391                   case kFileSaveAsPS:
00392                      GetCanvas()->SaveAs();
00393                      break;
00394                   case kFileSaveAsEPS:
00395                      GetCanvas()->SaveAs(".eps");
00396                      break;
00397                   case kFileSaveAsGIF:
00398                      GetCanvas()->SaveAs(".gif");
00399                      break;
00400                   case kFilePrint:
00401                      GetCanvas()->Print();
00402                      break;
00403                   case kFileCloseCanvas:
00404                  gInterpreter->DeleteGlobal(fDisplayFrame->GetCanvas());
00405                      delete fDisplayFrame->GetCanvas();
00406 
00407 // this in turn will delete this object
00408                      break;
00409                   case kFileQuit:
00410                      gApplication->Terminate(0);
00411                      break;
00412 
00413 // Handle Edit menu items...
00414                   case kEditEditor:
00415                      GetCanvas()->EditorBar();
00416                      break;
00417                   case kEditUndo:
00418                      // noop
00419                      break;
00420                   case kEditClearPad:
00421                      gPad->Clear();
00422                      gPad->Modified();
00423                      gPad->Update();
00424                      break;
00425                   case kEditClearCanvas:
00426                      GetCanvas()->Clear();
00427                      GetCanvas()->Modified();
00428                      GetCanvas()->Update();
00429                      break;
00430 
00431 // Handle View menu items...
00432                   case kViewColors:
00433                      {
00434                         TVirtualPad *padsav = gPad->GetCanvas();
00435                         TCanvas *m = new TCanvas("colors",
00436                                                          "Color Table");
00437                         TPad::DrawColorTable();
00438                         m->Update();
00439                         padsav->cd();
00440                      }
00441                      break;
00442                   case kViewFonts:
00443                      // noop
00444                      break;
00445                   case kViewMarkers:
00446                      {
00447                         TVirtualPad *padsav = gPad->GetCanvas();
00448                         TCanvas *m = new TCanvas("markers",
00449                                                 "Marker Types",600,200);
00450                         TMarker::DisplayMarkerTypes();
00451                         m->Update();
00452                         padsav->cd();
00453                      }
00454                      break;
00455                   case kViewIconify:
00456 //gmi                   Iconify();
00457                      break;
00458                   case kViewX3D:
00459 
00460 //gmi This section should be updated for current ROOT versions:
00461 //gmi gPad->SetViewer3D(TVirtualViewer3D::TVirtualViewer3D(gPad, "x3d"));
00462 //gmi
00463 //gmi While we are still straddling boundary to old versions:
00464 //gmi Method SetViewer3D doesn't exit in old TPad class (pre-20050311).
00465 //gmi This compiles, but may not work without setting fViewer3D in gPad,
00466 //gmi as in:         gPad->SetViewer3D(new TViewerX3D(gPad));
00467 //gmi grr disable    tvx3d = new TViewerX3D(gPad);
00468                      break;
00469                   case kViewOpenGL:
00470 
00471 //gmi This section should be updated for current ROOT versions:
00472 //gmi gPad->SetViewer3D(TVirtualViewer3D::TVirtualViewer3D(gPad, "ogl"));
00473 //gmi
00474 //gmi While we are still straddling boundary to old versions:
00475 //gmi Method SetViewer3D doesn't exit in old TPad class (pre-20050311).
00476 //gmi This compiles, but may not work without setting fViewer3D in gPad,
00477 //gmi as in:         gPad->SetViewer3D(new TViewerOpenGL(gPad));
00478 //gmi grr disable    tvogl = new TViewerOpenGL(gPad);
00479                      break;
00480                   case kInterrupt:
00481                      gROOT->SetInterrupt();
00482                      break;
00483 
00484 // Handle Option menu items...
00485                   case kOptionEventStatus:
00486                      ShowStatusBar(fShowEventStatus ? kFALSE : kTRUE);
00487                      break;
00488                   case kOptionAutoResize:
00489                      {
00490                         fAutoFit = fAutoFit ? kFALSE : kTRUE;
00491                         int opt =
00492                        fDisplayFrame->GetEmbeddedCanvas()->GetOptions();
00493                         if (fAutoFit) {
00494                            opt &= ~kFixedSize;
00495                            fOptionMenu->CheckEntry(kOptionAutoResize);
00496                         } else {
00497                            opt |= kFixedSize;
00498                            fOptionMenu->UnCheckEntry(kOptionAutoResize);
00499                         }
00500                  fDisplayFrame->GetEmbeddedCanvas()->ChangeOptions(opt);
00501 // in case of autofit this will generate a configure event for the
00502 // container and this will force the update of the TCanvas
00503                         Layout();
00504                      }
00505                      break;
00506                   case kOptionResizeCanvas:
00507 //gmi                FitCanvas();
00508                      break;
00509                   case kOptionMoveOpaque:
00510                      if (GetCanvas()->OpaqueMoving()) {
00511                         GetCanvas()->MoveOpaque(0);
00512                         fOptionMenu->UnCheckEntry(kOptionMoveOpaque);
00513                      } else {
00514                         GetCanvas()->MoveOpaque(1);
00515                         fOptionMenu->CheckEntry(kOptionMoveOpaque);
00516                      }
00517                      break;
00518                   case kOptionResizeOpaque:
00519                      if (GetCanvas()->OpaqueResizing()) {
00520                         GetCanvas()->ResizeOpaque(0);
00521                         fOptionMenu->UnCheckEntry(kOptionResizeOpaque);
00522                      } else {
00523                         GetCanvas()->ResizeOpaque(1);
00524                         fOptionMenu->CheckEntry(kOptionResizeOpaque);
00525                      }
00526                      break;
00527                   case kOptionRefresh:
00528                      GetCanvas()->Paint();
00529                      GetCanvas()->Update();
00530                      break;
00531                   case kOptionStatistics:
00532                      if (gStyle->GetOptStat()) {
00533                         gStyle->SetOptStat(0);
00534                         delete gPad->GetPrimitive("stats");
00535                         fOptionMenu->UnCheckEntry(kOptionStatistics);
00536                      } else {
00537                         gStyle->SetOptStat(1);
00538                         fOptionMenu->CheckEntry(kOptionStatistics);
00539                      }
00540                      gPad->Modified();
00541                      GetCanvas()->Update();
00542                      break;
00543                   case kOptionHistTitle:
00544                      if (gStyle->GetOptTitle()) {
00545                         gStyle->SetOptTitle(0);
00546                         delete gPad->GetPrimitive("title");
00547                         fOptionMenu->UnCheckEntry(kOptionHistTitle);
00548                      } else {
00549                         gStyle->SetOptTitle(1);
00550                         fOptionMenu->CheckEntry(kOptionHistTitle);
00551                      }
00552                      gPad->Modified();
00553                      GetCanvas()->Update();
00554                      break;
00555                   case kOptionFitParams:
00556                      if (gStyle->GetOptFit()) {
00557                         gStyle->SetOptFit(0);
00558                         fOptionMenu->UnCheckEntry(kOptionFitParams);
00559                      } else {
00560                         gStyle->SetOptFit(1);
00561                         fOptionMenu->CheckEntry(kOptionFitParams);
00562                      }
00563                      gPad->Modified();
00564                      GetCanvas()->Update();
00565                      break;
00566                   case kOptionCanEdit:
00567                      if (gROOT->GetEditHistograms()) {
00568                         gROOT->SetEditHistograms(kFALSE);
00569                         fOptionMenu->UnCheckEntry(kOptionCanEdit);
00570                      } else {
00571                         gROOT->SetEditHistograms(kTRUE);
00572                         fOptionMenu->CheckEntry(kOptionCanEdit);
00573                      }
00574                      break;
00575 
00576 // Handle Inspect menu items...
00577                   case kInspectRoot:
00578                      GetCanvas()->cd();
00579                      gROOT->Inspect();
00580                      GetCanvas()->Update();
00581                      break;
00582                   case kInspectBrowser:
00583                      new TBrowser("browser");
00584                      break;
00585 
00586 // Handle Inspect menu items...
00587                   case kClassesTree:
00588                      {
00589                         char cdef[64];
00590                         lc = (TList*)gROOT->GetListOfCanvases();
00591                         if (lc->FindObject("ClassTree")) {
00592                            sprintf(cdef,"ClassTree_%d",lc->GetSize()+1);
00593                         } else {
00594                            sprintf(cdef,"%s","ClassTree");
00595                         }
00596                         new TClassTree(cdef);
00597                      }
00598                      break;
00599 
00600 // Handle Help menu items...
00601                   case kHelpAbout:
00602                      {
00603                         char str[32];
00604                         sprintf(str, "About ROOT %s...",
00605                                                    gROOT->GetVersion());
00606                         hd = new TRootHelpDialog(this, str, 600, 400);
00607                         hd->SetText(gHelpAbout);
00608                         hd->Popup();
00609                      }
00610                      break;
00611                   case kHelpOnCanvas:
00612                      hd = new TRootHelpDialog(this, "Help on Canvas...",
00613                                                               600, 400);
00614                      hd->SetText(gHelpCanvas);
00615                      hd->Popup();
00616                      break;
00617                   case kHelpOnMenus:
00618                      hd = new TRootHelpDialog(this, "Help on Menus...",
00619                                                               600, 400);
00620                      hd->SetText(gHelpPullDownMenus);
00621                      hd->Popup();
00622                      break;
00623                   case kHelpOnGraphicsEd:
00624                      hd = new TRootHelpDialog(this,
00625                                 "Help on Graphics Editor...", 600, 400);
00626                      hd->SetText(gHelpGraphicsEditor);
00627                      hd->Popup();
00628                      break;
00629                   case kHelpOnBrowser:
00630                      hd = new TRootHelpDialog(this,
00631                                         "Help on Browser...", 600, 400);
00632                      hd->SetText(gHelpBrowser);
00633                      hd->Popup();
00634                      break;
00635                   case kHelpOnObjects:
00636                      hd = new TRootHelpDialog(this,
00637                                         "Help on Objects...", 600, 400);
00638                      hd->SetText(gHelpObjects);
00639                      hd->Popup();
00640                      break;
00641                   case kHelpOnPS:
00642                      hd = new TRootHelpDialog(this,
00643                                      "Help on PostScript...", 600, 400);
00644                      hd->SetText(gHelpPostscript);
00645                      hd->Popup();
00646                      break;
00647                }
00648             default:
00649                break;
00650          }
00651       default:
00652          break;
00653    }
00654    return kTRUE;
00655 }

void MINFGUIPanel::ShowMenuBar ( Bool_t  show = kTRUE  ) 

Definition at line 658 of file MINFGUIPanel.cxx.

References fMenuBar.

00659 {
00660 
00661 // Show or hide menubar.
00662    if (show) {
00663       ShowFrame(fMenuBar);
00664    } else {
00665       HideFrame(fMenuBar);
00666    }
00667 }

void MINFGUIPanel::ShowStatusBar ( Bool_t  show = kTRUE  ) 

Definition at line 670 of file MINFGUIPanel.cxx.

References fDisplayFrame, fOptionMenu, fShowEventStatus, kOptionEventStatus, and MINFDisplayFrame::ShowStatusBar().

Referenced by MINFDisplay::MINFDisplay(), and ProcessMessage().

00671 {
00672 
00673 // Show or hide statusbar.
00674    fShowEventStatus = show;
00675    fDisplayFrame->ShowStatusBar(show);
00676    if (show) {
00677       fOptionMenu->CheckEntry(kOptionEventStatus);
00678    } else {
00679       fOptionMenu->UnCheckEntry(kOptionEventStatus);
00680    }
00681 }


Member Data Documentation

Bool_t MINFGUIPanel::fAutoFit [private]

Definition at line 53 of file MINFGUIPanel.h.

Referenced by ProcessMessage().

Int_t MINFGUIPanel::fButton [private]

Definition at line 54 of file MINFGUIPanel.h.

TGPopupMenu* MINFGUIPanel::fClassesMenu [private]

Definition at line 38 of file MINFGUIPanel.h.

Referenced by ~MINFGUIPanel().

Definition at line 47 of file MINFGUIPanel.h.

Referenced by ~MINFGUIPanel().

TGLayoutHints* MINFGUIPanel::fControlLayout [private]

Definition at line 48 of file MINFGUIPanel.h.

Referenced by ~MINFGUIPanel().

Definition at line 50 of file MINFGUIPanel.h.

Referenced by GetCanvas(), ProcessMessage(), ShowStatusBar(), and ~MINFGUIPanel().

TGLayoutHints* MINFGUIPanel::fDisplayLayout [private]

Definition at line 51 of file MINFGUIPanel.h.

Referenced by ~MINFGUIPanel().

TGPopupMenu* MINFGUIPanel::fEditMenu [private]

Definition at line 34 of file MINFGUIPanel.h.

Referenced by ~MINFGUIPanel().

TGPopupMenu* MINFGUIPanel::fFileMenu [private]

Definition at line 33 of file MINFGUIPanel.h.

Referenced by ~MINFGUIPanel().

TGPopupMenu* MINFGUIPanel::fHelpMenu [private]

Definition at line 39 of file MINFGUIPanel.h.

Referenced by ~MINFGUIPanel().

TGHorizontalFrame* MINFGUIPanel::fHorizFrame [private]

Definition at line 44 of file MINFGUIPanel.h.

Referenced by ~MINFGUIPanel().

TGLayoutHints* MINFGUIPanel::fHorizLayout [private]

Definition at line 45 of file MINFGUIPanel.h.

Referenced by ~MINFGUIPanel().

TGPopupMenu* MINFGUIPanel::fInspectMenu [private]

Definition at line 37 of file MINFGUIPanel.h.

Referenced by ~MINFGUIPanel().

TGMenuBar* MINFGUIPanel::fMenuBar [private]

Definition at line 32 of file MINFGUIPanel.h.

Referenced by ShowMenuBar(), and ~MINFGUIPanel().

TGLayoutHints* MINFGUIPanel::fMenuBarHelpLayout [private]

Definition at line 42 of file MINFGUIPanel.h.

Referenced by ~MINFGUIPanel().

TGLayoutHints* MINFGUIPanel::fMenuBarItemLayout [private]

Definition at line 41 of file MINFGUIPanel.h.

Referenced by ~MINFGUIPanel().

TGLayoutHints* MINFGUIPanel::fMenuBarLayout [private]

Definition at line 40 of file MINFGUIPanel.h.

Referenced by ~MINFGUIPanel().

TGPopupMenu* MINFGUIPanel::fOptionMenu [private]

Definition at line 36 of file MINFGUIPanel.h.

Referenced by ProcessMessage(), ShowStatusBar(), and ~MINFGUIPanel().

Definition at line 55 of file MINFGUIPanel.h.

Referenced by ProcessMessage(), and ShowStatusBar().

TGPopupMenu* MINFGUIPanel::fViewMenu [private]

Definition at line 35 of file MINFGUIPanel.h.

Referenced by ~MINFGUIPanel().


The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1