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
53
54class VTKINTERACTIONWIDGETS_EXPORT vtkScalarBarRepresentation : public vtkBorderRepresentation
55{
56public:
58 void PrintSelf(ostream& os, vtkIndent indent) override;
60
62
65 vtkGetObjectMacro(ScalarBarActor, 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
114protected:
117
122 void SwapOrientation();
123
124 vtkScalarBarActor* ScalarBarActor;
125 bool AutoOrient;
126
127private:
129 void operator=(const vtkScalarBarRepresentation&) = delete;
130};
131
132#endif // vtkScalarBarRepresentation_h
represent a vtkBorderWidget
a simple class to control print indentation
Definition vtkIndent.h:40
an ordered list of Props
Create a scalar bar with labels.
represent scalar bar for vtkScalarBarWidget
vtkTypeBool GetVisibility() VTK_FUTURE_CONST override
These methods are necessary to make this representation behave as a vtkProp.
virtual void SetScalarBarActor(vtkScalarBarActor *)
The prop that is placed in the renderer.
void BuildRepresentation() override
Satisfy the superclass' API.
void PrintSelf(ostream &os, vtkIndent indent) override
Define standard methods.
void GetSize(double size[2]) override
Satisfy the superclass' API.
void WidgetInteraction(double eventPos[2]) override
Satisfy the superclass' API.
static vtkScalarBarRepresentation * New()
abstract specification for Viewports
Definition vtkViewport.h:56
window superclass for vtkRenderWindow
Definition vtkWindow.h:39
int vtkTypeBool
Definition vtkABI.h:69