pub struct Node {Show 99 fields
pub kind: Kind,
pub id: &'static str,
pub width: Size,
pub height: Size,
pub min_width: f32,
pub min_height: f32,
pub horizontal: bool,
pub measure_all_children: bool,
pub layout_direction: u8,
pub fill_viewport: bool,
pub clip_to_padding_disabled: bool,
pub clip_children_disabled: bool,
pub weight: f32,
pub weight_sum: f32,
pub divider_color: Option<Color>,
pub divider_thickness: f32,
pub divider_flags: u8,
pub divider_padding: f32,
pub padding_edges: [f32; 4],
pub padding_explicit: [bool; 4],
pub background_padding: Option<[f32; 4]>,
pub background_min_size: [f32; 2],
pub padding_relative: [Option<f32>; 2],
pub margin: [f32; 4],
pub margin_relative: [Option<f32>; 2],
pub layout_gravity: [u8; 2],
pub absolute_position: [f32; 2],
pub relative_rules: &'static [RelativeRule],
pub layout_gravity_explicit: bool,
pub content_gravity: [u8; 2],
pub text: &'static str,
pub hint: &'static str,
pub chrono_format: &'static str,
pub count_down: bool,
pub clock_12: &'static str,
pub clock_24: &'static str,
pub input_type: u8,
pub text_on: &'static str,
pub text_off: &'static str,
pub text_size: f32,
pub letter_spacing_em: f32,
pub line_spacing_extra: f32,
pub line_spacing_multiplier: f32,
pub text_bold: bool,
pub text_all_caps: bool,
pub max_lines: usize,
pub min_lines: usize,
pub ellipsize_end: bool,
pub ellipsize_side: u8,
pub single_line: bool,
pub align: u8,
pub color: Option<Color>,
pub text_color_states: &'static [TintState],
pub background: Option<Color>,
pub foreground: Option<Color>,
pub foreground_radius: f32,
pub foreground_size: [f32; 2],
pub foreground_padding: Option<[f32; 4]>,
pub foreground_gravity: [u8; 2],
pub foreground_excludes_padding: bool,
pub background_stroke: Option<Color>,
pub background_stroke_width: f32,
pub foreground_stroke: Option<Color>,
pub foreground_stroke_width: f32,
pub radius: f32,
pub clickable: bool,
pub icon: MaterialIcon,
pub image_src: &'static str,
pub image_scale: u8,
pub image_adjust_bounds: bool,
pub image_max_width: Option<f32>,
pub image_max_height: Option<f32>,
pub image_tint: Option<Color>,
pub image_tint_states: &'static [TintState],
pub image_tint_mode: u8,
pub image_alpha: u8,
pub view_alpha: f32,
pub image_builtin: bool,
pub enabled: bool,
pub checked: bool,
pub checked_button: &'static str,
pub min: f32,
pub max: f32,
pub progress: f32,
pub secondary_progress: f32,
pub indeterminate: bool,
pub num_stars: usize,
pub rating: f32,
pub step_size: f32,
pub indicator: bool,
pub mirror_for_rtl: bool,
pub animation_in: Option<AlphaAnimation>,
pub animation_out: Option<AlphaAnimation>,
pub translate_in: Option<TranslateAnimation>,
pub translate_out: Option<TranslateAnimation>,
pub auto_start: bool,
pub flip_interval: f64,
pub visibility: Visibility,
pub children: &'static [Node],
}Fields§
§kind: Kind§id: &'static str§width: Size§height: Size§min_width: f32§min_height: f32§horizontal: bool§measure_all_children: bool§layout_direction: u80 inherits, 1 is left-to-right, and 2 is right-to-left.
fill_viewport: bool§clip_to_padding_disabled: boolAndroid ViewGroup clips children to its padding by default.
clip_children_disabled: boolAndroid ViewGroup clips each child to its bounds by default.
weight: f32§weight_sum: f32Zero uses the sum of the visible child weights.
divider_color: Option<Color>§divider_thickness: f32§divider_flags: u8§divider_padding: f32§padding_edges: [f32; 4]Physical left, top, right and bottom padding and optional relative overrides.
padding_explicit: [bool; 4]§background_padding: Option<[f32; 4]>§background_min_size: [f32; 2]§padding_relative: [Option<f32>; 2]§margin: [f32; 4]Physical left, top, right and bottom margins.
margin_relative: [Option<f32>; 2]Optional start and end margins override the physical side in the current direction.
layout_gravity: [u8; 2]FrameLayout gravity: horizontal start/center/end/left/right, vertical top/center/bottom.
absolute_position: [f32; 2]Physical coordinates for children of deprecated AbsoluteLayout.
relative_rules: &'static [RelativeRule]§layout_gravity_explicit: bool§content_gravity: [u8; 2]§text: &'static str§hint: &'static str§chrono_format: &'static str§count_down: bool§clock_12: &'static str§clock_24: &'static str§input_type: u80 text, 1 email, 2 telephone, 3 numeric, 4 password, 5 decimal.
text_on: &'static str§text_off: &'static str§text_size: f32§letter_spacing_em: f32Android letter spacing in em units.
line_spacing_extra: f32§line_spacing_multiplier: f32§text_bold: bool§text_all_caps: bool§max_lines: usizeZero means no explicit line limit.
min_lines: usize§ellipsize_end: bool§ellipsize_side: u81 truncates at the start, 2 in the middle.
single_line: bool§align: u8§color: Option<Color>§text_color_states: &'static [TintState]§background: Option<Color>§foreground: Option<Color>Solid foreground painted over this view and its descendants.
foreground_radius: f32Negative radius represents an oval foreground.
foreground_size: [f32; 2]§foreground_padding: Option<[f32; 4]>§foreground_gravity: [u8; 2]Horizontal/vertical foreground gravity; 5 means fill.
foreground_excludes_padding: bool§background_stroke: Option<Color>§background_stroke_width: f32§foreground_stroke: Option<Color>§foreground_stroke_width: f32§radius: f32§clickable: bool§icon: MaterialIcon§image_src: &'static str§image_scale: u8Image scale mode encoded by the Android XML importer.
image_adjust_bounds: boolPreserve drawable aspect ratio when a view dimension can wrap.
image_max_width: Option<f32>§image_max_height: Option<f32>§image_tint: Option<Color>§image_tint_states: &'static [TintState]§image_tint_mode: u80 SRC_ATOP (XML default), 1 SRC_IN, 2 SRC_OVER, 3 MULTIPLY, 4 SCREEN, 5 ADD.
image_alpha: u8Drawable opacity in the Android imageAlpha range.
view_alpha: f32Opacity applied to the view and its children.
image_builtin: bool§enabled: bool§checked: bool§min: f32§max: f32§progress: f32§secondary_progress: f32§indeterminate: bool§num_stars: usize§rating: f32§step_size: f32§indicator: bool§mirror_for_rtl: bool§animation_in: Option<AlphaAnimation>§animation_out: Option<AlphaAnimation>§translate_in: Option<TranslateAnimation>§translate_out: Option<TranslateAnimation>§auto_start: bool§flip_interval: f64§visibility: Visibility§children: &'static [Node]Implementations§
Source§impl Node
impl Node
Sourcepub fn set_table_column_collapsed(
&self,
state: &mut LayoutState,
column: usize,
collapsed: bool,
) -> bool
pub fn set_table_column_collapsed( &self, state: &mut LayoutState, column: usize, collapsed: bool, ) -> bool
Override a named table column’s collapsed state. Returns false for unnamed/non-table nodes.
Source§impl Node
impl Node
Sourcepub fn set_switcher_text(
&self,
state: &mut LayoutState,
text: &str,
advance: bool,
) -> bool
pub fn set_switcher_text( &self, state: &mut LayoutState, text: &str, advance: bool, ) -> bool
Set text in a TextSwitcher, optionally switching to its next child. The switcher must have a stable XML ID when nested in another layout.
Sourcepub fn set_switcher_image(&self, state: &mut LayoutState, source: &str) -> bool
pub fn set_switcher_image(&self, state: &mut LayoutState, source: &str) -> bool
Set the image of the next ImageSwitcher child and select it.
Sourcepub fn render_floating_media_controller(
&'static self,
f: &mut Frame<'_>,
anchor: Rect,
height: f32,
state: &mut LayoutState,
) -> Option<&'static str>
pub fn render_floating_media_controller( &'static self, f: &mut Frame<'_>, anchor: Rect, height: f32, state: &mut LayoutState, ) -> Option<&'static str>
Paint an explicitly shown floating MediaController at the bottom of its anchor.