arrow.C: Demonstrates usage of TEveArrow class. | Event Display | assembly.C: Geometry detector assembly example |
// @(#)root/eve:$Id: triangleset.C 26568 2008-12-01 20:55:50Z matevz $ // Author: Matevz Tadel // How to use EVE without the standard window. // Type // gEve->GetBrowser()->MapWindow() // to bring it up for object interaction, debugging, etc. void arrow_standalone() { TEveManager::Create(kFALSE); // ---------------------------------------------------------------------- TGMainFrame* mf = new TGMainFrame(gClient->GetRoot(), 800, 400, kHorizontalFrame); mf->SetWindowName("Arrow Foo"); // ---------------------------------------------------------------------- TGCompositeFrame* evf = new TGCompositeFrame(mf, 400, 400); mf->AddFrame(evf, new TGLayoutHints(kLHintsNormal | kLHintsExpandX | kLHintsExpandY)); TGLEmbeddedViewer* ev = new TGLEmbeddedViewer(evf); evf->AddFrame(ev->GetFrame(), new TGLayoutHints(kLHintsNormal | kLHintsExpandX | kLHintsExpandY)); TEveViewer* eve_v = new TEveViewer("YourViewer"); eve_v->SetGLViewer(ev, ev->GetFrame()); eve_v->IncDenyDestroy(); eve_v->AddScene(gEve->GetEventScene()); gEve->AddElement(eve_v, gEve->GetViewers()); // ---------------------------------------------------------------------- // To create embedded canvas ... no menus on top. // TRootEmbeddedCanvas* ec = new TRootEmbeddedCanvas("EmbeddedCanvas", mf, 400, 400); // mf->AddFrame(ec, new TGLayoutHints(kLHintsNormal | kLHintsExpandX | kLHintsExpandY)); // -------------------------------- // This one is tricky - must be after embedded canvas but before std canvas!@ mf->MapSubwindows(); // -------------------------------- // To create full canvas with menus. mf->SetEditable(); TCanvas* c = new TCanvas("Foo", "Bar", 400, 400); mf->SetEditable(kFALSE); // ---------------------------------------------------------------------- mf->Layout(); mf->MapWindow(); // ---------------------------------------------------------------------- // Populate the viewer ... here we just call the arrow.C. TEveUtil::Macro("arrow.C"); } arrow_standalone.C:1 arrow_standalone.C:2 arrow_standalone.C:3 arrow_standalone.C:4 arrow_standalone.C:5 arrow_standalone.C:6 arrow_standalone.C:7 arrow_standalone.C:8 arrow_standalone.C:9 arrow_standalone.C:10 arrow_standalone.C:11 arrow_standalone.C:12 arrow_standalone.C:13 arrow_standalone.C:14 arrow_standalone.C:15 arrow_standalone.C:16 arrow_standalone.C:17 arrow_standalone.C:18 arrow_standalone.C:19 arrow_standalone.C:20 arrow_standalone.C:21 arrow_standalone.C:22 arrow_standalone.C:23 arrow_standalone.C:24 arrow_standalone.C:25 arrow_standalone.C:26 arrow_standalone.C:27 arrow_standalone.C:28 arrow_standalone.C:29 arrow_standalone.C:30 arrow_standalone.C:31 arrow_standalone.C:32 arrow_standalone.C:33 arrow_standalone.C:34 arrow_standalone.C:35 arrow_standalone.C:36 arrow_standalone.C:37 arrow_standalone.C:38 arrow_standalone.C:39 arrow_standalone.C:40 arrow_standalone.C:41 arrow_standalone.C:42 arrow_standalone.C:43 arrow_standalone.C:44 arrow_standalone.C:45 arrow_standalone.C:46 arrow_standalone.C:47 arrow_standalone.C:48 arrow_standalone.C:49 arrow_standalone.C:50 arrow_standalone.C:51 arrow_standalone.C:52 arrow_standalone.C:53 arrow_standalone.C:54 arrow_standalone.C:55 arrow_standalone.C:56 arrow_standalone.C:57 arrow_standalone.C:58 arrow_standalone.C:59 arrow_standalone.C:60 arrow_standalone.C:61 arrow_standalone.C:62 arrow_standalone.C:63 arrow_standalone.C:64 |
|