VTK
vtkScalarBarRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkScalarBarRepresentation.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
16 /*
17  * Copyright 2008 Sandia Corporation.
18  * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
19  * license for use of this work by or on behalf of the
20  * U.S. Government. Redistribution and use in source and binary forms, with
21  * or without modification, are permitted provided that this Notice and any
22  * statement of authorship are reproduced on all copies.
23  */
24 
43 #ifndef vtkScalarBarRepresentation_h
44 #define vtkScalarBarRepresentation_h
45 
46 #include "vtkInteractionWidgetsModule.h" // For export macro
48 
49 class vtkScalarBarActor;
50 
51 class VTKINTERACTIONWIDGETS_EXPORT vtkScalarBarRepresentation : public vtkBorderRepresentation
52 {
53 public:
55  void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE;
57 
59 
62  vtkGetObjectMacro(ScalarBarActor, vtkScalarBarActor);
63  virtual void SetScalarBarActor(vtkScalarBarActor *);
65 
67 
70  void BuildRepresentation() VTK_OVERRIDE;
71  void WidgetInteraction(double eventPos[2]) VTK_OVERRIDE;
72  void GetSize(double size[2]) VTK_OVERRIDE
73  {size[0]=2.0; size[1]=2.0;}
75 
77 
81  int GetVisibility() VTK_OVERRIDE;
82  void SetVisibility(int) VTK_OVERRIDE;
83  void GetActors2D(vtkPropCollection *collection) VTK_OVERRIDE;
84  void ReleaseGraphicsResources(vtkWindow *window) VTK_OVERRIDE;
85  int RenderOverlay(vtkViewport*) VTK_OVERRIDE;
86  int RenderOpaqueGeometry(vtkViewport*) VTK_OVERRIDE;
87  int RenderTranslucentPolygonalGeometry(vtkViewport*) VTK_OVERRIDE;
88  int HasTranslucentPolygonalGeometry() VTK_OVERRIDE;
90 
92 
96  vtkSetMacro(AutoOrient, bool)
97  vtkGetMacro(AutoOrient, bool)
99 
101 
104  void SetOrientation(int orient);
105  int GetOrientation();
107 
108 protected:
110  ~vtkScalarBarRepresentation() VTK_OVERRIDE;
111 
116  void SwapOrientation();
117 
118  vtkScalarBarActor *ScalarBarActor;
119  bool AutoOrient;
120 
121 private:
122  vtkScalarBarRepresentation(const vtkScalarBarRepresentation &) VTK_DELETE_FUNCTION;
123  void operator=(const vtkScalarBarRepresentation &) VTK_DELETE_FUNCTION;
124 };
125 
126 #endif //vtkScalarBarRepresentation_h
virtual int GetVisibility()
Set/Get visibility of this vtkProp.
abstract specification for Viewports
Definition: vtkViewport.h:44
Create a scalar bar with labels.
static vtkBorderRepresentation * New()
Instantiate this class.
an ordered list of Props
void PrintSelf(ostream &os, vtkIndent indent) override
Define standard methods.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
void BuildRepresentation() override
Subclasses should implement these methods.
a simple class to control print indentation
Definition: vtkIndent.h:33
represent scalar bar for vtkScalarBarWidget
represent a vtkBorderWidget
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.