KWWidgets
debian/tmp/usr/include/KWWidgets/vtkKWCheckButtonWithPopupFrame.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Module: $RCSfile: vtkKWCheckButtonWithPopupFrame.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 vtkKWCheckButtonWithPopupFrame - a popup frame + checkbutton
15 // .SECTION Description
16 // A class that provides a checkbutton and a (popup) frame. In popup mode
17 // the checkbutton is visible on the left of the popup button that will
18 // display the frame. In normal mode, the checkbutton is the first item
19 // packed in the frame.
20 
21 #ifndef __vtkKWCheckButtonWithPopupFrame_h
22 #define __vtkKWCheckButtonWithPopupFrame_h
23 
24 #include "vtkKWPopupFrame.h"
25 
26 class vtkKWCheckButton;
27 
29 {
30 public:
33  void PrintSelf(ostream& os, vtkIndent indent);
34 
35  // Description:
36  // Automatically disable the popup button when the checkbutton is not
37  // checked.
38  virtual void SetDisablePopupButtonWhenNotChecked(int);
39  vtkBooleanMacro(DisablePopupButtonWhenNotChecked, int);
40  vtkGetMacro(DisablePopupButtonWhenNotChecked, int);
41 
42  // Description:
43  // Access to sub-widgets
44  vtkGetObjectMacro(CheckButton, vtkKWCheckButton);
45 
46  // Description:
47  // Update the GUI according to the value of the ivars
48  virtual void Update();
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 CheckButtonCallback(int state);
62 
63 protected:
66 
67  // Description:
68  // Create the widget.
69  virtual void CreateWidget();
70 
71  // GUI
72 
74 
76 
77  // Get the value that should be used to set the checkbutton state
78  // (i.e. depending on the value this checkbutton is supposed to reflect,
79  // for example, an annotation visibility).
80  // This does *not* return the state of the widget.
81  virtual int GetCheckButtonState() { return 0; };
82 
83 private:
85  void operator=(const vtkKWCheckButtonWithPopupFrame&); // Not Implemented
86 };
87 
88 #endif