KWWidgets
vtkKWWidgetWithSpinButtons.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Module: $RCSfile: vtkKWWidgetWithSpinButtons.h,v $
4 
5  Copyright (c) Kitware, Inc.
6  All rights reserved.
7  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notice for more information.
12 
13 =========================================================================*/
14 // .NAME vtkKWWidgetWithSpinButtons - an abstract class widget with spin buttons
15 // .SECTION Description
16 // This class implements an abstract superclass for composite widgets
17 // associating a widget to a set of spin buttons.
18 // The only requirement is for the widget to implement the NextValue()
19 // and PreviousValue() callbacks.
20 //
21 // Be aware that most subclasses of vtkKWWidgetWithSpinButtons are
22 // generated automatically out of the vtkKWWidgetWithSpinButtonsSubclass
23 // template located in the Templates directory. Therefore, even though the
24 // source code for those vtkKWWidgetWithSpinButtons subclasses does not exist
25 // in the KWWidgets repository, they are still generated automatically and
26 // documented in the API online; check the vtkKWWidgetWithSpinButtons API
27 // online for its subclasses, as well as the \subpage
28 // kwwidgets_autogenerated_page page. Classes related
29 // to the same template can be found in the
30 // \ref kwwidgets_autogenerated_widget_with_spinbuttons_group section.
31 // .SECTION See Also
32 // vtkKWMenuButtonWithSpinButtons
33 
34 #ifndef __vtkKWWidgetWithSpinButtons_h
35 #define __vtkKWWidgetWithSpinButtons_h
36 
37 #include "vtkKWCompositeWidget.h"
38 
39 class vtkKWSpinButtons;
40 
42 {
43 public:
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
48  // Description:
49  // Retrieve the spin buttons
50  vtkGetObjectMacro(SpinButtons, vtkKWSpinButtons);
51 
52  // Description:
53  // Set the string that enables balloon help for this widget.
54  // Override to pass down to children.
55  virtual void SetBalloonHelpString(const char *str);
56 
57  // Description:
58  // Update the "enable" state of the object and its internal parts.
59  // Depending on different Ivars (this->Enabled, the application's
60  // Limited Edition Mode, etc.), the "enable" state of the object is updated
61  // and propagated to its internal parts/subwidgets. This will, for example,
62  // enable/disable parts of the widget UI, enable/disable the visibility
63  // of 3D widgets, etc.
64  virtual void UpdateEnableState();
65 
66  // Description:
67  // Callbacks. Internal, do not use.
68  virtual void NextValueCallback() {};
69  virtual void PreviousValueCallback() {};
70 
71 protected:
74 
75  // Description:
76  // Create the widget.
77  virtual void CreateWidget();
78 
79  // Description:
80  // Pack or repack the widget. To be implemented by subclasses.
81  virtual void Pack() {};
82 
83  // Description:
84  // Internal spin buttons
85  vtkKWSpinButtons *SpinButtons;
86 
87 private:
88 
89  vtkKWWidgetWithSpinButtons(const vtkKWWidgetWithSpinButtons&); // Not implemented
90  void operator=(const vtkKWWidgetWithSpinButtons&); // Not implemented
91 };
92 
93 #endif