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

Method SetMaximumValue

Interaction/Widgets/vtkSliderRepresentation.cxx:75–102  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

73
74//------------------------------------------------------------------------------
75void vtkSliderRepresentation::SetMaximumValue(double maxValue)
76{
77 if (maxValue == this->MaximumValue)
78 {
79 return;
80 }
81
82 if (maxValue <= this->MinimumValue)
83 {
84 this->MinimumValue = maxValue - 1;
85 }
86
87 this->MaximumValue = maxValue;
88
89 if (this->Value < this->MinimumValue)
90 {
91 this->Value = this->MinimumValue;
92 }
93 else if (this->Value > this->MaximumValue)
94 {
95 this->Value = this->MaximumValue;
96 }
97 this->CurrentT = (this->Value - this->MinimumValue) / (this->MaximumValue - this->MinimumValue);
98
99 this->Modified();
100 this->InvokeEvent(vtkCommand::WidgetValueChangedEvent, nullptr);
101 this->BuildRepresentation();
102}
103
104//------------------------------------------------------------------------------
105void vtkSliderRepresentation::SetValue(double value)

Callers 6

SetMaximumTiltAngleMethod · 0.80
SetMaximumDistanceMethod · 0.80

Calls 3

InvokeEventMethod · 0.80
ModifiedMethod · 0.45
BuildRepresentationMethod · 0.45

Tested by 2