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.";
369 fMainFrame->Connect(
"CloseWindow()",
"TEveCompositeFrameInMainFrame",
this,
"MainFrameClosed()");
370 gEve->GetWindowManager()->
Connect(
"WindowDeleted(TEveWindow*)",
"TEveCompositeFrameInMainFrame",
this,
"SomeWindowClosed(TEveWindow*)");
379 Info(
"~TEveCompositeFrameInMainFrame",
"Destructor.");
383 if (
gEve &&
gEve->GetWindowManager())
385 gEve->GetWindowManager()->Disconnect(
"WindowDeleted(TEveWindow*)",
this,
"SomeWindowClosed(TEveWindow*)");
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.";
475 else if (
gEve->GetWindowManager()->HasDefaultContainer())
477 swapCandidate =
gEve->GetWindowManager()->GetDefaultContainer()->NewSlot();
493 Info(
"TEveCompositeFrameInMainFrame::MainFrameClosed()",
494 "Expecting destructor call soon.");
531 Info(
"TEveCompositeFrameInPack::Destroy()",
"Removing from pack and deleting.");
535 fPack->RemoveFrame(
this);
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.");
671 Info(
"~TEveWindow",
"name='%s', deny-destroy=%d.",
683 gEve->GetWindowManager()->DeleteWindow(
this);
742 throw eh +
"Called with null argument.";
752 static const TEveException eh(
"TEveWindow::SwapWindowWithCurrent ");
754 TEveWindow* current =
gEve->GetWindowManager()->GetCurrentWindow();
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);
788 gEve->GetWindowManager()->WindowUndocked(
this );
799 return_cont =
nullptr;
806 SetOriginalSlotAndContainer(
nullptr, return_cont);
810 gEve->GetWindowManager()->WindowUndocked(
this);
827 fEveFrame->fEveParent->RemoveElement(
this);
829 w->fEveFrame->Layout();
838 Info(
"TEveWindow::DestroyWindow()",
"name='%s', class='%s', deny-destroy=%d.",
852 fEveFrame->fEveParent->RemoveElement(
this);
870 Info(
"TEveWindow::DestroyWindowAndSlot()",
"'name=%s', class= '%s', deny-destroy=%d.",
913 return gEve->GetWindowManager()->IsCurrentWindow(
this);
921 if ( !
gEve->GetWindowManager()->IsCurrentWindow(
this))
922 gEve->GetWindowManager()->SelectWindow(
this);
960 gEve->GetWindowManager()->SelectWindow(
this);
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();
1146 fEmptyButt->Connect(
"Clicked()",
"TEveWindow",
this,
"TitleBarClicked()");
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.";
1363 fPack->DeleteWindow();
1392 fPack->AddFrameWithWeight(slot,
nullptr,
w);
1421 fPack->EqualizeFrames();
1448 fTab->DeleteWindow();
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
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void w
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
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
TEveElementList(const char *n="TEveElementList", const char *t="", Bool_t doColor=kFALSE, Bool_t doTransparency=kFALSE)
Constructor.
const char * GetElementName() const override
Virtual function for retrieving name of the element.
virtual void AddElement(TEveElement *el)
Add el to the list of children.
Bool_t fDestroyOnZeroRefCnt
Deny-destroy count.
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.
TEveElement()
Default constructor.
Int_t fDenyDestroy
Counter for top-level list-tree items that prevent automatic destruction.
Exception class thrown by TEve classes and macros.
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 &)
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.
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...
void ClearEveFrame()
Clears eve-frame associated with this window.
static Pixel_t GetCurrentBackgroundColor()
Get background-color for marking the title-bar of current window. Static.
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
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.
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.
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.
virtual void HideFrame(TGFrame *f)
Hide sub frame.
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
TGFrame(const TGFrame &)=delete
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.
void UnmapWindow() override
unmap window
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 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.
void ShowFrame(TGFrame *f) override
Show sub frame.
void HideFrame(TGFrame *f) override
Hide sub frame.
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
Service classes of the tab widget.
A tab widget contains a set of composite frames each with a little tab with a name (like a set of fol...
virtual TGCompositeFrame * AddTab(TGString *text)
Add a tab to the tab widget.
Yield an action as soon as it is clicked.
ROOT GUI Window base class.
const TGWindow * GetParent() const
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
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.
TObject()
TObject constructor.
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.