/usr/include/vtk-7.1/vtkCaptionRepresentation.h is in libvtk7-dev 7.1.1+dfsg1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkCaptionRepresentation.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkCaptionRepresentation
* @brief represents vtkCaptionWidget in the scene
*
* This class represents vtkCaptionWidget. A caption is defined by some text
* with a leader (e.g., arrow) that points from the text to a point in the
* scene. The caption is defined by an instance of vtkCaptionActor2D. It uses
* the event bindings of its superclass (vtkBorderWidget) to control the
* placement of the text, and adds the ability to move the attachment point
* around. In addition, when the caption text is selected, the widget emits a
* ActivateEvent that observers can watch for. This is useful for opening GUI
* dialogoues to adjust font characteristics, etc. (Please see the superclass
* for a description of event bindings.)
*
* Note that this widget extends the behavior of its superclass
* vtkBorderRepresentation.
*
* @sa
* vtkCaptionWidget vtkBorderWidget vtkBorderRepresentation vtkCaptionActor
*/
#ifndef vtkCaptionRepresentation_h
#define vtkCaptionRepresentation_h
#include "vtkInteractionWidgetsModule.h" // For export macro
#include "vtkBorderRepresentation.h"
class vtkRenderer;
class vtkCaptionActor2D;
class vtkConeSource;
class vtkPointHandleRepresentation3D;
class VTKINTERACTIONWIDGETS_EXPORT vtkCaptionRepresentation : public vtkBorderRepresentation
{
public:
/**
* Instantiate this class.
*/
static vtkCaptionRepresentation *New();
//@{
/**
* Standard VTK class methods.
*/
vtkTypeMacro(vtkCaptionRepresentation,vtkBorderRepresentation);
void PrintSelf(ostream& os, vtkIndent indent);
//@}
//@{
/**
* Specify the position of the anchor (i.e., the point that the caption is anchored to).
* Note that the position should be specified in world coordinates.
*/
void SetAnchorPosition(double pos[3]);
void GetAnchorPosition(double pos[3]);
//@}
//@{
/**
* Specify the vtkCaptionActor2D to manage. If not specified, then one
* is automatically created.
*/
void SetCaptionActor2D(vtkCaptionActor2D *captionActor);
vtkGetObjectMacro(CaptionActor2D,vtkCaptionActor2D);
//@}
//@{
/**
* Set and get the instances of vtkPointHandleRepresention3D used to implement this
* representation. Normally default representations are created, but you can
* specify the ones you want to use.
*/
void SetAnchorRepresentation(vtkPointHandleRepresentation3D*);
vtkGetObjectMacro(AnchorRepresentation,vtkPointHandleRepresentation3D);
//@}
/**
* Satisfy the superclasses API.
*/
virtual void BuildRepresentation();
virtual void GetSize(double size[2])
{size[0]=2.0; size[1]=2.0;}
//@{
/**
* These methods are necessary to make this representation behave as
* a vtkProp.
*/
virtual void GetActors2D(vtkPropCollection*);
virtual void ReleaseGraphicsResources(vtkWindow*);
virtual int RenderOverlay(vtkViewport*);
virtual int RenderOpaqueGeometry(vtkViewport*);
virtual int RenderTranslucentPolygonalGeometry(vtkViewport*);
virtual int HasTranslucentPolygonalGeometry();
//@}
//@{
/**
* Set/Get the factor that controls the overall size of the fonts
* of the caption when the text actor's ScaledText is OFF
*/
vtkSetClampMacro(FontFactor, double, 0.1, 10.0);
vtkGetMacro(FontFactor, double);
//@}
protected:
vtkCaptionRepresentation();
~vtkCaptionRepresentation();
// the text to manage
vtkCaptionActor2D *CaptionActor2D;
vtkConeSource *CaptionGlyph;
int PointWidgetState;
int DisplayAttachmentPoint[2];
double FontFactor;
// Internal representation for the anchor
vtkPointHandleRepresentation3D *AnchorRepresentation;
// Check and adjust boundaries according to the size of the caption text
virtual void AdjustCaptionBoundary();
private:
vtkCaptionRepresentation(const vtkCaptionRepresentation&) VTK_DELETE_FUNCTION;
void operator=(const vtkCaptionRepresentation&) VTK_DELETE_FUNCTION;
};
#endif
|