vtkButtonWidget Class Reference

#include <vtkButtonWidget.h>

Inheritance diagram for vtkButtonWidget:

Inheritance graph
[legend]
Collaboration diagram for vtkButtonWidget:

Collaboration graph
[legend]

List of all members.


Detailed Description

activate an n-state button

The vtkButtonWidget is used to interface with an n-state button. That is each selection moves to the next button state (e.g., moves from "on" to "off"). The widget uses modulo list traversal to transition through one or more states. (A single state is simply a "selection" event; traversal through the list can be in the forward or backward direction.)

Depending on the nature of the representation the appearance of the button can change dramatically, the specifics of appearance changes are a function of the associated vtkButtonRepresentation (or subclass).

Event Bindings:
By default, the widget responds to the following VTK events (i.e., it watches the vtkRenderWindowInteractor for these events):
   LeftButtonPressEvent - select button
   LeftButtonReleaseEvent - end the button selection process
 
Event Bindings:
Note that the event bindings described above can be changed using this class's vtkWidgetEventTranslator. This class translates VTK events into the vtkButtonWidget's widget events:
   vtkWidgetEvent::Select -- some part of the widget has been selected
   vtkWidgetEvent::EndSelect -- the selection process has completed
 
Event Bindings:
In turn, when these widget events are processed, the vtkButtonWidget invokes the following VTK events on itself (which observers can listen for):
   vtkCommand::StateChangedEvent (on vtkWidgetEvent::EndSelect)
 
Events:
vtkCommand::StateChangedEvent
Tests:
vtkButtonWidget (Tests)

Definition at line 68 of file vtkButtonWidget.h.

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

Public Member Functions

void CreateDefaultRepresentation ()
void SetRepresentation (vtkButtonRepresentation *r)
vtkButtonRepresentationGetSliderRepresentation ()

Static Public Member Functions

static vtkButtonWidgetNew ()

Protected Types

enum  _WidgetState { Start = 0, Hovering, Selecting }

Protected Member Functions

 vtkButtonWidget ()
 ~vtkButtonWidget ()

Static Protected Member Functions

static void SelectAction (vtkAbstractWidget *)
static void MoveAction (vtkAbstractWidget *)
static void EndSelectAction (vtkAbstractWidget *)

Protected Attributes

int WidgetState

Member Typedef Documentation

Standard macros.

Reimplemented from vtkAbstractWidget.

Definition at line 76 of file vtkButtonWidget.h.


Member Enumeration Documentation

Enumerator:
Start 
Hovering 
Selecting 

Definition at line 108 of file vtkButtonWidget.h.


Constructor & Destructor Documentation

vtkButtonWidget::vtkButtonWidget (  )  [protected]

vtkButtonWidget::~vtkButtonWidget (  )  [inline, protected]

Definition at line 99 of file vtkButtonWidget.h.


Member Function Documentation

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

Instantiate the class.

Reimplemented from vtkObject.

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

Standard macros.

Reimplemented from vtkAbstractWidget.

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

Standard macros.

Reimplemented from vtkAbstractWidget.

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

Standard macros.

Reimplemented from vtkAbstractWidget.

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

Standard macros.

Reimplemented from vtkAbstractWidget.

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

Standard macros.

Reimplemented from vtkAbstractWidget.

void vtkButtonWidget::SetRepresentation ( vtkButtonRepresentation r  )  [inline]

Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene. Note that the representation is a subclass of vtkProp so it can be added to the renderer independent of the widget.

Definition at line 84 of file vtkButtonWidget.h.

vtkButtonRepresentation* vtkButtonWidget::GetSliderRepresentation (  )  [inline]

Return the representation as a vtkButtonRepresentation.

Definition at line 90 of file vtkButtonWidget.h.

void vtkButtonWidget::CreateDefaultRepresentation (  )  [virtual]

Create the default widget representation if one is not set.

Implements vtkAbstractWidget.

static void vtkButtonWidget::SelectAction ( vtkAbstractWidget  )  [static, protected]

static void vtkButtonWidget::MoveAction ( vtkAbstractWidget  )  [static, protected]

static void vtkButtonWidget::EndSelectAction ( vtkAbstractWidget  )  [static, protected]


Member Data Documentation

Definition at line 107 of file vtkButtonWidget.h.


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

Generated on Wed Aug 24 11:30:09 2011 for VTK by  doxygen 1.5.6