FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ColorPreviewer

    struct · ferroui-controls-color-picker · v0.5.0

    struct ColorPreviewer
    

    Presents a preview color with optional accent colors.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<ColorPreviewer>
    

    Returns a strong reference to this object.

    Source

    on_color_changed

    fn on_color_changed(self: &Self, e: &ColorChangedEventArgs)
    

    Raises the color changed event.

    e defines the old/new colors.

    Source

    TEMPLATE_PARTS

    const TEMPLATE_PARTS: &'static [TemplatePartAttribute]
    

    The named parts expected in the control template.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Initializes a new instance of the ColorPreviewer class.

    Source

    color_changed

    fn color_changed(self: &Self, handler: impl Fn(&ColorChangedEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
    

    Event for when the selected color changes within the previewer. This occurs when an accent color is pressed. Disposing the returned handle unsubscribes.

    Source

    hsv_color_property

    fn hsv_color_property() -> &'static StyledProperty<HsvColor>
    

    Defines the HsvColor property.

    Source

    is_accent_colors_visible_property

    fn is_accent_colors_visible_property() -> &'static StyledProperty<bool>
    

    Defines the IsAccentColorsVisible property.

    Source

    hsv_color

    fn hsv_color(self: &Self) -> HsvColor
    

    Gets the currently previewed color in the HSV color model.

    Only an HSV color is supported in this control to ensure there is never any loss of precision or color information. Accent colors, like the color spectrum, only operate with the HSV color model.

    Source

    set_hsv_color

    fn set_hsv_color(self: &Self, value: HsvColor)
    

    Sets hsv_color.

    Source

    is_accent_colors_visible

    fn is_accent_colors_visible(self: &Self) -> bool
    

    Gets a value indicating whether accent colors are visible along with the preview color.

    Source

    set_is_accent_colors_visible

    fn set_is_accent_colors_visible(self: &Self, value: bool)
    

    Sets is_accent_colors_visible.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.