FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ContentPresenter

    struct · ferroui-controls · v0.5.0

    struct ContentPresenter
    

    Presents a single item of data inside a templated control.

    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<ContentPresenter>
    

    Returns a strong reference to this object.

    Source

    PSEUDO_CLASSES

    const PSEUDO_CLASSES: PseudoClassesAttribute
    

    The pseudoclasses set by the class.

    Source

    background_property

    fn background_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
    

    Defines the Background property.

    Source

    background_sizing_property

    fn background_sizing_property() -> &'static StyledProperty<BackgroundSizing>
    

    Defines the BackgroundSizing property.

    Source

    border_brush_property

    fn border_brush_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
    

    Defines the BorderBrush property.

    Source

    border_thickness_property

    fn border_thickness_property() -> &'static StyledProperty<Thickness>
    

    Defines the BorderThickness property.

    Source

    corner_radius_property

    fn corner_radius_property() -> &'static StyledProperty<CornerRadius>
    

    Defines the CornerRadius property.

    Source

    box_shadow_property

    fn box_shadow_property() -> &'static StyledProperty<BoxShadows>
    

    Defines the BoxShadow property.

    Source

    foreground_property

    fn foreground_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
    

    Defines the Foreground property.

    Source

    font_family_property

    fn font_family_property() -> &'static StyledProperty<FontFamily>
    

    Defines the FontFamily property.

    Source

    font_size_property

    fn font_size_property() -> &'static StyledProperty<f64>
    

    Defines the FontSize property.

    Source

    font_style_property

    fn font_style_property() -> &'static StyledProperty<FontStyle>
    

    Defines the FontStyle property.

    Source

    font_weight_property

    fn font_weight_property() -> &'static StyledProperty<FontWeight>
    

    Defines the FontWeight property.

    Source

    font_stretch_property

    fn font_stretch_property() -> &'static StyledProperty<FontStretch>
    

    Defines the FontStretch property.

    Source

    text_alignment_property

    fn text_alignment_property() -> &'static StyledProperty<TextAlignment>
    

    Defines the TextAlignment property.

    Source

    text_wrapping_property

    fn text_wrapping_property() -> &'static StyledProperty<TextWrapping>
    

    Defines the TextWrapping property.

    Source

    text_trimming_property

    fn text_trimming_property() -> &'static StyledProperty<Rc<dyn TextTrimming>>
    

    Defines the TextTrimming property.

    Source

    line_height_property

    fn line_height_property() -> &'static StyledProperty<f64>
    

    Defines the LineHeight property.

    Source

    letter_spacing_property

    fn letter_spacing_property() -> &'static StyledProperty<f64>
    

    Defines the LetterSpacing property.

    Source

    max_lines_property

    fn max_lines_property() -> &'static StyledProperty<i32>
    

    Defines the MaxLines property.

    Source

    child_property

    fn child_property() -> &'static DirectProperty<ContentPresenter, Option<Ref<Control>>>
    

    Defines the Child property.

    Source

    content_property

    fn content_property() -> &'static StyledProperty<Option<BoxedValue>>
    

    Defines the Content property.

    Source

    content_template_property

    fn content_template_property() -> &'static StyledProperty<Option<Rc<dyn IDataTemplate>>>
    

    Defines the ContentTemplate property.

    Source

    horizontal_content_alignment_property

    fn horizontal_content_alignment_property() -> &'static StyledProperty<HorizontalAlignment>
    

    Defines the HorizontalContentAlignment property.

    Source

    vertical_content_alignment_property

    fn vertical_content_alignment_property() -> &'static StyledProperty<VerticalAlignment>
    

    Defines the VerticalContentAlignment property.

    Source

    padding_property

    fn padding_property() -> &'static StyledProperty<Thickness>
    

    Defines the Padding property.

    Source

    recognizes_access_key_property

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

    Defines the RecognizesAccessKey property.

    Source

    construct

    fn construct() -> Self
    

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

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    background

    fn background(self: &Self) -> Option<Rc<dyn IBrush>>
    

    A brush with which to paint the background.

    Source

    set_background

    fn set_background(self: &Self, value: Option<Rc<dyn IBrush>>)
    

    Source

    background_sizing

    fn background_sizing(self: &Self) -> BackgroundSizing
    

    How the background is drawn relative to the border.

    Source

    set_background_sizing

    fn set_background_sizing(self: &Self, value: BackgroundSizing)
    

    Source

    border_brush

    fn border_brush(self: &Self) -> Option<Rc<dyn IBrush>>
    

    A brush with which to paint the border.

    Source

    set_border_brush

    fn set_border_brush(self: &Self, value: Option<Rc<dyn IBrush>>)
    

    Source

    border_thickness

    fn border_thickness(self: &Self) -> Thickness
    

    The thickness of the border.

    Source

    set_border_thickness

    fn set_border_thickness(self: &Self, value: Thickness)
    

    Source

    corner_radius

    fn corner_radius(self: &Self) -> CornerRadius
    

    The radius of the border rounded corners.

    Source

    set_corner_radius

    fn set_corner_radius(self: &Self, value: CornerRadius)
    

    Source

    box_shadow

    fn box_shadow(self: &Self) -> BoxShadows
    

    The box shadow effect parameters.

    Source

    set_box_shadow

    fn set_box_shadow(self: &Self, value: BoxShadows)
    

    Source

    foreground

    fn foreground(self: &Self) -> Option<Rc<dyn IBrush>>
    

    A brush used to paint the text.

    Source

    set_foreground

    fn set_foreground(self: &Self, value: Option<Rc<dyn IBrush>>)
    

    Source

    font_family

    fn font_family(self: &Self) -> FontFamily
    

    The font family.

    Source

    set_font_family

    fn set_font_family(self: &Self, value: FontFamily)
    

    Source

    font_size

    fn font_size(self: &Self) -> f64
    

    The font size.

    Source

    set_font_size

    fn set_font_size(self: &Self, value: f64)
    

    Source

    font_style

    fn font_style(self: &Self) -> FontStyle
    

    The font style.

    Source

    set_font_style

    fn set_font_style(self: &Self, value: FontStyle)
    

    Source

    font_weight

    fn font_weight(self: &Self) -> FontWeight
    

    The font weight.

    Source

    set_font_weight

    fn set_font_weight(self: &Self, value: FontWeight)
    

    Source

    font_stretch

    fn font_stretch(self: &Self) -> FontStretch
    

    The font stretch.

    Source

    set_font_stretch

    fn set_font_stretch(self: &Self, value: FontStretch)
    

    Source

    text_alignment

    fn text_alignment(self: &Self) -> TextAlignment
    

    The text alignment.

    Source

    set_text_alignment

    fn set_text_alignment(self: &Self, value: TextAlignment)
    

    Source

    text_wrapping

    fn text_wrapping(self: &Self) -> TextWrapping
    

    The text wrapping.

    Source

    set_text_wrapping

    fn set_text_wrapping(self: &Self, value: TextWrapping)
    

    Source

    text_trimming

    fn text_trimming(self: &Self) -> Rc<dyn TextTrimming>
    

    The text trimming.

    Source

    set_text_trimming

    fn set_text_trimming(self: &Self, value: Rc<dyn TextTrimming>)
    

    Source

    line_height

    fn line_height(self: &Self) -> f64
    

    The line height.

    Source

    set_line_height

    fn set_line_height(self: &Self, value: f64)
    

    Source

    letter_spacing

    fn letter_spacing(self: &Self) -> f64
    

    The letter spacing.

    Source

    set_letter_spacing

    fn set_letter_spacing(self: &Self, value: f64)
    

    Source

    max_lines

    fn max_lines(self: &Self) -> i32
    

    The max lines.

    Source

    set_max_lines

    fn set_max_lines(self: &Self, value: i32)
    

    Source

    child

    fn child(self: &Self) -> Option<Ref<Control>>
    

    The control displayed by the presenter.

    Source

    content

    fn content(self: &Self) -> Option<BoxedValue>
    

    The content to be displayed by the presenter.

    Source

    set_content

    fn set_content(self: &Self, value: Option<BoxedValue>)
    

    Source

    content_template

    fn content_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
    

    The data template used to display the content of the control.

    Source

    set_content_template

    fn set_content_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
    

    Source

    horizontal_content_alignment

    fn horizontal_content_alignment(self: &Self) -> HorizontalAlignment
    

    The horizontal alignment of the content within the border the control.

    Source

    set_horizontal_content_alignment

    fn set_horizontal_content_alignment(self: &Self, value: HorizontalAlignment)
    

    Source

    vertical_content_alignment

    fn vertical_content_alignment(self: &Self) -> VerticalAlignment
    

    The vertical alignment of the content within the border of the control.

    Source

    set_vertical_content_alignment

    fn set_vertical_content_alignment(self: &Self, value: VerticalAlignment)
    

    Source

    padding

    fn padding(self: &Self) -> Thickness
    

    The space between the border and the child control.

    Source

    set_padding

    fn set_padding(self: &Self, value: Thickness)
    

    Source

    recognizes_access_key

    fn recognizes_access_key(self: &Self) -> bool
    

    Determine if the presenter should use access text in its style.

    Source

    set_recognizes_access_key

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

    Source

    host

    fn host(self: &Self) -> Option<Ref<FerroObject>>
    

    The host content control.

    Source

    set_content_with_data_context

    fn set_content_with_data_context(self: &Self, content: Option<BoxedValue>, data_context: Option<BoxedValue>)
    

    Sets the content and the data context of the presenter at once: the child is created with data_context instead of the data context derived from the content.

    Source

    update_child

    fn update_child(self: &Self)
    

    Updates the child control based on the content.

    Usually the child control is created automatically when apply_template is called; however for this to happen, the control needs to be attached to a logical tree (if the control is not attached to the logical tree, it is reasonable to expect that the data templates needed for the child are not yet available). This method forces the child to be updated regardless.

    Source

    layout_thickness

    fn layout_thickness(self: &Self) -> Thickness
    

    The border thickness used for rendering: rounded to device pixels when layout rounding is in use.

    Source

    arrange_override_impl

    fn arrange_override_impl(self: &Self, final_size: Size, offset: Vector) -> Size
    

    Arranges the child within final_size, with the origin of the content area displaced by offset.

    Source

    Trait implementations

    Availability

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