98 fEveParent (eve_parent),
110 fToggleBar->
Connect(
"Clicked()",
"TEveCompositeFrame",
this,
"FlipTitleBarState()");
117 fTitleBar->
Connect(
"Clicked()",
"TEveCompositeFrame",
this,
"TitleBarClicked()");
129 b->Connect(
"Pressed()",
"TEveCompositeFrame",
this,
"ActionPressed()");
143 fMiniBar->
Connect(
"Clicked()",
"TEveCompositeFrame",
this,
"FlipTitleBarState()");
179 Info(
"TEveCompositeFrame::~TEveCompositeFrame",
180 "EveWindow not null '%s', relinquishing it now.",
212 static const TEveException eh(
"TEveCompositeFrame::AcquireEveWindow ");
215 throw eh +
"Window already set.";
218 throw eh +
"Called with 0 argument.";
368 fOriginalContainer (0)
370 fMainFrame->
Connect(
"CloseWindow()",
"TEveCompositeFrameInMainFrame",
this,
"MainFrameClosed()");
371 gEve->
GetWindowManager()->
Connect(
"WindowDeleted(TEveWindow*)",
"TEveCompositeFrameInMainFrame",
this,
"SomeWindowClosed(TEveWindow*)");
380 Info(
"~TEveCompositeFrameInMainFrame",
"Destructor.");
390 Info(
"~TEveCompositeFrameInMainFrame",
"gEve null - OK if it was terminated.");
415 Info(
"TEveCompositeFrameInMainFrame::Destroy()",
416 "Propagating call to main-frame.");
429 static const TEveException kEH(
"TEveCompositeFrameInMainFrame::SetOriginalSlotAndContainer ");
432 throw kEH +
"Given window can not make new slots.";
494 Info(
"TEveCompositeFrameInMainFrame::MainFrameClosed()",
495 "Expecting destructor call soon.");
532 Info(
"TEveCompositeFrameInPack::Destroy()",
"Removing from pack and deleting.");
555 fParentInTab (parent)
584 static const TEveException eh(
"TEveCompositeFrameInTab::FindTabIndex ");
587 for (
Int_t t = 0; t < nt; ++t)
595 throw eh +
"parent frame not found in tab.";
607 Info(
"TEveCompositeFrameInTab::Destroy()",
"Removing from tab and deleting.");
658 fShowTitleBar (
kTRUE)
672 Info(
"~TEveWindow",
"name='%s', deny-destroy=%d.",
743 throw eh +
"Called with null argument.";
753 static const TEveException eh(
"TEveWindow::SwapWindowWithCurrent ");
758 throw eh +
"Current eve-window is not set.";
761 throw eh +
"This is the current window ... nothing changed.";
787 SetOriginalSlotAndContainer(ew_slot, return_cont);
807 SetOriginalSlotAndContainer(0, return_cont);
839 Info(
"TEveWindow::DestroyWindow()",
"name='%s', class='%s', deny-destroy=%d.",
871 Info(
"TEveWindow::DestroyWindowAndSlot()",
"'name=%s', class= '%s', deny-destroy=%d.",
970 return new TEveWindowSlot(
"Free Window Slot",
"A free window slot, can become a container or swallow a window.");
984 (mf, eve_parent, mf);
1032 if (w1 == 0 || w2 == 0)
1033 throw eh +
"Called with null window.";
1036 throw eh +
"Windows are equal ... nothing to change.";
1039 throw eh +
"Windows are in direct ancestry.";
1051 f2->RelinquishEveWindow(
kFALSE);
1053 f2->AcquireEveWindow(w1); w1->
fEveFrame = f2;
1058 p2->RemoveElement(w2);
1061 f1->Layout(); f2->Layout();
1188 (0,
"Pack",
"Window container for horizontal and vertical stacking.");
1202 (0,
"Tab",
"Window container for horizontal and vertical stacking.");
1218 (frame,
"External frame",
"");
1232 static const TEveException eh(
"TEveWindowSlot::StartEmbedding ");
1235 throw eh +
"Already embedding.";
1249 static const TEveException eh(
"TEveWindowSlot::StopEmbedding ");
1252 Warning(eh,
"Embedding not in progress.");
1261 Warning(eh,
"Frame has not been registered.");
1268 Warning(eh,
"Several frames have been registered (%d). Only the first one will be taken.", size);
1274 f->ReparentWindow(
gClient->GetDefaultRoot());
1332 static const TEveException kEH(
"TEveWindowFrame::GetGUICompositeFrame ");
1336 throw kEH +
"The registered frame is not a composite-frame.";
1355 fPack (p ? p : new
TGPack())
1440 fTab (tab ? tab : new
TGTab())
1494 gClient->GetDefaultRoot()->GetId(),
1495 0, 0,
x,
y, childdum);
R__EXTERN TEveManager * gEve
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
An EVE window-slot contained within a TGMainFrame.
TEveCompositeFrameInMainFrame(const TEveCompositeFrameInMainFrame &)
virtual void Destroy()
Virtual function called from eve side when the frame should be destroyed.
TEveWindow * fOriginalContainer
void SetOriginalSlotAndContainer(TEveWindow *slot, TEveWindow *container)
Set the container where to return the contained window on destruction.
virtual void WindowNameChanged(const TString &name)
Update widgets using window's name or title.
void SomeWindowClosed(TEveWindow *w)
Slot called when a window is closed ... we check that this was not our original container.
void MainFrameClosed()
Slot for main-frame's "CloseWindow()" signal.
virtual ~TEveCompositeFrameInMainFrame()
Destructor.
TEveWindow * fOriginalSlot
An EVE window-slot contained within one frame of a TGPack.
virtual void Destroy()
Virtual function called from eve side when the frame should be destroyed.
virtual ~TEveCompositeFrameInPack()
Destructor.
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
virtual ~TEveCompositeFrameInTab()
Destructor.
virtual void SetCurrent(Bool_t curr)
Set current state of this frame.
virtual void Destroy()
Virtual function called from eve side when the frame should be destroyed.
virtual void WindowNameChanged(const TString &name)
Update widgets using window's name or title.
TEveCompositeFrameInTab(const TEveCompositeFrameInTab &)
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
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 &)
virtual ~TEveCompositeFrame()
If fEveWindow != 0 we are being deleted from the ROOT GUI side.
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
virtual const char * GetElementName() const
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.
virtual ~TEveWindowFrame()
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.
virtual TGFrame * GetGUIFrame()
Return top-frame of this eve-window - the pack.
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.
virtual ~TEveWindowPack()
Destructor.
virtual TEveWindowSlot * NewSlot()
Create a new frame-slot at the last position of the pack.
Description of TEveWindowSlot.
TGCompositeFrame * fEmbedBuffer
TEveWindowSlot(const TEveWindowSlot &)
TEveWindowFrame * StopEmbedding(const char *name=0)
An embedded window is created in place of this window-slot.
TGCompositeFrame * StartEmbedding()
Start embedding a window that will replace the current slot.
TEveWindowFrame * MakeFrame(TGFrame *frame=0)
An eve-window-frame is created and frame is passed into it.
TEveWindowTab * MakeTab()
A tab is created in place of this window-slot.
virtual TGFrame * GetGUIFrame()
Return top-frame of this eve-window - the big button to make slot current.
virtual void SetCurrent(Bool_t curr)
Set current state of this window-slot.
virtual ~TEveWindowSlot()
Destructor.
TGTextButton * fEmptyButt
TEveWindowPack * MakePack()
A pack is created in place of this window-slot.
Encapsulates TGTab into an eve-window.
virtual ~TEveWindowTab()
Destructor.
TEveWindowTab(const TEveWindowTab &)
virtual TGFrame * GetGUIFrame()
Return top-frame of this eve-window - the tab.
virtual TEveWindowSlot * NewSlot()
Create new frame-slot - a new tab.
Abstract base-class for representing eve-windows.
virtual void PreDeleteElement()
Called before the element is deleted, thus offering the last chance to detach from acquired resources...
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.
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.
TEveWindow(const TEveWindow &)
static void SetMainFrameDefHeight(UInt_t x)
Set default height for new main-frame windows. Static.
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...
static TEveWindowSlot * CreateWindowMainFrame(TEveWindow *eve_parent=0)
Create a new main-frame and populate it with a default window-slot.
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
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.
static TEveWindowSlot * CreateWindowInTab(TGTab *tab, TEveWindow *eve_parent=0)
Create a new tab in a given tab-widget and populate it with a default window-slot.
void SetShowTitleBar(Bool_t x)
Set display state of the title-bar.
void SwapWindowWithCurrent()
Swap frames with the current window.
static UInt_t fgMainFrameDefHeight
virtual void NameTitleChanged()
Name or title of the window changed - propagate to frames.
void TitleBarClicked()
Slot for clicking on the title-bar.
static UInt_t fgMainFrameDefWidth
static Pixel_t fgMiniBarBackgroundColor
static UInt_t GetMainFrameDefWidth()
Get default width for new main-frame windows. Static.
virtual ~TEveWindow()
Destructor.
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.
virtual void SetMapSubwindows(Bool_t on)
virtual TList * GetList() const
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
virtual void SetEditable(Bool_t on=kTRUE)
Switch ON/OFF edit mode.
virtual void Layout()
Layout the elements of the composite frame.
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual void ShowFrame(TGFrame *f)
Show sub frame.
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
virtual void HideFrame(TGFrame *f)
Hide sub frame.
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
virtual void ReparentWindow(const TGWindow *p, Int_t x=0, Int_t y=0)
Reparent window, make p the new parent and position the window at position (x,y) in new parent.
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
virtual void DeleteWindow()
Delete window.
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual void SetCleanup(Int_t=kLocalCleanup)
virtual void MapWindow()
map window
virtual void UnmapWindow()
unmap window
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.
const char * GetWindowName() const
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
virtual void RemoveFrame(TGFrame *f)
Remove frame f and refit existing frames to pack size.
virtual void AddFrameWithWeight(TGFrame *f, TGLayoutHints *l, Float_t w)
Add frame f at the end with given weight.
virtual void ShowFrame(TGFrame *f)
Show sub frame.
virtual void HideFrame(TGFrame *f)
Hide sub frame.
virtual void Layout()
Reposition the frames so that they fit correctly.
void EqualizeFrames()
Refit existing frames so that their lengths are equal.
void SetVertical(Bool_t x)
Sets the vertical flag and reformats the back to new stacking direction.
Bool_t GetVertical() const
void SetText(TGString *text)
Set new tab text.
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.
virtual void SetTextJustify(Int_t tmode)
Set text justification.
virtual void SetText(TGHotString *new_label)
Set new button text.
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...
virtual void Add(TObject *obj)
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual TObject * First() const
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=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.