/usr/include/vtk-6.3/vtkCaptionRepresentation.h is in libvtk6-dev 6.3.0+dfsg1-5.
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 | /*=========================================================================
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.
=========================================================================*/
// .NAME vtkCaptionRepresentation - represents vtkCaptionWidget in the scene
// .SECTION Description
// 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.
// .SECTION See Also
// 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:
// Description:
// Instantiate this class.
static vtkCaptionRepresentation *New();
// Description:
// Standard VTK class methods.
vtkTypeMacro(vtkCaptionRepresentation,vtkBorderRepresentation);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// 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]);
// Description:
// Specify the vtkCaptionActor2D to manage. If not specified, then one
// is automatically created.
void SetCaptionActor2D(vtkCaptionActor2D *captionActor);
vtkGetObjectMacro(CaptionActor2D,vtkCaptionActor2D);
// Description:
// 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);
// Description:
// Satisfy the superclasses API.
virtual void BuildRepresentation();
virtual void GetSize(double size[2])
{size[0]=2.0; size[1]=2.0;}
// Description:
// 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();
// Description:
// 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&); //Not implemented
void operator=(const vtkCaptionRepresentation&); //Not implemented
};
#endif
|