Commit 1b24d0e7 authored by Marcus D. Hanwell's avatar Marcus D. Hanwell

ENH: Inherit from the new vtkRenderViewBase class.

Change to inherit from the lighter weight vtkRenderViewBase class,
mainly to get rid of several classes that were not being used by the
vtkContextView. The default background is no longer a gradient, other
than that everything else that was being used should remain the same.
parent bd0de3da
......@@ -48,11 +48,6 @@ vtkContextView::vtkContextView()
// Should not need to do this...
this->Scene->SetRenderer(this->Renderer);
// Set up our view to render on move, 2D interaction style
this->SetDisplayHoverText(false);
this->RenderOnMouseMoveOn();
this->SetInteractionModeTo2D();
// Single color background
this->Renderer->SetBackground(1.0, 1.0, 1.0);
this->Renderer->SetBackground2(1.0, 1.0, 1.0);
......@@ -75,13 +70,6 @@ vtkContextView::~vtkContextView()
}
//----------------------------------------------------------------------------
void vtkContextView::SetInteractionMode(int mode)
{
this->vtkRenderView::SetInteractionMode(mode);
this->Scene->SetInteractorStyle(
vtkInteractorStyle::SafeDownCast(this->RenderWindow->GetInteractor()->GetInteractorStyle()));
}
void vtkContextView::Render()
{
this->Update();
......
......@@ -21,17 +21,17 @@
#ifndef __vtkContextView_h
#define __vtkContextView_h
#include "vtkRenderView.h"
#include "vtkRenderViewBase.h"
class vtkContext2D;
class vtkContextScene;
class vtkRenderWindowInteractor;
class VTK_CHARTS_EXPORT vtkContextView : public vtkRenderView
class VTK_CHARTS_EXPORT vtkContextView : public vtkRenderViewBase
{
public:
void PrintSelf(ostream& os, vtkIndent indent);
vtkTypeMacro(vtkContextView,vtkRenderView);
vtkTypeMacro(vtkContextView,vtkRenderViewBase);
static vtkContextView* New();
......@@ -43,10 +43,6 @@ public:
// Get the vtkContext2D for the view.
vtkGetObjectMacro(Context, vtkContext2D);
// Description:
// Set the interaction mode, defaults to 2D here.
virtual void SetInteractionMode(int mode);
// Description:
// Get the scene of the view.
vtkGetObjectMacro(Scene, vtkContextScene);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment