25 TEveManager::Create();
27 TEveUtil::Macro(
"pointset.C");
33 gEve->GetBrowser()->GetTabRight()->SetTab(1);
39 TEveWindowSlot *slot = 0;
40 TEveWindowFrame *frame = 0;
43 slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
44 TEveWindowPack* pack1 = slot->MakePack();
45 pack1->SetShowTitleBar(kFALSE);
46 pack1->SetHorizontal();
49 slot = pack1->NewSlot();
50 v =
new TEveViewer(
"BarViewer");
51 v->SpawnGLEmbeddedViewer(gEve->GetEditor());
52 slot->ReplaceWindow(v);
53 v->SetElementName(
"Bar Embedded Viewer");
55 gEve->GetViewers()->AddElement(v);
56 v->AddScene(gEve->GetEventScene());
58 slot = pack1->NewSlot();
59 TEveWindowPack* pack2 = slot->MakePack();
60 pack2->SetShowTitleBar(kFALSE);
62 slot = pack2->NewSlot();
63 slot->StartEmbedding();
64 TCanvas* can =
new TCanvas(
"Root Canvas");
66 slot->StopEmbedding();
69 slot = pack2->NewSlot();
70 v =
new TEveViewer(
"FooViewer");
71 v->SpawnGLViewer(gEve->GetEditor());
72 slot->ReplaceWindow(v);
73 gEve->GetViewers()->AddElement(v);
74 v->AddScene(gEve->GetEventScene());
80 TEveWindowFrame *frame = 0;
82 TEveWindowSlot* slot =
83 TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
84 TEveWindowPack* pack1 = slot->MakePack();
85 pack1->SetShowTitleBar(kFALSE);
86 pack1->SetElementName(
"Detail");
87 pack1->SetHorizontal();
90 slot = pack1->NewSlot();
91 frame = slot->MakeFrame();
92 frame->SetElementName(
"Latex Frame");
93 frame->SetShowTitleBar(kFALSE);
94 TGCompositeFrame* cf = frame->GetGUICompositeFrame();
95 TGCompositeFrame* hf =
new TGVerticalFrame(cf);
96 hf->SetCleanup(kLocalCleanup);
97 cf->AddFrame(hf,
new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
99 TGVerticalFrame* guiFrame =
new TGVerticalFrame(hf);
100 hf->AddFrame(guiFrame,
new TGLayoutHints(kLHintsExpandX));
101 guiFrame->SetCleanup(kDeepCleanup);
103 guiFrame->AddFrame(
new TGLabel(guiFrame,
"Press Button:"),
104 new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
105 TGTextButton *b =
new TGTextButton(guiFrame,
"TestButton");
106 guiFrame->AddFrame(b,
new TGLayoutHints(kLHintsExpandX));
107 TRootEmbeddedCanvas* ec =
108 new TRootEmbeddedCanvas(
"Embeddedcanvas", hf, 220);
109 hf->AddFrame(ec,
new TGLayoutHints(kLHintsExpandY|kLHintsExpandX));
110 double fontsize = 0.07;
112 double y = 1 -1*fontsize;
113 TLatex* latex =
new TLatex(x, y,
"Legend:");
114 latex->SetTextSize(fontsize);
118 latex->DrawLatex(x, y,
"greek letter #Delta#eta_{out}");
120 latex->DrawLatex(x, y,
"#color[5]{+} marker");
122 latex->DrawLatex(x, y,
"#color[5]{+} marker");
124 latex->DrawLatex(x, y,
"#color[4]{+} marker");
126 latex->DrawLatex(x, y,
"#color[5]{#bullet} marker");
128 latex->DrawLatex(x, y,
"#color[4]{#bullet} marker some text");
130 latex->DrawLatex(x, y,
"#color[2]{#Box} square");
132 latex->DrawLatex(x, y,
"#color[5]{#Box} color");
140 TEveWindowSlot* slot2 = pack1->NewSlotWithWeight(3);
141 TEveViewer* viewer =
new TEveViewer(
"DetailView",
"DetailView");
142 TGLEmbeddedViewer* embeddedViewer = viewer->SpawnGLEmbeddedViewer();
143 slot2->ReplaceWindow(viewer);
144 gEve->GetViewers()->AddElement(viewer);
145 viewer->AddScene(gEve->GetEventScene());
151 TEveWindowSlot *slot = 0;
152 TEveWindowFrame *frame = 0;
155 slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
156 TEveWindowTab* tab1 = slot->MakeTab();
157 tab1->SetElementName(
"Tabs");
158 tab1->SetShowTitleBar(kFALSE);
161 slot = tab1->NewSlot();
162 TEveWindowPack* pack1 = slot->MakePack();
163 for(
int i = 0; i<4;++i)
165 Int_t weight = r.Uniform(3, 7);
166 slot = pack1->NewSlotWithWeight(weight);
167 frame = slot->MakeFrame();
168 frame->SetElementName(Form(
"FrameInPack %d", i));
169 TGCompositeFrame* cf = frame->GetGUICompositeFrame();
170 TGTextView* text_view =
new TGTextView(cf, 200, 400);
171 cf->AddFrame(text_view,
new TGLayoutHints(kLHintsLeft |
175 for(Int_t l =0; l<weight; l++)
177 text_view->AddLine(Form(
"slot[%d] add line %d here ", i, l));
180 text_view->SetWidth(text_view->ReturnLongestLineWidth()+20);
189 slot = tab1->NewSlot();
190 frame = slot->MakeFrame(
new TRootEmbeddedCanvas());
191 frame->SetElementName(
"Embedded Canvas");
194 slot = tab1->NewSlot();
195 slot->SetShowTitleBar(kFALSE);
196 TEveWindowTab* tab2 = slot->MakeTab();
197 tab2->SetElementName(
"Nested");
198 tab2->SetShowTitleBar(kFALSE);
199 slot = tab2->NewSlot();
200 slot->SetShowTitleBar(kFALSE);
201 slot = tab2->NewSlot();
202 slot->SetShowTitleBar(kFALSE);