1#ifndef ROOT_GRootBrowser
2#define ROOT_GRootBrowser
12#ifndef ROOT_TBrowserImp
13#include "TBrowserImp.h"
45 explicit GBrowserPlugin(
const char* name,
const char* cmd =
"", Int_t tab = 1, Int_t sub = -1)
121 TGVerticalFrame*
fVf{
nullptr};
122 TGHorizontalFrame*
fHf{
nullptr};
123 TGHorizontalFrame*
fH1{
nullptr};
124 TGHorizontalFrame*
fH2{
nullptr};
125 TGVerticalFrame*
fV1{
nullptr};
126 TGVerticalFrame*
fV2{
nullptr};
177 explicit GRootBrowser(TBrowser* b =
nullptr,
const char* name =
"ROOT Browser", UInt_t width = 800, UInt_t height = 500, Option_t* opt =
"", Bool_t initshow = kTRUE);
178 GRootBrowser(TBrowser* b,
const char* name, Int_t x, Int_t y, UInt_t width, UInt_t height, Option_t* opt =
"", Bool_t initshow = kTRUE);
188 void DoTab(Int_t
id);
189 void EventInfo(Int_t event, Int_t px, Int_t py, TObject* selected);
196 TGTab*
GetTab(Int_t pos)
const;
203 void ShowMenu(TGCompositeFrame* menu);
212 virtual void Checked(TObject* obj, Bool_t checked);
214 void Add(TObject* obj,
const char* name =
nullptr, Int_t check = -1)
override;
216 void Refresh(Bool_t force = kFALSE)
override;
217 void Show()
override { MapRaised(); }
219 TGMainFrame*
GetMainFrame()
const override {
return const_cast<TGMainFrame*
>(
static_cast<const TGMainFrame*
>(
this)); }
221 Long_t
ExecPlugin(
const char* name =
nullptr,
const char* fname =
nullptr,
const char* cmd =
nullptr,
224 Bool_t
HandleKey(Event_t* event)
override;
232 static TBrowserImp*
NewBrowser(TBrowser* b =
nullptr,
const char* title =
"ROOT Browser", UInt_t width = 800,
233 UInt_t height = 500, Option_t* opt =
"");
234 static TBrowserImp*
NewBrowser(TBrowser* b,
const char* title, Int_t x, Int_t y, UInt_t width, UInt_t height,
void SetSubTab(Int_t sub)
simple setter function for the tab element number
void SetCommand(const char *cmd)
simple setter function for the command to be executed
Int_t fSubTab
Tab element number.
TString fCommand
Command to be executed.
GBrowserPlugin(const char *name, const char *cmd="", Int_t tab=1, Int_t sub=-1)
void SetTab(Int_t tab)
simple setter function for the tab number
TBrowserImp * fActBrowser
Actual (active) browser imp.
void ReallyDelete() override
void InitPlugins(Option_t *opt="")
Int_t fEditSubPos
Id of subtab in "Edit" mode.
TGVerticalFrame * fVf
Vertical frame.
void CloseWindow() override
Int_t fPid
Current process id.
void CreateBrowser(const char *name)
void HandleMenu(Int_t id)
TGTab * GetTabRight() const
Long_t ExecPlugin(const char *name=nullptr, const char *fname=nullptr, const char *cmd=nullptr, Int_t pos=static_cast< Int_t >(EInsertPosition::kRight), Int_t subpos=-1) override
TGMenuBar * fMenuBar
Main (owned) menu bar.
TGLayoutHints * fLH3
Layout hints, part 4.
void SetStatusText(const char *txt, Int_t col) override
void RecursiveRemove(TObject *obj) override
TGVerticalFrame * fV1
Vertical frame.
TGPopupMenu * fMenuFile
"File" popup menu
TGHorizontalFrame * fHf
Horizontal frame.
void SwitchMenus(TGCompositeFrame *from)
std::array< Int_t, 3 > fCrTab
Actual (active) tab elements (for each Tab)
TGHorizontalFrame * fToolbarFrame
Toolbar frame.
Int_t fNbInitPlugins
Number of initial plugins (from .rootrc)
TGStatusBar * fStatusBar
Status bar.
void StartEmbedding(Int_t pos=static_cast< Int_t >(EInsertPosition::kRight), Int_t subpos=-1) override
void SetTab(Int_t pos=static_cast< Int_t >(EInsertPosition::kRight), Int_t subpos=-1)
virtual void CloseTab(Int_t id)
void SetTabTitle(const char *title, Int_t pos=static_cast< Int_t >(EInsertPosition::kRight), Int_t subpos=-1)
void Add(TObject *obj, const char *name=nullptr, Int_t check=-1) override
TGHSplitter * fHSplitter
Horizontal splitter.
TGTab * fEditTab
Tab in "Edit" mode.
void CloseTabs() override
TGLayoutHints * fLH1
Layout hints, part 2.
TGPopupMenu * fMenuExecPlugin
"Exec Plugin" popup menu
void SetActBrowser(TBrowserImp *b)
TGCompositeFrame * fEditFrame
Frame in "Edit" mode.
virtual Bool_t IsCloseTabShown() const
TGTab * fTabRight
Right Tab.
Bool_t fShowCloseTab
kTRUE to show close icon on tab elements
TList fBrowsers
List of (sub)browsers.
TGHorizontalFrame * fH2
Horizontal frame.
static TBrowserImp * NewBrowser(TBrowser *b=nullptr, const char *title="ROOT Browser", UInt_t width=800, UInt_t height=500, Option_t *opt="")
const TGPicture * fIconPic
icon picture
TGLayoutHints * fLH6
Layout hints, part 7.
TGTab * fTabBottom
Bottom Tab.
void ExecuteDefaultAction(TObject *obj) override
TGHorizontalFrame * fH1
Horizontal frame.
TGVerticalFrame * fV2
Vertical frame.
virtual void ShowCloseTab(Bool_t show)
TGHorizontalFrame * fMenuFrame
Shared menu frame.
Option_t * GetDrawOption() const override
TGCompositeFrame * fActMenuBar
Actual (active) menu bar.
void Refresh(Bool_t force=kFALSE) override
TGVSplitter * fVSplitter
Vertical splitter.
TGLayoutHints * fLH5
Layout hints, part 6.
void BrowseObj(TObject *obj) override
void RemoveTab(Int_t pos, Int_t subpos)
TGTab * GetTabLeft() const
Int_t fEditPos
Id of tab in "Edit" mode.
GRootBrowser(GRootBrowser &&) noexcept
TGFrame * GetToolbarFrame() const
TGTab * fTabLeft
Left Tab.
TGStatusBar * GetStatusBar() const
GRootBrowser(const GRootBrowser &)
TGHorizontalFrame * fTopMenuFrame
Top menu frame.
void StopEmbedding(const char *name=nullptr) override
TGLayoutHints * fLH0
Layout hints, part 1.
TGFrame * GetActFrame() const
TGPopupMenu * fMenuHelp
"Browser Help" popup menu
TGLayoutHints * fLH2
Layout hints, part 3.
TGTab * GetTab(Int_t pos) const
void ShowMenu(TGCompositeFrame *menu)
virtual void DoubleClicked(TObject *obj)
void EventInfo(Int_t event, Int_t px, Int_t py, TObject *selected)
Bool_t HandleKey(Event_t *event) override
TList fPlugins
List of plugins.
TGHorizontalFrame * fPreMenuFrame
First (owned) menu frame.
TGMainFrame * GetMainFrame() const override
virtual void Checked(TObject *obj, Bool_t checked)
void RecursiveReparent(TGPopupMenu *popup)
TGTab * GetTabBottom() const
TGLayoutHints * fLH7
Layout hints, part 8.
std::array< Int_t, 3 > fNbTab
Number of tab elements (for each Tab)
TGLayoutHints * fLH4
Layout hints, part 5.