pub trait WidgetTrait: WidgetTraitConst {
// Required method
fn as_raw_mut_Widget(&mut self) -> *mut c_void;
// Provided methods
fn set(&mut self, other: &impl WidgetTraitConst) -> Result<()> { ... }
fn set_rendering_property(
&mut self,
property: i32,
value: f64,
) -> Result<()> { ... }
}
Expand description
Mutable methods for crate::viz::Widget
Required Methods§
fn as_raw_mut_Widget(&mut self) -> *mut c_void
Provided Methods§
fn set(&mut self, other: &impl WidgetTraitConst) -> Result<()>
Sourcefn set_rendering_property(&mut self, property: i32, value: f64) -> Result<()>
fn set_rendering_property(&mut self, property: i32, value: f64) -> Result<()>
Sets rendering property of the widget.
§Parameters
- property: Property that will be modified.
- value: The new value of the property.
Rendering property can be one of the following:
- POINT_SIZE
- OPACITY
- LINE_WIDTH
- FONT_SIZE
REPRESENTATION: Expected values are
- REPRESENTATION_POINTS
- REPRESENTATION_WIREFRAME
- REPRESENTATION_SURFACE
IMMEDIATE_RENDERING:
- Turn on immediate rendering by setting the value to 1.
- Turn off immediate rendering by setting the value to 0.
SHADING: Expected values are
- SHADING_FLAT
- SHADING_GOURAUD
- SHADING_PHONG
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.