VTK  9.2.6
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 
50 #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  {
77  size[0] = 2.0;
78  size[1] = 2.0;
79  }
81 
83 
87  vtkTypeBool GetVisibility() VTK_FUTURE_CONST override;
88  void SetVisibility(vtkTypeBool) override;
89  void GetActors2D(vtkPropCollection* collection) override;
90  void ReleaseGraphicsResources(vtkWindow* window) override;
91  int RenderOverlay(vtkViewport*) override;
92  int RenderOpaqueGeometry(vtkViewport*) override;
93  int RenderTranslucentPolygonalGeometry(vtkViewport*) override;
94  vtkTypeBool HasTranslucentPolygonalGeometry() override;
96 
98 
102  vtkSetMacro(AutoOrient, bool);
103  vtkGetMacro(AutoOrient, bool);
105 
107 
110  void SetOrientation(int orient);
111  int GetOrientation();
113 
114 protected:
116  ~vtkScalarBarRepresentation() override;
117 
122  void SwapOrientation();
123 
124  vtkScalarBarActor* ScalarBarActor;
125  bool AutoOrient;
126 
127 private:
128  vtkScalarBarRepresentation(const vtkScalarBarRepresentation&) = delete;
129  void operator=(const vtkScalarBarRepresentation&) = delete;
130 };
131 
132 #endif // vtkScalarBarRepresentation_h
void WidgetInteraction(double eventPos[2]) override
Subclasses should implement these methods.
abstract specification for Viewports
Definition: vtkViewport.h:55
Create a scalar bar with labels.
virtual vtkTypeBool GetVisibility()
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:38
void BuildRepresentation() override
Subclasses should implement these methods.
a simple class to control print indentation
Definition: vtkIndent.h:39
represent scalar bar for vtkScalarBarWidget
represent a vtkBorderWidget
void GetSize(double size[2]) override
Satisfy the superclass' API.