00001 /*========================================================================= 00002 00003 Module: $RCSfile: vtkKWCheckButtonWithChangeColorButton.h,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 vtkKWCheckButtonWithChangeColorButton - a check button and color change button 00015 // .SECTION Description 00016 // This packs a checkbutton and a color change button inside a frame 00017 00018 #ifndef __vtkKWCheckButtonWithChangeColorButton_h 00019 #define __vtkKWCheckButtonWithChangeColorButton_h 00020 00021 #include "vtkKWCompositeWidget.h" 00022 00023 class vtkKWChangeColorButton; 00024 class vtkKWCheckButton; 00025 00026 class KWWidgets_EXPORT vtkKWCheckButtonWithChangeColorButton : public vtkKWCompositeWidget 00027 { 00028 public: 00029 static vtkKWCheckButtonWithChangeColorButton* New(); 00030 vtkTypeRevisionMacro(vtkKWCheckButtonWithChangeColorButton, vtkKWCompositeWidget); 00031 void PrintSelf(ostream& os, vtkIndent indent); 00032 00033 // Description: 00034 // Get the internal objects 00035 vtkGetObjectMacro(CheckButton, vtkKWCheckButton); 00036 vtkGetObjectMacro(ChangeColorButton, vtkKWChangeColorButton); 00037 00038 // Description: 00039 // Refresh the interface given the current value of the widgets and Ivars 00040 virtual void Update(); 00041 00042 // Description: 00043 // Disable the color button when the checkbutton is not checked. 00044 // You will have to call the Update() method manually though, to reflect 00045 // that state. 00046 virtual void SetDisableChangeColorButtonWhenNotChecked(int); 00047 vtkBooleanMacro(DisableChangeColorButtonWhenNotChecked, int); 00048 vtkGetMacro(DisableChangeColorButtonWhenNotChecked, int); 00049 00050 // Description: 00051 // Update the "enable" state of the object and its internal parts. 00052 // Depending on different Ivars (this->Enabled, the application's 00053 // Limited Edition Mode, etc.), the "enable" state of the object is updated 00054 // and propagated to its internal parts/subwidgets. This will, for example, 00055 // enable/disable parts of the widget UI, enable/disable the visibility 00056 // of 3D widgets, etc. 00057 virtual void UpdateEnableState(); 00058 00059 // Description: 00060 // Callbacks. Internal, do not use. 00061 virtual void UpdateVariableCallback(const char*, const char*, const char*); 00062 00063 protected: 00064 vtkKWCheckButtonWithChangeColorButton(); 00065 ~vtkKWCheckButtonWithChangeColorButton(); 00066 00067 // Description: 00068 // Create the widget. 00069 virtual void CreateWidget(); 00070 00071 vtkKWCheckButton *CheckButton; 00072 vtkKWChangeColorButton *ChangeColorButton; 00073 00074 int DisableChangeColorButtonWhenNotChecked; 00075 00076 // Pack or repack the widget 00077 00078 virtual void Pack(); 00079 00080 virtual void UpdateVariableBindings(); 00081 00082 private: 00083 vtkKWCheckButtonWithChangeColorButton(const vtkKWCheckButtonWithChangeColorButton&); // Not implemented 00084 void operator=(const vtkKWCheckButtonWithChangeColorButton&); // Not implemented 00085 }; 00086 00087 #endif 00088