108 fToggleBar->Connect(
"Clicked()",
"TEveCompositeFrame",
this,
"FlipTitleBarState()");
115 fTitleBar->Connect(
"Clicked()",
"TEveCompositeFrame",
this,
"TitleBarClicked()");
127 b->Connect(
"Pressed()",
"TEveCompositeFrame",
this,
"ActionPressed()");
141 fMiniBar->Connect(
"Clicked()",
"TEveCompositeFrame",
this,
"FlipTitleBarState()");
177 Info(
"TEveCompositeFrame::~TEveCompositeFrame",
178 "EveWindow not null '%s', relinquishing it now.",
210 static const TEveException eh(
"TEveCompositeFrame::AcquireEveWindow ");
213 throw eh +
"Window already set.";
216 throw eh +
"Called with 0 argument.";
367 fMainFrame->Connect(
"CloseWindow()",
"TEveCompositeFrameInMainFrame",
this,
"MainFrameClosed()");
368 gEve->GetWindowManager()->
Connect(
"WindowDeleted(TEveWindow*)",
"TEveCompositeFrameInMainFrame",
this,
"SomeWindowClosed(TEveWindow*)");
377 Info(
"~TEveCompositeFrameInMainFrame",
"Destructor.");
381 if (
gEve &&
gEve->GetWindowManager())
383 gEve->GetWindowManager()->Disconnect(
"WindowDeleted(TEveWindow*)",
this,
"SomeWindowClosed(TEveWindow*)");
387 Info(
"~TEveCompositeFrameInMainFrame",
"gEve null - OK if it was terminated.");
412 Info(
"TEveCompositeFrameInMainFrame::Destroy()",
413 "Propagating call to main-frame.");
426 static const TEveException kEH(
"TEveCompositeFrameInMainFrame::SetOriginalSlotAndContainer ");
429 throw kEH +
"Given window can not make new slots.";
473 else if (
gEve->GetWindowManager()->HasDefaultContainer())
475 swapCandidate =
gEve->GetWindowManager()->GetDefaultContainer()->NewSlot();
491 Info(
"TEveCompositeFrameInMainFrame::MainFrameClosed()",
492 "Expecting destructor call soon.");
528 Info(
"TEveCompositeFrameInPack::Destroy()",
"Removing from pack and deleting.");
532 fPack->RemoveFrame(
this);
579 static const TEveException eh(
"TEveCompositeFrameInTab::FindTabIndex ");
582 for (
Int_t t = 0; t < nt; ++t)
590 throw eh +
"parent frame not found in tab.";
602 Info(
"TEveCompositeFrameInTab::Destroy()",
"Removing from tab and deleting.");
666 Info(
"~TEveWindow",
"name='%s', deny-destroy=%d.",
678 gEve->GetWindowManager()->DeleteWindow(
this);
737 throw eh +
"Called with null argument.";
747 static const TEveException eh(
"TEveWindow::SwapWindowWithCurrent ");
749 TEveWindow* current =
gEve->GetWindowManager()->GetCurrentWindow();
751 if (current ==
nullptr)
752 throw eh +
"Current eve-window is not set.";
755 throw eh +
"This is the current window ... nothing changed.";
767 return_cont =
nullptr;
781 SetOriginalSlotAndContainer(ew_slot, return_cont);
783 gEve->GetWindowManager()->WindowUndocked(
this );
794 return_cont =
nullptr;
801 SetOriginalSlotAndContainer(
nullptr, return_cont);
805 gEve->GetWindowManager()->WindowUndocked(
this);
822 fEveFrame->fEveParent->RemoveElement(
this);
824 w->fEveFrame->Layout();
833 Info(
"TEveWindow::DestroyWindow()",
"name='%s', class='%s', deny-destroy=%d.",
847 fEveFrame->fEveParent->RemoveElement(
this);
865 Info(
"TEveWindow::DestroyWindowAndSlot()",
"'name=%s', class= '%s', deny-destroy=%d.",
908 return gEve->GetWindowManager()->IsCurrentWindow(
this);
916 if ( !
gEve->GetWindowManager()->IsCurrentWindow(
this))
917 gEve->GetWindowManager()->SelectWindow(
this);
955 gEve->GetWindowManager()->SelectWindow(
this);
964 return new TEveWindowSlot(
"Free Window Slot",
"A free window slot, can become a container or swallow a window.");
978 (mf, eve_parent, mf);
1026 if (w1 ==
nullptr || w2 ==
nullptr)
1027 throw eh +
"Called with null window.";
1030 throw eh +
"Windows are equal ... nothing to change.";
1033 throw eh +
"Windows are in direct ancestry.";
1045 f2->RelinquishEveWindow(
kFALSE);
1047 f2->AcquireEveWindow(w1); w1->
fEveFrame = f2;
1052 p2->RemoveElement(w2);
1055 f1->Layout(); f2->Layout();
1140 fEmptyButt->Connect(
"Clicked()",
"TEveWindow",
this,
"TitleBarClicked()");
1181 (
nullptr,
"Pack",
"Window container for horizontal and vertical stacking.");
1195 (
nullptr,
"Tab",
"Window container for horizontal and vertical stacking.");
1211 (frame,
"External frame",
"");
1225 static const TEveException eh(
"TEveWindowSlot::StartEmbedding ");
1228 throw eh +
"Already embedding.";
1242 static const TEveException eh(
"TEveWindowSlot::StopEmbedding ");
1245 Warning(eh,
"Embedding not in progress.");
1254 Warning(eh,
"Frame has not been registered.");
1261 Warning(eh,
"Several frames have been registered (%d). Only the first one will be taken.",
size);
1267 f->ReparentWindow(
gClient->GetDefaultRoot());
1272 assert(mf !=
nullptr);
1324 static const TEveException kEH(
"TEveWindowFrame::GetGUICompositeFrame ");
1328 throw kEH +
"The registered frame is not a composite-frame.";
1355 fPack->DeleteWindow();
1384 fPack->AddFrameWithWeight(slot,
nullptr, w);
1413 fPack->EqualizeFrames();
1439 fTab->DeleteWindow();
1483 gClient->GetDefaultRoot()->GetId(),
1484 0, 0,
x,
y, childdum);
ULong_t Pixel_t
Pixel value.
Handle_t Window_t
Window handle.
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
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).
float Float_t
Float 4 bytes (float).
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
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
virtual void Destroy()
Destroy this element.
virtual void PreDeleteElement()
Called before the element is deleted, thus offering the last chance to detach from acquired resources...
List_t::const_iterator List_ci
virtual void RemoveElement(TEveElement *el)
Remove el from the list of children.
TEveElement()
Default constructor.
Int_t fDenyDestroy
! Deny-destroy count.
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.
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.