forked from FNNDSC/KWWidgets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvtkKWCheckButtonWithPopupFrame.h
88 lines (67 loc) · 2.99 KB
/
vtkKWCheckButtonWithPopupFrame.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
88
/*=========================================================================
Module: $RCSfile: vtkKWCheckButtonWithPopupFrame.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 vtkKWCheckButtonWithPopupFrame - a popup frame + checkbutton
// .SECTION Description
// A class that provides a checkbutton and a (popup) frame. In popup mode
// the checkbutton is visible on the left of the popup button that will
// display the frame. In normal mode, the checkbutton is the first item
// packed in the frame.
#ifndef __vtkKWCheckButtonWithPopupFrame_h
#define __vtkKWCheckButtonWithPopupFrame_h
#include "vtkKWPopupFrame.h"
class vtkKWCheckButton;
class KWWidgets_EXPORT vtkKWCheckButtonWithPopupFrame : public vtkKWPopupFrame
{
public:
static vtkKWCheckButtonWithPopupFrame* New();
vtkTypeMacro(vtkKWCheckButtonWithPopupFrame,vtkKWPopupFrame);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Automatically disable the popup button when the checkbutton is not
// checked.
virtual void SetDisablePopupButtonWhenNotChecked(int);
vtkBooleanMacro(DisablePopupButtonWhenNotChecked, int);
vtkGetMacro(DisablePopupButtonWhenNotChecked, int);
// Description:
// Access to sub-widgets
vtkGetObjectMacro(CheckButton, vtkKWCheckButton);
// Description:
// Update the GUI according to the value of the ivars
virtual void Update();
// 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 CheckButtonCallback(int state);
protected:
vtkKWCheckButtonWithPopupFrame();
~vtkKWCheckButtonWithPopupFrame();
// Description:
// Create the widget.
virtual void CreateWidget();
// GUI
int DisablePopupButtonWhenNotChecked;
vtkKWCheckButton *CheckButton;
// Get the value that should be used to set the checkbutton state
// (i.e. depending on the value this checkbutton is supposed to reflect,
// for example, an annotation visibility).
// This does *not* return the state of the widget.
virtual int GetCheckButtonState() { return 0; };
private:
vtkKWCheckButtonWithPopupFrame(const vtkKWCheckButtonWithPopupFrame&); // Not implemented
void operator=(const vtkKWCheckButtonWithPopupFrame&); // Not Implemented
};
#endif