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 =========================================================================*/
60 #ifndef vtkButtonWidget_h
61 #define vtkButtonWidget_h
62 
63 #include "vtkInteractionWidgetsModule.h" // For export macro
64 #include "vtkAbstractWidget.h"
65 
67 
68 
70 {
71 public:
73  static vtkButtonWidget *New();
74 
76 
78  void PrintSelf(ostream& os, vtkIndent indent);
80 
82 
86  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
88 
90 
92  {return reinterpret_cast<vtkButtonRepresentation*>(this->WidgetRep);}
94 
97 
98 protected:
101 
102  // These are the events that are handled
103  static void SelectAction(vtkAbstractWidget*);
104  static void MoveAction(vtkAbstractWidget*);
105  static void EndSelectAction(vtkAbstractWidget*);
106 
107 //BTX - manage the state of the widget
110  {
111  Start=0,
113  Selecting
114  };
115  //ETX
116 
117 private:
118  vtkButtonWidget(const vtkButtonWidget&); //Not implemented
119  void operator=(const vtkButtonWidget&); //Not implemented
120 };
121 
122 #endif
void PrintSelf(ostream &os, vtkIndent indent)
vtkButtonRepresentation * GetSliderRepresentation()
activate an n-state button
virtual void CreateDefaultRepresentation()=0
vtkWidgetRepresentation * WidgetRep
#define VTKINTERACTIONWIDGETS_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
abstract class defines the representation for a vtkButtonWidget
define the API for widget / widget representation
static vtkObject * New()
void SetRepresentation(vtkButtonRepresentation *r)