VTK
Public Types | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkBalloonRepresentation Class Reference

represent the vtkBalloonWidget More...

#include <vtkBalloonRepresentation.h>

Inheritance diagram for vtkBalloonRepresentation:
Inheritance graph
[legend]
Collaboration diagram for vtkBalloonRepresentation:
Collaboration graph
[legend]

List of all members.

Public Types

enum  { ImageLeft = 0, ImageRight, ImageBottom, ImageTop }
enum  _InteractionState { Outside = 0, OnText, OnImage }

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 intGetImageSize ()
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 intGetOffset ()
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 int ComputeInteractionState (int X, int Y, int modify=0)
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
typedef vtkWidgetRepresentation Superclass
static int IsTypeOf (const char *type)
static vtkBalloonRepresentationSafeDownCast (vtkObjectBase *o)
virtual int IsA (const char *type)
vtkBalloonRepresentationNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual vtkObjectBaseNewInstanceInternal () const

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
Examples:
vtkBalloonRepresentation (Examples)
Tests:
vtkBalloonRepresentation (Tests)

Definition at line 81 of file vtkBalloonRepresentation.h.


Member Typedef Documentation

Standard VTK methods.

Reimplemented from vtkWidgetRepresentation.

Definition at line 89 of file vtkBalloonRepresentation.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
ImageLeft 
ImageRight 
ImageBottom 
ImageTop 

Definition at line 134 of file vtkBalloonRepresentation.h.

State is either outside, or inside (on the text portion ot the image).

Enumerator:
Outside 
OnText 
OnImage 

Definition at line 187 of file vtkBalloonRepresentation.h.


Constructor & Destructor Documentation


Member Function Documentation

Instantiate the class.

Reimplemented from vtkObject.

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.

Standard VTK methods.

Reimplemented from vtkWidgetRepresentation.

virtual vtkObjectBase* vtkBalloonRepresentation::NewInstanceInternal ( ) const [protected, virtual]

Standard VTK methods.

Reimplemented from vtkWidgetRepresentation.

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.

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.

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.

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.

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

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

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

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

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

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.

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.

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.

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.

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.

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.

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 149 of file vtkBalloonRepresentation.h.

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 150 of file vtkBalloonRepresentation.h.

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 151 of file vtkBalloonRepresentation.h.

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 152 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.

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.

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.

These are methods that satisfy vtkWidgetRepresentation's API.

Implements vtkWidgetRepresentation.

virtual int vtkBalloonRepresentation::ComputeInteractionState ( int  X,
int  Y,
int  modify = 0 
) [virtual]

These are methods that satisfy vtkWidgetRepresentation's API.

Reimplemented from vtkWidgetRepresentation.

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 194 of file vtkBalloonRepresentation.h.

Definition at line 195 of file vtkBalloonRepresentation.h.

Definition at line 198 of file vtkBalloonRepresentation.h.

Definition at line 201 of file vtkBalloonRepresentation.h.

Definition at line 202 of file vtkBalloonRepresentation.h.

Definition at line 203 of file vtkBalloonRepresentation.h.

Definition at line 206 of file vtkBalloonRepresentation.h.

Definition at line 207 of file vtkBalloonRepresentation.h.

Definition at line 208 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 216 of file vtkBalloonRepresentation.h.

Definition at line 219 of file vtkBalloonRepresentation.h.

Definition at line 220 of file vtkBalloonRepresentation.h.

Definition at line 221 of file vtkBalloonRepresentation.h.

Definition at line 222 of file vtkBalloonRepresentation.h.

Definition at line 223 of file vtkBalloonRepresentation.h.

Definition at line 224 of file vtkBalloonRepresentation.h.

Definition at line 227 of file vtkBalloonRepresentation.h.

Definition at line 228 of file vtkBalloonRepresentation.h.


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