]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/Reve/RGeoNodeEditors.cxx
Add Getters and Setters in TrackRnrStyle and TrackList to define rendering of path...
[u/mrichter/AliRoot.git] / EVE / Reve / RGeoNodeEditors.cxx
index 3bbd6652c5642bfffb5edc8e78ebc6fc9c5a4ace..137495879a831cf51d964b5410b7e20cf94b4cf1 100644 (file)
@@ -22,10 +22,10 @@ using namespace Reve;
 
 ClassImp(GeoNodeRnrElEditor)
 
-GeoNodeRnrElEditor::GeoNodeRnrElEditor(const TGWindow *p, Int_t id,
+GeoNodeRnrElEditor::GeoNodeRnrElEditor(const TGWindow *p,
                                        Int_t width, Int_t height,
                                        UInt_t options, Pixel_t back) :
-  TGedFrame(p, id, width, height, options | kVerticalFrame, back),
+  TGedFrame(p,width, height, options | kVerticalFrame, back),
 
   fNodeRE (0),
 
@@ -81,32 +81,13 @@ GeoNodeRnrElEditor::GeoNodeRnrElEditor(const TGWindow *p, Int_t id,
                           "Reve::GeoNodeRnrElEditor", this, "DoTransparency()");
     AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
   }
-
-
-  // What is this crap?
-  TClass *cl = GeoNodeRnrEl::Class();
-  TGedElement *ge = new TGedElement;
-  ge->fGedFrame = this;
-  ge->fCanvas = 0;
-  cl->GetEditorList()->Add(ge);
 }
 
 /**************************************************************************/
 
-void GeoNodeRnrElEditor::SetModel(TVirtualPad* pad, TObject* obj, Int_t )
+void GeoNodeRnrElEditor::SetModel(TObject* obj)
 {
-  fModel = 0;
-  fPad = 0;
-
-  if (!obj || !obj->InheritsFrom(GeoNodeRnrEl::Class()) || obj->InheritsFrom(TVirtualPad::Class())) {
-    SetActive(kFALSE);
-    return;
-  }
-
-  fModel = obj;
-  fPad = pad;
-   
-  fNodeRE = dynamic_cast<GeoNodeRnrEl*>(fModel);
+  fNodeRE = dynamic_cast<GeoNodeRnrEl*>(obj);
   TGeoNode*  node = fNodeRE->fNode;
   TGeoVolume* vol = node->GetVolume();
 
@@ -116,8 +97,6 @@ void GeoNodeRnrElEditor::SetModel(TVirtualPad* pad, TObject* obj, Int_t )
   fVizVolumeDaughters->SetState(vol->IsVisDaughters() ? kButtonDown : kButtonUp);
 
   fTransparency->SetNumber(vol->GetTransparency());
-
-  SetActive();
 }
 
 /**************************************************************************/
@@ -164,10 +143,10 @@ void GeoNodeRnrElEditor::DoTransparency()
 
 ClassImp(GeoTopNodeRnrElEditor)
 
-GeoTopNodeRnrElEditor::GeoTopNodeRnrElEditor(const TGWindow *p, Int_t id,
+GeoTopNodeRnrElEditor::GeoTopNodeRnrElEditor(const TGWindow *p,
                                              Int_t width, Int_t height,
                                             UInt_t options, Pixel_t back) :
-  TGedFrame(p, id, width, height, options | kVerticalFrame, back),
+  TGedFrame(p, width, height, options | kVerticalFrame, back),
 
   fTopNodeRE (0),
   fVisOption (0),
@@ -204,37 +183,16 @@ GeoTopNodeRnrElEditor::GeoTopNodeRnrElEditor(const TGWindow *p, Int_t id,
                        "Reve::GeoTopNodeRnrElEditor", this, "DoVisLevel()");
     AddFrame(f, new TGLayoutHints(kLHintsTop, 1, 1, 1, 1));
   }
-
-
-  // What is this crap?
-  TClass *cl = GeoNodeRnrEl::Class();
-  TGedElement *ge = new TGedElement;
-  ge->fGedFrame = this;
-  ge->fCanvas = 0;
-  cl->GetEditorList()->Add(ge);
 }
 
 /**************************************************************************/
 
-void GeoTopNodeRnrElEditor::SetModel(TVirtualPad* pad, TObject* obj, Int_t )
+void GeoTopNodeRnrElEditor::SetModel(TObject* obj)
 {
-  fModel = 0;
-  fPad = 0;
-
-  if (!obj || !obj->InheritsFrom(GeoTopNodeRnrEl::Class()) || obj->InheritsFrom(TVirtualPad::Class())) {
-    SetActive(kFALSE);
-    return;
-  }
-
-  fModel = obj;
-  fPad   = pad;
-   
-  fTopNodeRE = dynamic_cast<GeoTopNodeRnrEl*>(fModel);
+  fTopNodeRE = dynamic_cast<GeoTopNodeRnrEl*>(obj);
 
   fVisOption->SetNumber(fTopNodeRE->GetVisOption());
   fVisLevel->SetNumber(fTopNodeRE->GetVisLevel());
-
-  SetActive();
 }
 
 /**************************************************************************/