vtkBalloonRepresentation Class Reference

#include <vtkBalloonRepresentation.h>

Inheritance diagram for vtkBalloonRepresentation:

Inheritance graph
[legend]
Collaboration diagram for vtkBalloonRepresentation:

Collaboration graph
[legend]

List of all members.


Detailed Description

represent the vtkBalloonWidget

The vtkBalloonRepresentation is used to represent the vtkBalloonWidget. This representation is defined by two items: a text string and an image. At least one of these two items must be defined, but it is allowable to specify both, or just an image or just text. If both the text and image are specified, then methods are available for positioning the text and image with respect to each other.

The balloon representation consists of three parts: text, a rectangular frame behind the text, and an image placed next to the frame and sized to match the frame.

The size of the balloon is ultimately controlled by the text properties (i.e., font size). This representation uses a layout policy as follows.

If there is just text and no image, then the text properties and padding are used to control the size of the balloon.

If there is just an image and no text, then the ImageSize[2] member is used to control the image size. (The image will fit into this rectangle, but will not necessarily fill the whole rectangle, i.e., the image is not stretched).

If there is text and an image, the following approach ia used. First, based on the font size and other related properties (e.g., padding), determine the size of the frame. Second, depending on the layout of the image and text frame, control the size of the neighboring image (since the frame and image share a common edge). However, if this results in an image that is smaller than ImageSize[2], then the image size will be set to ImageSize[2] and the frame will be adjusted accordingly. The text is always placed in the center of the frame if the frame is resized.

See also:
vtkBalloonWidget
Tests:
vtkBalloonRepresentation (Tests)

Definition at line 77 of file vtkBalloonRepresentation.h.

typedef vtkWidgetRepresentation Superclass
static int IsTypeOf (const char *type)
static vtkBalloonRepresentationSafeDownCast (vtkObject *o)
virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)

Public Types

enum  { ImageLeft = 0, ImageRight, ImageBottom, ImageTop }

Public Member Functions

virtual void SetBalloonImage (vtkImageData *img)
virtual vtkImageDataGetBalloonImage ()
virtual char * GetBalloonText ()
virtual void SetBalloonText (const char *)
virtual void SetImageSize (int, int)
void SetImageSize (int[2])
virtual int * GetImageSize ()
virtual void GetImageSize (int &, int &)
virtual void GetImageSize (int[2])
virtual void SetTextProperty (vtkTextProperty *p)
virtual vtkTextPropertyGetTextProperty ()
virtual void SetFrameProperty (vtkProperty2D *p)
virtual vtkProperty2DGetFrameProperty ()
virtual void SetImageProperty (vtkProperty2D *p)
virtual vtkProperty2DGetImageProperty ()
virtual void SetBalloonLayout (int)
virtual int GetBalloonLayout ()
void SetBalloonLayoutToImageLeft ()
void SetBalloonLayoutToImageRight ()
void SetBalloonLayoutToImageBottom ()
void SetBalloonLayoutToImageTop ()
void SetBalloonLayoutToTextLeft ()
void SetBalloonLayoutToTextRight ()
void SetBalloonLayoutToTextTop ()
void SetBalloonLayoutToTextBottom ()
virtual void SetOffset (int, int)
void SetOffset (int[2])
virtual int * GetOffset ()
virtual void GetOffset (int &, int &)
virtual void GetOffset (int[2])
virtual void SetPadding (int)
virtual int GetPadding ()
virtual void StartWidgetInteraction (double e[2])
virtual void EndWidgetInteraction (double e[2])
virtual void BuildRepresentation ()
virtual void ReleaseGraphicsResources (vtkWindow *w)
virtual int RenderOverlay (vtkViewport *viewport)

Static Public Member Functions

static vtkBalloonRepresentationNew ()

Protected Member Functions

 vtkBalloonRepresentation ()
 ~vtkBalloonRepresentation ()
void AdjustImageSize (double imageSize[2])
void ScaleImage (double imageSize[2], double scale)

Protected Attributes

char * BalloonText
vtkImageDataBalloonImage
int BalloonLayout
int Padding
int Offset [2]
int ImageSize [2]
vtkTextMapperTextMapper
vtkActor2DTextActor
vtkTextPropertyTextProperty
vtkTextureTexture
vtkPolyDataTexturePolyData
vtkPointsTexturePoints
vtkPolyDataMapper2DTextureMapper
vtkActor2DTextureActor
vtkProperty2DImageProperty
vtkPointsFramePoints
vtkCellArrayFramePolygon
vtkPolyDataFramePolyData
vtkPolyDataMapper2DFrameMapper
vtkActor2DFrameActor
vtkProperty2DFrameProperty
int TextVisible
int ImageVisible

