00001 /*========================================================================= 00002 00003 Module: $RCSfile: vtkKWWidgetWithSpinButtonsSubclass.h.in,v $ 00004 00005 Copyright (c) Kitware, Inc. 00006 All rights reserved. 00007 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00008 00009 This software is distributed WITHOUT ANY WARRANTY; without even 00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00011 PURPOSE. See the above copyright notice for more information. 00012 00013 =========================================================================*/ 00014 // .NAME vtkKWMenuButtonWithSpinButtons - a vtkKWMenuButton associated to a vtkKWSpinButtons 00015 // .SECTION Description 00016 // This class creates a composite widget associating a vtkKWMenuButton to a 00017 // vtkKWSpinButtons. 00018 // As a subclass of vtkKWWidgetWithSpinButtons, it inherits a set of 00019 // spin buttons. 00020 // The only requirement is for the vtkKWMenuButton class to implement the 00021 // NextValue() and PreviousValue() callbacks. 00022 // @ingroup kwwidgets_autogenerated_widget_with_spinbuttons_group 00023 // .SECTION Note 00024 // This class and the corresponding code were 00025 // \subpage kwwidgets_autogenerated_page "generated automatically" by 00026 // instantiating the <tt>Templates/vtkKWWidgetWithSpinButtonsSubclass.h.in</tt> 00027 // and <tt>Templates/vtkKWWidgetWithSpinButtonsSubclass.cxx.in</tt> files for 00028 // the type vtkKWMenuButton. Classes related to the same template can be found 00029 // in the \ref kwwidgets_autogenerated_widget_with_spinbuttons_group. 00030 // .SECTION See Also 00031 // vtkKWWidgetWithSpinButtons vtkKWMenuButton 00032 00033 #ifndef __vtkKWMenuButtonWithSpinButtons_h 00034 #define __vtkKWMenuButtonWithSpinButtons_h 00035 00036 #include "vtkKWWidgetWithSpinButtons.h" 00037 00038 class vtkKWMenuButton; 00039 00040 class KWWidgets_EXPORT vtkKWMenuButtonWithSpinButtons : public vtkKWWidgetWithSpinButtons 00041 { 00042 public: 00043 static vtkKWMenuButtonWithSpinButtons* New(); 00044 vtkTypeRevisionMacro(vtkKWMenuButtonWithSpinButtons, vtkKWWidgetWithSpinButtons); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 00047 // Description: 00048 // Get the vtkKWMenuButton that is being associated to the spin buttons 00049 virtual vtkKWMenuButton* GetWidget(); 00050 00051 // Description: 00052 // Set the string that enables balloon help for this widget. 00053 // Override to pass down to children. 00054 virtual void SetBalloonHelpString(const char *str); 00055 00056 // Description: 00057 // Update the "enable" state of the object and its internal parts. 00058 // Depending on different Ivars (this->Enabled, the application's 00059 // Limited Edition Mode, etc.), the "enable" state of the object is updated 00060 // and propagated to its internal parts/subwidgets. This will, for example, 00061 // enable/disable parts of the widget UI, enable/disable the visibility 00062 // of 3D widgets, etc. 00063 virtual void UpdateEnableState(); 00064 00065 // Description: 00066 // Callbacks 00067 virtual void NextValueCallback(); 00068 virtual void PreviousValueCallback(); 00069 00070 protected: 00071 vtkKWMenuButtonWithSpinButtons(); 00072 ~vtkKWMenuButtonWithSpinButtons(); 00073 00074 // Description: 00075 // Create the widget 00076 virtual void CreateWidget(); 00077 00078 // Description: 00079 // Pack or repack the widget. To be implemented by subclasses. 00080 virtual void Pack(); 00081 00082 // Description: 00083 // Internal widget 00084 vtkKWMenuButton *Widget; 00085 00086 private: 00087 00088 vtkKWMenuButtonWithSpinButtons(const vtkKWMenuButtonWithSpinButtons&); // Not implemented 00089 void operator=(const vtkKWMenuButtonWithSpinButtons&); // Not implemented 00090 }; 00091 00092 #endif