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 
46 #ifndef vtkScalarBarRepresentation_h
47 #define vtkScalarBarRepresentation_h
48 
49 #include "vtkInteractionWidgetsModule.h" // For export macro
51 
52 class vtkScalarBarActor;
53 
54 class VTKINTERACTIONWIDGETS_EXPORT vtkScalarBarRepresentation : public vtkBorderRepresentation
55 {
56 public:
58  void PrintSelf(ostream &os, vtkIndent indent) override;
60 
62 
65  vtkGetObjectMacro(ScalarBarActor, vtkScalarBarActor);
66  virtual void SetScalarBarActor(vtkScalarBarActor *);
68 
70 
73  void BuildRepresentation() override;
74  void WidgetInteraction(double eventPos[2]) override;
75  void GetSize(double size[2]) override
76  {size[0]=2.0; size[1]=2.0;}
78 
80 
84  vtkTypeBool GetVisibility() override;
85  void SetVisibility(vtkTypeBool) override;
86  void GetActors2D(vtkPropCollection *collection) override;
87  void ReleaseGraphicsResources(vtkWindow *window) override;
88  int RenderOverlay(vtkViewport*) override;
89  int RenderOpaqueGeometry(vtkViewport*) override;
93 
95 
99  vtkSetMacro(AutoOrient, bool)
100  vtkGetMacro(AutoOrient, bool)
102 
104 
107  void SetOrientation(int orient);
108  int GetOrientation();
110 
111 protected:
113  ~vtkScalarBarRepresentation() override;
114 
119  void SwapOrientation();
120 
123 
124 private:
126  void operator=(const vtkScalarBarRepresentation &) = delete;
127 };
128 
129 #endif //vtkScalarBarRepresentation_h
int RenderOverlay(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
void WidgetInteraction(double eventPos[2]) override
Subclasses should implement these methods.
vtkTypeBool HasTranslucentPolygonalGeometry() override
These methods are necessary to make this representation behave as a vtkProp.
abstract specification for Viewports
Definition: vtkViewport.h:47
Create a scalar bar with labels.
int RenderOpaqueGeometry(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
void GetActors2D(vtkPropCollection *) override
These methods are necessary to make this representation behave as a vtkProp.
virtual vtkTypeBool GetVisibility()
Set/Get visibility of this vtkProp.
virtual void SetVisibility(vtkTypeBool)
Set/Get visibility of this vtkProp.
static vtkBorderRepresentation * New()
Instantiate this class.
an ordered list of Props
void PrintSelf(ostream &os, vtkIndent indent) override
Define standard methods.
int vtkTypeBool
Definition: vtkABI.h:69
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
void BuildRepresentation() override
Subclasses should implement these methods.
a simple class to control print indentation
Definition: vtkIndent.h:39
represent scalar bar for vtkScalarBarWidget
void ReleaseGraphicsResources(vtkWindow *) override
These methods are necessary to make this representation behave as a vtkProp.
represent a vtkBorderWidget
void GetSize(double size[2]) override
Satisfy the superclass' API.