Member Typedef Documentation

Standard VTK methods.

Reimplemented from vtkWidgetRepresentation.

Definition at line 85 of file vtkBalloonRepresentation.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
ImageLeft 
ImageRight 
ImageBottom 
ImageTop 

Definition at line 130 of file vtkBalloonRepresentation.h.


Constructor & Destructor Documentation

vtkBalloonRepresentation::vtkBalloonRepresentation (  )  [protected]

vtkBalloonRepresentation::~vtkBalloonRepresentation (  )  [protected]


Member Function Documentation

static vtkBalloonRepresentation* vtkBalloonRepresentation::New (  )  [static]

Instantiate the class.

Reimplemented from vtkObject.

virtual const char* vtkBalloonRepresentation::GetClassName (  )  [virtual]

Standard VTK methods.

Reimplemented from vtkWidgetRepresentation.

static int vtkBalloonRepresentation::IsTypeOf ( const char *  type  )  [static]

Standard VTK methods.

Reimplemented from vtkWidgetRepresentation.

virtual int vtkBalloonRepresentation::IsA ( const char *  type  )  [virtual]

Standard VTK methods.

Reimplemented from vtkWidgetRepresentation.

static vtkBalloonRepresentation* vtkBalloonRepresentation::SafeDownCast ( vtkObject o  )  [static]

Standard VTK methods.

Reimplemented from vtkWidgetRepresentation.

void vtkBalloonRepresentation::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Standard VTK methods.

Reimplemented from vtkWidgetRepresentation.

virtual void vtkBalloonRepresentation::SetBalloonImage ( vtkImageData img  )  [virtual]

Specify/retrieve the image to display in the balloon.

virtual vtkImageData* vtkBalloonRepresentation::GetBalloonImage (  )  [virtual]

Specify/retrieve the image to display in the balloon.

virtual char* vtkBalloonRepresentation::GetBalloonText (  )  [virtual]

Specify/retrieve the text to display in the balloon.

virtual void vtkBalloonRepresentation::SetBalloonText ( const char *   )  [virtual]

Specify/retrieve the text to display in the balloon.

virtual void vtkBalloonRepresentation::SetImageSize ( int  ,
int   
) [virtual]

Specify the minimum size for the image. Note that this is a bounding rectangle, the image will fit inside of it. However, if the balloon consists of text plus an image, then the image may be bigger than ImageSize[2] to fit into the balloon frame.

void vtkBalloonRepresentation::SetImageSize ( int  [2]  ) 

Specify the minimum size for the image. Note that this is a bounding rectangle, the image will fit inside of it. However, if the balloon consists of text plus an image, then the image may be bigger than ImageSize[2] to fit into the balloon frame.

virtual int* vtkBalloonRepresentation::GetImageSize (  )  [virtual]

Specify the minimum size for the image. Note that this is a bounding rectangle, the image will fit inside of it. However, if the balloon consists of text plus an image, then the image may be bigger than ImageSize[2] to fit into the balloon frame.

virtual void vtkBalloonRepresentation::GetImageSize ( int &  ,
int &   
) [virtual]

Specify the minimum size for the image. Note that this is a bounding rectangle, the image will fit inside of it. However, if the balloon consists of text plus an image, then the image may be bigger than ImageSize[2] to fit into the balloon frame.

virtual void vtkBalloonRepresentation::GetImageSize ( int  [2]  )  [virtual]

Specify the minimum size for the image. Note that this is a bounding rectangle, the image will fit inside of it. However, if the balloon consists of text plus an image, then the image may be bigger than ImageSize[2] to fit into the balloon frame.

virtual void vtkBalloonRepresentation::SetTextProperty ( vtkTextProperty p  )  [virtual]

Set/get the text property (relevant only if text is shown).

virtual vtkTextProperty* vtkBalloonRepresentation::GetTextProperty (  )  [virtual]

Set/get the text property (relevant only if text is shown).

virtual void vtkBalloonRepresentation::SetFrameProperty ( vtkProperty2D p  )  [virtual]

Set/get the frame property (relevant only if text is shown). The frame lies behind the text.

virtual vtkProperty2D* vtkBalloonRepresentation::GetFrameProperty (  )  [virtual]

Set/get the frame property (relevant only if text is shown). The frame lies behind the text.

virtual void vtkBalloonRepresentation::SetImageProperty ( vtkProperty2D p  )  [virtual]

