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

activate an n-state button More...

#include <vtkButtonWidget.h>

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

List of all members.

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
typedef vtkAbstractWidget Superclass
static int IsTypeOf (const char *type)
static vtkButtonWidgetSafeDownCast (vtkObjectBase *o)
virtual int IsA (const char *type)
vtkButtonWidgetNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual vtkObjectBaseNewInstanceInternal () const

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 69 of file vtkButtonWidget.h.


Member Typedef Documentation

Standard macros.

Reimplemented from vtkAbstractWidget.

Definition at line 77 of file vtkButtonWidget.h.


Member Enumeration Documentation

Enumerator:
Start 
Hovering 
Selecting 

Definition at line 109 of file vtkButtonWidget.h.


Constructor & Destructor Documentation

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

Definition at line 100 of file vtkButtonWidget.h.


Member Function Documentation

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

Instantiate the class.

Reimplemented from vtkObject.

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.

Standard macros.

Reimplemented from vtkAbstractWidget.

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

Standard macros.

Reimplemented from vtkAbstractWidget.

Standard macros.

Reimplemented from vtkAbstractWidget.

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

Standard macros.

Reimplemented from vtkAbstractWidget.

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 85 of file vtkButtonWidget.h.

Return the representation as a vtkButtonRepresentation.

Definition at line 91 of file vtkButtonWidget.h.

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 108 of file vtkButtonWidget.h.


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