KWWidgets
vtkKWCheckButtonWithChangeColorButton.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Module: $RCSfile: vtkKWCheckButtonWithChangeColorButton.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 vtkKWCheckButtonWithChangeColorButton - a check button and color change button
15 // .SECTION Description
16 // This packs a checkbutton and a color change button inside a frame
17 
18 #ifndef __vtkKWCheckButtonWithChangeColorButton_h
19 #define __vtkKWCheckButtonWithChangeColorButton_h
20 
21 #include "vtkKWCompositeWidget.h"
22 
24 class vtkKWCheckButton;
25 
27 {
28 public:
31  void PrintSelf(ostream& os, vtkIndent indent);
32 
33  // Description:
34  // Get the internal objects
35  vtkGetObjectMacro(CheckButton, vtkKWCheckButton);
36  vtkGetObjectMacro(ChangeColorButton, vtkKWChangeColorButton);
37 
38  // Description:
39  // Refresh the interface given the current value of the widgets and Ivars
40  virtual void Update();
41 
42  // Description:
43  // Disable the color button when the checkbutton is not checked.
44  // You will have to call the Update() method manually though, to reflect
45  // that state.
46  virtual void SetDisableChangeColorButtonWhenNotChecked(int);
47  vtkBooleanMacro(DisableChangeColorButtonWhenNotChecked, int);
48  vtkGetMacro(DisableChangeColorButtonWhenNotChecked, int);
49 
50  // Description:
51  // Update the "enable" state of the object and its internal parts.
52  // Depending on different Ivars (this->Enabled, the application's
53  // Limited Edition Mode, etc.), the "enable" state of the object is updated
54  // and propagated to its internal parts/subwidgets. This will, for example,
55  // enable/disable parts of the widget UI, enable/disable the visibility
56  // of 3D widgets, etc.
57  virtual void UpdateEnableState();
58 
59  // Description:
60  // Callbacks. Internal, do not use.
61  virtual void UpdateVariableCallback(const char*, const char*, const char*);
62 
63 protected:
66 
67  // Description:
68  // Create the widget.
69  virtual void CreateWidget();
70 
71  vtkKWCheckButton *CheckButton;
72  vtkKWChangeColorButton *ChangeColorButton;
73 
74  int DisableChangeColorButtonWhenNotChecked;
75 
76  // Pack or repack the widget
77 
78  virtual void Pack();
79 
80  virtual void UpdateVariableBindings();
81 
82 private:
84  void operator=(const vtkKWCheckButtonWithChangeColorButton&); // Not implemented
85 };
86 
87 #endif
88