VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
vtkButtonWidget Class Reference

activate an n-state button More...

#include <vtkButtonWidget.h>

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

Public Member Functions

void CreateDefaultRepresentation ()
 
void SetRepresentation (vtkButtonRepresentation *r)
 
vtkButtonRepresentationGetSliderRepresentation ()
 
- Public Member Functions inherited from vtkAbstractWidget
virtual void SetEnabled (int)
 
void Render ()
 
virtual void SetPriority (float)
 
virtual void SetProcessEvents (int)
 
virtual int GetProcessEvents ()
 
virtual void ProcessEventsOn ()
 
virtual void ProcessEventsOff ()
 
vtkWidgetEventTranslatorGetEventTranslator ()
 
void SetParent (vtkAbstractWidget *parent)
 
virtual vtkAbstractWidgetGetParent ()
 
vtkWidgetRepresentationGetRepresentation ()
 
virtual void SetManagesCursor (int)
 
virtual int GetManagesCursor ()
 
virtual void ManagesCursorOn ()
 
virtual void ManagesCursorOff ()
 
vtkAbstractWidgetNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 

Static Public Member Functions

static vtkButtonWidgetNew ()
 
- Static Public Member Functions inherited from vtkAbstractWidget
static int IsTypeOf (const char *type)
 
static vtkAbstractWidgetSafeDownCast (vtkObjectBase *o)
 

Protected Types

enum  _WidgetState { Start =0, Hovering, Selecting }
 

Protected Member Functions

 vtkButtonWidget ()
 
 ~vtkButtonWidget ()
 
- Protected Member Functions inherited from vtkAbstractWidget
 vtkAbstractWidget ()
 
 ~vtkAbstractWidget ()
 
void SetWidgetRepresentation (vtkWidgetRepresentation *r)
 
virtual void SetCursor (int vtkNotUsed(state))
 

Static Protected Member Functions

static void SelectAction (vtkAbstractWidget *)
 
static void MoveAction (vtkAbstractWidget *)
 
static void EndSelectAction (vtkAbstractWidget *)
 
- Static Protected Member Functions inherited from vtkAbstractWidget
static void ProcessEventsHandler (vtkObject *object, unsigned long event, void *clientdata, void *calldata)
 

Protected Attributes

int WidgetState
 
- Protected Attributes inherited from vtkAbstractWidget
vtkWidgetRepresentationWidgetRep
 
int ManagesCursor
 
vtkWidgetEventTranslatorEventTranslator
 
vtkWidgetCallbackMapperCallbackMapper
 
vtkAbstractWidgetParent
 
void * CallData
 
int ProcessEvents
 
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 vtkObjectBase * NewInstanceInternal () 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.

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 ( )
protected
vtkButtonWidget::~vtkButtonWidget ( )
inlineprotected

Definition at line 100 of file vtkButtonWidget.h.

Member Function Documentation

static vtkButtonWidget* vtkButtonWidget::New ( )
static

Instantiate the class.

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

Standard macros.

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

Standard macros.

Reimplemented from vtkAbstractWidget.

static vtkButtonWidget* vtkButtonWidget::SafeDownCast ( vtkObjectBase *  o)
static

Standard macros.

virtual vtkObjectBase* vtkButtonWidget::NewInstanceInternal ( ) const
protectedvirtual

Standard macros.

Reimplemented from vtkAbstractWidget.

vtkButtonWidget* vtkButtonWidget::NewInstance ( ) const

Standard macros.

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

Standard macros.

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

vtkButtonRepresentation* vtkButtonWidget::GetSliderRepresentation ( )
inline

Return the representation as a vtkButtonRepresentation.

Definition at line 91 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 )
staticprotected
static void vtkButtonWidget::MoveAction ( vtkAbstractWidget )
staticprotected
static void vtkButtonWidget::EndSelectAction ( vtkAbstractWidget )
staticprotected

Member Data Documentation

int vtkButtonWidget::WidgetState
protected

Definition at line 108 of file vtkButtonWidget.h.


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