Warning, file /include/root/TRootBrowserLite.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef ROOT_TRootBrowserLite
0014 #define ROOT_TRootBrowserLite
0015
0016
0017 #include "TBrowserImp.h"
0018 #include "TGFrame.h"
0019
0020 class TGMenuBar;
0021 class TGPopupMenu;
0022 class TGLayoutHints;
0023 class TGStatusBar;
0024 class TGHorizontal3DLine;
0025 class TGToolBar;
0026 class TGButton;
0027 class TGFSComboBox;
0028 class TGLabel;
0029 class TGListView;
0030 class TRootIconBox;
0031 class TGCanvas;
0032 class TGListTree;
0033 class TGListTreeItem;
0034 class TGFileItem;
0035 class TList;
0036 class TGFileContainer;
0037 class TGComboBox;
0038 class TGTextEdit;
0039
0040 class TRootBrowserLite : public TGMainFrame, public TBrowserImp {
0041
0042 friend class TRootIconBox;
0043
0044 private:
0045 TGMenuBar *fMenuBar;
0046 TGToolBar *fToolBar;
0047 TGHorizontal3DLine *fToolBarSep;
0048 TGVerticalFrame *fV1;
0049 TGVerticalFrame *fV2;
0050 TGLabel *fLbl1;
0051 TGLabel *fLbl2;
0052 TGHorizontalFrame *fHf;
0053 TGCompositeFrame *fTreeHdr;
0054 TGCompositeFrame *fListHdr;
0055
0056 TGLayoutHints *fMenuBarLayout;
0057 TGLayoutHints *fMenuBarItemLayout;
0058 TGLayoutHints *fMenuBarHelpLayout;
0059 TGLayoutHints *fComboLayout;
0060 TGLayoutHints *fBarLayout;
0061 TGComboBox *fDrawOption;
0062 TGLayoutHints *fExpandLayout;
0063 Bool_t fBrowseTextFile;
0064 TString fTextFileName;
0065
0066 TList *fWidgets;
0067 TList *fHistory;
0068 TObject *fHistoryCursor;
0069 const TGPicture *fIconPic;
0070
0071 void CreateBrowser(const char *name);
0072 void ListTreeHighlight(TGListTreeItem *item);
0073 void DeleteListTreeItem(TGListTreeItem *item);
0074 void HighlightListLevel();
0075 void AddToHistory(TGListTreeItem *item);
0076 void IconBoxAction(TObject *obj);
0077 void Chdir(TGListTreeItem *item);
0078 void DisplayDirectory();
0079 void DisplayTotal(Int_t total, Int_t selected);
0080 void SetViewMode(Int_t new_mode, Bool_t force = kFALSE);
0081 void ToSystemDirectory(const char *dirname);
0082 void UpdateDrawOption();
0083 void Search();
0084 void BrowseTextFile(const char *file);
0085 void HideTextEdit();
0086 void ShowMacroButtons(Bool_t show = kTRUE);
0087
0088 Bool_t HistoryBackward();
0089 Bool_t HistoryForward();
0090 void ClearHistory();
0091
0092 TRootBrowserLite(const TRootBrowserLite&) = delete;
0093 TRootBrowserLite& operator=(const TRootBrowserLite&) = delete;
0094
0095 protected:
0096 TGPopupMenu *fFileMenu;
0097 TGPopupMenu *fViewMenu;
0098 TGPopupMenu *fOptionMenu;
0099 TGPopupMenu *fHelpMenu;
0100 TGPopupMenu *fSortMenu;
0101 TGListView *fListView;
0102 TRootIconBox *fIconBox;
0103 TGCanvas *fTreeView;
0104 TGListTree *fLt;
0105 TGButton *fToolBarButton[7];
0106 TGFSComboBox *fFSComboBox;
0107 TGStatusBar *fStatusBar;
0108 TGListTreeItem *fListLevel;
0109 Bool_t fTreeLock;
0110 Int_t fViewMode;
0111 Int_t fSortMode;
0112 TGTextEdit *fTextEdit;
0113
0114 public:
0115 TRootBrowserLite(TBrowser *b = nullptr, const char *title = "ROOT Browser", UInt_t width = 800, UInt_t height = 500);
0116 TRootBrowserLite(TBrowser *b, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height);
0117 ~TRootBrowserLite() override;
0118
0119 void Add(TObject *obj, const char *name = nullptr, Int_t check = -1) override;
0120 virtual void AddToBox(TObject *obj, const char *name);
0121 virtual void AddToTree(TObject *obj, const char *name, Int_t check = -1);
0122
0123 void AddCheckBox(TObject *obj, Bool_t check = kFALSE) override;
0124 void CheckObjectItem(TObject *obj, Bool_t check = kFALSE) override;
0125 void RemoveCheckBox(TObject *obj) override;
0126
0127 void BrowseObj(TObject *obj) override;
0128 void ExecuteDefaultAction(TObject *obj) override;
0129 virtual void DoubleClicked(TObject *obj);
0130 virtual void Checked(TObject *obj, Bool_t check);
0131 void CloseTabs() override { }
0132 void Iconify() override { }
0133 void RecursiveRemove(TObject *obj) override;
0134 void Refresh(Bool_t force = kFALSE) override;
0135 virtual void ResizeBrowser() { }
0136 virtual void ShowToolBar(Bool_t show = kTRUE);
0137 virtual void ShowStatusBar(Bool_t show = kTRUE);
0138 void Show() override { MapRaised(); }
0139 virtual void SetDefaults(const char *iconStyle = nullptr, const char *sortBy = nullptr);
0140 Bool_t HandleKey(Event_t *event) override;
0141 void SetStatusText(const char *txt, Int_t col) override;
0142
0143 TGListTree *GetListTree() const { return fLt; }
0144 TGFileContainer *GetIconBox() const;
0145 TGStatusBar *GetStatusBar() const { return fStatusBar; }
0146 TGMenuBar *GetMenuBar() const { return fMenuBar; }
0147 TGToolBar *GetToolBar() const { return fToolBar; }
0148 void SetDrawOption(Option_t *option = "") override;
0149 Option_t *GetDrawOption() const override;
0150 void SetSortMode(Int_t new_mode);
0151 TGMainFrame *GetMainFrame() const override { return (TGMainFrame *)this; }
0152
0153
0154 void CloseWindow() override;
0155 Bool_t ProcessMessage(Longptr_t msg, Longptr_t parm1, Longptr_t parm2) override;
0156 void ReallyDelete() override;
0157
0158
0159 void ExecMacro();
0160 void InterruptMacro();
0161
0162 static TBrowserImp *NewBrowser(TBrowser *b = nullptr, const char *title = "ROOT Browser", UInt_t width = 800, UInt_t height = 500, Option_t *opt="");
0163 static TBrowserImp *NewBrowser(TBrowser *b, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height, Option_t *opt="");
0164
0165 ClassDefOverride(TRootBrowserLite,0)
0166 };
0167
0168 #endif