vtkKWLabel Class Reference

label widget More...

#include <vtkKWLabel.h>

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

List of all members.

Public Types

typedef vtkKWCoreWidget Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void UpdateEnableState ()
virtual void AdjustWrapLengthToWidthCallback ()



virtual void SetText (const char *)
virtual char * GetText ()
virtual void SetWidth (int)
virtual int GetWidth ()
virtual void SetHeight (int)
virtual int GetHeight ()
virtual void SetJustification (int)
virtual int GetJustification ()
virtual void SetJustificationToLeft ()
virtual void SetJustificationToCenter ()
virtual void SetJustificationToRight ()
virtual void SetAnchor (int)
virtual int GetAnchor ()
virtual void SetAnchorToNorth ()
virtual void SetAnchorToNorthEast ()
virtual void SetAnchorToEast ()
virtual void SetAnchorToSouthEast ()
virtual void SetAnchorToSouth ()
virtual void SetAnchorToSouthWest ()
virtual void SetAnchorToWest ()
virtual void SetAnchorToNorthWest ()
virtual void SetAnchorToCenter ()
virtual void GetBackgroundColor (double *r, double *g, double *b)
virtual double * GetBackgroundColor ()
virtual void SetBackgroundColor (double r, double g, double b)
virtual void SetBackgroundColor (double rgb[3])
virtual void GetForegroundColor (double *r, double *g, double *b)
virtual double * GetForegroundColor ()
virtual void SetForegroundColor (double r, double g, double b)
virtual void SetForegroundColor (double rgb[3])
virtual void GetDefaultForegroundColor (double *r, double *g, double *b)
virtual double * GetDefaultForegroundColor ()
virtual void SetHighlightThickness (int)
virtual int GetHighlightThickness ()
virtual void GetActiveBackgroundColor (double *r, double *g, double *b)
virtual double * GetActiveBackgroundColor ()
virtual void SetActiveBackgroundColor (double r, double g, double b)
virtual void SetActiveBackgroundColor (double rgb[3])
virtual void GetActiveForegroundColor (double *r, double *g, double *b)
virtual double * GetActiveForegroundColor ()
virtual void SetActiveForegroundColor (double r, double g, double b)
virtual void SetActiveForegroundColor (double rgb[3])
virtual void GetDisabledForegroundColor (double *r, double *g, double *b)
virtual double * GetDisabledForegroundColor ()
virtual void SetDisabledForegroundColor (double r, double g, double b)
virtual void SetDisabledForegroundColor (double rgb[3])
virtual void SetBorderWidth (int)
virtual int GetBorderWidth ()
virtual void SetRelief (int)
virtual int GetRelief ()
virtual void SetReliefToRaised ()
virtual void SetReliefToSunken ()
virtual void SetReliefToFlat ()
virtual void SetReliefToRidge ()
virtual void SetReliefToSolid ()
virtual void SetReliefToGroove ()
virtual void SetPadX (int)
virtual int GetPadX ()
virtual void SetPadY (int)
virtual int GetPadY ()
virtual void SetWrapLength (const char *length)
virtual const char * GetWrapLength ()
virtual void SetAdjustWrapLengthToWidth (int)
virtual int GetAdjustWrapLengthToWidth ()
virtual void AdjustWrapLengthToWidthOn ()
virtual void AdjustWrapLengthToWidthOff ()
virtual void SetFont (const char *font)
virtual const char * GetFont ()
virtual void SetImageToIcon (vtkKWIcon *icon)
virtual void SetImageToPredefinedIcon (int icon_index)
virtual void SetImageToPixels (const unsigned char *pixels, int width, int height, int pixel_size, unsigned long buffer_length=0)
virtual void SetCompoundMode (int)
virtual int GetCompoundMode ()
virtual void SetCompoundModeToNone ()
virtual void SetCompoundModeToLeft ()
virtual void SetCompoundModeToCenter ()
virtual void SetCompoundModeToRight ()
virtual void SetCompoundModeToTop ()
virtual void SetCompoundModeToBottom ()

