VTK
vtkButtonWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkButtonWidget.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
58 #ifndef vtkButtonWidget_h
59 #define vtkButtonWidget_h
60 
61 #include "vtkInteractionWidgetsModule.h" // For export macro
62 #include "vtkAbstractWidget.h"
63 
65 
66 
67 class VTKINTERACTIONWIDGETS_EXPORT vtkButtonWidget : public vtkAbstractWidget
68 {
69 public:
73  static vtkButtonWidget *New();
74 
76 
80  void PrintSelf(ostream& os, vtkIndent indent);
82 
89  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
90 
95  {return reinterpret_cast<vtkButtonRepresentation*>(this->WidgetRep);}
96 
101 
102 protected:
105 
106  // These are the events that are handled
110 
111  // Manage the state of the widget
114  {
115  Start=0,
117  Selecting
118  };
119 
120 private:
121  vtkButtonWidget(const vtkButtonWidget&) VTK_DELETE_FUNCTION;
122  void operator=(const vtkButtonWidget&) VTK_DELETE_FUNCTION;
123 };
124 
125 #endif
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
abstract class defines the representation for a vtkButtonWidget
activate an n-state button
static void SelectAction(vtkAbstractWidget *)
static void MoveAction(vtkAbstractWidget *)
void SetRepresentation(vtkButtonRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
static vtkButtonWidget * New()
Instantiate the class.
vtkButtonRepresentation * GetSliderRepresentation()
Return the representation as a vtkButtonRepresentation.
void CreateDefaultRepresentation()
Create the default widget representation if one is not set.
static void EndSelectAction(vtkAbstractWidget *)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract class defines interface between the widget and widget representation classes