// $Header$
#include "RGEditor.h"
+#include "RenderElement.h"
+#include "RGTopFrame.h"
#include <TGedFrame.h>
#include <TGCanvas.h>
ClassImp(RGEditor)
-RGEditor::RGEditor(TCanvas* canvas) : TGedEditor(canvas)
+RGEditor::RGEditor(TCanvas* canvas) :
+ TGedEditor(canvas),
+ fRnrElement(0)
{}
+void RGEditor::DisplayRenderElement(RenderElement* re)
+{
+ fRnrElement = re;
+ TObject* obj = fRnrElement ? fRnrElement->GetObject() : 0;
+ SetModel(fPad, obj, kButton1Down);
+}
+
void RGEditor::DisplayObject(TObject* obj)
{
+ fRnrElement = 0;
SetModel(fPad, obj, kButton1Down);
}
void RGEditor::Update(TGedFrame* /*gframe*/)
{
- // Copy from TGeEditor ... need to do something better now.
- if (fPad) {
- fPad->Modified();
- fPad->Update();
- }
+ // Virtual method from TGedEditor ... called on every change.
+
+ if (fRnrElement) {
+ fRnrElement->UpdateItems();
+ }
+ gReve->Redraw3D();
}