forked from FNNDSC/KWWidgets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vtkKWCheckButtonWithChangeColorButton.h
88 lines (65 loc) · 2.99 KB
/
vtkKWCheckButtonWithChangeColorButton.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/*=========================================================================
Module: $RCSfile: vtkKWCheckButtonWithChangeColorButton.h,v $
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkKWCheckButtonWithChangeColorButton - a check button and color change button
// .SECTION Description
// This packs a checkbutton and a color change button inside a frame
#ifndef __vtkKWCheckButtonWithChangeColorButton_h
#define __vtkKWCheckButtonWithChangeColorButton_h
#include "vtkKWCompositeWidget.h"
class vtkKWChangeColorButton;
class vtkKWCheckButton;
class KWWidgets_EXPORT vtkKWCheckButtonWithChangeColorButton : public vtkKWCompositeWidget
{
public:
static vtkKWCheckButtonWithChangeColorButton* New();
vtkTypeMacro(vtkKWCheckButtonWithChangeColorButton, vtkKWCompositeWidget);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Get the internal objects
vtkGetObjectMacro(CheckButton, vtkKWCheckButton);
vtkGetObjectMacro(ChangeColorButton, vtkKWChangeColorButton);
// Description:
// Refresh the interface given the current value of the widgets and Ivars
virtual void Update();
// Description:
// Disable the color button when the checkbutton is not checked.
// You will have to call the Update() method manually though, to reflect
// that state.
virtual void SetDisableChangeColorButtonWhenNotChecked(int);
vtkBooleanMacro(DisableChangeColorButtonWhenNotChecked, int);
vtkGetMacro(DisableChangeColorButtonWhenNotChecked, int);
// Description:
// Update the "enable" state of the object and its internal parts.
// Depending on different Ivars (this->Enabled, the application's
// Limited Edition Mode, etc.), the "enable" state of the object is updated
// and propagated to its internal parts/subwidgets. This will, for example,
// enable/disable parts of the widget UI, enable/disable the visibility
// of 3D widgets, etc.
virtual void UpdateEnableState();
// Description:
// Callbacks. Internal, do not use.
virtual void UpdateVariableCallback(const char*, const char*, const char*);
protected:
vtkKWCheckButtonWithChangeColorButton();
~vtkKWCheckButtonWithChangeColorButton();
// Description:
// Create the widget.
virtual void CreateWidget();
vtkKWCheckButton *CheckButton;
vtkKWChangeColorButton *ChangeColorButton;
int DisableChangeColorButtonWhenNotChecked;
// Pack or repack the widget
virtual void Pack();
virtual void UpdateVariableBindings();
private:
vtkKWCheckButtonWithChangeColorButton(const vtkKWCheckButtonWithChangeColorButton&); // Not implemented
void operator=(const vtkKWCheckButtonWithChangeColorButton&); // Not implemented
};
#endif