93 fEveWindowLH (nullptr),
97 fEveParent (eve_parent),
109 fToggleBar->
Connect(
"Clicked()",
"TEveCompositeFrame",
this,
"FlipTitleBarState()");
116 fTitleBar->
Connect(
"Clicked()",
"TEveCompositeFrame",
this,
"TitleBarClicked()");
128 b->Connect(
"Pressed()",
"TEveCompositeFrame",
this,
"ActionPressed()");
142 fMiniBar->
Connect(
"Clicked()",
"TEveCompositeFrame",
this,
"FlipTitleBarState()");
178 Info(
"TEveCompositeFrame::~TEveCompositeFrame",
179 "EveWindow not null '%s', relinquishing it now.",
211 static const TEveException eh(
"TEveCompositeFrame::AcquireEveWindow ");
214 throw eh +
"Window already set.";
217 throw eh +
"Called with 0 argument.";
366 fOriginalSlot (nullptr),
367 fOriginalContainer (nullptr)
369 fMainFrame->
Connect(
"CloseWindow()",
"TEveCompositeFrameInMainFrame",
this,
"MainFrameClosed()");
370 gEve->
GetWindowManager()->
Connect(
"WindowDeleted(TEveWindow*)",
"TEveCompositeFrameInMainFrame",
this,
"SomeWindowClosed(TEveWindow*)");
379 Info(
"~TEveCompositeFrameInMainFrame",
"Destructor.");
389 Info(
"~TEveCompositeFrameInMainFrame",
"gEve null - OK if it was terminated.");
414 Info(
"TEveCompositeFrameInMainFrame::Destroy()",
415 "Propagating call to main-frame.");
428 static const TEveException kEH(
"TEveCompositeFrameInMainFrame::SetOriginalSlotAndContainer ");
431 throw kEH +
"Given window can not make new slots.";
493 Info(
"TEveCompositeFrameInMainFrame::MainFrameClosed()",
494 "Expecting destructor call soon.");
531 Info(
"TEveCompositeFrameInPack::Destroy()",
"Removing from pack and deleting.");
554 fParentInTab (parent)
583 static const TEveException eh(
"TEveCompositeFrameInTab::FindTabIndex ");
586 for (
Int_t t = 0; t < nt; ++t)
594 throw eh +
"parent frame not found in tab.";
606 Info(
"TEveCompositeFrameInTab::Destroy()",
"Removing from tab and deleting.");
657 fShowTitleBar (
kTRUE)
671 Info(
"~TEveWindow",
"name='%s', deny-destroy=%d.",
742 throw eh +
"Called with null argument.";
752 static const TEveException eh(
"TEveWindow::SwapWindowWithCurrent ");
756 if (current ==
nullptr)
757 throw eh +
"Current eve-window is not set.";
760 throw eh +
"This is the current window ... nothing changed.";
772 return_cont =
nullptr;
786 SetOriginalSlotAndContainer(ew_slot, return_cont);
799 return_cont =
nullptr;
806 SetOriginalSlotAndContainer(
nullptr, return_cont);
829 w->fEveFrame->Layout();
838 Info(
"TEveWindow::DestroyWindow()",
"name='%s', class='%s', deny-destroy=%d.",
870 Info(
"TEveWindow::DestroyWindowAndSlot()",
"'name=%s', class= '%s', deny-destroy=%d.",
969 return new TEveWindowSlot(
"Free Window Slot",
"A free window slot, can become a container or swallow a window.");
983 (mf, eve_parent, mf);
1031 if (w1 ==
nullptr || w2 ==
nullptr)
1032 throw eh +
"Called with null window.";
1035 throw eh +
"Windows are equal ... nothing to change.";
1038 throw eh +
"Windows are in direct ancestry.";
1050 f2->RelinquishEveWindow(
kFALSE);
1052 f2->AcquireEveWindow(w1); w1->
fEveFrame = f2;
1057 p2->RemoveElement(w2);
1060 f1->Layout(); f2->Layout();
1139 fEmptyButt (nullptr),
1140 fEmbedBuffer (nullptr)
1187 (
nullptr,
"Pack",
"Window container for horizontal and vertical stacking.");
1201 (
nullptr,
"Tab",
"Window container for horizontal and vertical stacking.");
1217 (frame,
"External frame",
"");
1231 static const TEveException eh(
"TEveWindowSlot::StartEmbedding ");
1234 throw eh +
"Already embedding.";
1248 static const TEveException eh(
"TEveWindowSlot::StopEmbedding ");
1251 Warning(eh,
"Embedding not in progress.");
1260 Warning(eh,
"Frame has not been registered.");
1267 Warning(eh,
"Several frames have been registered (%d). Only the first one will be taken.",
size);
1273 f->ReparentWindow(
gClient->GetDefaultRoot());
1278 assert(mf !=
nullptr);
1331 static const TEveException kEH(
"TEveWindowFrame::GetGUICompositeFrame ");
1335 throw kEH +
"The registered frame is not a composite-frame.";
1439 fTab (tab ? tab : new
TGTab())
1493 gClient->GetDefaultRoot()->GetId(),
1494 0, 0,
x,
y, childdum);
Handle_t Window_t
Window handle.
ULong_t Pixel_t
Pixel value.
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
R__EXTERN TEveManager * gEve
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 Int_t Int_t Window_t win
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t button
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
An EVE window-slot contained within a TGMainFrame.
TEveCompositeFrameInMainFrame(const TEveCompositeFrameInMainFrame &)
TEveWindow * fOriginalContainer
void SetOriginalSlotAndContainer(TEveWindow *slot, TEveWindow *container)
Set the container where to return the contained window on destruction.
void Destroy() override
Virtual function called from eve side when the frame should be destroyed.
void SomeWindowClosed(TEveWindow *w)
Slot called when a window is closed ... we check that this was not our original container.
void WindowNameChanged(const TString &name) override
Update widgets using window's name or title.
void MainFrameClosed()
Slot for main-frame's "CloseWindow()" signal.
TEveWindow * fOriginalSlot
~TEveCompositeFrameInMainFrame() override
Destructor.
An EVE window-slot contained within one frame of a TGPack.
~TEveCompositeFrameInPack() override
Destructor.
void Destroy() override
Virtual function called from eve side when the frame should be destroyed.
TEveCompositeFrameInPack(const TEveCompositeFrameInPack &)
An EVE window-slot contained within one tab of a TGTab.
Int_t FindTabIndex()
Return index of this frame in the tab.
TGCompositeFrame * fParentInTab
void Destroy() override
Virtual function called from eve side when the frame should be destroyed.
void SetCurrent(Bool_t curr) override
Set current state of this frame.
void WindowNameChanged(const TString &name) override
Update widgets using window's name or title.
TEveCompositeFrameInTab(const TEveCompositeFrameInTab &)
~TEveCompositeFrameInTab() override
Destructor.
Abstract base-class for frame-slots that encompass EVE-windows (sub-classes of TEveWindow).
TGLayoutHints * fEveWindowLH
static Bool_t fgAllowTopFrameCollapse
static void SetupFrameMarkup(IconBarCreator_foo creator, UInt_t top_frame_height=14, UInt_t mini_bar_height=4, Bool_t allow_top_collapse=kTRUE)
Set properties of the EVE frame.
void FlipTitleBarState()
Change display-state of the title-bar / mini-bar.
virtual TEveWindow * RelinquishEveWindow(Bool_t reparent=kTRUE)
Remove window and decrease its deny-destroy count.
virtual void ShowNormalDecorations()
Show title-bar or mini-bar, as dictated by the window.
virtual void WindowNameChanged(const TString &name)
Update widgets using window's name or title.
void ActionPressed()
The action-button of the title-bar was pressed.
TGCompositeFrame * fTopFrame
TEveWindow * GetEveParentAsWindow() const
Returns eve-parent dynamic-casted to TEveWindow.
static UInt_t fgMiniBarHeight
TGTextButton * fToggleBar
~TEveCompositeFrame() override
If fEveWindow != 0 we are being deleted from the ROOT GUI side.
TGFrame *(* IconBarCreator_foo)(TEveCompositeFrame *, TGCompositeFrame *, Int_t)
virtual void AcquireEveWindow(TEveWindow *ew)
Accept window and increase its deny-destroy count.
static UInt_t fgTopFrameHeight
static TList * fgFrameList
static TEveContextMenu * fgCtxMenu
virtual void HideAllDecorations()
Hide title-bar and mini-bar.
virtual void SetShowTitleBar(Bool_t show)
Set state of title-bar.
TEveCompositeFrame(const TEveCompositeFrame &)
static const TString fgkEmptyFrameName
virtual void SetCurrent(Bool_t curr)
Set current state of this frame.
void TitleBarClicked()
Slot for mouse-click on the central part of the title-bar.
static IconBarCreator_foo fgIconBarCreator
const char * GetElementName() const override
Virtual function for retrieving name of the element.
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
virtual void AddElement(TEveElement *el)
Add el to the list of children.
Bool_t fDestroyOnZeroRefCnt
Deny-destroy count.
void DecDenyDestroy()
Decreases the deny-destroy count of the element.
void IncDenyDestroy()
Increases the deny-destroy count of the element.
virtual void Destroy()
Destroy this element.
virtual void PreDeleteElement()
Externally assigned and controlled user data.
List_t::const_iterator List_ci
virtual void RemoveElement(TEveElement *el)
Remove el from the list of children.
Int_t fDenyDestroy
Counter for top-level list-tree items that prevent automatic destruction.
Exception class thrown by TEve classes and macros.
TEveWindowManager * GetWindowManager() const
Encapsulates TGFrame into an eve-window.
TGCompositeFrame * GetGUICompositeFrame()
Returns the registered top-frame of this eve-window dynamic-casted to composite-frame.
~TEveWindowFrame() override
Destructor.
TEveWindowFrame(const TEveWindowFrame &)
void WindowUndocked(TEveWindow *window)
Emit the "WindowUndocked(TEveWindow*)" signal.
Bool_t HasDefaultContainer() const
void WindowDocked(TEveWindow *window)
Emit the "WindowDocked(TEveWindow*)" signal.
TEveWindow * GetDefaultContainer() const
TEveWindow * GetCurrentWindow() const
Bool_t IsCurrentWindow(const TEveWindow *w) const
void DeleteWindow(TEveWindow *w)
Called by a window before it gets deleted.
void SelectWindow(TEveWindow *w)
Entry-point for communicating the fact that a window was acted upon in such a way that it should beco...
Encapsulates TGPack into an eve-window.
void FlipOrientation()
Flip orientation of the pack (vertical / horizontal).
TEveWindowPack(const TEveWindowPack &)
void SetVertical(Bool_t x=kTRUE)
Set orientation of the pack (vertical / horizontal).
virtual TEveWindowSlot * NewSlotWithWeight(Float_t w)
Create a new weighted frame-slot at the last position of the pack.
void EqualizeFrames()
Refit existing frames so that their lengths are equal.
TEveWindowSlot * NewSlot() override
Create a new frame-slot at the last position of the pack.
TGFrame * GetGUIFrame() override
Return top-frame of this eve-window - the pack.
~TEveWindowPack() override
Destructor.
Description of TEveWindowSlot.
TEveWindowFrame * MakeFrame(TGFrame *frame=nullptr)
An eve-window-frame is created and frame is passed into it.
TGCompositeFrame * fEmbedBuffer
TEveWindowFrame * StopEmbedding(const char *name=nullptr)
An embedded window is created in place of this window-slot.
TEveWindowSlot(const TEveWindowSlot &)
TGCompositeFrame * StartEmbedding()
Start embedding a window that will replace the current slot.
~TEveWindowSlot() override
Destructor.
TEveWindowTab * MakeTab()
A tab is created in place of this window-slot.
void SetCurrent(Bool_t curr) override
Set current state of this window-slot.
TGFrame * GetGUIFrame() override
Return top-frame of this eve-window - the big button to make slot current.
TGTextButton * fEmptyButt
TEveWindowPack * MakePack()
A pack is created in place of this window-slot.
Encapsulates TGTab into an eve-window.
TEveWindowTab(const TEveWindowTab &)
~TEveWindowTab() override
Destructor.
TEveWindowSlot * NewSlot() override
Create new frame-slot - a new tab.
TGFrame * GetGUIFrame() override
Return top-frame of this eve-window - the tab.
Abstract base-class for representing eve-windows.
virtual void PreUndock()
Virtual function called before a window is undocked.
static void SetMiniBarBackgroundColor(Pixel_t p)
Set background-color for mini-bar (collapsed title-bar). Static.
~TEveWindow() override
Destructor.
virtual void DestroyWindowAndSlot()
Destroy eve-window and its frame-slot.
static UInt_t GetMainFrameDefHeight()
Get default height for new main-frame windows. Static.
static void SetMainFrameDefWidth(UInt_t x)
Set default width for new main-frame windows. Static.
TEveCompositeFrame * fEveFrame
static void SwapWindows(TEveWindow *w1, TEveWindow *w2)
Swap windows w1 and w2.
static TEveWindowSlot * CreateWindowMainFrame(TEveWindow *eve_parent=nullptr)
Create a new main-frame and populate it with a default window-slot.
TEveWindow(const TEveWindow &)
static void SetMainFrameDefHeight(UInt_t x)
Set default height for new main-frame windows. Static.
void PreDeleteElement() override
Called before the element is deleted, thus offering the last chance to detach from acquired resources...
static TEveWindowSlot * CreateDefaultWindowSlot()
Create a default window slot.
static void SetCurrentBackgroundColor(Pixel_t p)
Set background-color for marking the title-bar of current window. Static.
Bool_t IsCurrent() const
Returns true if this window is the current one.
Bool_t IsAncestorOf(TEveWindow *win)
Returns true if this is an ancestor of win.
virtual void SetCurrent(Bool_t curr)
Set current state of this eve-window.
void ReplaceWindow(TEveWindow *w)
Replace this window with the passed one.
virtual Bool_t CanMakeNewSlots() const
void MakeCurrent()
Make this window current.
virtual TEveWindowSlot * NewSlot()
static Pixel_t GetMiniBarBackgroundColor()
Get background-color for mini-bar (collapsed title-bar). Static.
void PopulateEmptyFrame(TEveCompositeFrame *ef)
Populate given frame-slot - intended for initial population of a new slot or low-level window-swappin...
virtual TGFrame * GetGUIFrame()=0
void ClearEveFrame()
Clears eve-frame associated with this window.
TEveCompositeFrame * GetEveFrame()
static Pixel_t GetCurrentBackgroundColor()
Get background-color for marking the title-bar of current window. Static.
Bool_t GetShowTitleBar() const
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.
virtual void DestroyWindow()
Destroy eve-window - replace it with an empty frame-slot.
void UndockWindow()
Undock the window - put it into a dedicated main-frame.
void SetShowTitleBar(Bool_t x)
Set display state of the title-bar.
void SwapWindowWithCurrent()
Swap frames with the current window.
static UInt_t fgMainFrameDefHeight
void TitleBarClicked()
Slot for clicking on the title-bar.
void NameTitleChanged() override
Name or title of the window changed - propagate to frames.
static UInt_t fgMainFrameDefWidth
static Pixel_t fgMiniBarBackgroundColor
static UInt_t GetMainFrameDefWidth()
Get default width for new main-frame windows. Static.
void UndockWindowDestroySlot()
Undock the window - put it into a dedicated main-frame.
virtual void PostDock()
Virtual function called after a window is docked.
void SwapWindow(TEveWindow *w)
Swap frames with the given window.
static Pixel_t fgCurrentBackgroundColor
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
The base class for composite widgets (menu bars, list boxes, etc.).
void SetMapSubwindows(Bool_t on) override
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.
void Layout() override
Layout the elements of the composite frame.
virtual void ShowFrame(TGFrame *f)
Show sub frame.
void SetCleanup(Int_t mode=kLocalCleanup) override
Turn on automatic cleanup of child frames in dtor.
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
void SetEditable(Bool_t on=kTRUE) override
Switch ON/OFF edit mode.
virtual void HideFrame(TGFrame *f)
Hide sub frame.
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
void ReparentWindow(const TGWindow *p, Int_t x=0, Int_t y=0) override
Reparent window, make p the new parent and position the window at position (x,y) in new parent.
void SetBackgroundColor(Pixel_t back) override
Set background color (override from TGWindow base class).
void MapWindow() override
map window
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual void DeleteWindow()
Delete window.
void UnmapWindow() override
unmap window
virtual void SetCleanup(Int_t=kLocalCleanup)
A composite frame that layout their children in horizontal way.
This class describes layout hints used by the layout classes.
Defines top level windows that interact with the system Window Manager.
void DontCallClose()
Typically call this method in the slot connected to the CloseWindow() signal to prevent the calling o...
virtual void CloseWindow()
Close and delete main frame.
void SetWindowName(const char *name=nullptr) override
Set window name. This is typically done via the window manager.
const char * GetWindowName() const
TGClient * fClient
Connection to display server.
Stack of frames in horizontal (default) or vertical stack.
virtual void AddFrameWithWeight(TGFrame *f, TGLayoutHints *l, Float_t w)
Add frame f at the end with given weight.
void EqualizeFrames()
Refit existing frames so that their lengths are equal.
void RemoveFrame(TGFrame *f) override
Remove frame f and refit existing frames to pack size.
void SetVertical(Bool_t x)
Sets the vertical flag and reformats the back to new stacking direction.
void Layout() override
Reposition the frames so that they fit correctly.
void ShowFrame(TGFrame *f) override
Show sub frame.
void HideFrame(TGFrame *f) override
Hide sub frame.
Bool_t GetVertical() const
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
Service classes of the tab widget.
void SetText(TGString *text)
Set new tab text.
A tab widget contains a set of composite frames each with a little tab with a name (like a set of fol...
TGTabElement * GetTabTab(Int_t tabIndex) const
Return the tab element of tab with index tabIndex.
Int_t GetNumberOfTabs() const
Return number of tabs.
virtual void RemoveTab(Int_t tabIndex=-1, Bool_t storeRemoved=kTRUE)
Remove container and tab of tab with index tabIndex.
TGCompositeFrame * GetTabContainer(Int_t tabIndex) const
Return container of tab with index tabIndex.
virtual TGCompositeFrame * AddTab(TGString *text)
Add a tab to the tab widget.
Yield an action as soon as it is clicked.
virtual void SetTextJustify(Int_t tmode)
Set text justification.
virtual void SetText(TGHotString *new_label)
Set new button text.
ROOT GUI Window base class.
virtual void DestroyWindow()
destroy window
const TGWindow * GetParent() const
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
void Add(TObject *obj) override
TObject * Remove(TObject *obj) override
Remove object from the list.
TObject * First() const override
Return the first object in the list. Returns 0 when list is empty.
Mother of all ROOT objects.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Bool_t Disconnect(const char *signal=nullptr, void *receiver=nullptr, const char *slot=nullptr)
Disconnects signal of this object from slot of receiver.