MINFDisplayFrame Class Reference

#include <MINFDisplayFrame.h>

List of all members.

Public Member Functions

 MINFDisplayFrame (const char *name, TGWindow *parent, UInt_t width, UInt_t height)
virtual ~MINFDisplayFrame ()
TCanvas * GetCanvas () const
MINFEmbeddedCanvasGetEmbeddedCanvas () const
void SetStatusText (Text_t *txt=0, Int_t partidx=0)
void SetUnZoomPad (TVirtualPad *pad)
void ShowStatusBar (Bool_t show=kTRUE)

Private Attributes

MINFEmbeddedCanvasfEmbeddedCanvas
TGLayoutHints * fCanvasLayout
TGStatusBar * fStatusBar
TGLayoutHints * fStatusBarLayout
Bool_t fShowEventStatus


Detailed Description

Definition at line 26 of file MINFDisplayFrame.h.


Constructor & Destructor Documentation

MINFDisplayFrame::MINFDisplayFrame ( const char *  name,
TGWindow *  parent,
UInt_t  width,
UInt_t  height 
)

Definition at line 48 of file MINFDisplayFrame.cxx.

00049                                                                        :
00050   TGCompositeFrame(parent, width, height)
00051 , fEmbeddedCanvas(0)
00052 , fCanvasLayout(0)
00053 , fStatusBar(0)
00054 , fStatusBarLayout(0)
00055 {
00056    fShowEventStatus = kFALSE;
00057 
00058 // Add MINFEmbeddedCanvas
00059    fEmbeddedCanvas = new MINFEmbeddedCanvas(name, this,
00060                                                      width+4, height+4);
00061    fCanvasLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft |
00062                                         kLHintsExpandX | kLHintsExpandY,
00063                                                             5, 5, 5, 5);
00064    AddFrame(fEmbeddedCanvas, fCanvasLayout);
00065 
00066 // Create status bar
00067    int parts[] = { 33, 10, 10, 47 };
00068    fStatusBar = new TGStatusBar(this, 10, 10);
00069    fStatusBar->SetParts(parts, 4);
00070 
00071    fStatusBarLayout = new TGLayoutHints(kLHintsTop | kLHintsLeft |
00072                                             kLHintsExpandX, 2, 2, 1, 1);
00073 
00074    fEmbeddedCanvas->SetShowEventStatus(fShowEventStatus);
00075    AddFrame(fStatusBar, fStatusBarLayout);
00076 
00077 // Final window setup
00078    MapSubwindows();
00079 
00080 // By default status bar is visible
00081    ShowStatusBar(kTRUE);
00082 
00083    Resize(GetDefaultSize());
00084    MapWindow();
00085 }

MINFDisplayFrame::~MINFDisplayFrame (  )  [virtual]

Definition at line 88 of file MINFDisplayFrame.cxx.

References fCanvasLayout, fEmbeddedCanvas, fStatusBar, and fStatusBarLayout.

00089 {
00090 
00091 // Delete ROOT basic canvas. Order is significant. Delete in reverse
00092 // order of creation.
00093    delete fStatusBar;
00094    delete fStatusBarLayout;
00095    delete fCanvasLayout;
00096    delete fEmbeddedCanvas;
00097 }


Member Function Documentation

TCanvas * MINFDisplayFrame::GetCanvas (  )  const

Definition at line 100 of file MINFDisplayFrame.cxx.

References fEmbeddedCanvas, and MINFEmbeddedCanvas::GetCanvas().

Referenced by MINFGUIPanel::ProcessMessage().

00101 {
00102    return fEmbeddedCanvas->GetCanvas();
00103 }

MINFEmbeddedCanvas* MINFDisplayFrame::GetEmbeddedCanvas (  )  const [inline]

Definition at line 45 of file MINFDisplayFrame.h.

References fEmbeddedCanvas.

Referenced by MINFGUIPanel::GetCanvas(), and MINFGUIPanel::ProcessMessage().

00046                                                {return fEmbeddedCanvas;}

void MINFDisplayFrame::SetStatusText ( Text_t *  txt = 0,
Int_t  partidx = 0 
)

Definition at line 106 of file MINFDisplayFrame.cxx.

References fStatusBar.

00107 {
00108 
00109 // Set text in status bar.
00110    fStatusBar->SetText(txt, partidx);
00111 }

void MINFDisplayFrame::SetUnZoomPad ( TVirtualPad *  pad  ) 

Definition at line 114 of file MINFDisplayFrame.cxx.

References MINFast::Display(), gMINFast, and MINFDisplay::SetUnZoomPad().

00115 {
00116 
00117 // Set text in status bar.
00118    gMINFast->Display()->SetUnZoomPad(pad);
00119 }

void MINFDisplayFrame::ShowStatusBar ( Bool_t  show = kTRUE  ) 

Definition at line 122 of file MINFDisplayFrame.cxx.

References fEmbeddedCanvas, fShowEventStatus, fStatusBar, and MINFEmbeddedCanvas::SetShowEventStatus().

Referenced by MINFGUIPanel::ShowStatusBar().

00123 {
00124 
00125 // Show or hide statusbar.
00126    fShowEventStatus = show;
00127    fEmbeddedCanvas->SetShowEventStatus(show);
00128    if (show) {
00129       ShowFrame(fStatusBar);
00130    } else {
00131       HideFrame(fStatusBar);
00132    }
00133 }


Member Data Documentation

TGLayoutHints* MINFDisplayFrame::fCanvasLayout [private]

Definition at line 33 of file MINFDisplayFrame.h.

Referenced by ~MINFDisplayFrame().

MINFEmbeddedCanvas* MINFDisplayFrame::fEmbeddedCanvas [private]

Definition at line 32 of file MINFDisplayFrame.h.

Referenced by GetCanvas(), GetEmbeddedCanvas(), ShowStatusBar(), and ~MINFDisplayFrame().

Bool_t MINFDisplayFrame::fShowEventStatus [private]

Definition at line 37 of file MINFDisplayFrame.h.

Referenced by ShowStatusBar().

TGStatusBar* MINFDisplayFrame::fStatusBar [private]

Definition at line 34 of file MINFDisplayFrame.h.

Referenced by SetStatusText(), ShowStatusBar(), and ~MINFDisplayFrame().

TGLayoutHints* MINFDisplayFrame::fStatusBarLayout [private]

Definition at line 35 of file MINFDisplayFrame.h.

Referenced by ~MINFDisplayFrame().


The documentation for this class was generated from the following files:
Generated on Wed Sep 10 22:51:29 2014 for loon by  doxygen 1.4.7