KWWidgets
debian/tmp/usr/include/KWWidgets/vtkKWScalarComponentSelectionWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Module: $RCSfile: vtkKWScalarComponentSelectionWidget.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 vtkKWScalarComponentSelectionWidget - a scalar component selection widget
15 // .SECTION Description
16 // This class contains the UI for scalar component selection.
17 
18 #ifndef __vtkKWScalarComponentSelectionWidget_h
19 #define __vtkKWScalarComponentSelectionWidget_h
20 
21 #include "vtkKWCompositeWidget.h"
22 
24 
26 {
27 public:
29  void PrintSelf(ostream& os, vtkIndent indent);
31 
32  // Description:
33  // Are the components independent of each other?
34  virtual void SetIndependentComponents(int);
35  vtkGetMacro(IndependentComponents, int);
36  vtkBooleanMacro(IndependentComponents, int);
37 
38  // Description:
39  // Set/Get the number of components controlled by the widget
40  virtual void SetNumberOfComponents(int);
41  vtkGetMacro(NumberOfComponents, int);
42 
43  // Description:
44  // Set/Get the current component controlled by the widget (if controllable)
45  virtual void SetSelectedComponent(int);
46  vtkGetMacro(SelectedComponent, int);
47 
48  // Description:
49  // Allow component selection (a quick way to hide the UI)
50  virtual void SetAllowComponentSelection(int);
51  vtkBooleanMacro(AllowComponentSelection, int);
52  vtkGetMacro(AllowComponentSelection, int);
53 
54  // Description:
55  // Update the whole UI depending on the value of the Ivars
56  virtual void Update();
57 
58  // Description:
59  // Specifies a command to associate with the widget. This command is
60  // typically invoked when the selected component is changed.
61  // The 'object' argument is the object that will have the method called on
62  // it. The 'method' argument is the name of the method to be called and any
63  // arguments in string form. If the object is NULL, the method is still
64  // evaluated as a simple command.
65  // The following parameters are also passed to the command:
66  // - the selected component: int
67  virtual void SetSelectedComponentChangedCommand(
68  vtkObject *object, const char *method);
69 
70  // Description:
71  // Access to objects
72  vtkGetObjectMacro(SelectedComponentOptionMenu, vtkKWMenuButtonWithLabel);
73 
74  // Description:
75  // Update the "enable" state of the object and its internal parts.
76  // Depending on different Ivars (this->Enabled, the application's
77  // Limited Edition Mode, etc.), the "enable" state of the object is updated
78  // and propagated to its internal parts/subwidgets. This will, for example,
79  // enable/disable parts of the widget UI, enable/disable the visibility
80  // of 3D widgets, etc.
81  virtual void UpdateEnableState();
82 
83  // Description:
84  // Callbacks. Internal, do not use.
85  virtual void SelectedComponentCallback(int);
86 
87 protected:
90 
91  // Description:
92  // Create the widget.
93  virtual void CreateWidget();
94 
99 
101  virtual void InvokeSelectedComponentChangedCommand(int comp);
102 
103  // GUI
104 
106 
107  // Pack
108  virtual void Pack();
109 
110 private:
112  void operator=(const vtkKWScalarComponentSelectionWidget&); // Not implemented
113 };
114 
115 #endif