Static Public Member Functions

static vtkKWLabelNew ()
static int IsTypeOf (const char *type)
static vtkKWLabelSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkKWLabel ()
 ~vtkKWLabel ()
virtual void CreateWidget ()
virtual void UpdateBindings ()
virtual void UpdateText ()

Detailed Description

label widget

A simple widget that represents a label. A label is a widget that displays a textual string (or image). If text is displayed, it must all be in a single font, but it can occupy multiple lines on the screen (if it contains newlines or if wrapping occurs because of the WrapLength option). For longer text and more justification options, see vtkKWMessage.

See also:
vtkKWMessage

Definition at line 33 of file vtkKWLabel.h.


Member Typedef Documentation

Reimplemented from vtkKWCoreWidget.

Reimplemented in vtkKWSmallCounterLabel.

Definition at line 38 of file vtkKWLabel.h.


Constructor & Destructor Documentation

vtkKWLabel::vtkKWLabel (  )  [protected]
vtkKWLabel::~vtkKWLabel (  )  [protected]

Member Function Documentation

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

Reimplemented from vtkKWCoreWidget.

Reimplemented in vtkKWSmallCounterLabel.

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

Reimplemented from vtkKWCoreWidget.

Reimplemented in vtkKWSmallCounterLabel.

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

Reimplemented from vtkKWCoreWidget.

Reimplemented in vtkKWSmallCounterLabel.

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

Reimplemented from vtkKWCoreWidget.

Reimplemented in vtkKWSmallCounterLabel.

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

Reimplemented from vtkKWCoreWidget.

Reimplemented in vtkKWSmallCounterLabel.

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

Reimplemented from vtkKWCoreWidget.

Reimplemented in vtkKWSmallCounterLabel.

virtual void vtkKWLabel::SetText ( const char *   )  [virtual]

Set the text on the label.

