61 Warning(
Form(
"TEveListTreeItem::%s()", func),
"not supported.");
69 switch (
fElement->GetSelectedLevel())
197 fListTree->Connect(
"MouseOver(TGListTreeItem*, UInt_t)",
"TEveGListTreeEditorFrame",
198 this,
"ItemBelowMouse(TGListTreeItem*, UInt_t)");
199 fListTree->Connect(
"Clicked(TGListTreeItem*, Int_t, UInt_t, Int_t, Int_t)",
"TEveGListTreeEditorFrame",
200 this,
"ItemClicked(TGListTreeItem*, Int_t, UInt_t, Int_t, Int_t)");
201 fListTree->Connect(
"DoubleClicked(TGListTreeItem*, Int_t)",
"TEveGListTreeEditorFrame",
202 this,
"ItemDblClicked(TGListTreeItem*, Int_t)");
203 fListTree->Connect(
"KeyPressed(TGListTreeItem*, ULong_t, ULong_t)",
"TEveGListTreeEditorFrame",
204 this,
"ItemKeyPress(TGListTreeItem*, UInt_t, UInt_t)");
216 fListTree->Disconnect(
"MouseOver(TGListTreeItem*, UInt_t)",
217 this,
"ItemBelowMouse(TGListTreeItem*, UInt_t)");
218 fListTree->Disconnect(
"Clicked(TGListTreeItem*, Int_t, UInt_t, Int_t, Int_t)",
219 this,
"ItemClicked(TGListTreeItem*, Int_t, UInt_t, Int_t, Int_t)");
220 fListTree->Disconnect(
"DoubleClicked(TGListTreeItem*, Int_t)",
221 this,
"ItemDblClicked(TGListTreeItem*, Int_t)");
222 fListTree->Disconnect(
"KeyPressed(TGListTreeItem*, ULong_t, ULong_t)",
223 this,
"ItemKeyPress(TGListTreeItem*, UInt_t, UInt_t)");
316 gEve->GetHighlight()->UserPickedElement(el,
kFALSE);
330 static const TEveException eh(
"TEveGListTreeEditorFrame::ItemClicked ");
333 if (el ==
nullptr)
return;
343 if (
gEve->ElementPaste(el))
365 static const TEveException eh(
"TEveGListTreeEditorFrame::ItemDblClicked ");
367 if (btn != 1)
return;
370 if (el ==
nullptr)
return;
384 for (
Int_t i=0; i<
n->GetNdaughters(); i++)
387 title.Form(
"%d : %s[%d]", i,
388 n->GetDaughter(i)->GetVolume()->GetName(),
389 n->GetDaughter(i)->GetNdaughters());
407 static const TEveException eh(
"TEveGListTreeEditorFrame::ItemKeyPress ");
410 if (entry ==
nullptr)
return;
423 throw(eh +
"DestroyDenied set for this item.");
429 gEve->RemoveElement(el, parent);
436 throw(eh +
"DestroyDenied set for this top-level item.");
472 "Export to CINT",
"ExportToCINT",
this,
"const char*,TObject*", 1);
486 gClient->GetDefaultRoot()->GetId(),
487 0, 0,
x,
y, childdum);
493 kNewMainFrameSlot, kNewTabSlot,
494 kNewViewer, kNewScene,
495 kNewBrowser, kNewCanvas, kNewCanvasExt, kNewTextEditor, kNewHtmlBrowser,
496 kSel_PS_Ignore, kSel_PS_Element, kSel_PS_Projectable, kSel_PS_Compound,
497 kSel_PS_PableCompound, kSel_PS_Master, kSel_PS_END,
498 kHil_PS_Ignore, kHil_PS_Element, kHil_PS_Projectable, kHil_PS_Compound,
499 kHil_PS_PableCompound, kHil_PS_Master, kHil_PS_END,
501 kWinDecorNormal, kWinDecorHide, kWinDecorTitleBar, kWinDecorMiniBar
519 fEvePopup->AddEntry(
"New &MainFrame Slot", kNewMainFrameSlot);
520 fEvePopup->AddEntry(
"New &Tab Slot", kNewTabSlot);
522 fEvePopup->AddEntry(
"New &Viewer", kNewViewer);
523 fEvePopup->AddEntry(
"New &Scene", kNewScene);
525 fEvePopup->AddEntry(
"New &Browser", kNewBrowser);
527 fEvePopup->AddEntry(
"New Canvas Ext", kNewCanvasExt);
528 fEvePopup->AddEntry(
"New Text &Editor", kNewTextEditor);
534 fSelPopup->AddEntry(
"Ignore", kSel_PS_Ignore);
535 fSelPopup->AddEntry(
"Element", kSel_PS_Element);
536 fSelPopup->AddEntry(
"Projectable", kSel_PS_Projectable);
537 fSelPopup->AddEntry(
"Compound", kSel_PS_Compound);
538 fSelPopup->AddEntry(
"Projectable and Compound",
539 kSel_PS_PableCompound);
540 fSelPopup->AddEntry(
"Master", kSel_PS_Master);
541 fSelPopup->RCheckEntry(kSel_PS_Ignore +
gEve->GetSelection()->GetPickToSelect(),
542 kSel_PS_Ignore, kSel_PS_END - 1);
547 fHilPopup->AddEntry(
"Ignore", kHil_PS_Ignore);
548 fHilPopup->AddEntry(
"Element", kHil_PS_Element);
549 fHilPopup->AddEntry(
"Projectable", kHil_PS_Projectable);
550 fHilPopup->AddEntry(
"Compound", kHil_PS_Compound);
551 fHilPopup->AddEntry(
"Projectable and Compound",
552 kHil_PS_PableCompound);
553 fHilPopup->AddEntry(
"Master", kHil_PS_Master);
554 fHilPopup->RCheckEntry(kHil_PS_Ignore +
gEve->GetHighlight()->GetPickToSelect(),
555 kHil_PS_Ignore, kHil_PS_END - 1);
560 fEvePopup->AddEntry(
"Vertical browser", kVerticalBrowser);
564 wd->
AddEntry(
"Normal", kWinDecorNormal);
565 wd->
AddEntry(
"Hide", kWinDecorHide);
566 wd->
AddEntry(
"Title bars", kWinDecorTitleBar);
567 wd->
AddEntry(
"Mini bars", kWinDecorMiniBar);
568 fEvePopup->AddPopup(
"Window decorations", wd);
571 fEvePopup->Connect(
"Activated(Int_t)",
"TEveBrowser",
572 this,
"EveMenu(Int_t)");
591 case kNewMainFrameSlot: {
593 gEve->GetWindowManager()->SelectWindow(ew_slot);
598 gEve->GetWindowManager()->SelectWindow(ew_slot);
602 gEve->SpawnNewViewer(
"Viewer Pepe");
606 gEve->SpawnNewScene(
"Scena Mica");
610 gROOT->ProcessLineFast(
"new TBrowser");
615 gROOT->ProcessLineFast(
"new TCanvas");
620 case kNewCanvasExt: {
621 gROOT->ProcessLineFast(
"new TCanvas");
624 case kNewTextEditor: {
626 gROOT->ProcessLineFast(
Form(
"new TGTextEditor((const char *)0, (const TGWindow *)0x%zx)", (
size_t)
gClient->GetRoot()));
631 case kNewHtmlBrowser: {
633 if (
gSystem->Load(
"libRHtml") >= 0)
636 gROOT->ProcessLine(
Form(
"new TGHtmlBrowser(\"https://root.cern/doc/master/classes.html\", \
637 (const TGWindow *)0x%zx)", (
size_t)
gClient->GetRoot()));
644 case kSel_PS_Element:
645 case kSel_PS_Projectable:
646 case kSel_PS_Compound:
647 case kSel_PS_PableCompound:
648 case kSel_PS_Master: {
649 gEve->GetSelection()->SetPickToSelect(
id - kSel_PS_Ignore);
650 fSelPopup->RCheckEntry(kSel_PS_Ignore +
gEve->GetSelection()->GetPickToSelect(),
651 kSel_PS_Ignore, kSel_PS_END - 1);
655 case kHil_PS_Element:
656 case kHil_PS_Projectable:
657 case kHil_PS_Compound:
658 case kHil_PS_PableCompound:
659 case kHil_PS_Master: {
660 gEve->GetHighlight()->SetPickToSelect(
id - kHil_PS_Ignore);
661 fHilPopup->RCheckEntry(kHil_PS_Ignore +
gEve->GetHighlight()->GetPickToSelect(),
662 kHil_PS_Ignore, kHil_PS_END - 1);
665 case kVerticalBrowser: {
666 if (
fEvePopup->IsEntryChecked(kVerticalBrowser)) {
667 gEve->GetLTEFrame()->ReconfToHorizontal();
668 fEvePopup->UnCheckEntry(kVerticalBrowser);
670 gEve->GetLTEFrame()->ReconfToVertical();
675 case kWinDecorNormal: {
676 gEve->GetWindowManager()->ShowNormalEveDecorations();
679 case kWinDecorHide: {
680 gEve->GetWindowManager()->HideAllEveDecorations();
683 case kWinDecorTitleBar: {
684 gEve->GetWindowManager()->SetShowTitleBars(
kTRUE);
687 case kWinDecorMiniBar: {
688 gEve->GetWindowManager()->SetShowTitleBars(
kFALSE);
735 gROOT->GetListOfBrowsers()->Remove(tb);
const Mask_t kKeyControlMask
ULong_t Pixel_t
Pixel value.
Handle_t Window_t
Window handle.
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
const char Option_t
Option string (const char).
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
virtual void SetBrowser(TBrowser *b)
TBrowserImp(const TBrowserImp &)=delete
Using a TBrowser one can browse all ROOT objects.
TContextMenu * GetContextMenu() const
void SetBrowserImp(TBrowserImp *i)
TClass instances represent classes, structs and namespaces in the ROOT type system.
TList * GetMenuList() const
Return the list of menu items associated with the class.
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
static ULong_t Number2Pixel(Int_t ci)
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.
void EveMenu(Int_t id)
Handle events from Eve menu.
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.
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.
void HideBottomTab()
Hide the bottom tab (usually holding command-line widget).
TGFileBrowser * fFileBrowser
Abstract base-class for frame-slots that encompass EVE-windows (sub-classes of TEveWindow).
TEveWindow * GetEveWindow() const
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
virtual Int_t GetNItems() const
virtual void ExpandIntoListTree(TGListTree *ltree, TGListTreeItem *parent)
Populates parent with elements.
Int_t GetDenyDestroy() const
Returns the number of times deny-destroy has been requested on the element.
virtual TObject * GetObject(const TEveException &eh) const
Get a TObject associated with this render-element.
Exception class thrown by TEve classes and macros.
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.
TGCompositeFrame * fLTFrame
void ItemDblClicked(TGListTreeItem *item, Int_t btn)
Item has been double-clicked, potentially expand the children.
TGCompositeFrame * fFrame
void ItemKeyPress(TGListTreeItem *entry, UInt_t keysym, UInt_t mask)
A key has been pressed for an item.
void ReconfToHorizontal()
Reconfigure to horizontal layout, list-tree and editor side by side.
void ConnectSignals()
Connect list-tree signals.
Specialization of TGedEditor for proper update propagation to TEveManager.
Pixel_t GetActiveColor() const override
Return highlight color corresponding to current state of TEveElement.
void Toggle() override
Item's check-box state has been toggled ... forward to element's render-state.
void NotSupported(const char *func) const
Warn about access to function members that should never be called.
Bool_t IsChecked() const override
static void Terminate()
Properly terminate global TEveManager.
Description of TEveWindowSlot.
virtual void DestroyWindowAndSlot()
Destroy eve-window and its frame-slot.
static TEveWindowSlot * CreateWindowMainFrame(TEveWindow *eve_parent=nullptr)
Create a new main-frame and populate it with a default window-slot.
static TEveWindowSlot * CreateWindowInTab(TGTab *tab, TEveWindow *eve_parent=nullptr)
Create a new tab in a given tab-widget and populate it with a default window-slot.
A frame containing two scrollbars (a horizontal and a vertical) and a viewport.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
virtual TList * GetList() const
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
TGCompositeFrame(const TGCompositeFrame &)=delete
void Layout() override
Layout the elements of the composite frame.
void SetCleanup(Int_t mode=kLocalCleanup) override
Turn on automatic cleanup of child frames in dtor.
System file browser, used as TRootBrowser plug-in.
void BrowseObj(TObject *obj) override
Browse object.
void SetNewBrowser(TRootBrowser *b)
static Pixel_t GetDefaultSelectedBackground()
Get default selected frame background.
void MapWindow() override
map window
void UnmapWindow() override
unmap window
This class describes layout hints used by the layout classes.
virtual void SetPadRight(Int_t v)
virtual void SetPadLeft(Int_t v)
virtual void SetPadTop(Int_t v)
virtual void SetPadBottom(Int_t v)
virtual void SetLayoutHints(ULong_t lh)
TGListTreeItem * GetFirstChild() const
TGListTreeItem * GetParent() const
virtual void * GetUserData() const =0
virtual void SetUserData(void *, Bool_t=kFALSE)
A list tree is a widget that can contain a number of items arranged in a tree structure.
TGMainFrame(const TGMainFrame &)=delete
This class is the baseclass for all ROOT GUI widgets.
TGClient * fClient
Connection to display server.
ROOT GUI Window base class.
@ kEditEnable
allow edit of this window
@ kEditDisable
disable edit of this window
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
TObject * First() const override
Return the first object in the list. Returns 0 when list is empty.
Mother of all ROOT objects.
virtual TClass * IsA() const
void StartEmbedding(Int_t pos=kRight, Int_t subpos=-1) override
Start embedding external frame in the tab "pos" and tab element "subpos".
void SetTabTitle(const char *title, Int_t pos=kRight, Int_t subpos=-1)
Set text "title" of Tab "subpos" in TGTab "pos".
Int_t fCrTab[3]
Actual (active) tab elements (for each Tab).
TRootBrowser(const TRootBrowser &)=delete
TGHorizontalFrame * fH2
Horizontal frame.
Int_t fNbTab[3]
Number of tab elements (for each Tab).
TGHSplitter * fHSplitter
Horizontal splitter.
virtual void CloseTab(Int_t id)
Remove tab element id from right tab.
void StopEmbedding(const char *name=nullptr) override
TGHorizontalFrame * fPreMenuFrame
First (owned) menu frame.
TGTab * fTabRight
Right Tab.
TGPopupMenu * fMenuFile
"File" popup menu
TGTab * GetTabRight() const
TGHorizontalFrame * fTopMenuFrame
Top menu frame.
TGMenuBar * fMenuBar
Main (owned) menu bar.
void InitPlugins(Option_t *opt="")
Initialize default plugins.
TGVerticalFrame * fV2
Vertical frame.
TString & ReplaceAll(const TString &s1, const TString &s2)
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const