Set/get the image property (relevant only if an image is shown).

virtual vtkProperty2D* vtkBalloonRepresentation::GetImageProperty (  )  [virtual]

Set/get the image property (relevant only if an image is shown).

virtual void vtkBalloonRepresentation::SetBalloonLayout ( int   )  [virtual]

Specify the layout of the image and text within the balloon. Note that there are reduncies in these methods, for example SetBalloonLayoutToImageLeft() results in the same effect as SetBalloonLayoutToTextRight(). If only text is specified, or only an image is specified, then it doesn't matter how the layout is specified.

virtual int vtkBalloonRepresentation::GetBalloonLayout (  )  [virtual]

Specify the layout of the image and text within the balloon. Note that there are reduncies in these methods, for example SetBalloonLayoutToImageLeft() results in the same effect as SetBalloonLayoutToTextRight(). If only text is specified, or only an image is specified, then it doesn't matter how the layout is specified.

void vtkBalloonRepresentation::SetBalloonLayoutToImageLeft (  )  [inline]

Specify the layout of the image and text within the balloon. Note that there are reduncies in these methods, for example SetBalloonLayoutToImageLeft() results in the same effect as SetBalloonLayoutToTextRight(). If only text is specified, or only an image is specified, then it doesn't matter how the layout is specified.

Definition at line 141 of file vtkBalloonRepresentation.h.

void vtkBalloonRepresentation::SetBalloonLayoutToImageRight (  )  [inline]

Specify the layout of the image and text within the balloon. Note that there are reduncies in these methods, for example SetBalloonLayoutToImageLeft() results in the same effect as SetBalloonLayoutToTextRight(). If only text is specified, or only an image is specified, then it doesn't matter how the layout is specified.

Definition at line 142 of file vtkBalloonRepresentation.h.

void vtkBalloonRepresentation::SetBalloonLayoutToImageBottom (  )  [inline]

Specify the layout of the image and text within the balloon. Note that there are reduncies in these methods, for example SetBalloonLayoutToImageLeft() results in the same effect as SetBalloonLayoutToTextRight(). If only text is specified, or only an image is specified, then it doesn't matter how the layout is specified.

Definition at line 143 of file vtkBalloonRepresentation.h.

void vtkBalloonRepresentation::SetBalloonLayoutToImageTop (  )  [inline]

Specify the layout of the image and text within the balloon. Note that there are reduncies in these methods, for example SetBalloonLayoutToImageLeft() results in the same effect as SetBalloonLayoutToTextRight(). If only text is specified, or only an image is specified, then it doesn't matter how the layout is specified.

Definition at line 144 of file vtkBalloonRepresentation.h.

void vtkBalloonRepresentation::SetBalloonLayoutToTextLeft (  )  [inline]

Specify the layout of the image and text within the balloon. Note that there are reduncies in these methods, for example SetBalloonLayoutToImageLeft() results in the same effect as SetBalloonLayoutToTextRight(). If only text is specified, or only an image is specified, then it doesn't matter how the layout is specified.

Definition at line 145 of file vtkBalloonRepresentation.h.

void vtkBalloonRepresentation::SetBalloonLayoutToTextRight (  )  [inline]

Specify the layout of the image and text within the balloon. Note that there are reduncies in these methods, for example SetBalloonLayoutToImageLeft() results in the same effect as SetBalloonLayoutToTextRight(). If only text is specified, or only an image is specified, then it doesn't matter how the layout is specified.

Definition at line 146 of file vtkBalloonRepresentation.h.

void vtkBalloonRepresentation::SetBalloonLayoutToTextTop (  )  [inline]

Specify the layout of the image and text within the balloon. Note that there are reduncies in these methods, for example SetBalloonLayoutToImageLeft() results in the same effect as SetBalloonLayoutToTextRight(). If only text is specified, or only an image is specified, then it doesn't matter how the layout is specified.

Definition at line 147 of file vtkBalloonRepresentation.h.

void vtkBalloonRepresentation::SetBalloonLayoutToTextBottom (  )  [inline]

Specify the layout of the image and text within the balloon. Note that there are reduncies in these methods, for example SetBalloonLayoutToImageLeft() results in the same effect as SetBalloonLayoutToTextRight(). If only text is specified, or only an image is specified, then it doesn't matter how the layout is specified.

Definition at line 148 of file vtkBalloonRepresentation.h.

virtual void vtkBalloonRepresentation::SetOffset ( int  ,
int   
) [virtual]

