pub struct Style {
pub color: Option<Color>,
pub socket_length: Option<f64>,
pub border: Option<f64>,
pub border_radius: Option<f64>,
pub border_color: Option<Color>,
pub socket_color: Option<Color>,
pub input_socket_layout: Option<SocketLayout>,
pub output_socket_layout: Option<SocketLayout>,
}Expand description
Unique styling for the BorderedRectangle widget.
Fields§
§color: Option<Color>Shape color for the inner rectangle.
socket_length: Option<f64>The length of each rectangle along its SocketSide.
border: Option<f64>The widget of the border around the widget.
this should always be a positive value in order for sockets to remain visible.
border_radius: Option<f64>The radius of the rounded corners of the border.
This value will be clamped to the border thickness.
A value of 0.0 gives square corners.
border_color: Option<Color>Color of the border.
socket_color: Option<Color>Color of the sockets.
input_socket_layout: Option<SocketLayout>Default layout for input sockets.
output_socket_layout: Option<SocketLayout>Default layout for node output sockets.
Implementations§
Source§impl Style
impl Style
Sourcepub fn color(&self, theme: &Theme) -> Color
pub fn color(&self, theme: &Theme) -> Color
Retrieves the value, falling back to a default values in the following order:
- If the field is
None, falls back to the style stored within theTheme. - If there are no style defaults for the widget in the theme, or if the
default field is also
None, falls back to the expression specified within the field’s#[conrod(default = "expr")]attribute.
This method was generated by the #[conrod(default = "expr")] attribute
associated with the #[derive(WidgetStyle)] attribute.
Sourcepub fn socket_length(&self, theme: &Theme) -> f64
pub fn socket_length(&self, theme: &Theme) -> f64
Retrieves the value, falling back to a default values in the following order:
- If the field is
None, falls back to the style stored within theTheme. - If there are no style defaults for the widget in the theme, or if the
default field is also
None, falls back to the expression specified within the field’s#[conrod(default = "expr")]attribute.
This method was generated by the #[conrod(default = "expr")] attribute
associated with the #[derive(WidgetStyle)] attribute.
Sourcepub fn border(&self, theme: &Theme) -> f64
pub fn border(&self, theme: &Theme) -> f64
Retrieves the value, falling back to a default values in the following order:
- If the field is
None, falls back to the style stored within theTheme. - If there are no style defaults for the widget in the theme, or if the
default field is also
None, falls back to the expression specified within the field’s#[conrod(default = "expr")]attribute.
This method was generated by the #[conrod(default = "expr")] attribute
associated with the #[derive(WidgetStyle)] attribute.
Sourcepub fn border_radius(&self, theme: &Theme) -> f64
pub fn border_radius(&self, theme: &Theme) -> f64
Retrieves the value, falling back to a default values in the following order:
- If the field is
None, falls back to the style stored within theTheme. - If there are no style defaults for the widget in the theme, or if the
default field is also
None, falls back to the expression specified within the field’s#[conrod(default = "expr")]attribute.
This method was generated by the #[conrod(default = "expr")] attribute
associated with the #[derive(WidgetStyle)] attribute.
Sourcepub fn border_color(&self, theme: &Theme) -> Color
pub fn border_color(&self, theme: &Theme) -> Color
Retrieves the value, falling back to a default values in the following order:
- If the field is
None, falls back to the style stored within theTheme. - If there are no style defaults for the widget in the theme, or if the
default field is also
None, falls back to the expression specified within the field’s#[conrod(default = "expr")]attribute.
This method was generated by the #[conrod(default = "expr")] attribute
associated with the #[derive(WidgetStyle)] attribute.
Sourcepub fn socket_color(&self, theme: &Theme) -> Color
pub fn socket_color(&self, theme: &Theme) -> Color
Retrieves the value, falling back to a default values in the following order:
- If the field is
None, falls back to the style stored within theTheme. - If there are no style defaults for the widget in the theme, or if the
default field is also
None, falls back to the expression specified within the field’s#[conrod(default = "expr")]attribute.
This method was generated by the #[conrod(default = "expr")] attribute
associated with the #[derive(WidgetStyle)] attribute.
Sourcepub fn input_socket_layout(&self, theme: &Theme) -> SocketLayout
pub fn input_socket_layout(&self, theme: &Theme) -> SocketLayout
Retrieves the value, falling back to a default values in the following order:
- If the field is
None, falls back to the style stored within theTheme. - If there are no style defaults for the widget in the theme, or if the
default field is also
None, falls back to the expression specified within the field’s#[conrod(default = "expr")]attribute.
This method was generated by the #[conrod(default = "expr")] attribute
associated with the #[derive(WidgetStyle)] attribute.
Sourcepub fn output_socket_layout(&self, theme: &Theme) -> SocketLayout
pub fn output_socket_layout(&self, theme: &Theme) -> SocketLayout
Retrieves the value, falling back to a default values in the following order:
- If the field is
None, falls back to the style stored within theTheme. - If there are no style defaults for the widget in the theme, or if the
default field is also
None, falls back to the expression specified within the field’s#[conrod(default = "expr")]attribute.
This method was generated by the #[conrod(default = "expr")] attribute
associated with the #[derive(WidgetStyle)] attribute.
Trait Implementations§
impl Copy for Style
impl StructuralPartialEq for Style
Auto Trait Implementations§
impl Freeze for Style
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnwindSafe for Style
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Content for Twhere
T: Copy,
impl<T> Content for Twhere
T: Copy,
Source§fn read<F, E>(size: usize, f: F) -> Result<T, E>
fn read<F, E>(size: usize, f: F) -> Result<T, E>
Owned.Source§fn get_elements_size() -> usize
fn get_elements_size() -> usize
Source§fn to_void_ptr(&self) -> *const ()
fn to_void_ptr(&self) -> *const ()
Source§fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
Source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more