Universita' di GenovaINFN Sezione di Genova  
AIRWATCH / EUSO Genova

EGViewer

#include "EGViewer.hh"

EGViewer


class description - source file - inheritance tree (.pdf)

class EGViewer : public TGMainFrame

Inheritance Chart:
TObject
<-
TGObject
<-
TGWindow
TQObject
<-
TGFrame
<-
TGCompositeFrame
<-
TGMainFrame
<-
EGViewer

    protected:
EGViewer(Bool_t build, const char* name = "0", Int_t w = 800, Int_t h = 600) virtual Int_t A4Height(Int_t w) void AddMenuBar() void AddPadToClean(TVirtualPad* pad) const void AddStatusBar() void AddTabs() void AddUserFrame() virtual Bool_t CloneToCanvas(TVirtualPad* pad) Bool_t Constructor(const char* name, const char* title) virtual void CreateEditor() void DrawClonePad(TVirtualPad* newp, TVirtualPad* oldp) const TRootEmbeddedCanvas* GetEmbeddedCanvas(TGCompositeFrame*) const virtual TGTab* GetTab() const Bool_t IsPadLookup() const virtual Bool_t ProcessMessageCommand(Long_t submsg, Long_t mp1, Long_t mp2) virtual Bool_t ProcessMessageCommandMenu(Long_t mp1) virtual Bool_t ProcessMessageTextview(Long_t submsg, Long_t mp1, Long_t mp2) virtual Bool_t ProcessMessageUser(Long_t submsg, Long_t mp1, Long_t mp2) void SetPadFillColor(TVirtualPad& p, Int_t col) const void SetPadLookup(Bool_t = kTRUE) void UpdatePSHeader(const TString& name) const void UpdateTab(TGCompositeFrame* f) virtual void UpdateWMSizeHints() public:
EGViewer(const char* name = "0", const char* title = "0", Int_t w = 800, Int_t h = 600) EGViewer(const EGViewer&) virtual ~EGViewer() virtual TGCompositeFrame* AddEmptyTab(const char* title) virtual TCanvas* AddTab(const char* name, const char* title = "0") static TClass* Class() virtual void Clear(Option_t* = "") virtual void CloseWindow() virtual TCanvas* CurrentCanvas() const virtual void EventInfo(Int_t event, Int_t px, Int_t py, TObject* selected) virtual TCanvas* FindAddTab(const char* name, const char* title = "0") virtual TCanvas* FindCanvas(const char* name) const virtual TCanvas* FindCanvasByTab(Int_t i) const virtual TCanvas* FindCanvasByTab(TGCompositeFrame* f) const virtual TSeqCollection* GetListOfCanvases() const virtual const char* GetName() const virtual TGProgressBar* GetProgressBar() const virtual const char* GetTitle() const virtual Bool_t HandleEvent(Event_t* event) virtual Bool_t HandleKey(Event_t* event) virtual TClass* IsA() const virtual Int_t NextTab() const virtual Int_t PrevTab() const virtual Bool_t ProcessMessage(Long_t msg, Long_t mp1, Long_t mp2) virtual Int_t Read(const char* name) virtual void RemoveTab(const char* name) virtual void RemoveTab(Int_t i) virtual void RemoveTabs() virtual Int_t SaveAsPDF(const char* name = "0") virtual Int_t SaveAsPS(const char* name = "0") virtual Int_t SaveAsRoot(const char* name = "0") virtual void SelectTab(Int_t) const virtual void SetName(const char* name) virtual void SetStatusText(const char* txt, Int_t partidx) virtual void SetStatusText(const char* txt, Int_t partidx) const virtual void SetTitle(const char* title) virtual void ShowEditor(Bool_t show = kTRUE) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void ShowProgressBarPosition(Bool_t set = kTRUE, Bool_t percent = kTRUE, const char* format = "%.2f") virtual void ShowTabList(Bool_t show = kTRUE) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) virtual void ToggleEditor() virtual void ToggleTabList() virtual Int_t Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) const

Data Members


    protected:
TList* fList TList* fCanvases TMutex* fMutex TString fName TString fTitle TVirtualPad* fOldPad Bool_t fPadLookup TGComboBox* fTabCombo TGCompositeFrame* fMenuFrame TGCompositeFrame* fStatusFrame TGCompositeFrame* fMainFrame TGCompositeFrame* fUserFrame TGCompositeFrame* fEditorFrame TGHProgressBar* fProgressBar TGHorizontal3DLine* fLine TGLayoutHints* fLayCanvas TGMenuBar* fMenuBar TGPopupMenu* fFileMenu TGPopupMenu* fFileSaveMenu TGPopupMenu* fSizeMenu TGPopupMenu* fSizePaperMenu TGPopupMenu* fTabMenu TGPopupMenu* fViewMenu TGPopupMenu* fOptionMenu TGStatusBar* fStatusBar TGTab* fTab TGListBox* fTabList TGCompositeFrame* fTabListFrame TVirtualPadEditor* fEditor

Class Description

 EGViewer

 <extensive class description>

   Config file parameters
   ======================

   <parameter name>: <parameter description>
   -Valid options: <available options>


EGViewer( const char* name, const char* title, Int_t w, Int_t h) : TGMainFrame(gClient->GetRoot(), w, h)
 Constructor


EGViewer(Bool_t build, const char* name, Int_t w, Int_t h) : TGMainFrame(gClient->GetRoot(), w, h)
 Protected constructor


