vtkKWPushButton Class Reference

push button widget More...

#include <vtkKWPushButton.h>

Inheritance diagram for vtkKWPushButton:
Inheritance graph
[legend]
Collaboration diagram for vtkKWPushButton:
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 SetCommand (vtkObject *object, const char *method)
virtual void UpdateEnableState ()
virtual void CommandCallback ()

Static Public Member Functions

static vtkKWPushButtonNew ()
static int IsTypeOf (const char *type)
static vtkKWPushButtonSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkKWPushButton ()
 ~vtkKWPushButton ()
virtual void CreateWidget ()
virtual void SetButtonText (const char *)
virtual void InvokeCommand ()

Protected Attributes

char * ButtonText
char * Command



enum  { InvokedEvent = 10000 }
virtual void SetText (const char *label)
virtual char * GetText ()
virtual void SetWidth (int width)
virtual int GetWidth ()
virtual void SetHeight (int height)
virtual int GetHeight ()
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 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 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 SetOverRelief (int)
virtual int GetOverRelief ()
virtual void SetOverReliefToRaised ()
virtual void SetOverReliefToSunken ()
virtual void SetOverReliefToFlat ()
virtual void SetOverReliefToRidge ()
virtual void SetOverReliefToSolid ()
virtual void SetOverReliefToGroove ()
virtual void SetOverReliefToNone ()
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 ()

Detailed Description

push button widget

A simple widget that represents a push button.

Definition at line 27 of file vtkKWPushButton.h.


Member Typedef Documentation

Reimplemented from vtkKWCoreWidget.

Reimplemented in vtkKWLoadSaveButton, and vtkKWPopupButton.

Definition at line 32 of file vtkKWPushButton.h.


Member Enumeration Documentation

anonymous enum

Events. The InvokedEvent is triggered when the button is pressed. BTX

Enumerator:
InvokedEvent 

Definition at line 65 of file vtkKWPushButton.h.


Constructor & Destructor Documentation

vtkKWPushButton::vtkKWPushButton (  )  [protected]
vtkKWPushButton::~vtkKWPushButton (  )  [protected]

Member Function Documentation

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

Reimplemented from vtkKWCoreWidget.

Reimplemented in vtkKWLoadSaveButton, and vtkKWPopupButton.

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

Reimplemented from vtkKWCoreWidget.

Reimplemented in vtkKWLoadSaveButton, and vtkKWPopupButton.

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

Reimplemented from vtkKWCoreWidget.

Reimplemented in vtkKWLoadSaveButton, and vtkKWPopupButton.

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

Reimplemented from vtkKWCoreWidget.

Reimplemented in vtkKWLoadSaveButton, and vtkKWPopupButton.

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

Reimplemented from vtkKWCoreWidget.

Reimplemented in vtkKWLoadSaveButton, and vtkKWPopupButton.

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

Reimplemented from vtkKWCoreWidget.

Reimplemented in vtkKWLoadSaveButton, and vtkKWPopupButton.

virtual void vtkKWPushButton::SetText ( const char *  label  )  [virtual]

Set the contents label.

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

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetWidth ( int  width  )  [virtual]

Set/Get the text width (in chars if the button has a text contents, or pixels if it has an image contents).

