El
struct · ferroui-view · v0.5.0
struct El<T>
The element of a control class T, built with chained setters. Turns
into an Element.
Members
new
fn new() -> Self
An element of T with nothing set.
key
fn key(self: Self, key: impl Into<crate::Key>) -> Self
The key of the element among its siblings.
name
fn name(self: Self, name: impl Into<String>) -> Self
The Name of the control.
class
fn class(self: Self, classes: &str) -> Self
Adds style classes, separated by spaces ("accent large").
classes
fn classes(self: Self, classes: &str) -> Self
Adds style classes, separated by spaces; the same as
class.
set
fn set<P: TypedProperty + ?Sized, M>(self: Self, property: &'static P, value: impl IntoProp<<P as >::Value, M>) -> Self
Gives a property a value; the same as the generated setter of the property, for any property (an attached one of another crate, one the generator left out).
bind
fn bind<P: TypedProperty + ?Sized>(self: Self, property: &'static P, binding: impl BindingBase + 'static) -> Self
Binds a property with a binding of the property system (the indexer
control[!Property] = binding upstream).
on
fn on<A: IRoutedEventArgs + 'static>(self: Self, event: &'static RoutedEvent<A>, handler: impl Fn(&Interactive, &A) -> () + 'static) -> Self
Handles a routed event with the control that handles it.
on_changed
fn on_changed<P: TypedProperty + ?Sized>(self: Self, property: &'static P, handler: impl Fn(&<P as >::Value) -> () + 'static) -> Self
Calls handler with the new value whenever property changes on the
control (the user typed, a slider moved, a binding set it).
with
fn with(self: Self, f: impl Fn(&Ref<T>) -> () + 'static) -> Self
where T: ObjectType
Calls f with the control once it was made and given its values and
children: what a builder cannot say (a control kept in a
NodeRef, a call the class has no property for).
styles
fn styles(self: Self, styles: impl IntoIterator<Item = crate::style::StyleBuilder>) -> Self
Adds styles to the control (Styles of the control): they apply to
it and to the controls below it. They are added when the control is
made.
node_ref
fn node_ref(self: Self, node_ref: crate::NodeRef<T>) -> Self
where T: ObjectType
Keeps the control in node_ref once it is made.
child
fn child(self: Self, child: impl IntoChild) -> Self
Adds a child: an element, a builder, text or a list. Children go into
the content of the control: Children of a panel, Items of an items
control, Content of a content control, Child of a decorator, the
text of a TextBlock.
children
fn children(self: Self, children: impl IntoChildren) -> Self
Adds children: a vector, an array or a tuple of them.
build
fn build(self: Self) -> Element
The element.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeIntoValue<T>IntoProp<T, Value>IntoProp<Option<Rc<dyn AnyValue>>, FromElement>IntoProp<Option<Ref<T>>, FromControlElement>IntoChildBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEitherDefaultElementBuilderIntoElementFrom<El<T>>GridDefinitionsAccessTextPropsAcrylicBrushPropsAdaptiveTriggerPropsAdornerLayerPropsAnimatablePropsAnimationPropsAnimatorKeyFramePropsApplicationPropsArcPropsArcSegmentPropsAutoCompleteBoxPropsAutoSuggestBoxPropsBezierSegmentPropsBindingEvaluatorPropsBitmapCachePropsBlockPropsBlurEffectPropsBorderPropsBrushPropsButtonPropsButtonSpinnerPropsCalendarPropsCalendarDatePickerPropsCalendarItemPropsCanvasPropsCarouselPropsCarouselPagePropsColumnDefinitionPropsCombinedGeometryPropsComboBoxPropsCommandBarPropsCommandBarButtonPropsCommandBarSeparatorPropsCommandBarToggleButtonPropsConicGradientBrushPropsContactPropsContentControlPropsContentPagePropsContentPresenterPropsContextMenuPropsControlPropsCroppedBitmapPropsDashStylePropsDataValidationErrorsPropsDatePickerPropsDatePickerPresenterPropsDateTimePickerPanelPropsDecoratorPropsDefinitionBasePropsDockPanelPropsDrawerPagePropsDrawingBrushPropsDrawingGroupPropsDrawingImagePropsDropShadowDirectionEffectPropsDropShadowEffectPropsDropShadowEffectBasePropsEllipseGeometryPropsExpanderPropsExperimentalAcrylicBorderPropsExperimentalAcrylicMaterialPropsFlexPanelPropsFlyoutPropsFlyoutBasePropsFontIconPropsFontIconSourcePropsFramePropsFramePagePropsGeometryPropsGeometryDrawingPropsGeometryGroupPropsGlyphRunDrawingPropsGradientBrushPropsGradientStopPropsGridPropsGridSplitterPropsHeaderedContentControlPropsHeaderedItemsControlPropsHeaderedSelectingItemsControlPropsHyperlinkPropsHyperlinkButtonPropsIconSourcePropsImagePropsImageBrushPropsImageDrawingPropsInfoBadgePropsInfoBadgeTemplateSettingsPropsInfoBarPropsInfoBarPanelPropsInfoBarTemplateSettingsPropsInlinePropsInputElementPropsInputPaneAwareDecoratorPropsInputScopeNamePropsItemsControlPropsItemsPresenterPropsKeyBindingPropsLayoutTransformControlPropsLayoutablePropsLinePropsLineGeometryPropsLineSegmentPropsLinearGradientBrushPropsListBoxItemPropsMaskedTextBoxPropsMatrixTransformPropsMenuBasePropsMenuFlyoutPropsMenuItemPropsMicaBackdropPropsMultiPagePropsNativeMenuItemPropsNavigationPagePropsNavigationViewPropsNavigationViewItemPropsNavigationViewItemBasePropsNavigationViewTemplateSettingsPropsNotificationCardPropsNumberBoxPropsNumericUpDownPropsOverlayPopupHostPropsPagePropsPageNavigationHostPropsPagerControlPropsPanelPropsParagraphPropsPathPropsPathFigurePropsPathGeometryPropsPathIconPropsPathIconSourcePropsPathSegmentPropsPenPropsPersonPicturePropsPersonPictureTemplateSettingsPropsPipsPagerPropsPolyBezierSegmentPropsPolyLineSegmentPropsPolygonPropsPolylinePropsPolylineGeometryPropsPopupPropsPopupFlyoutBasePropsPopupRootPropsProgressBarPropsProgressBarTemplateSettingsPropsProgressRingPropsPullGestureRecognizerPropsQuadraticBezierSegmentPropsRadialGradientBrushPropsRadioButtonPropsRadioButtonsPropsRadioButtonsPanelPropsRangeBasePropsRatingControlPropsRatingItemFontInfoPropsRatingItemImageInfoPropsRectanglePropsRectangleGeometryPropsRefreshContainerPropsRefreshVisualizerPropsRelativePanelPropsRepeatButtonPropsRevealBrushPropsReversibleStackPanelPropsRichEditBoxPropsRichTextBlockPropsRotate3DTransformPropsRotateTransformPropsRowDefinitionPropsRunPropsScaleTransformPropsScrollBarPropsScrollContentPresenterPropsScrollGestureRecognizerPropsScrollViewerPropsSectorPropsSelectableTextBlockPropsSelectingItemsControlPropsSelectingMultiPagePropsShapePropsSkewTransformPropsSliderPropsSolidColorBrushPropsSpanPropsSpinnerPropsSplitButtonPropsSplitViewPropsSplitViewTemplateSettingsPropsStackPanelPropsStateTriggerPropsStyledElementPropsSwipeGestureRecognizerPropsSymbolIconPropsSymbolIconSourcePropsTabControlPropsTabItemPropsTabbedPagePropsTableViewPropsTableViewColumnPropsTemplatedControlPropsTextBlockPropsTextBoxPropsTextDecorationPropsTextElementPropsTextHighlighterPropsTextPresenterPropsTickBarPropsTileBrushPropsTimePickerPropsTimePickerPresenterPropsTitleBarPropsTitleBarTemplateSettingsPropsToggleButtonPropsToggleSplitButtonPropsToggleSwitchPropsToolTipPropsTopLevelPropsTrackPropsTransitionBasePropsTransitioningContentControlPropsTranslateTransformPropsTrayIconPropsTreeViewPropsTreeViewItemPropsUniformGridPropsViewboxPropsVirtualizingStackPanelPropsVisualPropsVisualBrushPropsVisualStateManagerPropsWindowPropsWindowBasePropsWindowDrawnDecorationsPropsWindowNotificationManagerPropsWrapPanelPropsXamlAmbientLightPropsXamlCompositionBrushBasePropsAttachedPropsColorPickerPropsColorPreviewerPropsColorSliderPropsColorSpectrumPropsColorViewPropsManagedFileChooserOverwritePromptPropsReactiveUserControlBasePropsReactiveWindowBasePropsRoutedViewHostPropsViewModelViewHostPropsTreeDataGridPropsTreeDataGridBindingProbePropsTreeDataGridCellsPresenterPropsTreeDataGridCheckBoxCellPropsTreeDataGridColumnHeadersPresenterPropsTreeDataGridExpanderCellPropsTreeDataGridRowPropsTreeDataGridRowsPresenterPropsTreeDataGridTextCellProps
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.