Set/Get the offset from the mouse pointer from which to place the balloon. The representation will try and honor this offset unless there is a collision with the side of the renderer, in which case the balloon will be repositioned to lie within the rendering window.

void vtkBalloonRepresentation::SetOffset ( int  [2]  ) 

Set/Get the offset from the mouse pointer from which to place the balloon. The representation will try and honor this offset unless there is a collision with the side of the renderer, in which case the balloon will be repositioned to lie within the rendering window.

virtual int* vtkBalloonRepresentation::GetOffset (  )  [virtual]

Set/Get the offset from the mouse pointer from which to place the balloon. The representation will try and honor this offset unless there is a collision with the side of the renderer, in which case the balloon will be repositioned to lie within the rendering window.

virtual void vtkBalloonRepresentation::GetOffset ( int &  ,
int &   
) [virtual]

Set/Get the offset from the mouse pointer from which to place the balloon. The representation will try and honor this offset unless there is a collision with the side of the renderer, in which case the balloon will be repositioned to lie within the rendering window.

virtual void vtkBalloonRepresentation::GetOffset ( int  [2]  )  [virtual]

Set/Get the offset from the mouse pointer from which to place the balloon. The representation will try and honor this offset unless there is a collision with the side of the renderer, in which case the balloon will be repositioned to lie within the rendering window.

virtual void vtkBalloonRepresentation::SetPadding ( int   )  [virtual]

Set/Get the padding (in pixels) that is used between the text and the frame.

virtual int vtkBalloonRepresentation::GetPadding (  )  [virtual]

Set/Get the padding (in pixels) that is used between the text and the frame.

virtual void vtkBalloonRepresentation::StartWidgetInteraction ( double  e[2]  )  [virtual]

These are methods that satisfy vtkWidgetRepresentation's API.

Reimplemented from vtkWidgetRepresentation.

virtual void vtkBalloonRepresentation::EndWidgetInteraction ( double  e[2]  )  [virtual]

These are methods that satisfy vtkWidgetRepresentation's API.

Reimplemented from vtkWidgetRepresentation.

virtual void vtkBalloonRepresentation::BuildRepresentation (  )  [virtual]

These are methods that satisfy vtkWidgetRepresentation's API.

Implements vtkWidgetRepresentation.

virtual void vtkBalloonRepresentation::ReleaseGraphicsResources ( vtkWindow w  )  [virtual]

Methods required by vtkProp superclass.

Reimplemented from vtkWidgetRepresentation.

virtual int vtkBalloonRepresentation::RenderOverlay ( vtkViewport viewport  )  [virtual]

Methods required by vtkProp superclass.

Reimplemented from vtkProp.

void vtkBalloonRepresentation::AdjustImageSize ( double  imageSize[2]  )  [protected]

void vtkBalloonRepresentation::ScaleImage ( double  imageSize[2],
double  scale 
) [protected]


Member Data Documentation

Definition at line 185 of file vtkBalloonRepresentation.h.

Definition at line 186 of file vtkBalloonRepresentation.h.

Definition at line 189 of file vtkBalloonRepresentation.h.

Definition at line 192 of file vtkBalloonRepresentation.h.

Definition at line 193 of file vtkBalloonRepresentation.h.

Definition at line 194 of file vtkBalloonRepresentation.h.

Definition at line 197 of file vtkBalloonRepresentation.h.

Definition at line 198 of file vtkBalloonRepresentation.h.

Definition at line 199 of file vtkBalloonRepresentation.h.

Definition at line 202 of file vtkBalloonRepresentation.h.

Definition at line 203 of file vtkBalloonRepresentation.h.

Definition at line 204 of file vtkBalloonRepresentation.h.

Definition at line 205 of file vtkBalloonRepresentation.h.

Definition at line 206 of file vtkBalloonRepresentation.h.

Definition at line 207 of file vtkBalloonRepresentation.h.

Definition at line 210 of file vtkBalloonRepresentation.h.

Definition at line 211 of file vtkBalloonRepresentation.h.

Definition at line 212 of file vtkBalloonRepresentation.h.

Definition at line 213 of file vtkBalloonRepresentation.h.

Definition at line 214 of file vtkBalloonRepresentation.h.

Definition at line 215 of file vtkBalloonRepresentation.h.

Definition at line 218 of file vtkBalloonRepresentation.h.

Definition at line 219 of file vtkBalloonRepresentation.h.


The documentation for this class was generated from the following file:

Generated on Sat Dec 27 13:17:21 2008 for VTK by  doxygen 1.5.6