virtual int vtkKWPushButton::GetWidth (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetHeight ( int  height  )  [virtual]

Set/Get the text height (in chars if the button has a text contents, or pixels if it has an image contents).

virtual int vtkKWPushButton::GetHeight (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetCommand ( vtkObject object,
const char *  method 
) [virtual]

Specifies a command to associate with the widget. This command is typically invoked when button is pressed. The 'object' argument is the object that will have the method called on it. The 'method' argument is the name of the method to be called and any arguments in string form. If the object is NULL, the method is still evaluated as a simple command.

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

Set/Get the background color of the widget

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

Events. The InvokedEvent is triggered when the button is pressed. BTX

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

Events. The InvokedEvent is triggered when the button is pressed. BTX

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

Events. The InvokedEvent is triggered when the button is pressed. BTX

Definition at line 77 of file vtkKWPushButton.h.

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

Set/Get the foreground color of the widget

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

Events. The InvokedEvent is triggered when the button is pressed. BTX

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

Events. The InvokedEvent is triggered when the button is pressed. BTX

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

Events. The InvokedEvent is triggered when the button is pressed. BTX

Definition at line 86 of file vtkKWPushButton.h.

virtual void vtkKWPushButton::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 vtkKWPushButton::GetHighlightThickness (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::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* vtkKWPushButton::GetActiveBackgroundColor (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

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

Events. The InvokedEvent is triggered when the button is pressed. BTX

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

Events. The InvokedEvent is triggered when the button is pressed. BTX

Definition at line 106 of file vtkKWPushButton.h.

virtual void vtkKWPushButton::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* vtkKWPushButton::GetActiveForegroundColor (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

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

Events. The InvokedEvent is triggered when the button is pressed. BTX

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

Events. The InvokedEvent is triggered when the button is pressed. BTX

Definition at line 118 of file vtkKWPushButton.h.

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

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

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

Events. The InvokedEvent is triggered when the button is pressed. BTX

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

Events. The InvokedEvent is triggered when the button is pressed. BTX

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

Events. The InvokedEvent is triggered when the button is pressed. BTX

Definition at line 127 of file vtkKWPushButton.h.

virtual void vtkKWPushButton::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 vtkKWPushButton::GetBorderWidth (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::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 vtkKWPushButton::GetRelief (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetReliefToRaised (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetReliefToSunken (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetReliefToFlat (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetReliefToRidge (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetReliefToSolid (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetReliefToGroove (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::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 vtkKWPushButton::GetPadX (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

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

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual int vtkKWPushButton::GetPadY (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::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 vtkKWPushButton::GetAnchor (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetAnchorToNorth (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetAnchorToNorthEast (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetAnchorToEast (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetAnchorToSouthEast (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetAnchorToSouth (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetAnchorToSouthWest (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetAnchorToWest (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetAnchorToNorthWest (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetAnchorToCenter (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetOverRelief ( int   )  [virtual]

Set/Get the 3-D effect desired for the widget. Specifies an alternative relief for the button, to be used when the mouse cursor is over the widget. This option can be used to make toolbar buttons, by configuring SetRelief to Flat and OverRelief to Raised. Valid constants can be found in vtkKWOptions::ReliefType. If the value of this option is None, then no alternative relief is used when the mouse cursor is over the checkbutton.

virtual int vtkKWPushButton::GetOverRelief (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetOverReliefToRaised (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetOverReliefToSunken (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetOverReliefToFlat (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetOverReliefToRidge (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetOverReliefToSolid (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetOverReliefToGroove (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetOverReliefToNone (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::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* vtkKWPushButton::GetFont (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::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 vtkKWPushButton::SetImageToPredefinedIcon ( int  icon_index  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

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

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::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 vtkKWPushButton::GetCompoundMode (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetCompoundModeToNone (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetCompoundModeToLeft (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetCompoundModeToCenter (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetCompoundModeToRight (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetCompoundModeToTop (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::SetCompoundModeToBottom (  )  [virtual]

Events. The InvokedEvent is triggered when the button is pressed. BTX

virtual void vtkKWPushButton::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.

Reimplemented in vtkKWLoadSaveButton, and vtkKWPopupButton.

virtual void vtkKWPushButton::CommandCallback (  )  [virtual]

Callbacks. Internal, do not use.

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

Create the widget.

Reimplemented from vtkKWCoreWidget.

Reimplemented in vtkKWLoadSaveButton, and vtkKWPopupButton.

virtual void vtkKWPushButton::SetButtonText ( const char *   )  [protected, virtual]
virtual void vtkKWPushButton::InvokeCommand (  )  [protected, virtual]

Reimplemented in vtkKWLoadSaveButton.


Member Data Documentation

char* vtkKWPushButton::ButtonText [protected]

Definition at line 281 of file vtkKWPushButton.h.

char* vtkKWPushButton::Command [protected]

Definition at line 284 of file vtkKWPushButton.h.


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:36:36 2010 for KWWidgets by  doxygen 1.6.1