#include <vtkBalloonRepresentation.h>
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.
Definition at line 80 of file vtkBalloonRepresentation.h.
Standard VTK methods.
Reimplemented from vtkWidgetRepresentation.
Definition at line 88 of file vtkBalloonRepresentation.h.
anonymous enum |
Definition at line 133 of file vtkBalloonRepresentation.h.
State is either outside, or inside (on the text portion ot the image).
Definition at line 186 of file vtkBalloonRepresentation.h.
vtkBalloonRepresentation::vtkBalloonRepresentation | ( | ) | [protected] |
vtkBalloonRepresentation::~vtkBalloonRepresentation | ( | ) | [protected] |
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 144 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 145 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 146 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 147 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 148 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 149 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 150 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 151 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 int vtkBalloonRepresentation::ComputeInteractionState | ( | int | X, | |
int | Y, | |||
int | modify = 0 | |||
) | [virtual] |
These are methods that satisfy vtkWidgetRepresentation's API.
Reimplemented from vtkWidgetRepresentation.
virtual void vtkBalloonRepresentation::ReleaseGraphicsResources | ( | vtkWindow * | w | ) | [virtual] |
Methods required by vtkProp superclass.
Reimplemented from vtkWidgetRepresentation.
virtual int vtkBalloonRepresentation::RenderOverlay | ( | vtkViewport * | viewport | ) | [virtual] |
void vtkBalloonRepresentation::AdjustImageSize | ( | double | imageSize[2] | ) | [protected] |
void vtkBalloonRepresentation::ScaleImage | ( | double | imageSize[2], | |
double | scale | |||
) | [protected] |
char* vtkBalloonRepresentation::BalloonText [protected] |
Definition at line 193 of file vtkBalloonRepresentation.h.
vtkImageData* vtkBalloonRepresentation::BalloonImage [protected] |
Definition at line 194 of file vtkBalloonRepresentation.h.
int vtkBalloonRepresentation::BalloonLayout [protected] |
Definition at line 197 of file vtkBalloonRepresentation.h.
int vtkBalloonRepresentation::Padding [protected] |
Definition at line 200 of file vtkBalloonRepresentation.h.
int vtkBalloonRepresentation::Offset[2] [protected] |
Definition at line 201 of file vtkBalloonRepresentation.h.
int vtkBalloonRepresentation::ImageSize[2] [protected] |
Definition at line 202 of file vtkBalloonRepresentation.h.
vtkTextMapper* vtkBalloonRepresentation::TextMapper [protected] |
Definition at line 205 of file vtkBalloonRepresentation.h.
vtkActor2D* vtkBalloonRepresentation::TextActor [protected] |
Definition at line 206 of file vtkBalloonRepresentation.h.
vtkTextProperty* vtkBalloonRepresentation::TextProperty [protected] |
Definition at line 207 of file vtkBalloonRepresentation.h.
vtkTexture* vtkBalloonRepresentation::Texture [protected] |
Definition at line 210 of file vtkBalloonRepresentation.h.
vtkPolyData* vtkBalloonRepresentation::TexturePolyData [protected] |
Definition at line 211 of file vtkBalloonRepresentation.h.
vtkPoints* vtkBalloonRepresentation::TexturePoints [protected] |
Definition at line 212 of file vtkBalloonRepresentation.h.
Definition at line 213 of file vtkBalloonRepresentation.h.
vtkActor2D* vtkBalloonRepresentation::TextureActor [protected] |
Definition at line 214 of file vtkBalloonRepresentation.h.
vtkProperty2D* vtkBalloonRepresentation::ImageProperty [protected] |
Definition at line 215 of file vtkBalloonRepresentation.h.
vtkPoints* vtkBalloonRepresentation::FramePoints [protected] |
Definition at line 218 of file vtkBalloonRepresentation.h.
vtkCellArray* vtkBalloonRepresentation::FramePolygon [protected] |
Definition at line 219 of file vtkBalloonRepresentation.h.
vtkPolyData* vtkBalloonRepresentation::FramePolyData [protected] |
Definition at line 220 of file vtkBalloonRepresentation.h.
vtkPolyDataMapper2D* vtkBalloonRepresentation::FrameMapper [protected] |
Definition at line 221 of file vtkBalloonRepresentation.h.
vtkActor2D* vtkBalloonRepresentation::FrameActor [protected] |
Definition at line 222 of file vtkBalloonRepresentation.h.
vtkProperty2D* vtkBalloonRepresentation::FrameProperty [protected] |
Definition at line 223 of file vtkBalloonRepresentation.h.
int vtkBalloonRepresentation::TextVisible [protected] |
Definition at line 226 of file vtkBalloonRepresentation.h.
int vtkBalloonRepresentation::ImageVisible [protected] |
Definition at line 227 of file vtkBalloonRepresentation.h.