Bool_t Constructor(const char* name, const char* title)
 Build the Viewer


~EGViewer()
 Destructor


void UpdateWMSizeHints()
 Sets the WM min-max size of the window not to hide the tab list.
 Sometime, if it is hidden a crash may occour.


void CloseWindow()

void Clear( Option_t* opt )



void AddMenuBar()
 File Menu


void AddUserFrame()
 Adds an empty TGCompositeFrame which might be filled by the user


void AddTabs()
 Add Tabs frame


void AddStatusBar()
 Add the status bar


void CreateEditor()



void ShowEditor( Bool_t show )



void ToggleEditor()



TGCompositeFrame* AddEmptyTab( const char* title )



TCanvas* AddTab( const char* name, const char* title )
 Add new tab


TCanvas* FindAddTab( const char* name, const char* title )
 Add new tab if it's not already in the list


void RemoveTab(Int_t i )
 Remove the i-th Tab


void SelectTab(Int_t i) const

Int_t NextTab() const
 Switch to the next tab


Int_t PrevTab() const
 Switch to the next tab


void ShowTabList( Bool_t show)
 Shows Tab Combo box


void ToggleTabList()
 Toggles Tab Combo box.


Bool_t HandleEvent(Event_t* event)

Bool_t HandleKey(Event_t* event)
 Handle keybord commands



Bool_t ProcessMessage(Long_t msg, Long_t mp1, Long_t mp2 )
 Process the messages from the GUI


Bool_t ProcessMessageCommand(Long_t submsg, Long_t mp1, Long_t mp2)



Bool_t ProcessMessageCommandMenu(Long_t mp1)
 Menu messages


Bool_t ProcessMessageTextview(Long_t submsg, Long_t mp1, Long_t mp2)

Bool_t ProcessMessageUser(Long_t submsg, Long_t mp1, Long_t mp2)

TRootEmbeddedCanvas* GetEmbeddedCanvas(TGCompositeFrame *cf) const
 Takes a TGCompositeFrame as argument. Searches for the first
 TRootEmbeddedCanvas which is contained by it and returns a pointer
 to the corresponding TCanvas. If it isn't found NULL is returned.


TCanvas* CurrentCanvas() const
 Returns the canvas in the selected tab, otherwise 0


TCanvas* FindCanvasByTab(int i) const
 Returns GetCanvas of the i-th Tab.


TCanvas* FindCanvasByTab(TGCompositeFrame *f) const
 Takes a TGCompositeFrame as argument. Searches for the first
 TRootEmbeddedCanvas which is contained by it and returns a pointer
 to the corresponding TCanvas. If it isn't found NULL is returned.


TCanvas* FindCanvas(const char* name) const

void RemoveTab( const char* name )
 Find and remove the tab with name


void RemoveTabs()
 Find the tab with name


void SetStatusText(const char *txt, Int_t partidx)
 Set text in status bar.


void SetStatusText(const char *txt, Int_t partidx) const
 Const version of SetStatusText


void UpdateTab(TGCompositeFrame *f)
 Update a canvas in a tab, takes the corresponding TGCompositeFrame
 as an argument. This is necessary, because not all functions
 changing the contents of a canvas or pad can call SetModified()
 for the corresponding tab. If this is not called correctly the
 tab won't be updated calling TCanvas::Update(). So we simply
 redraw it by our own (instead we could recursively call
 TPad::Modified() for everything contained by the TCanvas and
 call TCanvas::Update() afterwards)


Bool_t CloneToCanvas(TVirtualPad* pad)



void AddPadToClean(TVirtualPad* pad) const



void DrawClonePad(TVirtualPad *newp, TVirtualPad *oldp) const

void SetPadLookup( Bool_t lookup )

void EventInfo(Int_t event, Int_t px, Int_t py, TObject *selected)
    This function is called when the option "Event Status"
    in the canvas menu "Options" is selected.


void SetPadFillColor(TVirtualPad &p, Int_t col) const
 Set the background color in a canvas


void UpdatePSHeader(const TString &name) const
 Insert the following two lines into the postscript header:

   %%DocumentPaperSizes: a4
   %%Orientation: Landscape


Int_t SaveAsPS( const char* name )
 Save all tabs in a PDF File.
 FIXME: the behaviour is not well understood, use SaveAsPS instead


Int_t SaveAsPDF( const char* name )
 Save all tabs in a PDF File.
 FIXME: the behaviour is not well understood, use SaveAsPS instead


Int_t SaveAsRoot(const char* name)



Int_t A4Height( Int_t w )

void ShowProgressBarPosition(Bool_t set, Bool_t percent, const char* format)

Int_t Write(const char *name, Int_t option, Int_t bufsize) const



Int_t Read(const char *name)





Inline Functions


         TGProgressBar* GetProgressBar() const
        TSeqCollection* GetListOfCanvases() const
            const char* GetName() const
            const char* GetTitle() const
                   void SetName(const char* name)
                   void SetTitle(const char* title)
                 TGTab* GetTab() const
                 Bool_t IsPadLookup() const
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)
                   void StreamerNVirtual(TBuffer& b)
               EGViewer EGViewer(const EGViewer&)
About Us | EUSO Official Website | Web pages created by Roberto Pesce and Alessandro Thea - Last Update Wed Nov 16 16:24:34 2005