enaml.stdlib.slider_transform
Classes
A base class for creating declarative slider transforms. |
|
A concreted SliderTransform for floating point values. |
- class enaml.stdlib.slider_transform.SliderTransform(parent=None, **kwargs)[source]
Bases:
Declarative
A base class for creating declarative slider transforms.
A SliderTransform must be subclassed to be useful. The abstract api defined below must be implemented by the subclass.
When using a transform with a slider, the transform takes complete ownership of the slider range. No effort is made to observe outside changes to the slider range, so all changes should be made on the transform.
- minimum
The data-space minimum for the transform. This may be redefined by a subclass to enforce stronger typing.
- maximum
The data-space maximum for the transform. This may be redefined by a subclass to enforce stronger typing.
- value
The data-space value for the transform. This may be redefined by a subclass to enforce stronger typing.
- initialize()[source]
A reimplemented initialization handler.
The parent slider values are initialized during the transform initialization pass.
- get_minimum()[source]
Get the minimum value of the transform as an int.
- Returns:
result – The minimum value of the transform converted to an int.
- Return type:
- get_maximum()[source]
Get the maximum value of the transform as an int.
- Returns:
result – The maximum value of the transform converted to an int.
- Return type:
- class enaml.stdlib.slider_transform.FloatTransform(parent=None, **kwargs)[source]
Bases:
SliderTransform
A concreted SliderTransform for floating point values.
- minimum
A redeclared parent class member which enforces float values.
- maximum
A redeclared parent class member which enforces float values.
- value
A redeclared parent class member which enforces float values.
- precision
The number of stops to use between the minimum and maximum.
- get_minimum()[source]
Get the minimum value of the transform as an int.
- Returns:
result – The minimum value of the transform converted to an int.
- Return type:
- get_maximum()[source]
Get the maximum value of the transform as an int.
- Returns:
result – The maximum value of the transform converted to an int.
- Return type: