]>
Commit | Line | Data |
---|---|---|
5a5a1232 | 1 | // $Header$ |
2 | ||
3 | #include "RGEditor.h" | |
a8600b56 | 4 | #include "RenderElement.h" |
5 | #include "RGTopFrame.h" | |
5a5a1232 | 6 | |
7 | #include <TGedFrame.h> | |
8 | #include <TGCanvas.h> | |
9 | #include <TCanvas.h> | |
10 | ||
11 | //______________________________________________________________________ | |
12 | // RGEditor | |
13 | // | |
14 | ||
15 | using namespace Reve; | |
16 | ||
17 | ClassImp(RGEditor) | |
18 | ||
3c67f72c | 19 | RGEditor::RGEditor(TCanvas* canvas) : |
20 | TGedEditor(canvas), | |
21 | fRnrElement(0) | |
5a5a1232 | 22 | {} |
23 | ||
a8600b56 | 24 | void RGEditor::DisplayRenderElement(RenderElement* re) |
25 | { | |
26 | fRnrElement = re; | |
27 | TObject* obj = fRnrElement ? fRnrElement->GetObject() : 0; | |
28 | SetModel(fPad, obj, kButton1Down); | |
29 | } | |
30 | ||
5a5a1232 | 31 | void RGEditor::DisplayObject(TObject* obj) |
32 | { | |
a8600b56 | 33 | fRnrElement = 0; |
34 | SetModel(fPad, obj, kButton1Down); | |
35 | } | |
36 | ||
37 | void RGEditor::Update(TGedFrame* /*gframe*/) | |
38 | { | |
39 | // Virtual method from TGedEditor ... called on every change. | |
0de797f2 | 40 | |
a8600b56 | 41 | if (fRnrElement) { |
42 | fRnrElement->UpdateItems(); | |
e8f20a25 | 43 | } |
a8600b56 | 44 | |
45 | gReve->Redraw3D(); | |
5a5a1232 | 46 | } |