Debian Codegraph @

src/canvas/widgets/temperature_table.rs

raw symbols SCIP
1 use ratatuirust-analyzer cargo ratatui 0.30.2 crate/::{Framerust-analyzer cargo ratatui-core 0.1.2 terminal/frame/Frame#, layoutrust-analyzer cargo ratatui-core 0.1.2 layout/::Rectrust-analyzer cargo ratatui-core 0.1.2 layout/rect/Rect#};
2
3 use craterust-analyzer cargo bottom 0.14.9 crate/::{
4 apprust-analyzer cargo bottom 0.14.9 app/,
5 canvasrust-analyzer cargo bottom 0.14.9 canvas/::{
6 Painterrust-analyzer cargo bottom 0.14.9 canvas/Painter#,
7 componentsrust-analyzer cargo bottom 0.14.9 canvas/components/::data_tablerust-analyzer cargo bottom 0.14.9 canvas/components/data_table/::{DrawInforust-analyzer cargo bottom 0.14.9 canvas/components/data_table/draw/DrawInfo#, SelectionStaterust-analyzer cargo bottom 0.14.9 canvas/components/data_table/draw/SelectionState#},
8 },
9 };
10
11 impl Painterrust-analyzer cargo bottom 0.14.9 canvas/Painter# {
12 pub fn draw_temp_tablerust-analyzer cargo bottom 0.14.9 canvas/widgets/temperature_table/impl#[Painter]draw_temp_table().(
13 &self, f: &mut Framerust-analyzer cargo ratatui-core 0.1.2 terminal/frame/Frame#<'_>, app_state: &mut apprust-analyzer cargo bottom 0.14.9 app/::Apprust-analyzer cargo bottom 0.14.9 app/App#, draw_loc: Rectrust-analyzer cargo ratatui-core 0.1.2 layout/rect/Rect#, widget_id: u64,
14 ) {
15 let recalculate_column_widths = app_state.should_get_widget_boundsrust-analyzer cargo bottom 0.14.9 app/impl#[App]should_get_widget_bounds().();
16 if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(temp_widget_state) = app_state
17 .statesrust-analyzer cargo bottom 0.14.9 app/App#states.
18 .temp_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#temp_state.
19 .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/TempState#widget_states.
20 .get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&widget_id)
21 {
22 let is_on_widget = app_state.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_idrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_id. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialEq<Self>`]eq().widget_id;
23
24 let draw_info = DrawInforust-analyzer cargo bottom 0.14.9 canvas/components/data_table/draw/DrawInfo# {
25 locrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/draw/DrawInfo#loc.: draw_loc,
26 force_redrawrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/draw/DrawInfo#force_redraw.: app_state.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw.,
27 recalculate_column_widthsrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/draw/DrawInfo#recalculate_column_widths.,
28 selection_staterust-analyzer cargo bottom 0.14.9 canvas/components/data_table/draw/DrawInfo#selection_state.: SelectionStaterust-analyzer cargo bottom 0.14.9 canvas/components/data_table/draw/SelectionState#::newrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/draw/impl#[SelectionState]new().(app_state.is_expandedrust-analyzer cargo bottom 0.14.9 app/App#is_expanded., is_on_widget),
29 };
30
31 temp_widget_state.tablerust-analyzer cargo bottom 0.14.9 widgets/temperature_table/TempWidgetState#table..drawrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/draw/impl#[`DataTable<DataType, H, S, C>`]draw().(
32 f,
33 &draw_info,
34 app_state.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&widget_id),
35 self,
36 );
37 }
38 }
39 }