Logo ROOT   6.14/05
Reference Guide
arrow_standalone.C File Reference

Detailed Description

How to use EVE without the standard window.

Type gEve->GetBrowser()->MapWindow() to bring it up for object interaction, debugging, etc.

eve_arrow_standalone.png
void arrow_standalone()
{
// ----------------------------------------------------------------------
TGMainFrame* mf = new TGMainFrame(gClient->GetRoot(), 800, 400,
mf->SetWindowName("Arrow Foo");
// ----------------------------------------------------------------------
TGCompositeFrame* evf = new TGCompositeFrame(mf, 400, 400);
evf->AddFrame(ev->GetFrame(),
TEveViewer* eve_v = new TEveViewer("YourViewer");
eve_v->SetGLViewer(ev, ev->GetFrame());
eve_v->IncDenyDestroy();
// ----------------------------------------------------------------------
// 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!
// --------------------------------
// To create full canvas with menus.
mf->SetEditable();
TCanvas* c = new TCanvas("Foo", "Bar", 400, 400);
// ----------------------------------------------------------------------
mf->Layout();
mf->MapWindow();
// ----------------------------------------------------------------------
// Populate the viewer ... here we just call the arrow.C.
TEveUtil::Macro("arrow.C");
}
Author
Matevz Tadel

Definition in file arrow_standalone.C.