virtual char* vtkKWLabel::GetText (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetWidth ( int   )  [virtual]

Set/Get the width of the label. If an image is being displayed in the label then the value is in screen units; for text it is in characters.

virtual int vtkKWLabel::GetWidth (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetHeight ( int   )  [virtual]

Set/Get the height of the label. If an image is being displayed in the label then the value is in screen units; for text it is in lines of text.

virtual int vtkKWLabel::GetHeight (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetJustification ( int   )  [virtual]

Set/Get the justification mode. When there are multiple lines of text displayed in a widget, this option determines how the lines line up with each other. Valid constants can be found in vtkKWOptions::JustificationType.

virtual int vtkKWLabel::GetJustification (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetJustificationToLeft (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetJustificationToCenter (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetJustificationToRight (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetAnchor ( int   )  [virtual]

Set/Get the anchoring. Specifies how the information in a widget (e.g. text or a bitmap) is to be displayed in the widget. Valid constants can be found in vtkKWOptions::AnchorType.

virtual int vtkKWLabel::GetAnchor (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetAnchorToNorth (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetAnchorToNorthEast (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetAnchorToEast (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetAnchorToSouthEast (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetAnchorToSouth (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetAnchorToSouthWest (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetAnchorToWest (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetAnchorToNorthWest (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetAnchorToCenter (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::GetBackgroundColor ( double *  r,
double *  g,
double *  b 
) [virtual]

Set/Get the background color of the widget.

virtual double* vtkKWLabel::GetBackgroundColor (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetBackgroundColor ( double  r,
double  g,
double  b 
) [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetBackgroundColor ( double  rgb[3]  )  [inline, virtual]

Set the text on the label.

Definition at line 97 of file vtkKWLabel.h.

virtual void vtkKWLabel::GetForegroundColor ( double *  r,
double *  g,
double *  b 
) [virtual]

Set/Get the foreground color of the widget (or the default color).

virtual double* vtkKWLabel::GetForegroundColor (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetForegroundColor ( double  r,
double  g,
double  b 
) [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetForegroundColor ( double  rgb[3]  )  [inline, virtual]

Set the text on the label.

Definition at line 106 of file vtkKWLabel.h.

virtual void vtkKWLabel::GetDefaultForegroundColor ( double *  r,
double *  g,
double *  b 
) [virtual]

Set the text on the label.

virtual double* vtkKWLabel::GetDefaultForegroundColor (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetHighlightThickness ( int   )  [virtual]

Set/Get the highlight thickness, a non-negative value indicating the width of the highlight rectangle to draw around the outside of the widget when it has the input focus.

virtual int vtkKWLabel::GetHighlightThickness (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::GetActiveBackgroundColor ( double *  r,
double *  g,
double *  b 
) [virtual]

Set/Get the active background color of the widget. An element (a widget or portion of a widget) is active if the mouse cursor is positioned over the element and pressing a mouse button will cause some action to occur.

virtual double* vtkKWLabel::GetActiveBackgroundColor (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetActiveBackgroundColor ( double  r,
double  g,
double  b 
) [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetActiveBackgroundColor ( double  rgb[3]  )  [inline, virtual]

Set the text on the label.

Definition at line 128 of file vtkKWLabel.h.

virtual void vtkKWLabel::GetActiveForegroundColor ( double *  r,
double *  g,
double *  b 
) [virtual]

Set/Get the active foreground color of the widget. An element (a widget or portion of a widget) is active if the mouse cursor is positioned over the element and pressing a mouse button will cause some action to occur.

virtual double* vtkKWLabel::GetActiveForegroundColor (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetActiveForegroundColor ( double  r,
double  g,
double  b 
) [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetActiveForegroundColor ( double  rgb[3]  )  [inline, virtual]

Set the text on the label.

Definition at line 140 of file vtkKWLabel.h.

virtual void vtkKWLabel::GetDisabledForegroundColor ( double *  r,
double *  g,
double *  b 
) [virtual]

Set/Get the foreground color of the widget when it is disabled.

virtual double* vtkKWLabel::GetDisabledForegroundColor (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetDisabledForegroundColor ( double  r,
double  g,
double  b 
) [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetDisabledForegroundColor ( double  rgb[3]  )  [inline, virtual]

Set the text on the label.

Definition at line 149 of file vtkKWLabel.h.

virtual void vtkKWLabel::SetBorderWidth ( int   )  [virtual]

Set/Get the border width, a non-negative value indicating the width of the 3-D border to draw around the outside of the widget (if such a border is being drawn; the Relief option typically determines this).

virtual int vtkKWLabel::GetBorderWidth (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetRelief ( int   )  [virtual]

Set/Get the 3-D effect desired for the widget. The value indicates how the interior of the widget should appear relative to its exterior. Valid constants can be found in vtkKWOptions::ReliefType.

virtual int vtkKWLabel::GetRelief (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetReliefToRaised (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetReliefToSunken (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetReliefToFlat (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetReliefToRidge (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetReliefToSolid (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetReliefToGroove (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetPadX ( int   )  [virtual]

Set/Get the padding that will be applied around each widget (in pixels). Specifies a non-negative value indicating how much extra space to request for the widget in the X and Y-direction. When computing how large a window it needs, the widget will add this amount to the width it would normally need (as determined by the width of the things displayed in the widget); if the geometry manager can satisfy this request, the widget will end up with extra internal space around what it displays inside.

virtual int vtkKWLabel::GetPadX (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetPadY ( int   )  [virtual]

Set the text on the label.

virtual int vtkKWLabel::GetPadY (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetWrapLength ( const char *  length  )  [virtual]

Set/Get the wrap length mode. For widgets that can perform word-wrapping, this option specifies the maximum line length. Lines that would exceed this length are wrapped onto the next line, so that no line is longer than the specified length. The value may be specified in any of the standard forms for screen distances (i.e, "2i" means 2 inches). If this value is less than or equal to 0 then no wrapping is done: lines will break only at newline characters in the text.

virtual const char* vtkKWLabel::GetWrapLength (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetAdjustWrapLengthToWidth ( int   )  [virtual]

Adjust the -wraplength argument so that it matches the width of the widget automatically (through the Configure event).

virtual int vtkKWLabel::GetAdjustWrapLengthToWidth (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::AdjustWrapLengthToWidthOn (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::AdjustWrapLengthToWidthOff (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetFont ( const char *  font  )  [virtual]

Specifies the font to use when drawing text inside the widget. You can use predefined font names (e.g. 'system'), or you can specify a set of font attributes with a platform-independent name, for example, 'times 12 bold'. In this example, the font is specified with a three element list: the first element is the font family, the second is the size, the third is a list of style parameters (normal, bold, roman, italic, underline, overstrike). Example: 'times 12 {bold italic}'. The Times, Courier and Helvetica font families are guaranteed to exist and will be matched to the corresponding (closest) font on your system. If you are familiar with the X font names specification, you can also describe the font that way (say, '*times-medium-r-*-*-12*').

virtual const char* vtkKWLabel::GetFont (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetImageToIcon ( vtkKWIcon icon  )  [virtual]

Specifies an image to display in the widget. Typically, if the image is specified then it overrides other options that specify a bitmap or textual value to display in the widget. Invoke vtkKWWidget's SetConfigurationOption("-image", imagename) to use a specific pre-existing Tk image, or call one of the following functions: The SetImageToPredefinedIcon method accepts an index to one of the predefined icon listed in vtkKWIcon. The SetImageToPixels method sets the image using pixel data. It expects a pointer to the pixels and the structure of the image, i.e. its width, height and the pixel_size (how many bytes per pixel, say 3 for RGB, or 1 for grayscale). If buffer_length = 0, it is computed automatically from the previous parameters. If it is not, it will most likely indicate that the buffer has been encoded using base64 and/or zlib. If pixel_size > 3 (i.e. RGBA), the image is blend the with background color of the widget. Check the SetCompoundMode method if you want to display both the image and the label at the same time.

virtual void vtkKWLabel::SetImageToPredefinedIcon ( int  icon_index  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetImageToPixels ( const unsigned char *  pixels,
int  width,
int  height,
int  pixel_size,
unsigned long  buffer_length = 0 
) [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetCompoundMode ( int   )  [virtual]

Specifies if the widget should display text and bitmaps/images at the same time, and if so, where the bitmap/image should be placed relative to the text. Valid constants can be found in vtkKWOptions::CompoundModeType. The (default) value CompoundModeNone specifies that the bitmap or image should (if defined) be displayed instead of the text.

virtual int vtkKWLabel::GetCompoundMode (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetCompoundModeToNone (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetCompoundModeToLeft (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetCompoundModeToCenter (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetCompoundModeToRight (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetCompoundModeToTop (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::SetCompoundModeToBottom (  )  [virtual]

Set the text on the label.

virtual void vtkKWLabel::UpdateEnableState (  )  [virtual]

Update the "enable" state of the object and its internal parts. Depending on different Ivars (this->Enabled, the application's Limited Edition Mode, etc.), the "enable" state of the object is updated and propagated to its internal parts/subwidgets. This will, for example, enable/disable parts of the widget UI, enable/disable the visibility of 3D widgets, etc.

Reimplemented from vtkKWWidget.

virtual void vtkKWLabel::AdjustWrapLengthToWidthCallback (  )  [virtual]

Callbacks. Internal, do not use.

virtual void vtkKWLabel::CreateWidget (  )  [protected, virtual]

Create the widget.

Reimplemented from vtkKWCoreWidget.

Reimplemented in vtkKWSmallCounterLabel.

virtual void vtkKWLabel::UpdateBindings (  )  [protected, virtual]
virtual void vtkKWLabel::UpdateText (  )  [protected, virtual]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Tue Apr 27 02:35:00 2010 for KWWidgets by  doxygen 1.6.1