MCPcopy Create free account
hub / github.com/Kitware/VTK / SetEnabled

Method SetEnabled

Rendering/Core/vtkInteractorStyle.cxx:108–142  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

106
107//------------------------------------------------------------------------------
108void vtkInteractorStyle::SetEnabled(int enabling)
109{
110 if (!this->Interactor)
111 {
112 vtkErrorMacro(<< "The interactor must be set prior to enabling/disabling widget");
113 return;
114 }
115
116 if (enabling) //----------------------------------------------------------
117 {
118 vtkDebugMacro(<< "Enabling widget");
119
120 if (this->Enabled) // already enabled, just return
121 {
122 return;
123 }
124
125 this->Enabled = 1;
126 this->InvokeEvent(vtkCommand::EnableEvent, nullptr);
127 }
128
129 else // disabling-------------------------------------------------------------
130 {
131 vtkDebugMacro(<< "Disabling widget");
132
133 if (!this->Enabled) // already disabled, just return
134 {
135 return;
136 }
137
138 this->Enabled = 0;
139 this->HighlightProp(nullptr);
140 this->InvokeEvent(vtkCommand::DisableEvent, nullptr);
141 }
142}
143
144//------------------------------------------------------------------------------
145// NOTE!!! This does not do any reference counting!!!

Callers 9

testMethod · 0.45
testMethod · 0.45
testMethod · 0.45
SetInteractorMethod · 0.45
EnabledOnFunction · 0.45
EnabledOffFunction · 0.45
OnFunction · 0.45
OffFunction · 0.45

Calls 2

HighlightPropMethod · 0.95
InvokeEventMethod · 0.80

Tested by 3

testMethod · 0.36
testMethod · 0.36
testMethod · 0.36