]>
Commit | Line | Data |
---|---|---|
32e219c2 | 1 | #ifndef ROOT_TGNewBrowser |
2 | #define ROOT_TGNewBrowser | |
3 | ||
4 | #ifndef ROOT_TGFrame | |
5 | #include "TGFrame.h" | |
6 | #endif | |
7 | ||
8 | //#ifndef ROOT_TBrowserImp | |
9 | //#include "TBrowserImp.h" | |
10 | //#endif | |
11 | ||
12 | class TGLayoutHints; | |
13 | class TGTab; | |
14 | class TGListTree; | |
15 | class TGListTreeItem; | |
16 | class TGPicture; | |
17 | class TGLabel; | |
18 | class TGComboBox; | |
19 | class TGTextEntry; | |
20 | class TGTextBuffer; | |
21 | class TGTextView; | |
22 | class TContextMenu; | |
23 | class TRegexp; | |
24 | class TGMenuBar; | |
25 | class TGPopupMenu; | |
26 | class TGStatusBar; | |
27 | class TGPictureButton; | |
28 | class TGVSplitter; | |
29 | class TGHSplitter; | |
30 | ||
31 | class TGFileBrowser; | |
32 | ||
33 | class TGNewBrowser : public TGMainFrame { //, public TBrowserImp { | |
34 | ||
35 | protected: | |
36 | ||
37 | TGLayoutHints *fLH0, *fLH1, *fLH2, *fLH3, *fLH4; | |
38 | TGLayoutHints *fLH5, *fLH6, *fLH7; | |
39 | TGTab *fTabLeft; | |
40 | TGTab *fTabRight; | |
41 | TGTab *fTabBottom; | |
42 | TGTab *fEditTab; | |
43 | TGVerticalFrame *fVf; | |
44 | TGHorizontalFrame *fHf; | |
45 | TGHorizontalFrame *fH1; | |
46 | TGHorizontalFrame *fH2; | |
47 | TGVerticalFrame *fV1; | |
48 | TGVerticalFrame *fV2; | |
49 | TGVSplitter *fVSplitter; | |
50 | TGHSplitter *fHSplitter; | |
51 | TGCompositeFrame *fEditFrame; | |
52 | TGHorizontalFrame *fTopMenuFrame; | |
53 | TGHorizontalFrame *fPreMenuFrame; | |
54 | TGHorizontalFrame *fMenuFrame; | |
55 | TGHorizontalFrame *fToolbarFrame; | |
56 | TGMenuBar *fMenuBar; | |
57 | TGPopupMenu *fMenuFile; | |
58 | TGCompositeFrame *fActMenuBar; | |
59 | TGStatusBar *fStatusBar; | |
60 | Int_t fNbTab[3]; | |
61 | Int_t fCrTab[3]; | |
62 | Int_t fPid; // current process id | |
63 | ||
64 | public: | |
65 | enum EInsertPosition { | |
66 | kLeft, kRight, kBottom | |
67 | }; | |
68 | ||
69 | TGNewBrowser(const char *name = "ROOT Browser", UInt_t width = 800, UInt_t height = 500, Bool_t initshow=kTRUE); | |
70 | TGNewBrowser(const char *name, Int_t x, Int_t y, UInt_t width, UInt_t height, Bool_t initshow=kTRUE); | |
71 | virtual ~TGNewBrowser(); | |
72 | ||
73 | TGFileBrowser* MakeFileBrowser(); | |
74 | void InitPlugins(); | |
75 | ||
76 | void CreateBrowser(const char *name); | |
77 | void CloseWindow(); | |
78 | void DoTab(Int_t id); | |
79 | TGFrame *GetActFrame() const { return (TGFrame *)fEditFrame; } | |
80 | TGStatusBar *GetStatusBar() const { return fStatusBar; } | |
81 | TGTab *GetTabLeft() const { return fTabLeft; } | |
82 | TGTab *GetTabRight() const { return fTabRight; } | |
83 | TGTab *GetTabBottom() const { return fTabBottom; } | |
84 | TGTab *GetTab(Int_t pos) const; | |
85 | void SetTab(Int_t pos = kRight, Int_t subpos = -1); | |
86 | void SetTabTitle(const char *title, Int_t pos = kRight, Int_t subpos = -1); | |
87 | void HandleMenu(Int_t id); | |
88 | using TGCompositeFrame::RemoveFrame; | |
89 | void RecursiveReparent(TGPopupMenu *popup); | |
90 | void RemoveFrame(Int_t pos, Int_t subpos); | |
91 | void ShowMenu(TGCompositeFrame *menu); | |
92 | TGCompositeFrame *StartEmbedding(Int_t pos = kRight, Int_t subpos = -1); | |
93 | void StopEmbedding(TGLayoutHints *layout=0); | |
94 | void SwitchMenus(TGCompositeFrame *from); | |
95 | ||
96 | virtual void ExecPlugin(const char *fname, Int_t pos = kRight, Int_t subpos = -1); | |
97 | virtual Bool_t HandleKey(Event_t *event); | |
98 | ||
99 | // static TBrowserImp *NewBrowser(TBrowser *b = 0, const char *title = "ROOT Browser", UInt_t width = 800, UInt_t height = 500); | |
100 | // static TBrowserImp *NewBrowser(TBrowser *b, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height); | |
101 | ||
102 | // overridden from TGMainFrame | |
103 | // void ReallyDelete(); | |
104 | ||
105 | ClassDef(TGNewBrowser, 0) | |
106 | }; | |
107 | ||
108 | #endif |