Debian Codegraph @

src/app/layout_manager.rs

raw symbols SCIP
1 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::collectionsrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/::BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#;
2
3 use ratatuirust-analyzer cargo ratatui 0.30.2 crate/::layoutrust-analyzer cargo ratatui-core 0.1.2 layout/::Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#;
4
5 use craterust-analyzer cargo bottom 0.14.9 crate/::{constantsrust-analyzer cargo bottom 0.14.9 constants/::DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID., optionsrust-analyzer cargo bottom 0.14.9 options/::OptionErrorrust-analyzer cargo bottom 0.14.9 options/error/OptionError#};
6
7 // Represents a start and end coordinate in some dimension.
8 type LineSegmentrust-analyzer cargo bottom 0.14.9 app/layout_manager/LineSegment# = (u16, u16);
9
10 type WidgetMappingsrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetMappings# = (u16, BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<LineSegmentrust-analyzer cargo bottom 0.14.9 app/layout_manager/LineSegment#, u64>);
11 type ColumnRowMappingsrust-analyzer cargo bottom 0.14.9 app/layout_manager/ColumnRowMappings# = (u16, BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<LineSegmentrust-analyzer cargo bottom 0.14.9 app/layout_manager/LineSegment#, WidgetMappingsrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetMappings#>);
12 type ColumnMappingsrust-analyzer cargo bottom 0.14.9 app/layout_manager/ColumnMappings# = (u16, BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<LineSegmentrust-analyzer cargo bottom 0.14.9 app/layout_manager/LineSegment#, ColumnRowMappingsrust-analyzer cargo bottom 0.14.9 app/layout_manager/ColumnRowMappings#>);
13
14 /// Represents a more usable representation of the layout, derived from the
15 /// config.
16 ///
17 /// FIXME: This is kinda gross. Ideally optimize out the hard-coded stuff.
18 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
19 pub struct BottomLayoutrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomLayout# {
20 pub rowsrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomLayout#rows.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<BottomRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#>,
21 pub total_row_height_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomLayout#total_row_height_ratio.: u16,
22 }
23
24 trait Ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/Ratio# {
25 fn ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/Ratio#ratio().(&self) -> u16;
26 }
27
28 impl Ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/Ratio# for Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint# {
29 fn ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[Constraint][Ratio]ratio().(&self) -> u16 {
30 match self {
31 Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Minrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Min#(min) => stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::cmprust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/::maxrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/max().(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().min, 1),
32 Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Lengthrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Length#(_) => 1,
33 Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Fillrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Fill#(scaling) => *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().scaling,
34 _ => unreachablerust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/unreachable!!("if this gets hit then you're refactoring layouts"),
35 }
36 }
37 }
38
39 impl BottomLayoutrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomLayout# {
40 pub fn get_movement_mappingsrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomLayout]get_movement_mappings().(&mut self) {
41 #[expect(clippy::suspicious_operation_groupings)] // Have to enable this, clippy really doesn't like me doing this with tuples...
42 fn is_intersectingrust-analyzer cargo bottom 0.14.9 app/layout_manager/is_intersecting().(a: LineSegmentrust-analyzer cargo bottom 0.14.9 app/layout_manager/LineSegment#, b: LineSegmentrust-analyzer cargo bottom 0.14.9 app/layout_manager/LineSegment#) -> bool {
43 a.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().b.0 && a.1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().b.1
44 || a.1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().b.1 && a.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().b.0
45 || a.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().<=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]le().b.0 && a.1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().b.0
46 || a.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().b.0 && a.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().b.1 && a.1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]ge().b.1
47 }
48
49 fn get_distancerust-analyzer cargo bottom 0.14.9 app/layout_manager/get_distance().(target: LineSegmentrust-analyzer cargo bottom 0.14.9 app/layout_manager/LineSegment#, candidate: LineSegmentrust-analyzer cargo bottom 0.14.9 app/layout_manager/LineSegment#) -> u16 {
50 if candidate.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().target.0 {
51 candidate.1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub().target.0
52 } else if candidate.1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().target.1 {
53 candidate.1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub().candidate.0
54 } else {
55 target.1 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub().candidate.0
56 }
57 }
58
59 // Now we need to create the correct mapping for moving from a specific
60 // widget to another
61 let mut layout_mapping: BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<LineSegmentrust-analyzer cargo bottom 0.14.9 app/layout_manager/LineSegment#, ColumnMappingsrust-analyzer cargo bottom 0.14.9 app/layout_manager/ColumnMappings#> = BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V>`]new().();
62 let mut total_height = 0;
63 for row in &self.rowsrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomLayout#rows. {
64 let mut row_width = 0;
65 let mut row_mapping: BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<LineSegmentrust-analyzer cargo bottom 0.14.9 app/layout_manager/LineSegment#, ColumnRowMappingsrust-analyzer cargo bottom 0.14.9 app/layout_manager/ColumnRowMappings#> = BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V>`]new().();
66 let mut is_valid_row = false;
67 for col in &row.childrenrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#children. {
68 let mut col_row_height = 0;
69 let mut col_mapping: BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<LineSegmentrust-analyzer cargo bottom 0.14.9 app/layout_manager/LineSegment#, WidgetMappingsrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetMappings#> = BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V>`]new().();
70 let mut is_valid_col = false;
71
72 for col_row in &col.childrenrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#children. {
73 let mut widget_width = 0;
74 let mut col_row_mapping: BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#<LineSegmentrust-analyzer cargo bottom 0.14.9 app/layout_manager/LineSegment#, u64> = BTreeMaprust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/BTreeMap#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V>`]new().();
75 let mut is_valid_col_row = false;
76 for widget in &col_row.childrenrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#children. {
77 let widget_ratio = widget
78 .ratio_overriderust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#ratio_override.
79 .unwrap_or_elserust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or_else().(|| widget.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#constraint..ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[Constraint][Ratio]ratio().());
80
81 match widget.widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. {
82 BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Emptyrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Empty# => {}
83 _ => {
84 is_valid_col_row = true;
85 col_row_mapping.insertrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]insert().(
86 (
87 widget_width rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().100 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().col_row.total_widget_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#total_widget_ratio.,
88 (widget_width rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().widget_ratio) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().100
89 /rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().col_row.total_widget_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#total_widget_ratio.,
90 ),
91 widget.widget_idrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_id.,
92 );
93 }
94 }
95 widget_width rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().widget_ratio;
96 }
97 if is_valid_col_row {
98 col_mapping.insertrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]insert().(
99 (
100 col_row_height rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().100 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().col.total_col_row_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#total_col_row_ratio.,
101 (col_row_height rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().col_row.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#constraint..ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[Constraint][Ratio]ratio().()) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().100
102 /rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().col.total_col_row_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#total_col_row_ratio.,
103 ),
104 (col.total_col_row_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#total_col_row_ratio., col_row_mapping),
105 );
106 is_valid_col = true;
107 }
108
109 col_row_height rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().col_row.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#constraint..ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[Constraint][Ratio]ratio().();
110 }
111 if is_valid_col {
112 row_mapping.insertrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]insert().(
113 (
114 row_width rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().100 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().row.total_col_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#total_col_ratio.,
115 (row_width rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().col.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#constraint..ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[Constraint][Ratio]ratio().()) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().100 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().row.total_col_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#total_col_ratio.,
116 ),
117 (row.total_col_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#total_col_ratio., col_mapping),
118 );
119 is_valid_row = true;
120 }
121
122 row_width rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().col.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#constraint..ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[Constraint][Ratio]ratio().();
123 }
124 if is_valid_row {
125 layout_mapping.insertrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]insert().(
126 (
127 total_height rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().100 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().self.total_row_height_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomLayout#total_row_height_ratio.,
128 (total_height rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().row.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#constraint..ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[Constraint][Ratio]ratio().()) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().100 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().self.total_row_height_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomLayout#total_row_height_ratio.,
129 ),
130 (self.total_row_height_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomLayout#total_row_height_ratio., row_mapping),
131 );
132 }
133 total_height rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().row.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#constraint..ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[Constraint][Ratio]ratio().();
134 }
135
136 // Now pass through a second time; this time we want to build up
137 // our neighbour profile.
138 let mut height_cursor = 0;
139 for row in &mut self.rowsrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomLayout#rows. {
140 let mut col_cursor = 0;
141 let row_height_percentage_start = height_cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().100 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().self.total_row_height_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomLayout#total_row_height_ratio.;
142 let row_height_percentage_end =
143 (height_cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().row.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#constraint..ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[Constraint][Ratio]ratio().()) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().100 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().self.total_row_height_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomLayout#total_row_height_ratio.;
144
145 for col in &mut row.childrenrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#children. {
146 let mut col_row_cursor = 0;
147 let col_width_percentage_start = col_cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().100 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().row.total_col_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#total_col_ratio.;
148 let col_width_percentage_end =
149 (col_cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().col.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#constraint..ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[Constraint][Ratio]ratio().()) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().100 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().row.total_col_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#total_col_ratio.;
150
151 for col_row in &mut col.childrenrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#children. {
152 let mut widget_cursor = 0;
153 let col_row_height_percentage_start =
154 col_row_cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().100 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().col.total_col_row_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#total_col_row_ratio.;
155 let col_row_height_percentage_end =
156 (col_row_cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().col_row.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#constraint..ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[Constraint][Ratio]ratio().()) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().100
157 /rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().col.total_col_row_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#total_col_row_ratio.;
158 let col_row_children_len = col_row.childrenrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#children..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().();
159
160 for widget in &mut col_row.childrenrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#children. {
161 // Bail if empty.
162 if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Emptyrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Empty# = widget.widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. {
163 continue;
164 }
165
166 let widget_ratio = widget
167 .ratio_overriderust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#ratio_override.
168 .unwrap_or_elserust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or_else().(|| widget.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#constraint..ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[Constraint][Ratio]ratio().());
169
170 let widget_width_percentage_start =
171 widget_cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().100 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().col_row.total_widget_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#total_widget_ratio.;
172 let widget_width_percentage_end =
173 (widget_cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().widget_ratio) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().100 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().col_row.total_widget_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#total_widget_ratio.;
174
175 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(current_row) = layout_mapping
176 .getrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]get().(&(row_height_percentage_start, row_height_percentage_end))
177 {
178 // First check for within the same col_row for left and right
179 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(current_col) = current_row
180 .1
181 .getrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]get().(&(col_width_percentage_start, col_width_percentage_end))
182 && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(current_col_row) = current_col.1.getrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]get().(&(
183 col_row_height_percentage_start,
184 col_row_height_percentage_end,
185 ))
186 {
187 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(to_left_widget) = current_col_row
188 .1
189 .rangerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]range().(
190 ..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#(
191 widget_width_percentage_start,
192 widget_width_percentage_start,
193 ),
194 )
195 .next_backrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`Range<'a, K, V>`][DoubleEndedIterator]next_back().()
196 {
197 widget.left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#left_neighbour. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().to_left_widget.1);
198 }
199
200 // Right
201 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(to_right_neighbour) = current_col_row
202 .1
203 .rangerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]range().(
204 (
205 widget_width_percentage_end,
206 widget_width_percentage_end,
207 )..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#,
208 )
209 .nextrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`Range<'a, K, V>`][Iterator]next().()
210 {
211 widget.right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#right_neighbour. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().to_right_neighbour.1);
212 }
213 }
214
215 if widget.left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#left_neighbour..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().()
216 && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(to_left_col) = current_row
217 .1
218 .rangerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]range().(
219 ..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#(col_width_percentage_start, col_width_percentage_start),
220 )
221 .next_backrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`Range<'a, K, V>`][DoubleEndedIterator]next_back().()
222 {
223 // Check left in same row
224 let mut current_best_distance = 0;
225 let mut current_best_widget_id = widget.widget_idrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_id.;
226
227 for widget_position in &(to_left_col.1).1 {
228 let candidate_start = (widget_position.0).0;
229 let candidate_end = (widget_position.0).1;
230
231 if is_intersectingrust-analyzer cargo bottom 0.14.9 app/layout_manager/is_intersecting().(
232 (
233 col_row_height_percentage_start,
234 col_row_height_percentage_end,
235 ),
236 (candidate_start, candidate_end),
237 ) {
238 let candidate_distance = get_distancerust-analyzer cargo bottom 0.14.9 app/layout_manager/get_distance().(
239 (
240 col_row_height_percentage_start,
241 col_row_height_percentage_end,
242 ),
243 (candidate_start, candidate_end),
244 );
245
246 if current_best_distance rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().candidate_distance
247 && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_best_widget) =
248 (widget_position.1).1.iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]iter().().next_backrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`Iter<'a, K, V>`][DoubleEndedIterator]next_back().()
249 {
250 current_best_distance = candidate_distance rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().1;
251 current_best_widget_id = *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().(new_best_widget.1);
252 }
253 }
254 }
255 if current_best_distance rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]gt().0 {
256 widget.left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#left_neighbour. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(current_best_widget_id);
257 }
258 }
259
260 if widget.right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#right_neighbour..is_nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_none().()
261 && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(to_right_col) = current_row
262 .1
263 .rangerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]range().((col_width_percentage_end, col_width_percentage_end)..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#)
264 .nextrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`Range<'a, K, V>`][Iterator]next().()
265 {
266 // Check right in same row
267 let mut current_best_distance = 0;
268 let mut current_best_widget_id = widget.widget_idrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_id.;
269
270 for widget_position in &(to_right_col.1).1 {
271 let candidate_start = (widget_position.0).0;
272 let candidate_end = (widget_position.0).1;
273
274 if is_intersectingrust-analyzer cargo bottom 0.14.9 app/layout_manager/is_intersecting().(
275 (
276 col_row_height_percentage_start,
277 col_row_height_percentage_end,
278 ),
279 (candidate_start, candidate_end),
280 ) {
281 let candidate_distance = get_distancerust-analyzer cargo bottom 0.14.9 app/layout_manager/get_distance().(
282 (
283 col_row_height_percentage_start,
284 col_row_height_percentage_end,
285 ),
286 (candidate_start, candidate_end),
287 );
288
289 if current_best_distance rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().candidate_distance
290 && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_best_widget) =
291 (widget_position.1).1.iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]iter().().nextrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`Iter<'a, K, V>`][Iterator]next().()
292 {
293 current_best_distance = candidate_distance rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().1;
294 current_best_widget_id = *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().(new_best_widget.1);
295 }
296 }
297 }
298 if current_best_distance rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]gt().0 {
299 widget.right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#right_neighbour. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(current_best_widget_id);
300 }
301 }
302
303 // Check up/down within same row;
304 // else check up/down with other rows
305 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(current_col) = current_row
306 .1
307 .getrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]get().(&(col_width_percentage_start, col_width_percentage_end))
308 {
309 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(to_up) = current_col
310 .1
311 .rangerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]range().(
312 ..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#(
313 col_row_height_percentage_start,
314 col_row_height_percentage_start,
315 ),
316 )
317 .next_backrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`Range<'a, K, V>`][DoubleEndedIterator]next_back().()
318 {
319 // Now check each widget_width and pick the best
320 for candidate_widget in &(to_up.1).1 {
321 let mut current_best_distance = 0;
322 let mut current_best_widget_id = widget.widget_idrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_id.;
323 if is_intersectingrust-analyzer cargo bottom 0.14.9 app/layout_manager/is_intersecting().(
324 (
325 widget_width_percentage_start,
326 widget_width_percentage_end,
327 ),
328 ((candidate_widget.0).0, (candidate_widget.0).1),
329 ) {
330 let candidate_best_distance = get_distancerust-analyzer cargo bottom 0.14.9 app/layout_manager/get_distance().(
331 (
332 widget_width_percentage_start,
333 widget_width_percentage_end,
334 ),
335 ((candidate_widget.0).0, (candidate_widget.0).1),
336 );
337
338 if current_best_distance rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().candidate_best_distance {
339 current_best_distance = candidate_best_distance rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().1;
340 current_best_widget_id = *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().candidate_widget.1;
341 }
342 }
343
344 if current_best_distance rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]gt().0 {
345 widget.up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#up_neighbour. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(current_best_widget_id);
346 }
347 }
348 } else {
349 for next_row_up in layout_mapping
350 .rangerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]range().(
351 ..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeTo#(
352 row_height_percentage_start,
353 row_height_percentage_start,
354 ),
355 )
356 .revrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#rev().()
357 {
358 let mut current_best_distance = 0;
359 let mut current_best_widget_id = widget.widget_idrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_id.;
360 let (target_start_width, target_end_width) =
361 if col_row_children_len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().1 {
362 (
363 col_width_percentage_start
364 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().widget_width_percentage_start
365 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().(col_width_percentage_end
366 -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub().col_width_percentage_start)
367 /rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().100,
368 col_width_percentage_start
369 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().widget_width_percentage_end
370 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().(col_width_percentage_end
371 -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub().col_width_percentage_start)
372 /rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().100,
373 )
374 } else {
375 (
376 col_width_percentage_start,
377 col_width_percentage_end,
378 )
379 };
380
381 for col_position in &(next_row_up.1).1 {
382 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(next_col_row) =
383 (col_position.1).1.iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]iter().().next_backrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`Iter<'a, K, V>`][DoubleEndedIterator]next_back().()
384 {
385 let (candidate_col_start, candidate_col_end) =
386 ((col_position.0).0, (col_position.0).1);
387 let candidate_difference =
388 candidate_col_end rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub().candidate_col_start;
389 for candidate_widget in &(next_col_row.1).1 {
390 let candidate_start = candidate_col_start
391 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().(candidate_widget.0).0
392 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().candidate_difference
393 /rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().100;
394 let candidate_end = candidate_col_start
395 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().(candidate_widget.0).1
396 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().candidate_difference
397 /rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().100;
398
399 if is_intersectingrust-analyzer cargo bottom 0.14.9 app/layout_manager/is_intersecting().(
400 (target_start_width, target_end_width),
401 (candidate_start, candidate_end),
402 ) {
403 let candidate_distance = get_distancerust-analyzer cargo bottom 0.14.9 app/layout_manager/get_distance().(
404 (target_start_width, target_end_width),
405 (candidate_start, candidate_end),
406 );
407
408 if current_best_distance
409 <rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().candidate_distance
410 {
411 current_best_distance =
412 candidate_distance rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().1;
413 current_best_widget_id =
414 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().(candidate_widget.1);
415 }
416 }
417 }
418 }
419 }
420
421 if current_best_distance rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]gt().0 {
422 widget.up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#up_neighbour. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(current_best_widget_id);
423 break;
424 }
425 }
426 }
427
428 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(to_down) = current_col
429 .1
430 .rangerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]range().(
431 (
432 col_row_height_percentage_start rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().1,
433 col_row_height_percentage_start rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().1,
434 )..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#,
435 )
436 .nextrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`Range<'a, K, V>`][Iterator]next().()
437 {
438 for candidate_widget in &(to_down.1).1 {
439 let mut current_best_distance = 0;
440 let mut current_best_widget_id = widget.widget_idrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_id.;
441 if is_intersectingrust-analyzer cargo bottom 0.14.9 app/layout_manager/is_intersecting().(
442 (
443 widget_width_percentage_start,
444 widget_width_percentage_end,
445 ),
446 ((candidate_widget.0).0, (candidate_widget.0).1),
447 ) {
448 let candidate_best_distance = get_distancerust-analyzer cargo bottom 0.14.9 app/layout_manager/get_distance().(
449 (
450 widget_width_percentage_start,
451 widget_width_percentage_end,
452 ),
453 ((candidate_widget.0).0, (candidate_widget.0).1),
454 );
455
456 if current_best_distance rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().candidate_best_distance {
457 current_best_distance = candidate_best_distance rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().1;
458 current_best_widget_id = *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().candidate_widget.1;
459 }
460 }
461
462 if current_best_distance rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]gt().0 {
463 widget.down_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#down_neighbour. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(current_best_widget_id);
464 }
465 }
466 } else {
467 for next_row_down in layout_mapping.rangerust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]range().(
468 (
469 row_height_percentage_start rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().1,
470 row_height_percentage_start rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().1,
471 )..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFrom#,
472 ) {
473 let mut current_best_distance = 0;
474 let mut current_best_widget_id = widget.widget_idrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_id.;
475 let (target_start_width, target_end_width) =
476 if col_row_children_len rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().1 {
477 (
478 col_width_percentage_start
479 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().widget_width_percentage_start
480 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().(col_width_percentage_end
481 -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub().col_width_percentage_start)
482 /rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().100,
483 col_width_percentage_start
484 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().widget_width_percentage_end
485 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().(col_width_percentage_end
486 -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub().col_width_percentage_start)
487 /rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().100,
488 )
489 } else {
490 (
491 col_width_percentage_start,
492 col_width_percentage_end,
493 )
494 };
495
496 for col_position in &(next_row_down.1).1 {
497 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(next_col_row) =
498 (col_position.1).1.iterrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`BTreeMap<K, V, A>`]iter().().nextrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc collections/btree/map/impl#[`Iter<'a, K, V>`][Iterator]next().()
499 {
500 let (candidate_col_start, candidate_col_end) =
501 ((col_position.0).0, (col_position.0).1);
502 let candidate_difference =
503 candidate_col_end rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Sub<Self>`]sub().candidate_col_start;
504 for candidate_widget in &(next_col_row.1).1 {
505 let candidate_start = candidate_col_start
506 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().(candidate_widget.0).0
507 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().candidate_difference
508 /rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().100;
509 let candidate_end = candidate_col_start
510 +rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().(candidate_widget.0).1
511 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Mul<Self>`]mul().candidate_difference
512 /rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Div<Self>`]div().100;
513
514 if is_intersectingrust-analyzer cargo bottom 0.14.9 app/layout_manager/is_intersecting().(
515 (target_start_width, target_end_width),
516 (candidate_start, candidate_end),
517 ) {
518 let candidate_distance = get_distancerust-analyzer cargo bottom 0.14.9 app/layout_manager/get_distance().(
519 (target_start_width, target_end_width),
520 (candidate_start, candidate_end),
521 );
522
523 if current_best_distance
524 <rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]lt().candidate_distance
525 {
526 current_best_distance =
527 candidate_distance rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`Add<Self>`]add().1;
528 current_best_widget_id =
529 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().(candidate_widget.1);
530 }
531 }
532 }
533 }
534 }
535
536 if current_best_distance rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialOrd<Self>`]gt().0 {
537 widget.down_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#down_neighbour. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(current_best_widget_id);
538 break;
539 }
540 }
541 }
542 }
543 }
544 widget_cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().widget_ratio;
545 }
546 col_row_cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().col_row.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#constraint..ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[Constraint][Ratio]ratio().();
547 }
548 col_cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().col.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#constraint..ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[Constraint][Ratio]ratio().();
549 }
550 height_cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`AddAssign<Self>`]add_assign().row.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#constraint..ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[Constraint][Ratio]ratio().();
551 }
552 }
553
554 pub fn init_basic_defaultrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomLayout]init_basic_default().(use_battery: bool) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomLayout] {
555 let table_widgets = if use_battery {
556 let disk_widget = BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]new().(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Diskrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Disk#, 4)
557 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]canvas_handled().()
558 .up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]up_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(100))
559 .left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]left_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(8))
560 .right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]right_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().2));
561
562 let proc_sort = BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]new().(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort#, DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().2)
563 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]canvas_handled().()
564 .up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]up_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(100))
565 .down_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]down_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().1))
566 .left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]left_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(4))
567 .right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]right_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID.))
568 .ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]ratio().(1)
569 .parent_reflectorrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]parent_reflector().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Rightrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Right#, 2)));
570
571 let proc = BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]new().(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc#, DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID.)
572 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]canvas_handled().()
573 .up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]up_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(100))
574 .down_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]down_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().1))
575 .left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]left_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().2))
576 .right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]right_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(7))
577 .ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]ratio().(2);
578
579 let proc_search =
580 BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]new().(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch#, DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().1)
581 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]canvas_handled().()
582 .up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]up_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID.))
583 .left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]left_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(4))
584 .right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]right_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(7))
585 .parent_reflectorrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]parent_reflector().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Uprust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Up#, 1)));
586
587 let temp = BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]new().(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Temprust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Temp#, 7)
588 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]canvas_handled().()
589 .up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]up_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(100))
590 .left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]left_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID.))
591 .right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]right_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(8));
592
593 let battery = BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]new().(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Batteryrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Battery#, 8)
594 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]canvas_handled().()
595 .up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]up_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(100))
596 .left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]left_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(7))
597 .right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]right_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(4));
598
599 vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
600 BottomColrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![BottomColRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![disk_widget]).canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]canvas_handled().()])
601 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]canvas_handled().(),
602 BottomColrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
603 BottomColRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![proc_sort, proc])
604 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]canvas_handled().()
605 .total_widget_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]total_widget_ratio().(3),
606 BottomColRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![proc_search]).canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]canvas_handled().(),
607 ])
608 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]canvas_handled().(),
609 BottomColrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![BottomColRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![temp]).canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]canvas_handled().()])
610 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]canvas_handled().(),
611 BottomColrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![BottomColRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![battery]).canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]canvas_handled().()])
612 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]canvas_handled().(),
613 ]
614 } else {
615 let disk = BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]new().(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Diskrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Disk#, 4)
616 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]canvas_handled().()
617 .up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]up_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(100))
618 .left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]left_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(7))
619 .right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]right_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().2));
620
621 let proc_sort = BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]new().(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort#, DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().2)
622 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]canvas_handled().()
623 .up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]up_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(100))
624 .down_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]down_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().1))
625 .left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]left_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(4))
626 .right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]right_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID.))
627 .parent_reflectorrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]parent_reflector().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Rightrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Right#, 2)));
628
629 let proc = BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]new().(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc#, DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID.)
630 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]canvas_handled().()
631 .up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]up_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(100))
632 .down_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]down_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().1))
633 .left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]left_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().2))
634 .right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]right_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(7));
635
636 let proc_search =
637 BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]new().(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch#, DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Add<Self>`]add().1)
638 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]canvas_handled().()
639 .up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]up_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID.))
640 .left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]left_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(4))
641 .right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]right_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(7))
642 .parent_reflectorrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]parent_reflector().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Uprust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Up#, 1)));
643
644 let temp = BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]new().(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Temprust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Temp#, 7)
645 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]canvas_handled().()
646 .up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]up_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(100))
647 .left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]left_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(DEFAULT_WIDGET_IDrust-analyzer cargo bottom 0.14.9 constants/DEFAULT_WIDGET_ID.))
648 .right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]right_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(4));
649
650 vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
651 BottomColrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![BottomColRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![disk]).canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]canvas_handled().()])
652 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]canvas_handled().(),
653 BottomColrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
654 BottomColRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![proc_sort, proc]).canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]canvas_handled().(),
655 BottomColRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![proc_search]).canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]canvas_handled().(),
656 ])
657 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]canvas_handled().(),
658 BottomColrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![BottomColRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![temp]).canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]canvas_handled().()])
659 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]canvas_handled().(),
660 ]
661 };
662
663 let cpu = BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]new().(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::BasicCpurust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#BasicCpu#, 1)
664 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]canvas_handled().()
665 .down_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]down_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(2));
666
667 let mem = BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]new().(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::BasicMemrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#BasicMem#, 2)
668 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]canvas_handled().()
669 .up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]up_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(1))
670 .down_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]down_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(100))
671 .right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]right_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(3));
672
673 let net = BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]new().(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::BasicNetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#BasicNet#, 3)
674 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]canvas_handled().()
675 .up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]up_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(1))
676 .down_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]down_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(100))
677 .left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]left_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(2));
678
679 let table = BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]new().(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::BasicTablesrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#BasicTables#, 100)
680 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]canvas_handled().()
681 .up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]up_neighbour().(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(2));
682
683 BottomLayoutrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomLayout# {
684 total_row_height_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomLayout#total_row_height_ratio.: 3,
685 rowsrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomLayout#rows.: vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
686 BottomRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomRow]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
687 BottomColrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![BottomColRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![cpu]).canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]canvas_handled().()])
688 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]canvas_handled().(),
689 ])
690 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomRow]canvas_handled().(),
691 BottomRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomRow]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
692 BottomColrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![BottomColRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![mem, net]).canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]canvas_handled().()])
693 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]canvas_handled().(),
694 ])
695 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomRow]canvas_handled().(),
696 BottomRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomRow]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![
697 BottomColrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![BottomColRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![table]).canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]canvas_handled().()])
698 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]canvas_handled().(),
699 ])
700 .canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomRow]canvas_handled().(),
701 BottomRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#::newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomRow]new().(table_widgets).canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomRow]canvas_handled().(),
702 ],
703 }
704 }
705 }
706
707 /// Represents a single row in the layout.
708 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
709 pub struct BottomRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow# {
710 pub childrenrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#children.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<BottomColrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#>,
711 pub total_col_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#total_col_ratio.: u16,
712 pub constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#constraint.: Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#,
713 }
714
715 impl BottomRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow# {
716 pub fn newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomRow]new().(children: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<BottomColrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#>) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomRow] {
717 Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomRow] {
718 childrenrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#children.,
719 total_col_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#total_col_ratio.: 1,
720 constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#constraint.: Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Fillrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Fill#(1),
721 }
722 }
723
724 pub fn total_col_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomRow]total_col_ratio().(mut self, total_col_ratio: u16) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomRow] {
725 self.total_col_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#total_col_ratio. = total_col_ratio;
726 self
727 }
728
729 pub fn ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomRow]ratio().(mut self, value: u16) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomRow] {
730 self.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#constraint. = Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Fillrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Fill#(value);
731 self
732 }
733
734 pub fn canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomRow]canvas_handled().(mut self) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomRow] {
735 self.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomRow#constraint. = Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Lengthrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Length#(0);
736 self
737 }
738 }
739
740 /// Represents a single column in the layout. We assume that even if the column
741 /// contains only ONE element, it is still a column (rather than either a col or
742 /// a widget, as per the config, for simplicity's sake).
743 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
744 pub struct BottomColrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol# {
745 pub childrenrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#children.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<BottomColRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#>,
746 pub total_col_row_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#total_col_row_ratio.: u16,
747 pub constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#constraint.: Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#,
748 }
749
750 impl BottomColrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol# {
751 pub fn newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]new().(children: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<BottomColRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#>) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol] {
752 Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol] {
753 childrenrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#children.,
754 total_col_row_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#total_col_row_ratio.: 1,
755 constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#constraint.: Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Fillrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Fill#(1),
756 }
757 }
758
759 pub fn total_col_row_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]total_col_row_ratio().(mut self, total_col_row_ratio: u16) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol] {
760 self.total_col_row_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#total_col_row_ratio. = total_col_row_ratio;
761 self
762 }
763
764 pub fn ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]ratio().(mut self, value: u16) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol] {
765 self.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#constraint. = Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Fillrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Fill#(value);
766 self
767 }
768
769 pub fn canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol]canvas_handled().(mut self) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomCol] {
770 self.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomCol#constraint. = Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Lengthrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Length#(0);
771 self
772 }
773 }
774
775 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:)]
776 pub struct BottomColRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow# {
777 pub childrenrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#children.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#>,
778 pub total_widget_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#total_widget_ratio.: u16,
779 pub constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#constraint.: Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#,
780 }
781
782 impl BottomColRowrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow# {
783 pub(craterust-analyzer cargo bottom 0.14.9 crate/) fn newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]new().(children: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#>) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow] {
784 Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow] {
785 childrenrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#children.,
786 total_widget_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#total_widget_ratio.: 1,
787 constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#constraint.: Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Fillrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Fill#(1),
788 }
789 }
790
791 pub(craterust-analyzer cargo bottom 0.14.9 crate/) fn total_widget_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]total_widget_ratio().(mut self, total_widget_ratio: u16) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow] {
792 self.total_widget_ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#total_widget_ratio. = total_widget_ratio;
793 self
794 }
795
796 pub fn ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]ratio().(mut self, value: u16) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow] {
797 self.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#constraint. = Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Fillrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Fill#(value);
798 self
799 }
800
801 pub fn canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]canvas_handled().(mut self) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow] {
802 self.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#constraint. = Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Lengthrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Length#(0);
803 self
804 }
805
806 pub fn growrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow]grow().(mut self, minimum: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u16>) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomColRow] {
807 self.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomColRow#constraint. = Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Minrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Min#(minimum.unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().(0));
808 self
809 }
810 }
811
812 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:)]
813 pub enum WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection# {
814 Leftrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Left#,
815 Rightrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Right#,
816 Uprust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Up#,
817 Downrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Down#,
818 }
819
820 impl WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection# {
821 pub fn is_oppositerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[WidgetDirection]is_opposite().(&self, other_direction: &WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#) -> bool {
822 let to_compare = match &self {
823 WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Leftrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Left# => WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Rightrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Right#,
824 WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Rightrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Right# => WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Leftrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Left#,
825 WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Uprust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Up# => WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Downrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Down#,
826 WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Downrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Down# => WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Uprust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Up#,
827 };
828
829 *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().other_direction rust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[WidgetDirection][`PartialEq<Self>`]eq().==rust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[WidgetDirection][`PartialEq<Self>`]eq(). rust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[WidgetDirection][`PartialEq<Self>`]eq().to_compare
830 }
831 }
832
833 /// Represents a single widget.
834 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:)]
835 pub struct BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget# {
836 pub widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type.: BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#,
837 pub widget_idrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_id.: u64,
838 pub constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#constraint.: Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#,
839 pub left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#left_neighbour.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u64>,
840 pub right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#right_neighbour.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u64>,
841 pub up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#up_neighbour.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u64>,
842 pub down_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#down_neighbour.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u64>,
843
844 /// The value is the direction to bounce, as well as the parent offset.
845 pub parent_reflectorrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#parent_reflector.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<(WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#, u64)>,
846
847 /// Top left corner when drawn, for mouse click detection. (x, y)
848 ///
849 /// TODO: Replace this with just an Option<Rect> for top + bottom.
850 pub top_left_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#top_left_corner.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<(u16, u16)>,
851
852 /// Bottom right corner when drawn, for mouse click detection. (x, y)
853 pub bottom_right_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#bottom_right_corner.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<(u16, u16)>,
854
855 /// TODO: REMOVE THIS LATER. This is temporary code to bridge the
856 /// old layout system with a newer system later.
857 ratio_overriderust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#ratio_override.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u16>,
858 }
859
860 impl BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget# {
861 pub(craterust-analyzer cargo bottom 0.14.9 crate/) fn newrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]new().(widget_type: BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#, widget_id: u64) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget] {
862 Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget] {
863 widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type.,
864 widget_idrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_id.,
865 constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#constraint.: Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Fillrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Fill#(1),
866 left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#left_neighbour.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
867 right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#right_neighbour.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
868 up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#up_neighbour.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
869 down_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#down_neighbour.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
870 parent_reflectorrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#parent_reflector.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
871 top_left_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#top_left_corner.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
872 bottom_right_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#bottom_right_corner.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
873 ratio_overriderust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#ratio_override.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#,
874 }
875 }
876
877 pub(craterust-analyzer cargo bottom 0.14.9 crate/) fn left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]left_neighbour().(mut self, left_neighbour: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u64>) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget] {
878 self.left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#left_neighbour. = left_neighbour;
879 self
880 }
881
882 pub(craterust-analyzer cargo bottom 0.14.9 crate/) fn right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]right_neighbour().(mut self, right_neighbour: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u64>) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget] {
883 self.right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#right_neighbour. = right_neighbour;
884 self
885 }
886
887 pub(craterust-analyzer cargo bottom 0.14.9 crate/) fn up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]up_neighbour().(mut self, up_neighbour: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u64>) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget] {
888 self.up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#up_neighbour. = up_neighbour;
889 self
890 }
891
892 pub(craterust-analyzer cargo bottom 0.14.9 crate/) fn down_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]down_neighbour().(mut self, down_neighbour: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u64>) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget] {
893 self.down_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#down_neighbour. = down_neighbour;
894 self
895 }
896
897 pub(craterust-analyzer cargo bottom 0.14.9 crate/) fn ratiorust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]ratio().(mut self, value: u16) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget] {
898 self.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#constraint. = Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Fillrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Fill#(value);
899 self
900 }
901
902 pub fn canvas_handledrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]canvas_handled().(mut self) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget] {
903 self.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#constraint. = Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Lengthrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Length#(0);
904 self
905 }
906
907 pub fn growrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]grow().(mut self, minimum: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<u16>) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget] {
908 self.constraintrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#constraint. = Constraintrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#::Minrust-analyzer cargo ratatui-core 0.1.2 layout/constraint/Constraint#Min#(minimum.unwrap_orrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or().(0));
909 self
910 }
911
912 /// TODO: REMOVE THIS LATER. This is temporary code to bridge the
913 /// old layout system with a newer system later.
914 pub fn with_ratio_overriderust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]with_ratio_override().(mut self, ratio_override: u16) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget] {
915 self.ratio_overriderust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#ratio_override. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(ratio_override);
916 self
917 }
918
919 pub(craterust-analyzer cargo bottom 0.14.9 crate/) fn parent_reflectorrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget]parent_reflector().(
920 mut self, parent_reflector: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<(WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#, u64)>,
921 ) -> Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget] {
922 self.parent_reflectorrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#parent_reflector. = parent_reflector;
923 self
924 }
925 }
926
927 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Hashrust-analyzer cargo core https://github.com/rust-lang/rust/library/core hash/macros/Hash:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)]
928 pub enum BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType# {
929 #[defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/default:]
930 Emptyrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Empty#,
931 Cpurust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Cpu#,
932 CpuLegendrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#CpuLegend#,
933 Memrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Mem#,
934 Netrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Net#,
935 Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc#,
936 ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch#,
937 ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort#,
938 Temprust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Temp#,
939 TempGraphrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#TempGraph#,
940 Diskrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Disk#,
941 DiskIoGraphrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#DiskIoGraph#,
942 BasicCpurust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#BasicCpu#,
943 BasicMemrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#BasicMem#,
944 BasicNetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#BasicNet#,
945 BasicTablesrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#BasicTables#,
946 Batteryrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Battery#,
947 }
948
949 impl BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType# {
950 pub fn is_widget_tablerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType]is_widget_table().(&self) -> bool {
951 use BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::*;
952 matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/matches!!(self, Diskrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Disk# | Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# | ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# | Temprust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Temp# | CpuLegendrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#CpuLegend#)
953 }
954
955 pub fn is_widget_graphrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType]is_widget_graph().(&self) -> bool {
956 use BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::*;
957 matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/matches!!(self, Cpurust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Cpu# | Netrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Net# | Memrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Mem# | TempGraphrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#TempGraph# | DiskIoGraphrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#DiskIoGraph#)
958 }
959
960 pub fn get_pretty_namerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType]get_pretty_name().(&self) -> &str {
961 use BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::*;
962 match self {
963 Cpurust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Cpu# => "CPU",
964 Memrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Mem# => "Memory",
965 Netrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Net# => "Network",
966 Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# => "Processes",
967 Temprust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Temp# => "Temperature",
968 Diskrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Disk# => "Disks",
969 Batteryrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Battery# => "Battery",
970 TempGraphrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#TempGraph# => "Temperature",
971 _ => "",
972 }
973 }
974 }
975
976 impl stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/::FromStrrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/traits/FromStr# for BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType# {
977 type Errrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType][FromStr]Err# = OptionErrorrust-analyzer cargo bottom 0.14.9 options/error/OptionError#;
978
979 fn from_strrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType][FromStr]from_str().(s: &str) -> Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType][FromStr], Selfrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType][FromStr]::Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core str/traits/FromStr#Err#> {
980 let lower_case = s.to_lowercaserust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str]to_lowercase().();
981 match lower_case.as_strrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[String]as_str().() {
982 "cpu" => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Cpurust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Cpu#),
983 "mem" | "memory" => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Memrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Mem#),
984 "net" | "network" => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Netrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Net#),
985 "proc" | "process" | "processes" => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc#),
986 "temp" | "temperature" => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Temprust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Temp#),
987 "temp_graph" | "temperature_graph" => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::TempGraphrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#TempGraph#),
988 "disk" => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Diskrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Disk#),
989 "disk_io_graph" => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::DiskIoGraphrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#DiskIoGraph#),
990 "empty" => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Emptyrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Empty#),
991 #[cfg(feature = "battery")]
992 "battery" | "batt" => Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Batteryrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Battery#),
993 _ => {
994 #[cfg(feature = "battery")]
995 {
996 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(OptionErrorrust-analyzer cargo bottom 0.14.9 options/error/OptionError#::configrust-analyzer cargo bottom 0.14.9 options/error/impl#[OptionError]config().(formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!(
997 "'{s}' is an invalid widget name.
998
999 Supported widget names:
1000 +--------------------------------+
1001 | cpu |
1002 +--------------------------------+
1003 | mem, memory |
1004 +--------------------------------+
1005 | net, network |
1006 +--------------------------------+
1007 | proc, process, processes |
1008 +--------------------------------+
1009 | temp, temperature |
1010 +--------------------------------+
1011 | temp_graph, temperature_graph |
1012 +--------------------------------+
1013 | disk |
1014 +--------------------------------+
1015 | disk_io_graph |
1016 +--------------------------------+
1017 | batt, battery |
1018 +--------------------------------+
1019 | empty |
1020 +--------------------------------+
1021 ",
1022 )))
1023 }
1024 #[cfg(not(feature = "battery"))]
1025 {
1026 Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(OptionErrorrust-analyzer cargo bottom 0.14.9 options/error/OptionError#::config(formatrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/format!!(
1027 "'{s}' is an invalid widget name.
1028
1029 Supported widget names:
1030 +--------------------------------+
1031 | cpu |
1032 +--------------------------------+
1033 | mem, memory |
1034 +--------------------------------+
1035 | net, network |
1036 +--------------------------------+
1037 | proc, process, processes |
1038 +--------------------------------+
1039 | temp, temperature |
1040 +--------------------------------+
1041 | temp_graph, temperature_graph |
1042 +--------------------------------+
1043 | disk |
1044 +--------------------------------+
1045 | disk_io_graph |
1046 +--------------------------------+
1047 | empty |
1048 +--------------------------------+
1049 ",
1050 )))
1051 }
1052 }
1053 }
1054 }
1055 }
1056
1057 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:)]
1058 pub struct UsedWidgetsrust-analyzer cargo bottom 0.14.9 app/layout_manager/UsedWidgets# {
1059 pub use_cpurust-analyzer cargo bottom 0.14.9 app/layout_manager/UsedWidgets#use_cpu.: bool,
1060 pub use_memrust-analyzer cargo bottom 0.14.9 app/layout_manager/UsedWidgets#use_mem.: bool,
1061 pub use_cacherust-analyzer cargo bottom 0.14.9 app/layout_manager/UsedWidgets#use_cache.: bool,
1062 pub use_gpurust-analyzer cargo bottom 0.14.9 app/layout_manager/UsedWidgets#use_gpu.: bool,
1063 pub use_netrust-analyzer cargo bottom 0.14.9 app/layout_manager/UsedWidgets#use_net.: bool,
1064 pub use_procrust-analyzer cargo bottom 0.14.9 app/layout_manager/UsedWidgets#use_proc.: bool,
1065 pub use_diskrust-analyzer cargo bottom 0.14.9 app/layout_manager/UsedWidgets#use_disk.: bool,
1066 pub use_temprust-analyzer cargo bottom 0.14.9 app/layout_manager/UsedWidgets#use_temp.: bool,
1067 pub use_temp_graphrust-analyzer cargo bottom 0.14.9 app/layout_manager/UsedWidgets#use_temp_graph.: bool,
1068 pub use_disk_io_graphrust-analyzer cargo bottom 0.14.9 app/layout_manager/UsedWidgets#use_disk_io_graph.: bool,
1069 pub use_batteryrust-analyzer cargo bottom 0.14.9 app/layout_manager/UsedWidgets#use_battery.: bool,
1070 }