This commit was generated by cvs2svn to compensate for changes in r13732,
[u/mrichter/AliRoot.git] / EVE / Reve / RGEditor.cxx
1 // $Header$
2
3 #include "RGEditor.h"
4
5 #include <TGedFrame.h>
6 #include <TGCanvas.h>
7 #include <TCanvas.h>
8
9 //______________________________________________________________________
10 // RGEditor
11 //
12
13 using namespace Reve;
14
15 ClassImp(RGEditor)
16
17 RGEditor::RGEditor(TCanvas* canvas) : TGedEditor(canvas)
18 {}
19
20 void RGEditor::DisplayObject(TObject* obj)
21 {
22   fModel = obj;
23
24   if(obj) {
25     if(obj->IsA() != fClass && !obj->IsA()->InheritsFrom(fClass)) {
26       fClass = obj->IsA();
27       GetEditors();
28     }
29   } else {
30     fCan->UnmapWindow();
31     return;
32   }
33
34   TGFrameElement *el;
35   TIter next(fStyle->GetList());
36   while ((el = (TGFrameElement *) next())) {
37     if ((el->fFrame)->InheritsFrom(TGedFrame::Class()))
38       ((TGedFrame *)(el->fFrame))->SetModel(fPad, fModel, 0);
39   }
40   fCan->MapWindow();
41 }