Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TEveBrowser.h
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TEveBrowser
13#define ROOT_TEveBrowser
14
15#include "TEveElement.h"
16
17#include "TContextMenu.h"
18#include "TGListTree.h"
19#include "TRootBrowser.h"
20#include "TString.h"
21
22
23class TGFileBrowser;
24class TGSplitter;
25
26class TEveGedEditor;
27
28
30{
31private:
32 TEveListTreeItem(const TEveListTreeItem&); // not implemented
33 TEveListTreeItem& operator=(const TEveListTreeItem&); // not implemented
34
35protected:
37
38 void NotSupported(const char* func) const;
39
40public:
42 ~TEveListTreeItem() override {}
43
44 Bool_t IsActive() const override { return fElement->GetSelectedLevel() != 0; }
45 Pixel_t GetActiveColor() const override;
46 void SetActive(Bool_t) override { NotSupported("SetActive"); }
47
48 const char *GetText() const override { return fElement->GetElementName(); }
49 Int_t GetTextLength() const override { return strlen(fElement->GetElementName()); }
50 const char *GetTipText() const override { return fElement->GetElementTitle(); }
51 Int_t GetTipTextLength() const override { return strlen(fElement->GetElementTitle()); }
52 void SetText(const char *) override { NotSupported("SetText"); }
53 void SetTipText(const char *) override { NotSupported("SetTipText"); }
54
55 void SetUserData(void *, Bool_t=kFALSE) override { NotSupported("SetUserData"); }
56 void *GetUserData() const override { return fElement; }
57
58 const TGPicture*GetPicture() const override { return fElement->GetListTreeIcon(fOpen); }
59 const TGPicture*GetCheckBoxPicture() const override { return fElement->GetListTreeCheckBoxIcon(); }
60
61 void SetPictures(const TGPicture*, const TGPicture*) override { NotSupported("SetUserData"); }
62 void SetCheckBoxPictures(const TGPicture*, const TGPicture*) override { NotSupported("SetUserData"); }
63
64 void SetCheckBox(Bool_t=kTRUE) override { NotSupported("SetCheckBox"); }
65 Bool_t HasCheckBox() const override { return kTRUE; }
66 void CheckItem(Bool_t=kTRUE) override { printf("TEveListTreeItem::CheckItem - to be ignored ... all done via signal Checked().\n"); }
67 void Toggle() override;
68 Bool_t IsChecked() const override { return fElement->GetRnrState(); }
69
70 // Propagation of checked-state form children to parents. Not needed, ignore.
71
72 // Item coloration (underline + minibox)
73 Bool_t HasColor() const override { return fElement->HasMainColor(); }
74 Color_t GetColor() const override { return fElement->GetMainColor(); }
75 void SetColor(Color_t) override { NotSupported("SetColor"); }
76 void ClearColor() override { NotSupported("ClearColor"); }
77
78 ClassDefOverride(TEveListTreeItem,0); // Special llist-tree-item for Eve.
79};
80
81
83{
86
87 friend class TEveManager;
88
89protected:
92
97
99
101
103
104public:
105 TEveGListTreeEditorFrame(const TGWindow *p = nullptr, Int_t width=250, Int_t height=700);
106 ~TEveGListTreeEditorFrame() override;
107
108 void ConnectSignals();
109 void DisconnectSignals();
110
111 void ReconfToHorizontal();
112 void ReconfToVertical();
113
114 TGListTree* GetListTree() const { return fListTree; }
115 TEveGedEditor* GetEditor() const { return fEditor; }
116
118 void ItemClicked(TGListTreeItem *entry, Int_t btn, UInt_t mask, Int_t x, Int_t y);
119 void ItemDblClicked(TGListTreeItem* item, Int_t btn);
120 void ItemKeyPress(TGListTreeItem *entry, UInt_t keysym, UInt_t mask);
121
122 static void SetEditorClass(const char* edclass);
123
124 ClassDefOverride(TEveGListTreeEditorFrame, 0); // Composite GUI frame for parallel display of a TGListTree and TEveGedEditor.
125};
126
127// ----------------------------------------------------------------
128
130{
131 TEveBrowser(const TEveBrowser&); // Not implemented
132 TEveBrowser& operator=(const TEveBrowser&); // Not implemented
133
134protected:
135 void SetupCintExport(TClass* cl);
136 void CalculateReparentXY(TGObject* parent, Int_t& x, Int_t& y);
137
142
143public:
145 ~TEveBrowser() override { CloseTabs(); }
146
147 void ReallyDelete() override;
148 void CloseTab(Int_t id) override;
149 void CloseWindow() override;
150
151 void InitPlugins(Option_t *opt="FI");
152
156
157 void EveMenu(Int_t id);
158
159 // Some getters missing in TRootBrowser
160 TGMenuBar* GetMenuBar() const { return fMenuBar; }
162
163 void HideBottomTab();
164
165 void SanitizeTabCounts();
166
167 ClassDefOverride(TEveBrowser, 0); // Specialization of TRootBrowser for Eve.
168};
169
170#endif
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
#define b(i)
Definition RSha256.hxx:100
#define h(i)
Definition RSha256.hxx:106
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
short Color_t
Definition RtypesCore.h:92
unsigned int UInt_t
Definition RtypesCore.h:46
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t mask
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
This class provides an interface to context sensitive popup menus.
Specialization of TRootBrowser for Eve.
TGMenuBar * GetMenuBar() const
TEveBrowser(const TEveBrowser &)
void CalculateReparentXY(TGObject *parent, Int_t &x, Int_t &y)
Calculate position of a widget for reparenting into parent.
TGFileBrowser * GetFileBrowser() const
Returns the default file-browser.
void SanitizeTabCounts()
TRootBrowser keeps (somewhat unnecessarily) counters for number ob tabs on each position.
TGHorizontalFrame * GetTopMenuFrame() const
void EveMenu(Int_t id)
Handle events from Eve menu.
~TEveBrowser() override
void SetupCintExport(TClass *cl)
Add "Export to CINT" into context-menu for class cl.
void CloseTab(Int_t id) override
Virtual from TRootBrowser. Need to intercept closing of Eve tabs.
void CloseWindow() override
Virtual from TGMainFrame. Calls TEveManager::Terminate().
void ReallyDelete() override
Override from TRootBrowser.
TGPopupMenu * fSelPopup
TGPopupMenu * fHilPopup
TGFileBrowser * MakeFileBrowser(Bool_t make_default=kFALSE)
Create a file-browser.
void SetFileBrowser(TGFileBrowser *b)
Set the default file browser.
void InitPlugins(Option_t *opt="FI")
Initialize standard plugins.
TGPopupMenu * fEvePopup
void HideBottomTab()
Hide the bottom tab (usually holding command-line widget).
TEveBrowser & operator=(const TEveBrowser &)
TGFileBrowser * fFileBrowser
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition TEveElement.h:36
virtual UChar_t GetSelectedLevel() const
Get selection level, needed for rendering selection and highlight feedback.
virtual const char * GetElementTitle() const
Virtual function for retrieving title of the render-element.
virtual Bool_t GetRnrState() const
virtual Color_t GetMainColor() const
virtual Bool_t HasMainColor() const
virtual const char * GetElementName() const
Virtual function for retrieving name of the element.
virtual const TGPicture * GetListTreeCheckBoxIcon()
Returns list-tree-item check-box picture appropriate for given rendering state.
virtual const TGPicture * GetListTreeIcon(Bool_t open=kFALSE)
Returns pointer to first listtreeicon.
Composite GUI frame for parallel display of a TGListTree and TEveGedEditor.
Definition TEveBrowser.h:83
static TString fgEditorClass
static void SetEditorClass(const char *edclass)
Set GED editor class.
void ItemClicked(TGListTreeItem *entry, Int_t btn, UInt_t mask, Int_t x, Int_t y)
Item has been clicked, based on mouse button do:
void DisconnectSignals()
Disconnect list-tree signals.
TEveGListTreeEditorFrame(const TEveGListTreeEditorFrame &)
void ReconfToVertical()
Reconfigure to vertical layout, list-tree above the editor.
void ItemBelowMouse(TGListTreeItem *entry, UInt_t mask)
Different item is below mouse.
~TEveGListTreeEditorFrame() override
Destructor.
TEveGedEditor * fEditor
Definition TEveBrowser.h:96
TGCompositeFrame * fLTFrame
Definition TEveBrowser.h:91
void ItemDblClicked(TGListTreeItem *item, Int_t btn)
Item has been double-clicked, potentially expand the children.
TContextMenu * fCtxMenu
Definition TEveBrowser.h:98
TGCompositeFrame * fFrame
Definition TEveBrowser.h:90
TEveGListTreeEditorFrame & operator=(const TEveGListTreeEditorFrame &)
void ItemKeyPress(TGListTreeItem *entry, UInt_t keysym, UInt_t mask)
A key has been pressed for an item.
TGListTree * GetListTree() const
void ReconfToHorizontal()
Reconfigure to horizontal layout, list-tree and editor side by side.
void ConnectSignals()
Connect list-tree signals.
TEveGedEditor * GetEditor() const
Specialization of TGedEditor for proper update propagation to TEveManager.
Special list-tree-item for Eve.
Definition TEveBrowser.h:30
Pixel_t GetActiveColor() const override
Return highlight color corresponding to current state of TEveElement.
void ClearColor() override
Definition TEveBrowser.h:76
Bool_t HasColor() const override
Definition TEveBrowser.h:73
Int_t GetTipTextLength() const override
Definition TEveBrowser.h:51
Bool_t IsActive() const override
Definition TEveBrowser.h:44
void SetUserData(void *, Bool_t=kFALSE) override
Definition TEveBrowser.h:55
void SetTipText(const char *) override
Definition TEveBrowser.h:53
void SetText(const char *) override
Definition TEveBrowser.h:52
TEveElement * fElement
Definition TEveBrowser.h:36
TEveListTreeItem(const TEveListTreeItem &)
void SetPictures(const TGPicture *, const TGPicture *) override
Definition TEveBrowser.h:61
void SetCheckBox(Bool_t=kTRUE) override
Definition TEveBrowser.h:64
Int_t GetTextLength() const override
Definition TEveBrowser.h:49
void Toggle() override
Item's check-box state has been toggled ... forward to element's render-state.
void SetCheckBoxPictures(const TGPicture *, const TGPicture *) override
Definition TEveBrowser.h:62
const TGPicture * GetCheckBoxPicture() const override
Definition TEveBrowser.h:59
TEveListTreeItem & operator=(const TEveListTreeItem &)
Color_t GetColor() const override
Definition TEveBrowser.h:74
const char * GetTipText() const override
Definition TEveBrowser.h:50
const TGPicture * GetPicture() const override
Definition TEveBrowser.h:58
void SetColor(Color_t) override
Definition TEveBrowser.h:75
void SetActive(Bool_t) override
Definition TEveBrowser.h:46
void NotSupported(const char *func) const
Warn about access to function members that should never be called.
TEveListTreeItem(TEveElement *el)
Definition TEveBrowser.h:41
void * GetUserData() const override
Definition TEveBrowser.h:56
~TEveListTreeItem() override
Definition TEveBrowser.h:42
Bool_t HasCheckBox() const override
Definition TEveBrowser.h:65
Bool_t IsChecked() const override
Definition TEveBrowser.h:68
const char * GetText() const override
Definition TEveBrowser.h:48
void CheckItem(Bool_t=kTRUE) override
Definition TEveBrowser.h:66
Central application manager for Eve.
Definition TEveManager.h:50
A frame containing two scrollbars (a horizontal and a vertical) and a viewport.
Definition TGCanvas.h:192
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:287
System file browser, used as TRootBrowser plug-in.
A composite frame that layout their children in horizontal way.
Definition TGFrame.h:385
Bool_t fOpen
true if item is open
Definition TGListTree.h:42
A list tree is a widget that can contain a number of items arranged in a tree structure.
Definition TGListTree.h:195
Defines top level windows that interact with the system Window Manager.
Definition TGFrame.h:397
The TGMenu.h header contains all different menu classes.
Definition TGMenu.h:282
This class is the baseclass for all ROOT GUI widgets.
Definition TGObject.h:21
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
Definition TGPicture.h:25
This class creates a popup menu object.
Definition TGMenu.h:110
A splitter allows the frames left and right or above and below of it to be resized.
Definition TGSplitter.h:19
ROOT GUI Window base class.
Definition TGWindow.h:23
This class creates a ROOT object browser, constituted by three main tabs.
TGHorizontalFrame * fTopMenuFrame
Top menu frame.
TGMenuBar * fMenuBar
Main (owned) menu bar.
void CloseTabs() override
Properly close the mainframes embedded in the different tabs.
Basic string class.
Definition TString.h:139
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17