Demonstrates usage of EVE window-manager.
void PackTest();
void DetailTest();
void TabsTest();
void window_manager()
{
PackTest();
DetailTest();
TabsTest();
gEve->GetBrowser()->GetTabRight()->SetTab(1);
}
void PackTest()
{
v->SpawnGLEmbeddedViewer(
gEve->GetEditor());
v->SetElementName(
"Bar Embedded Viewer");
gEve->GetViewers()->AddElement(
v);
v->AddScene(
gEve->GetEventScene());
v->SpawnGLViewer(
gEve->GetEditor());
gEve->GetViewers()->AddElement(
v);
v->AddScene(
gEve->GetEventScene());
}
void DetailTest()
{
{
double fontsize = 0.07;
double y = 1 - 1 * fontsize;
latex->
DrawLatex(
x,
y,
"greek letter #Delta#eta_{out}");
latex->
DrawLatex(
x,
y,
"#color[4]{#bullet} marker some text");
}
gEve->GetViewers()->AddElement(viewer);
}
void TabsTest()
{
tab1->SetElementName(
"Tabs");
for (int i = 0; i < 4; ++i) {
Int_t weight =
r.Uniform(3, 7);
text_view->
AddLine(
Form(
"slot[%d] add line %d here ", i,
l));
}
}
tab2->SetElementName(
"Nested");
}
int Int_t
Signed integer 4 bytes (int).
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
virtual void ToggleEditor()
Toggle editor.
void SetElementName(const char *name) override
Virtual function for setting of name of an element.
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
static void Macro(const char *mac)
Execute macro 'mac'. Do not reload the macro.
Eve representation of TGLViewer.
TGLEmbeddedViewer * SpawnGLEmbeddedViewer(TGedEditor *ged=nullptr, Int_t border=0)
Spawn new GLViewer and adopt it.
virtual void AddScene(TEveScene *scene)
Add 'scene' to the list of scenes.
Encapsulates TGFrame into an eve-window.
TGCompositeFrame * GetGUICompositeFrame()
Returns the registered top-frame of this eve-window dynamic-casted to composite-frame.
Encapsulates TGPack into an eve-window.
virtual TEveWindowSlot * NewSlotWithWeight(Float_t w)
Create a new weighted frame-slot at the last position of the pack.
TEveWindowSlot * NewSlot() override
Create a new frame-slot at the last position of the pack.
Description of TEveWindowSlot.
TEveWindowFrame * MakeFrame(TGFrame *frame=nullptr)
An eve-window-frame is created and frame is passed into it.
TEveWindowFrame * StopEmbedding(const char *name=nullptr)
An embedded window is created in place of this window-slot.
TGCompositeFrame * StartEmbedding()
Start embedding a window that will replace the current slot.
TEveWindowTab * MakeTab()
A tab is created in place of this window-slot.
TEveWindowPack * MakePack()
A pack is created in place of this window-slot.
Encapsulates TGTab into an eve-window.
void ReplaceWindow(TEveWindow *w)
Replace this window with the passed one.
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.
void SetShowTitleBar(Bool_t x)
Set display state of the title-bar.
The base class for composite widgets (menu bars, list boxes, etc.).
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.
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.
void MapWindow() override
map window
virtual void SetWidth(UInt_t w)
Minimal GL-viewer that can be embedded in a standard ROOT frames.
This class handles GUI labels.
This class describes layout hints used by the layout classes.
Yield an action as soon as it is clicked.
A TGTextView is a text viewer widget.
virtual void Update()
update the whole window of text view
virtual Long_t ReturnLongestLineWidth()
Return width of longest line.
void Layout() override
Layout the components of view.
virtual void AddLine(const char *string)
Add a line of text to the view widget.
A composite frame that layout their children in vertical way.
TLatex * DrawLatex(Double_t x, Double_t y, const char *text)
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
This is the base class for the ROOT Random number generators.
This class creates a TGCanvas in which a TCanvas is created.