| 1 | pub mod datarust-analyzer cargo bottom 0.14.9 app/data/; |
| 2 | pub mod filterrust-analyzer cargo bottom 0.14.9 app/filter/; |
| 3 | pub mod layout_managerrust-analyzer cargo bottom 0.14.9 app/layout_manager/; |
| 4 | pub mod statesrust-analyzer cargo bottom 0.14.9 app/states/; |
| 5 | |
| 6 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::timerust-analyzer cargo std https://github.com/rust-lang/rust/library/std time/::Instantrust-analyzer cargo std https://github.com/rust-lang/rust/library/std time/Instant#; |
| 7 | |
| 8 | use datarust-analyzer cargo bottom 0.14.9 app/data/::*; |
| 9 | use filterrust-analyzer cargo bottom 0.14.9 app/filter/::*; |
| 10 | use layout_managerrust-analyzer cargo bottom 0.14.9 app/layout_manager/::*; |
| 11 | use rustc_hashrust-analyzer cargo rustc-hash 2.1.3 crate/::FxHashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap# as HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#; |
| 12 | pub use statesrust-analyzer cargo bottom 0.14.9 app/states/::*; |
| 13 | |
| 14 | use craterust-analyzer cargo bottom 0.14.9 crate/::{ |
| 15 | canvasrust-analyzer cargo bottom 0.14.9 canvas/::{ |
| 16 | componentsrust-analyzer cargo bottom 0.14.9 canvas/components/::{data_tablerust-analyzer cargo bottom 0.14.9 canvas/components/data_table/::SortOrderrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/sortable/SortOrder#, time_seriesrust-analyzer cargo bottom 0.14.9 canvas/components/time_series/::LegendPositionrust-analyzer cargo bottom 0.14.9 canvas/components/time_series/vendored/LegendPosition#}, |
| 17 | dialogsrust-analyzer cargo bottom 0.14.9 canvas/dialogs/::process_kill_dialogrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/::ProcessKillDialogrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/ProcessKillDialog#, |
| 18 | }, |
| 19 | componentsrust-analyzer cargo bottom 0.14.9 components/::time_seriesrust-analyzer cargo bottom 0.14.9 components/time_series/::TimeseriesStaterust-analyzer cargo bottom 0.14.9 components/time_series/TimeseriesState#, |
| 20 | constantsrust-analyzer cargo bottom 0.14.9 constants/, |
| 21 | optionsrust-analyzer cargo bottom 0.14.9 options/::configrust-analyzer cargo bottom 0.14.9 options/config/::flagsrust-analyzer cargo bottom 0.14.9 options/config/flags/::TableGaprust-analyzer cargo bottom 0.14.9 options/config/flags/TableGap#, |
| 22 | utilsrust-analyzer cargo bottom 0.14.9 utils/::data_unitsrust-analyzer cargo bottom 0.14.9 utils/data_units/::DataUnitrust-analyzer cargo bottom 0.14.9 utils/data_units/DataUnit#, |
| 23 | widgetsrust-analyzer cargo bottom 0.14.9 widgets/::{ |
| 24 | DiskWidgetColumnrust-analyzer cargo bottom 0.14.9 widgets/disk_table/DiskWidgetColumn#, ProcWidgetColumnrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetColumn#, ProcWidgetModerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetMode#, TempWidgetColumnrust-analyzer cargo bottom 0.14.9 widgets/temperature_table/TempWidgetColumn#, TreeCollapsedrust-analyzer cargo bottom 0.14.9 widgets/process_table/TreeCollapsed#, |
| 25 | }, |
| 26 | }; |
| 27 | |
| 28 | #[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:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:)] |
| 29 | pub enum AxisScalingrust-analyzer cargo bottom 0.14.9 app/AxisScaling# { |
| 30 | #[defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/default:] |
| 31 | Logrust-analyzer cargo bottom 0.14.9 app/AxisScaling#Log#, |
| 32 | Linearrust-analyzer cargo bottom 0.14.9 app/AxisScaling#Linear#, |
| 33 | } |
| 34 | |
| 35 | /// AppConfigFields is meant to cover basic fields that would normally be set |
| 36 | /// by config files or launch options. |
| 37 | /// |
| 38 | /// TODO: Clean this up, we probably don't need to have this duplicated. |
| 39 | #[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:)] |
| 40 | #[cfg_attr(test, derive(PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:))] |
| 41 | pub struct AppConfigFieldsrust-analyzer cargo bottom 0.14.9 app/AppConfigFields# { |
| 42 | pub update_raterust-analyzer cargo bottom 0.14.9 app/AppConfigFields#update_rate.: u64, |
| 43 | pub temperature_typerust-analyzer cargo bottom 0.14.9 app/AppConfigFields#temperature_type.: TemperatureTyperust-analyzer cargo bottom 0.14.9 app/data/temperature/TemperatureType#, |
| 44 | pub use_dotrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#use_dot.: bool, |
| 45 | pub cpu_left_legendrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#cpu_left_legend.: bool, |
| 46 | pub show_average_cpurust-analyzer cargo bottom 0.14.9 app/AppConfigFields#show_average_cpu.: bool, // TODO: Unify this in CPU options |
| 47 | pub show_cpu_decimalrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#show_cpu_decimal.: bool, |
| 48 | pub use_current_cpu_totalrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#use_current_cpu_total.: bool, |
| 49 | pub unnormalized_cpurust-analyzer cargo bottom 0.14.9 app/AppConfigFields#unnormalized_cpu.: bool, |
| 50 | pub get_process_threadsrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#get_process_threads.: bool, |
| 51 | pub use_basic_moderust-analyzer cargo bottom 0.14.9 app/AppConfigFields#use_basic_mode.: bool, |
| 52 | pub default_time_valuerust-analyzer cargo bottom 0.14.9 app/AppConfigFields#default_time_value.: u64, |
| 53 | pub time_intervalrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#time_interval.: u64, |
| 54 | pub hide_timerust-analyzer cargo bottom 0.14.9 app/AppConfigFields#hide_time.: bool, |
| 55 | pub autohide_timerust-analyzer cargo bottom 0.14.9 app/AppConfigFields#autohide_time.: bool, |
| 56 | pub use_old_network_legendrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#use_old_network_legend.: bool, |
| 57 | pub table_gaprust-analyzer cargo bottom 0.14.9 app/AppConfigFields#table_gap.: TableGaprust-analyzer cargo bottom 0.14.9 options/config/flags/TableGap#, |
| 58 | pub disable_clickrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#disable_click.: bool, |
| 59 | pub disable_keysrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#disable_keys.: bool, |
| 60 | pub enable_gpurust-analyzer cargo bottom 0.14.9 app/AppConfigFields#enable_gpu.: bool, |
| 61 | pub short_gpu_namesrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#short_gpu_names.: bool, |
| 62 | pub enable_cache_memoryrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#enable_cache_memory.: bool, |
| 63 | pub show_table_scroll_positionrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#show_table_scroll_position.: bool, |
| 64 | pub show_table_scroll_barrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#show_table_scroll_bar.: bool, |
| 65 | #[cfg(any(target_os = "linux", target_os = "macos", target_os = "freebsd"))] |
| 66 | pub is_advanced_killrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#is_advanced_kill.: bool, |
| 67 | pub is_read_onlyrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#is_read_only.: bool, |
| 68 | #[cfg(target_os = "linux")] |
| 69 | pub hide_k_threadsrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#hide_k_threads.: bool, |
| 70 | #[cfg(feature = "zfs")] |
| 71 | pub free_arcrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#free_arc.: bool, |
| 72 | pub memory_legend_positionrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#memory_legend_position.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<LegendPositionrust-analyzer cargo bottom 0.14.9 canvas/components/time_series/vendored/LegendPosition#>, |
| 73 | // TODO: Remove these, move network details state-side. |
| 74 | pub network_unit_typerust-analyzer cargo bottom 0.14.9 app/AppConfigFields#network_unit_type.: DataUnitrust-analyzer cargo bottom 0.14.9 utils/data_units/DataUnit#, |
| 75 | pub network_legend_positionrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#network_legend_position.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<LegendPositionrust-analyzer cargo bottom 0.14.9 canvas/components/time_series/vendored/LegendPosition#>, |
| 76 | pub network_scale_typerust-analyzer cargo bottom 0.14.9 app/AppConfigFields#network_scale_type.: AxisScalingrust-analyzer cargo bottom 0.14.9 app/AxisScaling#, |
| 77 | pub network_use_binary_prefixrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#network_use_binary_prefix.: bool, |
| 78 | pub network_show_packetsrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#network_show_packets.: bool, |
| 79 | pub network_start_zeroedrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#network_start_zeroed.: bool, |
| 80 | pub retention_msrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#retention_ms.: u64, |
| 81 | pub dedicated_average_rowrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#dedicated_average_row.: bool, |
| 82 | pub default_tree_collapserust-analyzer cargo bottom 0.14.9 app/AppConfigFields#default_tree_collapse.: bool, |
| 83 | pub default_temp_sort_columnrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#default_temp_sort_column.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<TempWidgetColumnrust-analyzer cargo bottom 0.14.9 widgets/temperature_table/TempWidgetColumn#>, |
| 84 | pub default_temp_sort_orderrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#default_temp_sort_order.: SortOrderrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/sortable/SortOrder#, |
| 85 | pub default_disk_sort_columnrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#default_disk_sort_column.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<DiskWidgetColumnrust-analyzer cargo bottom 0.14.9 widgets/disk_table/DiskWidgetColumn#>, |
| 86 | pub default_disk_sort_orderrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#default_disk_sort_order.: SortOrderrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/sortable/SortOrder#, |
| 87 | pub temperature_legend_positionrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#temperature_legend_position.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<LegendPositionrust-analyzer cargo bottom 0.14.9 canvas/components/time_series/vendored/LegendPosition#>, |
| 88 | pub disk_io_legend_positionrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#disk_io_legend_position.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<LegendPositionrust-analyzer cargo bottom 0.14.9 canvas/components/time_series/vendored/LegendPosition#>, |
| 89 | pub disk_show_unmountedrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#disk_show_unmounted.: bool, |
| 90 | pub disk_io_graph_show_unmountedrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#disk_io_graph_show_unmounted.: bool, |
| 91 | } |
| 92 | |
| 93 | /// For filtering out information |
| 94 | #[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:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)] |
| 95 | pub struct DataFiltersrust-analyzer cargo bottom 0.14.9 app/DataFilters# { |
| 96 | pub disk_filterrust-analyzer cargo bottom 0.14.9 app/DataFilters#disk_filter.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Filterrust-analyzer cargo bottom 0.14.9 app/filter/Filter#>, |
| 97 | pub mount_filterrust-analyzer cargo bottom 0.14.9 app/DataFilters#mount_filter.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Filterrust-analyzer cargo bottom 0.14.9 app/filter/Filter#>, |
| 98 | pub temp_filterrust-analyzer cargo bottom 0.14.9 app/DataFilters#temp_filter.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Filterrust-analyzer cargo bottom 0.14.9 app/filter/Filter#>, |
| 99 | pub temp_graph_filterrust-analyzer cargo bottom 0.14.9 app/DataFilters#temp_graph_filter.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Filterrust-analyzer cargo bottom 0.14.9 app/filter/Filter#>, |
| 100 | pub disk_io_graph_filterrust-analyzer cargo bottom 0.14.9 app/DataFilters#disk_io_graph_filter.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Filterrust-analyzer cargo bottom 0.14.9 app/filter/Filter#>, |
| 101 | pub net_filterrust-analyzer cargo bottom 0.14.9 app/DataFilters#net_filter.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Filterrust-analyzer cargo bottom 0.14.9 app/filter/Filter#>, |
| 102 | } |
| 103 | |
| 104 | pub struct Apprust-analyzer cargo bottom 0.14.9 app/App# { |
| 105 | awaiting_second_charrust-analyzer cargo bottom 0.14.9 app/App#awaiting_second_char.: bool, |
| 106 | second_charrust-analyzer cargo bottom 0.14.9 app/App#second_char.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<char>, |
| 107 | pub data_storerust-analyzer cargo bottom 0.14.9 app/App#data_store.: DataStorerust-analyzer cargo bottom 0.14.9 app/data/store/DataStore#, |
| 108 | last_key_pressrust-analyzer cargo bottom 0.14.9 app/App#last_key_press.: Instantrust-analyzer cargo std https://github.com/rust-lang/rust/library/std time/Instant#, |
| 109 | pub(craterust-analyzer cargo bottom 0.14.9 crate/) process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog.: ProcessKillDialogrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/ProcessKillDialog#, |
| 110 | pub help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state.: AppHelpDialogStaterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#, |
| 111 | pub is_expandedrust-analyzer cargo bottom 0.14.9 app/App#is_expanded.: bool, |
| 112 | pub is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw.: bool, |
| 113 | pub is_determining_widget_boundaryrust-analyzer cargo bottom 0.14.9 app/App#is_determining_widget_boundary.: bool, |
| 114 | pub basic_mode_use_percentrust-analyzer cargo bottom 0.14.9 app/App#basic_mode_use_percent.: bool, |
| 115 | pub statesrust-analyzer cargo bottom 0.14.9 app/App#states.: AppWidgetStatesrust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#, |
| 116 | pub app_config_fieldsrust-analyzer cargo bottom 0.14.9 app/App#app_config_fields.: AppConfigFieldsrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#, |
| 117 | pub widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map.: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#>, |
| 118 | pub current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget.: BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#, |
| 119 | pub used_widgetsrust-analyzer cargo bottom 0.14.9 app/App#used_widgets.: UsedWidgetsrust-analyzer cargo bottom 0.14.9 app/layout_manager/UsedWidgets#, |
| 120 | pub filtersrust-analyzer cargo bottom 0.14.9 app/App#filters.: DataFiltersrust-analyzer cargo bottom 0.14.9 app/DataFilters#, |
| 121 | } |
| 122 | |
| 123 | impl Apprust-analyzer cargo bottom 0.14.9 app/App# { |
| 124 | /// Create a new [`App`]. |
| 125 | pub fn newrust-analyzer cargo bottom 0.14.9 app/impl#[App]new().( |
| 126 | app_config_fields: AppConfigFieldsrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#, states: AppWidgetStatesrust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#, |
| 127 | widget_map: HashMaprust-analyzer cargo rustc-hash 2.1.3 FxHashMap#<u64, BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#>, current_widget: BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#, |
| 128 | used_widgets: UsedWidgetsrust-analyzer cargo bottom 0.14.9 app/layout_manager/UsedWidgets#, filters: DataFiltersrust-analyzer cargo bottom 0.14.9 app/DataFilters#, is_expanded: bool, |
| 129 | ) -> Selfrust-analyzer cargo bottom 0.14.9 app/impl#[App] { |
| 130 | let mut data_store = DataStorerust-analyzer cargo bottom 0.14.9 app/data/store/DataStore#::newrust-analyzer cargo bottom 0.14.9 app/data/store/impl#[DataStore]new().(used_widgets); |
| 131 | data_store.set_filtersrust-analyzer cargo bottom 0.14.9 app/data/store/impl#[DataStore]set_filters().(filters.clonerust-analyzer cargo bottom 0.14.9 app/impl#[DataFilters][Clone]clone().()); |
| 132 | |
| 133 | Selfrust-analyzer cargo bottom 0.14.9 app/impl#[App] { |
| 134 | awaiting_second_charrust-analyzer cargo bottom 0.14.9 app/App#awaiting_second_char.: false, |
| 135 | second_charrust-analyzer cargo bottom 0.14.9 app/App#second_char.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 136 | data_storerust-analyzer cargo bottom 0.14.9 app/App#data_store., |
| 137 | last_key_pressrust-analyzer cargo bottom 0.14.9 app/App#last_key_press.: Instantrust-analyzer cargo std https://github.com/rust-lang/rust/library/std time/Instant#::nowrust-analyzer cargo std https://github.com/rust-lang/rust/library/std time/impl#[Instant]now().(), |
| 138 | process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog.: ProcessKillDialogrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/ProcessKillDialog#::defaultrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog][Default]default().(), |
| 139 | help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state.: AppHelpDialogStaterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#::defaultrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState][Default]default().(), |
| 140 | is_expandedrust-analyzer cargo bottom 0.14.9 app/App#is_expanded., |
| 141 | is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw.: false, |
| 142 | is_determining_widget_boundaryrust-analyzer cargo bottom 0.14.9 app/App#is_determining_widget_boundary.: false, |
| 143 | basic_mode_use_percentrust-analyzer cargo bottom 0.14.9 app/App#basic_mode_use_percent.: false, |
| 144 | statesrust-analyzer cargo bottom 0.14.9 app/App#states., |
| 145 | app_config_fieldsrust-analyzer cargo bottom 0.14.9 app/App#app_config_fields., |
| 146 | widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map., |
| 147 | current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget., |
| 148 | used_widgetsrust-analyzer cargo bottom 0.14.9 app/App#used_widgets., |
| 149 | filtersrust-analyzer cargo bottom 0.14.9 app/App#filters., |
| 150 | } |
| 151 | } |
| 152 | |
| 153 | /// Update the data in the [`App`]. |
| 154 | pub fn update_datarust-analyzer cargo bottom 0.14.9 app/impl#[App]update_data().(&mut self) { |
| 155 | let data_source = self.data_storerust-analyzer cargo bottom 0.14.9 app/App#data_store..get_datarust-analyzer cargo bottom 0.14.9 app/data/store/impl#[DataStore]get_data().(); |
| 156 | |
| 157 | // FIXME: (points_rework_v1) maybe separate PR but would it make more sense to |
| 158 | // store references of data? Would it also make more sense to move the |
| 159 | // "data set" step to the draw step, and make it only set if force |
| 160 | // update is set here? |
| 161 | for proc in self.statesrust-analyzer cargo bottom 0.14.9 app/App#states..proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state..widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states..values_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]values_mut().() { |
| 162 | if proc.force_update_datarust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#force_update_data. { |
| 163 | proc.set_table_datarust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]set_table_data().(data_source); |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | for temp in self.statesrust-analyzer cargo bottom 0.14.9 app/App#states..temp_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#temp_state..widget_statesrust-analyzer cargo bottom 0.14.9 app/states/TempState#widget_states..values_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]values_mut().() { |
| 168 | if temp.force_update_datarust-analyzer cargo bottom 0.14.9 widgets/temperature_table/TempWidgetState#force_update_data. { |
| 169 | temp.set_table_datarust-analyzer cargo bottom 0.14.9 widgets/temperature_table/impl#[TempWidgetState]set_table_data().(&data_source.temp_datarust-analyzer cargo bottom 0.14.9 app/data/store/InnerData#temp_data.); |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | for cpu in self.statesrust-analyzer cargo bottom 0.14.9 app/App#states..cpu_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#cpu_state..widget_statesrust-analyzer cargo bottom 0.14.9 app/states/CpuState#widget_states..values_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]values_mut().() { |
| 174 | if cpu.force_update_datarust-analyzer cargo bottom 0.14.9 widgets/cpu_graph/CpuWidgetState#force_update_data. { |
| 175 | cpu.set_legend_datarust-analyzer cargo bottom 0.14.9 widgets/cpu_graph/impl#[CpuWidgetState]set_legend_data().(&data_source.cpu_harvestrust-analyzer cargo bottom 0.14.9 app/data/store/InnerData#cpu_harvest.); |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | for disk in self.statesrust-analyzer cargo bottom 0.14.9 app/App#states..disk_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#disk_state..widget_statesrust-analyzer cargo bottom 0.14.9 app/states/DiskState#widget_states..values_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]values_mut().() { |
| 180 | if disk.force_update_datarust-analyzer cargo bottom 0.14.9 widgets/disk_table/DiskTableWidget#force_update_data. { |
| 181 | disk.set_table_datarust-analyzer cargo bottom 0.14.9 widgets/disk_table/impl#[DiskTableWidget]set_table_data().(data_source); |
| 182 | } |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | pub fn resetrust-analyzer cargo bottom 0.14.9 app/impl#[App]reset().(&mut self) { |
| 187 | // Reset multi |
| 188 | self.reset_multi_tap_keysrust-analyzer cargo bottom 0.14.9 app/impl#[App]reset_multi_tap_keys().(); |
| 189 | |
| 190 | // Reset dialog state |
| 191 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help. = false; |
| 192 | self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..resetrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]reset().(); |
| 193 | |
| 194 | // Close all searches and reset it |
| 195 | self.statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 196 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 197 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 198 | .values_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]values_mut().() |
| 199 | .for_eachrust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#for_each().(|state| { |
| 200 | state.proc_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#proc_search..search_staterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcessSearchState#search_state..resetrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppSearchState]reset().(); |
| 201 | }); |
| 202 | |
| 203 | self.data_storerust-analyzer cargo bottom 0.14.9 app/App#data_store..resetrust-analyzer cargo bottom 0.14.9 app/data/store/impl#[DataStore]reset().(); |
| 204 | |
| 205 | // Reset zoom. |
| 206 | // TODO: Make this suck less... should just make it so that calling reset fixes this all (including above too). |
| 207 | for widget_state in self.statesrust-analyzer cargo bottom 0.14.9 app/App#states..cpu_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#cpu_state..widget_statesrust-analyzer cargo bottom 0.14.9 app/states/CpuState#widget_states..values_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]values_mut().() { |
| 208 | widget_state.graphrust-analyzer cargo bottom 0.14.9 widgets/cpu_graph/CpuWidgetState#graph..state_mutrust-analyzer cargo bottom 0.14.9 components/time_series/percent/impl#[PercentTimeGraph]state_mut().().reset_zoomrust-analyzer cargo bottom 0.14.9 components/time_series/impl#[TimeseriesState]reset_zoom().(); |
| 209 | } |
| 210 | |
| 211 | for widget_state in self.statesrust-analyzer cargo bottom 0.14.9 app/App#states..mem_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#mem_state..widget_statesrust-analyzer cargo bottom 0.14.9 app/states/MemState#widget_states..values_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]values_mut().() { |
| 212 | widget_state.graphrust-analyzer cargo bottom 0.14.9 widgets/mem_graph/MemWidgetState#graph..state_mutrust-analyzer cargo bottom 0.14.9 components/time_series/percent/impl#[PercentTimeGraph]state_mut().().reset_zoomrust-analyzer cargo bottom 0.14.9 components/time_series/impl#[TimeseriesState]reset_zoom().(); |
| 213 | } |
| 214 | |
| 215 | for widget_state in self.statesrust-analyzer cargo bottom 0.14.9 app/App#states..net_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#net_state..widget_statesrust-analyzer cargo bottom 0.14.9 app/states/NetState#widget_states..values_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]values_mut().() { |
| 216 | widget_state.graphrust-analyzer cargo bottom 0.14.9 widgets/network_graph/NetWidgetState#graph..state_mutrust-analyzer cargo bottom 0.14.9 components/time_series/auto_y/impl#[AutoYAxisTimeGraph]state_mut().().reset_zoomrust-analyzer cargo bottom 0.14.9 components/time_series/impl#[TimeseriesState]reset_zoom().(); |
| 217 | } |
| 218 | |
| 219 | for widget_state in self.statesrust-analyzer cargo bottom 0.14.9 app/App#states..temp_graph_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#temp_graph_state..widget_statesrust-analyzer cargo bottom 0.14.9 app/states/TempGraphStates#widget_states..values_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]values_mut().() { |
| 220 | widget_state.graphrust-analyzer cargo bottom 0.14.9 widgets/temperature_graph/TempGraphWidgetState#graph..state_mutrust-analyzer cargo bottom 0.14.9 components/time_series/auto_y/impl#[AutoYAxisTimeGraph]state_mut().().reset_zoomrust-analyzer cargo bottom 0.14.9 components/time_series/impl#[TimeseriesState]reset_zoom().(); |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | pub fn should_get_widget_boundsrust-analyzer cargo bottom 0.14.9 app/impl#[App]should_get_widget_bounds().(&self) -> bool { |
| 225 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. || self.is_determining_widget_boundaryrust-analyzer cargo bottom 0.14.9 app/App#is_determining_widget_boundary. |
| 226 | } |
| 227 | |
| 228 | pub fn on_escrust-analyzer cargo bottom 0.14.9 app/impl#[App]on_esc().(&mut self) { |
| 229 | self.reset_multi_tap_keysrust-analyzer cargo bottom 0.14.9 app/impl#[App]reset_multi_tap_keys().(); |
| 230 | |
| 231 | if self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..is_openrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]is_open().() { |
| 232 | self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..on_escrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]on_esc().(); |
| 233 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 234 | } else if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help. { |
| 235 | if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_searchingrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]is_searching().() { |
| 236 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..close_searchrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]close_search().(); |
| 237 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 238 | } else { |
| 239 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help. = false; |
| 240 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..scroll_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#scroll_state..current_scroll_indexrust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#current_scroll_index. = 0; |
| 241 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 242 | } |
| 243 | } else { |
| 244 | match self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 245 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# => { |
| 246 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pws) = self |
| 247 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 248 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 249 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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.) |
| 250 | && (pws.is_search_enabledrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]is_search_enabled().() || pws.is_sort_openrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#is_sort_open.) |
| 251 | { |
| 252 | pws.proc_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#proc_search..search_staterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcessSearchState#search_state..is_enabledrust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#is_enabled. = false; |
| 253 | pws.is_sort_openrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#is_sort_open. = false; |
| 254 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 255 | return; |
| 256 | } |
| 257 | } |
| 258 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# => { |
| 259 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pws) = self |
| 260 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 261 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 262 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().1) |
| 263 | && pws.is_search_enabledrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]is_search_enabled().() |
| 264 | { |
| 265 | pws.proc_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#proc_search..search_staterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcessSearchState#search_state..is_enabledrust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#is_enabled. = false; |
| 266 | self.move_widget_selectionrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection().(&WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Uprust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Up#); |
| 267 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 268 | return; |
| 269 | } |
| 270 | } |
| 271 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# => { |
| 272 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pws) = self |
| 273 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 274 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 275 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().2) |
| 276 | && pws.is_sort_openrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#is_sort_open. |
| 277 | { |
| 278 | pws.is_sort_openrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#is_sort_open. = false; |
| 279 | self.move_widget_selectionrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection().(&WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Rightrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Right#); |
| 280 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 281 | return; |
| 282 | } |
| 283 | } |
| 284 | _ => {} |
| 285 | } |
| 286 | |
| 287 | if self.is_expandedrust-analyzer cargo bottom 0.14.9 app/App#is_expanded. { |
| 288 | self.is_expandedrust-analyzer cargo bottom 0.14.9 app/App#is_expanded. = false; |
| 289 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 290 | } |
| 291 | } |
| 292 | } |
| 293 | |
| 294 | pub fn is_in_search_widgetrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_search_widget().(&self) -> bool { |
| 295 | matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/matches!!( |
| 296 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type., |
| 297 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# |
| 298 | ) |
| 299 | } |
| 300 | |
| 301 | pub fn is_in_any_searchrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_any_search().(&self) -> bool { |
| 302 | // TODO: This is really hacky, but is fine until we do some smarter things like putting event catching at a per-widget/dialog state. |
| 303 | self.is_in_search_widgetrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_search_widget().() || (self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_help_searchingrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]is_help_searching().()) |
| 304 | } |
| 305 | |
| 306 | fn reset_multi_tap_keysrust-analyzer cargo bottom 0.14.9 app/impl#[App]reset_multi_tap_keys().(&mut self) { |
| 307 | self.awaiting_second_charrust-analyzer cargo bottom 0.14.9 app/App#awaiting_second_char. = false; |
| 308 | self.second_charrust-analyzer cargo bottom 0.14.9 app/App#second_char. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; |
| 309 | } |
| 310 | |
| 311 | fn is_in_dialogrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_dialog().(&self) -> bool { |
| 312 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help. || self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..is_openrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]is_open().() |
| 313 | } |
| 314 | |
| 315 | fn ignore_normal_keybindsrust-analyzer cargo bottom 0.14.9 app/impl#[App]ignore_normal_keybinds().(&self) -> bool { |
| 316 | self.is_in_dialogrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_dialog().() |
| 317 | } |
| 318 | |
| 319 | pub fn on_tabrust-analyzer cargo bottom 0.14.9 app/impl#[App]on_tab().(&mut self) { |
| 320 | // Allow usage whilst only in processes |
| 321 | |
| 322 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.ignore_normal_keybindsrust-analyzer cargo bottom 0.14.9 app/impl#[App]ignore_normal_keybinds().() |
| 323 | && let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. |
| 324 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 325 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 326 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 327 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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.) |
| 328 | { |
| 329 | proc_widget_state.toggle_tabrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]toggle_tab().(); |
| 330 | } |
| 331 | } |
| 332 | |
| 333 | pub fn on_slashrust-analyzer cargo bottom 0.14.9 app/impl#[App]on_slash().(&mut self) { |
| 334 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.ignore_normal_keybindsrust-analyzer cargo bottom 0.14.9 app/impl#[App]ignore_normal_keybinds().() { |
| 335 | match &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 336 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# => { |
| 337 | // Toggle on |
| 338 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self.statesrust-analyzer cargo bottom 0.14.9 app/App#states..proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state..get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().( |
| 339 | self.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. |
| 340 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().match &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 341 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# => 2, |
| 342 | _ => 0, |
| 343 | }, |
| 344 | ) { |
| 345 | proc_widget_state.proc_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#proc_search..search_staterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcessSearchState#search_state..is_enabledrust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#is_enabled. = true; |
| 346 | self.move_widget_selectionrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection().(&WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Downrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Down#); |
| 347 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 348 | } |
| 349 | } |
| 350 | _ => {} |
| 351 | } |
| 352 | } else if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help. { |
| 353 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..open_searchrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]open_search().(); |
| 354 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | pub fn toggle_sort_menurust-analyzer cargo bottom 0.14.9 app/impl#[App]toggle_sort_menu().(&mut self) { |
| 359 | let widget_id = self.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. |
| 360 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().match &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 361 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# => 0, |
| 362 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# => 2, |
| 363 | _ => 0, |
| 364 | }; |
| 365 | |
| 366 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pws) = self.statesrust-analyzer cargo bottom 0.14.9 app/App#states..proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state..get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(widget_id) { |
| 367 | pws.is_sort_openrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#is_sort_open. = !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().pws.is_sort_openrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#is_sort_open.; |
| 368 | pws.force_rerenderrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#force_rerender. = true; |
| 369 | |
| 370 | // If the sort is now open, move left. Otherwise, if the proc sort was selected, |
| 371 | // force move right. |
| 372 | if pws.is_sort_openrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#is_sort_open. { |
| 373 | pws.sort_tablerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#sort_table..set_positionrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]set_position().(pws.tablerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#table..sort_indexrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/sortable/impl#[`DataTable<D, H, Sortable, SortColumn<H>>`]sort_index().()); |
| 374 | self.move_widget_selectionrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection().(&WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Leftrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Left#); |
| 375 | } else if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 376 | self.move_widget_selectionrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection().(&WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Rightrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Right#); |
| 377 | } |
| 378 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 379 | } |
| 380 | } |
| 381 | |
| 382 | pub fn invert_sortrust-analyzer cargo bottom 0.14.9 app/impl#[App]invert_sort().(&mut self) { |
| 383 | match &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 384 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# => { |
| 385 | let widget_id = self.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. |
| 386 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().match &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 387 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# => 0, |
| 388 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# => 2, |
| 389 | _ => 0, |
| 390 | }; |
| 391 | |
| 392 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pws) = self.statesrust-analyzer cargo bottom 0.14.9 app/App#states..proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state..get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(widget_id) { |
| 393 | pws.tablerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#table..toggle_orderrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/sortable/impl#[`DataTable<D, H, Sortable, SortColumn<H>>`]toggle_order().(); |
| 394 | pws.force_data_updaterust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]force_data_update().(); |
| 395 | } |
| 396 | } |
| 397 | _ => {} |
| 398 | } |
| 399 | } |
| 400 | |
| 401 | pub fn toggle_percentagesrust-analyzer cargo bottom 0.14.9 app/impl#[App]toggle_percentages().(&mut self) { |
| 402 | match &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 403 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::BasicMemrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#BasicMem# => { |
| 404 | self.basic_mode_use_percentrust-analyzer cargo bottom 0.14.9 app/App#basic_mode_use_percent. = !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.basic_mode_use_percentrust-analyzer cargo bottom 0.14.9 app/App#basic_mode_use_percent.; // Oh god this is so lazy. |
| 405 | } |
| 406 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# => { |
| 407 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 408 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 409 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 410 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 411 | .get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&self.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.) |
| 412 | { |
| 413 | proc_widget_state.toggle_mem_percentagerust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]toggle_mem_percentage().(); |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | _ => {} |
| 418 | } |
| 419 | } |
| 420 | |
| 421 | pub fn toggle_ignore_caserust-analyzer cargo bottom 0.14.9 app/impl#[App]toggle_ignore_case().(&mut self) { |
| 422 | let is_in_search_widget = self.is_in_search_widgetrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_search_widget().(); |
| 423 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 424 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 425 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 426 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 427 | .get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().1)) |
| 428 | && is_in_search_widget |
| 429 | && proc_widget_state.is_search_enabledrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]is_search_enabled().() |
| 430 | { |
| 431 | proc_widget_state.proc_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#proc_search..search_toggle_ignore_caserust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcessSearchState]search_toggle_ignore_case().(); |
| 432 | proc_widget_state.update_queryrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]update_query().(); |
| 433 | } |
| 434 | } |
| 435 | |
| 436 | pub fn toggle_search_whole_wordrust-analyzer cargo bottom 0.14.9 app/impl#[App]toggle_search_whole_word().(&mut self) { |
| 437 | let is_in_search_widget = self.is_in_search_widgetrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_search_widget().(); |
| 438 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 439 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 440 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 441 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 442 | .get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().1)) |
| 443 | && is_in_search_widget |
| 444 | && proc_widget_state.is_search_enabledrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]is_search_enabled().() |
| 445 | { |
| 446 | proc_widget_state.proc_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#proc_search..search_toggle_whole_wordrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcessSearchState]search_toggle_whole_word().(); |
| 447 | proc_widget_state.update_queryrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]update_query().(); |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | pub fn toggle_search_regexrust-analyzer cargo bottom 0.14.9 app/impl#[App]toggle_search_regex().(&mut self) { |
| 452 | let is_in_search_widget = self.is_in_search_widgetrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_search_widget().(); |
| 453 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 454 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 455 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 456 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 457 | .get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().1)) |
| 458 | && is_in_search_widget |
| 459 | && proc_widget_state.is_search_enabledrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]is_search_enabled().() |
| 460 | { |
| 461 | proc_widget_state.proc_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#proc_search..search_toggle_regexrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcessSearchState]search_toggle_regex().(); |
| 462 | proc_widget_state.update_queryrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]update_query().(); |
| 463 | } |
| 464 | } |
| 465 | |
| 466 | pub fn toggle_tree_moderust-analyzer cargo bottom 0.14.9 app/impl#[App]toggle_tree_mode().(&mut self) { |
| 467 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 468 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 469 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 470 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 471 | .get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&(self.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.)) |
| 472 | { |
| 473 | match proc_widget_state.moderust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#mode. { |
| 474 | ProcWidgetModerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetMode#::Treerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetMode#Tree# { .. } => { |
| 475 | proc_widget_state.moderust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#mode. = ProcWidgetModerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetMode#::Normalrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetMode#Normal#; |
| 476 | proc_widget_state.force_rerender_and_updaterust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]force_rerender_and_update().(); |
| 477 | } |
| 478 | ProcWidgetModerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetMode#::Normalrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetMode#Normal# => { |
| 479 | proc_widget_state.moderust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#mode. = ProcWidgetModerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetMode#::Treerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetMode#Tree#(TreeCollapsedrust-analyzer cargo bottom 0.14.9 widgets/process_table/TreeCollapsed#::newrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[TreeCollapsed]new().( |
| 480 | self.app_config_fieldsrust-analyzer cargo bottom 0.14.9 app/App#app_config_fields..default_tree_collapserust-analyzer cargo bottom 0.14.9 app/AppConfigFields#default_tree_collapse., |
| 481 | )); |
| 482 | proc_widget_state.force_rerender_and_updaterust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]force_rerender_and_update().(); |
| 483 | } |
| 484 | ProcWidgetModerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetMode#::Groupedrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetMode#Grouped# => {} |
| 485 | } |
| 486 | } |
| 487 | } |
| 488 | |
| 489 | /// One of two functions allowed to run while in a dialog... |
| 490 | pub fn on_enterrust-analyzer cargo bottom 0.14.9 app/impl#[App]on_enter().(&mut self) { |
| 491 | if self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..is_openrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]is_open().() { |
| 492 | // Not the best way of doing things for now but works as glue. |
| 493 | self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..on_enterrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]on_enter().(); |
| 494 | } else if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_help_searchingrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]is_help_searching().() { |
| 495 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..close_searchrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]close_search().(); |
| 496 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 497 | } else if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.is_in_dialogrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_dialog().() { |
| 498 | match self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 499 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# => { |
| 500 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 501 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 502 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 503 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().1) |
| 504 | && proc_widget_state.is_search_enabledrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]is_search_enabled().() |
| 505 | { |
| 506 | proc_widget_state.proc_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#proc_search..search_staterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcessSearchState#search_state..is_enabledrust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#is_enabled. = false; |
| 507 | self.move_widget_selectionrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection().(&WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Uprust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Up#); |
| 508 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 509 | } |
| 510 | } |
| 511 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# => { |
| 512 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 513 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 514 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 515 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().2) |
| 516 | && proc_widget_state.is_sort_openrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#is_sort_open. |
| 517 | { |
| 518 | proc_widget_state.use_sort_table_valuerust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]use_sort_table_value().(); |
| 519 | self.move_widget_selectionrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection().(&WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Rightrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Right#); |
| 520 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 521 | } |
| 522 | } |
| 523 | _ => {} |
| 524 | } |
| 525 | } |
| 526 | } |
| 527 | |
| 528 | pub fn on_deleterust-analyzer cargo bottom 0.14.9 app/impl#[App]on_delete().(&mut self) { |
| 529 | if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_help_searchingrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]is_help_searching().() { |
| 530 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..search_input_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#search_input_state..delete_at_cursorrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState]delete_at_cursor().(); |
| 531 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 532 | return; |
| 533 | } |
| 534 | match self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 535 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# => { |
| 536 | let is_in_search_widget = self.is_in_search_widgetrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_search_widget().(); |
| 537 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 538 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 539 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 540 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 541 | .get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().1)) |
| 542 | && is_in_search_widget |
| 543 | && proc_widget_state.proc_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#proc_search..search_staterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcessSearchState#search_state..is_enabledrust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#is_enabled. |
| 544 | { |
| 545 | proc_widget_state |
| 546 | .proc_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#proc_search. |
| 547 | .search_staterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcessSearchState#search_state. |
| 548 | .input_field_staterust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#input_field_state. |
| 549 | .delete_at_cursorrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState]delete_at_cursor().(); |
| 550 | |
| 551 | proc_widget_state.update_queryrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]update_query().(); |
| 552 | } |
| 553 | } |
| 554 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# => { |
| 555 | self.kill_current_processrust-analyzer cargo bottom 0.14.9 app/impl#[App]kill_current_process().(); |
| 556 | } |
| 557 | _ => {} |
| 558 | } |
| 559 | } |
| 560 | |
| 561 | pub fn on_backspacerust-analyzer cargo bottom 0.14.9 app/impl#[App]on_backspace().(&mut self) { |
| 562 | if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_help_searchingrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]is_help_searching().() { |
| 563 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state. |
| 564 | .search_input_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#search_input_state. |
| 565 | .delete_behind_cursorrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState]delete_behind_cursor().(); |
| 566 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 567 | } else if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 568 | let is_in_search_widget = self.is_in_search_widgetrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_search_widget().(); |
| 569 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 570 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 571 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 572 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 573 | .get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().1)) |
| 574 | && is_in_search_widget |
| 575 | && proc_widget_state.proc_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#proc_search..search_staterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcessSearchState#search_state..is_enabledrust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#is_enabled. |
| 576 | { |
| 577 | proc_widget_state |
| 578 | .proc_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#proc_search. |
| 579 | .search_staterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcessSearchState#search_state. |
| 580 | .input_field_staterust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#input_field_state. |
| 581 | .delete_behind_cursorrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState]delete_behind_cursor().(); |
| 582 | |
| 583 | proc_widget_state.update_queryrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]update_query().(); |
| 584 | } |
| 585 | } |
| 586 | } |
| 587 | |
| 588 | pub fn on_up_keyrust-analyzer cargo bottom 0.14.9 app/impl#[App]on_up_key().(&mut self) { |
| 589 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.is_in_dialogrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_dialog().() { |
| 590 | self.decrement_position_countrust-analyzer cargo bottom 0.14.9 app/impl#[App]decrement_position_count().(); |
| 591 | self.reset_multi_tap_keysrust-analyzer cargo bottom 0.14.9 app/impl#[App]reset_multi_tap_keys().(); |
| 592 | } else if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help. { |
| 593 | self.help_scroll_uprust-analyzer cargo bottom 0.14.9 app/impl#[App]help_scroll_up().(); |
| 594 | self.reset_multi_tap_keysrust-analyzer cargo bottom 0.14.9 app/impl#[App]reset_multi_tap_keys().(); |
| 595 | } else if self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..is_openrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]is_open().() { |
| 596 | self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..on_up_keyrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]on_up_key().(); |
| 597 | } |
| 598 | } |
| 599 | |
| 600 | pub fn on_down_keyrust-analyzer cargo bottom 0.14.9 app/impl#[App]on_down_key().(&mut self) { |
| 601 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.is_in_dialogrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_dialog().() { |
| 602 | self.increment_position_countrust-analyzer cargo bottom 0.14.9 app/impl#[App]increment_position_count().(); |
| 603 | self.reset_multi_tap_keysrust-analyzer cargo bottom 0.14.9 app/impl#[App]reset_multi_tap_keys().(); |
| 604 | } else if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help. { |
| 605 | self.help_scroll_downrust-analyzer cargo bottom 0.14.9 app/impl#[App]help_scroll_down().(); |
| 606 | self.reset_multi_tap_keysrust-analyzer cargo bottom 0.14.9 app/impl#[App]reset_multi_tap_keys().(); |
| 607 | } else if self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..is_openrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]is_open().() { |
| 608 | self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..on_down_keyrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]on_down_key().(); |
| 609 | } |
| 610 | } |
| 611 | |
| 612 | pub fn on_left_keyrust-analyzer cargo bottom 0.14.9 app/impl#[App]on_left_key().(&mut self) { |
| 613 | if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_help_searchingrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]is_help_searching().() { |
| 614 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..search_input_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#search_input_state..move_leftrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState]move_left().(); |
| 615 | return; |
| 616 | } |
| 617 | |
| 618 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.is_in_dialogrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_dialog().() { |
| 619 | match self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 620 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# => { |
| 621 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 622 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 623 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 624 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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.) |
| 625 | { |
| 626 | proc_widget_state.collapse_current_tree_branch_entryrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]collapse_current_tree_branch_entry().(); |
| 627 | } |
| 628 | } |
| 629 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# => { |
| 630 | let is_in_search_widget = self.is_in_search_widgetrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_search_widget().(); |
| 631 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 632 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 633 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 634 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().1) |
| 635 | && is_in_search_widget |
| 636 | { |
| 637 | proc_widget_state |
| 638 | .proc_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#proc_search. |
| 639 | .search_staterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcessSearchState#search_state. |
| 640 | .input_field_staterust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#input_field_state. |
| 641 | .move_leftrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState]move_left().(); |
| 642 | } |
| 643 | } |
| 644 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Batteryrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Battery# => { |
| 645 | #[cfg(feature = "battery")] |
| 646 | if self.data_storerust-analyzer cargo bottom 0.14.9 app/App#data_store..get_datarust-analyzer cargo bottom 0.14.9 app/data/store/impl#[DataStore]get_data().().battery_harvestrust-analyzer cargo bottom 0.14.9 app/data/store/InnerData#battery_harvest..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]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 |
| 647 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(battery_widget_state) = self |
| 648 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 649 | .battery_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#battery_state. |
| 650 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[AppBatteryState]get_mut_widget_state().(self.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.) |
| 651 | && battery_widget_state.currently_selected_battery_indexrust-analyzer cargo bottom 0.14.9 widgets/battery_info/BatteryWidgetState#currently_selected_battery_index. 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().0 |
| 652 | { |
| 653 | battery_widget_state.currently_selected_battery_indexrust-analyzer cargo bottom 0.14.9 widgets/battery_info/BatteryWidgetState#currently_selected_battery_index. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`SubAssign<Self>`]sub_assign().1; |
| 654 | } |
| 655 | } |
| 656 | _ => {} |
| 657 | } |
| 658 | } else if self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..is_openrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]is_open().() { |
| 659 | self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..on_left_keyrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]on_left_key().(); |
| 660 | } |
| 661 | } |
| 662 | |
| 663 | pub fn on_right_keyrust-analyzer cargo bottom 0.14.9 app/impl#[App]on_right_key().(&mut self) { |
| 664 | if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_help_searchingrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]is_help_searching().() { |
| 665 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..search_input_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#search_input_state..move_rightrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState]move_right().(); |
| 666 | return; |
| 667 | } |
| 668 | |
| 669 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.is_in_dialogrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_dialog().() { |
| 670 | match self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 671 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# => { |
| 672 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 673 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 674 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 675 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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.) |
| 676 | { |
| 677 | proc_widget_state.expand_current_tree_branch_entryrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]expand_current_tree_branch_entry().(); |
| 678 | } |
| 679 | } |
| 680 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# => { |
| 681 | let is_in_search_widget = self.is_in_search_widgetrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_search_widget().(); |
| 682 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 683 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 684 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 685 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().1) |
| 686 | && is_in_search_widget |
| 687 | { |
| 688 | proc_widget_state |
| 689 | .proc_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#proc_search. |
| 690 | .search_staterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcessSearchState#search_state. |
| 691 | .input_field_staterust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#input_field_state. |
| 692 | .move_rightrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState]move_right().(); |
| 693 | } |
| 694 | } |
| 695 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Batteryrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Battery# => { |
| 696 | #[cfg(feature = "battery")] |
| 697 | { |
| 698 | let battery_count = self.data_storerust-analyzer cargo bottom 0.14.9 app/App#data_store..get_datarust-analyzer cargo bottom 0.14.9 app/data/store/impl#[DataStore]get_data().().battery_harvestrust-analyzer cargo bottom 0.14.9 app/data/store/InnerData#battery_harvest..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().(); |
| 699 | if battery_count 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 |
| 700 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(battery_widget_state) = self |
| 701 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 702 | .battery_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#battery_state. |
| 703 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[AppBatteryState]get_mut_widget_state().(self.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.) |
| 704 | && battery_widget_state.currently_selected_battery_indexrust-analyzer cargo bottom 0.14.9 widgets/battery_info/BatteryWidgetState#currently_selected_battery_index. |
| 705 | <rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().battery_count rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1 |
| 706 | { |
| 707 | battery_widget_state.currently_selected_battery_indexrust-analyzer cargo bottom 0.14.9 widgets/battery_info/BatteryWidgetState#currently_selected_battery_index. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().1; |
| 708 | } |
| 709 | } |
| 710 | } |
| 711 | _ => {} |
| 712 | } |
| 713 | } else if self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..is_openrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]is_open().() { |
| 714 | self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..on_right_keyrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]on_right_key().(); |
| 715 | } |
| 716 | } |
| 717 | |
| 718 | pub fn on_space_keyrust-analyzer cargo bottom 0.14.9 app/impl#[App]on_space_key().(&mut self) { |
| 719 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.is_in_dialogrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_dialog().() { |
| 720 | if self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. rust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType][`PartialEq<Self>`]eq().==rust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType][`PartialEq<Self>`]eq(). rust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType][`PartialEq<Self>`]eq().BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# |
| 721 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 722 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 723 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 724 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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.) |
| 725 | { |
| 726 | proc_widget_state.toggle_current_tree_branch_entryrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]toggle_current_tree_branch_entry().(); |
| 727 | } |
| 728 | } else if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_help_searchingrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]is_help_searching().() { |
| 729 | self.on_char_keyrust-analyzer cargo bottom 0.14.9 app/impl#[App]on_char_key().(' '); |
| 730 | } |
| 731 | } |
| 732 | |
| 733 | pub fn on_page_uprust-analyzer cargo bottom 0.14.9 app/impl#[App]on_page_up().(&mut self) { |
| 734 | if self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..is_openrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]is_open().() { |
| 735 | self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..on_page_uprust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]on_page_up().(); |
| 736 | } else if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help. { |
| 737 | let current = &mut self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..scroll_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#scroll_state..current_scroll_indexrust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#current_scroll_index.; |
| 738 | let amount = self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..heightrust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#height.; |
| 739 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().current = current.saturating_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]saturating_sub().(amount); |
| 740 | } else if self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type..is_widget_tablerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType]is_widget_table().() |
| 741 | && let (Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((_tlc_x, tlc_y)), Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((_brc_x, brc_y))) = ( |
| 742 | &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..top_left_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#top_left_corner., |
| 743 | &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..bottom_right_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#bottom_right_corner., |
| 744 | ) |
| 745 | { |
| 746 | let border_offset = u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<bool>`]from().(self.is_drawing_borderrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_drawing_border().()); |
| 747 | let header_offset = self.header_offsetrust-analyzer cargo bottom 0.14.9 app/impl#[App]header_offset().(&self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget.); |
| 748 | let height = brc_y 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().tlc_y 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().2 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().border_offset 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().header_offset; |
| 749 | self.change_position_countrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_position_count().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().(height as i64)); |
| 750 | } |
| 751 | } |
| 752 | |
| 753 | pub fn on_page_downrust-analyzer cargo bottom 0.14.9 app/impl#[App]on_page_down().(&mut self) { |
| 754 | if self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..is_openrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]is_open().() { |
| 755 | self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..on_page_downrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]on_page_down().(); |
| 756 | } else if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help. { |
| 757 | let current = self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..scroll_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#scroll_state..current_scroll_indexrust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#current_scroll_index.; |
| 758 | let amount = self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..heightrust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#height.; |
| 759 | |
| 760 | self.help_scroll_to_or_maxrust-analyzer cargo bottom 0.14.9 app/impl#[App]help_scroll_to_or_max().(current 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().amount); |
| 761 | } else if self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type..is_widget_tablerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType]is_widget_table().() |
| 762 | && let (Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((_tlc_x, tlc_y)), Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((_brc_x, brc_y))) = ( |
| 763 | &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..top_left_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#top_left_corner., |
| 764 | &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..bottom_right_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#bottom_right_corner., |
| 765 | ) |
| 766 | { |
| 767 | let border_offset = u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<bool>`]from().(self.is_drawing_borderrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_drawing_border().()); |
| 768 | let header_offset = self.header_offsetrust-analyzer cargo bottom 0.14.9 app/impl#[App]header_offset().(&self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget.); |
| 769 | let height = brc_y 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().tlc_y 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().2 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().border_offset 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().header_offset; |
| 770 | self.change_position_countrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_position_count().(height as i64); |
| 771 | } |
| 772 | } |
| 773 | |
| 774 | pub fn scroll_half_page_uprust-analyzer cargo bottom 0.14.9 app/impl#[App]scroll_half_page_up().(&mut self) { |
| 775 | if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help. { |
| 776 | let current = &mut self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..scroll_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#scroll_state..current_scroll_indexrust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#current_scroll_index.; |
| 777 | let amount = self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..heightrust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#height. 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().2; |
| 778 | |
| 779 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().current = current.saturating_subrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]saturating_sub().(amount); |
| 780 | } else if self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type..is_widget_tablerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType]is_widget_table().() |
| 781 | && let (Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((_tlc_x, tlc_y)), Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((_brc_x, brc_y))) = ( |
| 782 | &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..top_left_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#top_left_corner., |
| 783 | &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..bottom_right_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#bottom_right_corner., |
| 784 | ) |
| 785 | { |
| 786 | let border_offset = u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<bool>`]from().(self.is_drawing_borderrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_drawing_border().()); |
| 787 | let header_offset = self.header_offsetrust-analyzer cargo bottom 0.14.9 app/impl#[App]header_offset().(&self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget.); |
| 788 | let height = brc_y 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().tlc_y 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().2 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().border_offset 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().header_offset; |
| 789 | self.change_position_countrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_position_count().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().(height as i64) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div().2); |
| 790 | } |
| 791 | } |
| 792 | |
| 793 | pub fn scroll_half_page_downrust-analyzer cargo bottom 0.14.9 app/impl#[App]scroll_half_page_down().(&mut self) { |
| 794 | if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help. { |
| 795 | let current = self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..scroll_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#scroll_state..current_scroll_indexrust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#current_scroll_index.; |
| 796 | let amount = self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..heightrust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#height. 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().2; |
| 797 | |
| 798 | self.help_scroll_to_or_maxrust-analyzer cargo bottom 0.14.9 app/impl#[App]help_scroll_to_or_max().(current 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().amount); |
| 799 | } else if self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type..is_widget_tablerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType]is_widget_table().() |
| 800 | && let (Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((_tlc_x, tlc_y)), Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((_brc_x, brc_y))) = ( |
| 801 | &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..top_left_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#top_left_corner., |
| 802 | &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..bottom_right_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#bottom_right_corner., |
| 803 | ) |
| 804 | { |
| 805 | let border_offset = u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<bool>`]from().(self.is_drawing_borderrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_drawing_border().()); |
| 806 | let header_offset = self.header_offsetrust-analyzer cargo bottom 0.14.9 app/impl#[App]header_offset().(&self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget.); |
| 807 | let height = brc_y 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().tlc_y 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().2 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().border_offset 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().header_offset; |
| 808 | self.change_position_countrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_position_count().(height as i64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Div<Self>`]div().2); |
| 809 | } |
| 810 | } |
| 811 | |
| 812 | pub fn skip_cursor_beginningrust-analyzer cargo bottom 0.14.9 app/impl#[App]skip_cursor_beginning().(&mut self) { |
| 813 | if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_help_searchingrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]is_help_searching().() { |
| 814 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state. |
| 815 | .search_input_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#search_input_state. |
| 816 | .skip_to_beginningrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState]skip_to_beginning().(); |
| 817 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 818 | } else if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.ignore_normal_keybindsrust-analyzer cargo bottom 0.14.9 app/impl#[App]ignore_normal_keybinds().() |
| 819 | && let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. |
| 820 | { |
| 821 | let is_in_search_widget = self.is_in_search_widgetrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_search_widget().(); |
| 822 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 823 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 824 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 825 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 826 | .get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().1)) |
| 827 | && is_in_search_widget |
| 828 | { |
| 829 | proc_widget_state |
| 830 | .proc_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#proc_search. |
| 831 | .search_staterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcessSearchState#search_state. |
| 832 | .input_field_staterust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#input_field_state. |
| 833 | .skip_to_beginningrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState]skip_to_beginning().(); |
| 834 | } |
| 835 | } |
| 836 | } |
| 837 | |
| 838 | pub fn skip_cursor_endrust-analyzer cargo bottom 0.14.9 app/impl#[App]skip_cursor_end().(&mut self) { |
| 839 | if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_help_searchingrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]is_help_searching().() { |
| 840 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..search_input_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#search_input_state..skip_to_endrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState]skip_to_end().(); |
| 841 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 842 | } else if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.ignore_normal_keybindsrust-analyzer cargo bottom 0.14.9 app/impl#[App]ignore_normal_keybinds().() |
| 843 | && let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. |
| 844 | { |
| 845 | let is_in_search_widget = self.is_in_search_widgetrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_search_widget().(); |
| 846 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 847 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 848 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 849 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 850 | .get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().1)) |
| 851 | && is_in_search_widget |
| 852 | { |
| 853 | proc_widget_state |
| 854 | .proc_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#proc_search. |
| 855 | .search_staterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcessSearchState#search_state. |
| 856 | .input_field_staterust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#input_field_state. |
| 857 | .skip_to_endrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState]skip_to_end().(); |
| 858 | } |
| 859 | } |
| 860 | } |
| 861 | |
| 862 | pub fn clear_searchrust-analyzer cargo bottom 0.14.9 app/impl#[App]clear_search().(&mut self) { |
| 863 | if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_help_searchingrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]is_help_searching().() { |
| 864 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..search_input_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#search_input_state. = Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState][Default]default().(); |
| 865 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 866 | } else if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. |
| 867 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 868 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 869 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 870 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 871 | .get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().1)) |
| 872 | { |
| 873 | proc_widget_state.clear_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]clear_search().(); |
| 874 | } |
| 875 | } |
| 876 | |
| 877 | pub fn clear_previous_wordrust-analyzer cargo bottom 0.14.9 app/impl#[App]clear_previous_word().(&mut self) { |
| 878 | if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_help_searchingrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]is_help_searching().() { |
| 879 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state. |
| 880 | .search_input_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#search_input_state. |
| 881 | .delete_previous_wordrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState]delete_previous_word().(); |
| 882 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 883 | } else if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. |
| 884 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 885 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 886 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 887 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 888 | .get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().1)) |
| 889 | { |
| 890 | proc_widget_state |
| 891 | .proc_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#proc_search. |
| 892 | .search_staterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcessSearchState#search_state. |
| 893 | .input_field_staterust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#input_field_state. |
| 894 | .delete_previous_wordrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState]delete_previous_word().(); |
| 895 | |
| 896 | proc_widget_state.update_queryrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]update_query().(); |
| 897 | } |
| 898 | } |
| 899 | |
| 900 | pub fn on_char_keyrust-analyzer cargo bottom 0.14.9 app/impl#[App]on_char_key().(&mut self, caught_char: char) { |
| 901 | // Skip control code chars |
| 902 | if caught_char.is_controlrust-analyzer cargo core https://github.com/rust-lang/rust/library/core char/methods/impl#[char]is_control().() { |
| 903 | return; |
| 904 | } |
| 905 | |
| 906 | const MAX_KEY_TIMEOUT_IN_MILLISECONDSrust-analyzer cargo bottom 0.14.9 app/MAX_KEY_TIMEOUT_IN_MILLISECONDS.: u64 = 1000; |
| 907 | |
| 908 | // Forbid any char key presses when showing a dialog box... |
| 909 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.ignore_normal_keybindsrust-analyzer cargo bottom 0.14.9 app/impl#[App]ignore_normal_keybinds().() { |
| 910 | let current_key_press_inst = Instantrust-analyzer cargo std https://github.com/rust-lang/rust/library/std time/Instant#::nowrust-analyzer cargo std https://github.com/rust-lang/rust/library/std time/impl#[Instant]now().(); |
| 911 | if current_key_press_inst |
| 912 | .duration_sincerust-analyzer cargo std https://github.com/rust-lang/rust/library/std time/impl#[Instant]duration_since().(self.last_key_pressrust-analyzer cargo bottom 0.14.9 app/App#last_key_press.) |
| 913 | .as_millisrust-analyzer cargo core https://github.com/rust-lang/rust/library/core time/impl#[Duration]as_millis().() |
| 914 | >rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u128][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u128][`PartialOrd<Self>`]gt().MAX_KEY_TIMEOUT_IN_MILLISECONDSrust-analyzer cargo bottom 0.14.9 app/MAX_KEY_TIMEOUT_IN_MILLISECONDS..intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().() |
| 915 | { |
| 916 | self.reset_multi_tap_keysrust-analyzer cargo bottom 0.14.9 app/impl#[App]reset_multi_tap_keys().(); |
| 917 | } |
| 918 | self.last_key_pressrust-analyzer cargo bottom 0.14.9 app/App#last_key_press. = current_key_press_inst; |
| 919 | |
| 920 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 921 | let is_in_search_widget = self.is_in_search_widgetrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_search_widget().(); |
| 922 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 923 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 924 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 925 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 926 | .get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().1)) |
| 927 | && is_in_search_widget |
| 928 | && proc_widget_state.is_search_enabledrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]is_search_enabled().() |
| 929 | { |
| 930 | proc_widget_state |
| 931 | .proc_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#proc_search. |
| 932 | .search_staterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcessSearchState#search_state. |
| 933 | .input_field_staterust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#input_field_state. |
| 934 | .insert_charrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState]insert_char().(caught_char); |
| 935 | |
| 936 | proc_widget_state.update_queryrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]update_query().(); |
| 937 | |
| 938 | return; |
| 939 | } |
| 940 | } |
| 941 | self.handle_charrust-analyzer cargo bottom 0.14.9 app/impl#[App]handle_char().(caught_char); |
| 942 | } else if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help. { |
| 943 | if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_searchingrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]is_searching().() { |
| 944 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state. |
| 945 | .search_input_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#search_input_state. |
| 946 | .insert_charrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState]insert_char().(caught_char); |
| 947 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 948 | } else { |
| 949 | match caught_char { |
| 950 | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' => { |
| 951 | let potential_index = caught_char.to_digitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core char/methods/impl#[char]to_digit().(10); |
| 952 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(potential_index) = potential_index { |
| 953 | let potential_index = potential_index as usize; |
| 954 | if (potential_index) rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..index_shortcutsrust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#index_shortcuts..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().() { |
| 955 | self.help_scroll_to_or_maxrust-analyzer cargo bottom 0.14.9 app/impl#[App]help_scroll_to_or_max().( |
| 956 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..index_shortcutsrust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#index_shortcuts.[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().potential_index]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index()., |
| 957 | ); |
| 958 | } |
| 959 | } |
| 960 | } |
| 961 | 'j' | 'k' | 'g' | 'G' => self.handle_charrust-analyzer cargo bottom 0.14.9 app/impl#[App]handle_char().(caught_char), |
| 962 | '/' => { |
| 963 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..open_searchrust-analyzer cargo bottom 0.14.9 app/states/impl#[AppHelpDialogState]open_search().(); |
| 964 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 965 | } |
| 966 | _ => {} |
| 967 | } |
| 968 | } |
| 969 | } else if self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..is_openrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]is_open().() { |
| 970 | self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..on_charrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]on_char().(caught_char); |
| 971 | } |
| 972 | } |
| 973 | |
| 974 | /// Kill the currently selected process if we are in the process widget. |
| 975 | /// |
| 976 | /// TODO: This ideally gets abstracted out into a separate widget. |
| 977 | pub(craterust-analyzer cargo bottom 0.14.9 crate/) fn kill_current_processrust-analyzer cargo bottom 0.14.9 app/impl#[App]kill_current_process().(&mut self) { |
| 978 | if self.app_config_fieldsrust-analyzer cargo bottom 0.14.9 app/App#app_config_fields..is_read_onlyrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#is_read_only. { |
| 979 | return; |
| 980 | } |
| 981 | |
| 982 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pws) = self |
| 983 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 984 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 985 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 986 | .getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&self.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.) |
| 987 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(current) = pws.tablerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#table..current_itemrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]current_item().() |
| 988 | { |
| 989 | let id = current.idrust-analyzer cargo bottom 0.14.9 widgets/process_table/process_data/ProcWidgetData#id..to_stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/impl#[T][ToString]to_string().(); |
| 990 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pids) = pws |
| 991 | .id_pid_maprust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#id_pid_map. |
| 992 | .getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&id) |
| 993 | .clonedrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<&T>`]cloned().() |
| 994 | .or_elserust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]or_else().(|| Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![current.pidrust-analyzer cargo bottom 0.14.9 widgets/process_table/process_data/ProcWidgetData#pid.])) |
| 995 | { |
| 996 | let current_process = (id, pids); |
| 997 | |
| 998 | let use_simple_selection = { |
| 999 | cfg_selectrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/cfg_select!! { |
| 1000 | any(target_os = "linux", target_os = "macos", target_os = "freebsd") => { |
| 1001 | !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.app_config_fieldsrust-analyzer cargo bottom 0.14.9 app/App#app_config_fields..is_advanced_killrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#is_advanced_kill. |
| 1002 | } |
| 1003 | _ => { |
| 1004 | true |
| 1005 | } |
| 1006 | } |
| 1007 | }; |
| 1008 | |
| 1009 | self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..start_process_killrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]start_process_kill().( |
| 1010 | current_process.0, |
| 1011 | current_process.1, |
| 1012 | use_simple_selection, |
| 1013 | ); |
| 1014 | |
| 1015 | // TODO: I don't think most of this is needed. |
| 1016 | self.is_determining_widget_boundaryrust-analyzer cargo bottom 0.14.9 app/App#is_determining_widget_boundary. = true; |
| 1017 | } |
| 1018 | } |
| 1019 | } |
| 1020 | |
| 1021 | // FIXME: Refactor this system... |
| 1022 | fn handle_charrust-analyzer cargo bottom 0.14.9 app/impl#[App]handle_char().(&mut self, caught_char: char) { |
| 1023 | match caught_char { |
| 1024 | '/' => { |
| 1025 | self.on_slashrust-analyzer cargo bottom 0.14.9 app/impl#[App]on_slash().(); |
| 1026 | } |
| 1027 | 'd' => { |
| 1028 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1029 | let mut is_first_d = true; |
| 1030 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(second_char) = self.second_charrust-analyzer cargo bottom 0.14.9 app/App#second_char. |
| 1031 | && self.awaiting_second_charrust-analyzer cargo bottom 0.14.9 app/App#awaiting_second_char. |
| 1032 | && second_char rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[char][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[char][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[char][`PartialEq<Self>`]eq().'d' |
| 1033 | { |
| 1034 | is_first_d = false; |
| 1035 | self.awaiting_second_charrust-analyzer cargo bottom 0.14.9 app/App#awaiting_second_char. = false; |
| 1036 | self.second_charrust-analyzer cargo bottom 0.14.9 app/App#second_char. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; |
| 1037 | |
| 1038 | self.reset_multi_tap_keysrust-analyzer cargo bottom 0.14.9 app/impl#[App]reset_multi_tap_keys().(); |
| 1039 | |
| 1040 | self.kill_current_processrust-analyzer cargo bottom 0.14.9 app/impl#[App]kill_current_process().(); |
| 1041 | } |
| 1042 | |
| 1043 | if is_first_d { |
| 1044 | self.awaiting_second_charrust-analyzer cargo bottom 0.14.9 app/App#awaiting_second_char. = true; |
| 1045 | self.second_charrust-analyzer cargo bottom 0.14.9 app/App#second_char. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#('d'); |
| 1046 | } |
| 1047 | } else if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(disk) = self |
| 1048 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1049 | .disk_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#disk_state. |
| 1050 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskState]get_mut_widget_state().(self.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.) |
| 1051 | { |
| 1052 | disk.set_indexrust-analyzer cargo bottom 0.14.9 widgets/disk_table/impl#[DiskTableWidget]set_index().(0); |
| 1053 | } |
| 1054 | } |
| 1055 | 'g' => { |
| 1056 | let mut is_first_g = true; |
| 1057 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(second_char) = self.second_charrust-analyzer cargo bottom 0.14.9 app/App#second_char. |
| 1058 | && self.awaiting_second_charrust-analyzer cargo bottom 0.14.9 app/App#awaiting_second_char. |
| 1059 | && second_char rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[char][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[char][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[char][`PartialEq<Self>`]eq().'g' |
| 1060 | { |
| 1061 | is_first_g = false; |
| 1062 | self.awaiting_second_charrust-analyzer cargo bottom 0.14.9 app/App#awaiting_second_char. = false; |
| 1063 | self.second_charrust-analyzer cargo bottom 0.14.9 app/App#second_char. = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; |
| 1064 | self.skip_to_firstrust-analyzer cargo bottom 0.14.9 app/impl#[App]skip_to_first().(); |
| 1065 | } |
| 1066 | |
| 1067 | if is_first_g { |
| 1068 | self.awaiting_second_charrust-analyzer cargo bottom 0.14.9 app/App#awaiting_second_char. = true; |
| 1069 | self.second_charrust-analyzer cargo bottom 0.14.9 app/App#second_char. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#('g'); |
| 1070 | } |
| 1071 | } |
| 1072 | 'G' => self.skip_to_lastrust-analyzer cargo bottom 0.14.9 app/impl#[App]skip_to_last().(), |
| 1073 | 'k' => self.on_up_keyrust-analyzer cargo bottom 0.14.9 app/impl#[App]on_up_key().(), |
| 1074 | 'j' => self.on_down_keyrust-analyzer cargo bottom 0.14.9 app/impl#[App]on_down_key().(), |
| 1075 | 'f' => self.data_storerust-analyzer cargo bottom 0.14.9 app/App#data_store..toggle_frozenrust-analyzer cargo bottom 0.14.9 app/data/store/impl#[DataStore]toggle_frozen().(), |
| 1076 | 'c' => { |
| 1077 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. |
| 1078 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 1079 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1080 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1081 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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.) |
| 1082 | { |
| 1083 | proc_widget_state.select_columnrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]select_column().(ProcWidgetColumnrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetColumn#::Cpurust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetColumn#Cpu#); |
| 1084 | } |
| 1085 | } |
| 1086 | 'm' => { |
| 1087 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1088 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 1089 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1090 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1091 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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.) |
| 1092 | { |
| 1093 | proc_widget_state.select_columnrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]select_column().(ProcWidgetColumnrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetColumn#::Memrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetColumn#Mem#); |
| 1094 | } |
| 1095 | } else if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(disk) = self |
| 1096 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1097 | .disk_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#disk_state. |
| 1098 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskState]get_mut_widget_state().(self.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.) |
| 1099 | { |
| 1100 | disk.set_indexrust-analyzer cargo bottom 0.14.9 widgets/disk_table/impl#[DiskTableWidget]set_index().(1); |
| 1101 | } |
| 1102 | } |
| 1103 | 'p' => { |
| 1104 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1105 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 1106 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1107 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1108 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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.) |
| 1109 | { |
| 1110 | proc_widget_state.select_columnrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]select_column().(ProcWidgetColumnrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetColumn#::PidOrCountrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetColumn#PidOrCount#); |
| 1111 | } |
| 1112 | } else if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(disk) = self |
| 1113 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1114 | .disk_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#disk_state. |
| 1115 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskState]get_mut_widget_state().(self.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.) |
| 1116 | { |
| 1117 | disk.set_indexrust-analyzer cargo bottom 0.14.9 widgets/disk_table/impl#[DiskTableWidget]set_index().(5); |
| 1118 | } |
| 1119 | } |
| 1120 | 'P' => { |
| 1121 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. |
| 1122 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 1123 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1124 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1125 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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.) |
| 1126 | { |
| 1127 | proc_widget_state.toggle_commandrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]toggle_command().(); |
| 1128 | } |
| 1129 | } |
| 1130 | 'n' => { |
| 1131 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1132 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 1133 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1134 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1135 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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.) |
| 1136 | { |
| 1137 | proc_widget_state.select_columnrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]select_column().(ProcWidgetColumnrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetColumn#::ProcNameOrCommandrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetColumn#ProcNameOrCommand#); |
| 1138 | } |
| 1139 | } else if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(disk) = self |
| 1140 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1141 | .disk_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#disk_state. |
| 1142 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskState]get_mut_widget_state().(self.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.) |
| 1143 | { |
| 1144 | disk.set_indexrust-analyzer cargo bottom 0.14.9 widgets/disk_table/impl#[DiskTableWidget]set_index().(3); |
| 1145 | } |
| 1146 | } |
| 1147 | #[cfg(feature = "gpu")] |
| 1148 | 'M' => { |
| 1149 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. |
| 1150 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 1151 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1152 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1153 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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.) |
| 1154 | { |
| 1155 | proc_widget_state.select_columnrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]select_column().(ProcWidgetColumnrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetColumn#::GpuMemrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetColumn#GpuMem#); |
| 1156 | } |
| 1157 | } |
| 1158 | #[cfg(feature = "gpu")] |
| 1159 | 'C' => { |
| 1160 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. |
| 1161 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 1162 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1163 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1164 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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.) |
| 1165 | { |
| 1166 | proc_widget_state.select_columnrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]select_column().(ProcWidgetColumnrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetColumn#::GpuUtilrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetColumn#GpuUtil#); |
| 1167 | } |
| 1168 | } |
| 1169 | '?' => { |
| 1170 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help. = true; |
| 1171 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 1172 | } |
| 1173 | 'H' | 'A' => self.move_widget_selectionrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection().(&WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Leftrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Left#), |
| 1174 | 'L' | 'D' => self.move_widget_selectionrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection().(&WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Rightrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Right#), |
| 1175 | 'K' | 'W' => self.move_widget_selectionrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection().(&WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Uprust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Up#), |
| 1176 | 'J' | 'S' => self.move_widget_selectionrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection().(&WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Downrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Down#), |
| 1177 | 't' => { |
| 1178 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1179 | self.toggle_tree_moderust-analyzer cargo bottom 0.14.9 app/impl#[App]toggle_tree_mode().() |
| 1180 | } else if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(temp) = self |
| 1181 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1182 | .temp_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#temp_state. |
| 1183 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[TempState]get_mut_widget_state().(self.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.) |
| 1184 | { |
| 1185 | temp.tablerust-analyzer cargo bottom 0.14.9 widgets/temperature_table/TempWidgetState#table..set_sort_indexrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/sortable/impl#[`DataTable<D, H, Sortable, SortColumn<H>>`]set_sort_index().(1); |
| 1186 | temp.force_data_updaterust-analyzer cargo bottom 0.14.9 widgets/temperature_table/impl#[TempWidgetState]force_data_update().(); |
| 1187 | } else if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(disk) = self |
| 1188 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1189 | .disk_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#disk_state. |
| 1190 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskState]get_mut_widget_state().(self.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.) |
| 1191 | { |
| 1192 | disk.set_indexrust-analyzer cargo bottom 0.14.9 widgets/disk_table/impl#[DiskTableWidget]set_index().(4); |
| 1193 | } |
| 1194 | } |
| 1195 | '+' => self.on_plusrust-analyzer cargo bottom 0.14.9 app/impl#[App]on_plus().(), |
| 1196 | '-' => self.on_minusrust-analyzer cargo bottom 0.14.9 app/impl#[App]on_minus().(), |
| 1197 | '=' => self.reset_zoomrust-analyzer cargo bottom 0.14.9 app/impl#[App]reset_zoom().(), |
| 1198 | 'e' => self.toggle_expand_widgetrust-analyzer cargo bottom 0.14.9 app/impl#[App]toggle_expand_widget().(), |
| 1199 | 's' => { |
| 1200 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1201 | self.toggle_sort_menurust-analyzer cargo bottom 0.14.9 app/impl#[App]toggle_sort_menu().() |
| 1202 | } else if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(temp) = self |
| 1203 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1204 | .temp_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#temp_state. |
| 1205 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[TempState]get_mut_widget_state().(self.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.) |
| 1206 | { |
| 1207 | temp.tablerust-analyzer cargo bottom 0.14.9 widgets/temperature_table/TempWidgetState#table..set_sort_indexrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/sortable/impl#[`DataTable<D, H, Sortable, SortColumn<H>>`]set_sort_index().(0); |
| 1208 | temp.force_data_updaterust-analyzer cargo bottom 0.14.9 widgets/temperature_table/impl#[TempWidgetState]force_data_update().(); |
| 1209 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 1210 | } |
| 1211 | } |
| 1212 | 'u' => { |
| 1213 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(disk) = self |
| 1214 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1215 | .disk_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#disk_state. |
| 1216 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskState]get_mut_widget_state().(self.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.) |
| 1217 | { |
| 1218 | disk.set_indexrust-analyzer cargo bottom 0.14.9 widgets/disk_table/impl#[DiskTableWidget]set_index().(2); |
| 1219 | } |
| 1220 | } |
| 1221 | 'r' => { |
| 1222 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(disk) = self |
| 1223 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1224 | .disk_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#disk_state. |
| 1225 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskState]get_mut_widget_state().(self.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.) |
| 1226 | { |
| 1227 | disk.set_indexrust-analyzer cargo bottom 0.14.9 widgets/disk_table/impl#[DiskTableWidget]set_index().(6); |
| 1228 | } |
| 1229 | } |
| 1230 | 'w' => { |
| 1231 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(disk) = self |
| 1232 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1233 | .disk_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#disk_state. |
| 1234 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskState]get_mut_widget_state().(self.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.) |
| 1235 | { |
| 1236 | disk.set_indexrust-analyzer cargo bottom 0.14.9 widgets/disk_table/impl#[DiskTableWidget]set_index().(7); |
| 1237 | } |
| 1238 | } |
| 1239 | 'I' => self.invert_sortrust-analyzer cargo bottom 0.14.9 app/impl#[App]invert_sort().(), |
| 1240 | '%' => self.toggle_percentagesrust-analyzer cargo bottom 0.14.9 app/impl#[App]toggle_percentages().(), |
| 1241 | #[cfg(target_os = "linux")] |
| 1242 | 'z' => { |
| 1243 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. |
| 1244 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 1245 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1246 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1247 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 1248 | .get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&self.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.) |
| 1249 | { |
| 1250 | proc_widget_state.toggle_k_threadrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]toggle_k_thread().(); |
| 1251 | } |
| 1252 | } |
| 1253 | _ => {} |
| 1254 | } |
| 1255 | |
| 1256 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(second_char) = self.second_charrust-analyzer cargo bottom 0.14.9 app/App#second_char. |
| 1257 | && self.awaiting_second_charrust-analyzer cargo bottom 0.14.9 app/App#awaiting_second_char. |
| 1258 | && caught_char rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[char][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[char][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[char][`PartialEq<Self>`]ne().second_char |
| 1259 | { |
| 1260 | self.awaiting_second_charrust-analyzer cargo bottom 0.14.9 app/App#awaiting_second_char. = false; |
| 1261 | } |
| 1262 | } |
| 1263 | |
| 1264 | fn toggle_expand_widgetrust-analyzer cargo bottom 0.14.9 app/impl#[App]toggle_expand_widget().(&mut self) { |
| 1265 | if self.is_expandedrust-analyzer cargo bottom 0.14.9 app/App#is_expanded. { |
| 1266 | self.is_expandedrust-analyzer cargo bottom 0.14.9 app/App#is_expanded. = false; |
| 1267 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 1268 | } else { |
| 1269 | self.expand_widgetrust-analyzer cargo bottom 0.14.9 app/impl#[App]expand_widget().(); |
| 1270 | } |
| 1271 | } |
| 1272 | |
| 1273 | fn expand_widgetrust-analyzer cargo bottom 0.14.9 app/impl#[App]expand_widget().(&mut self) { |
| 1274 | // TODO: [BASIC] Expansion in basic mode. |
| 1275 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.ignore_normal_keybindsrust-analyzer cargo bottom 0.14.9 app/impl#[App]ignore_normal_keybinds().() && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.app_config_fieldsrust-analyzer cargo bottom 0.14.9 app/App#app_config_fields..use_basic_moderust-analyzer cargo bottom 0.14.9 app/AppConfigFields#use_basic_mode. { |
| 1276 | // Pop-out mode. We ignore if in process search. |
| 1277 | |
| 1278 | match self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1279 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# => {} |
| 1280 | _ => { |
| 1281 | self.is_expandedrust-analyzer cargo bottom 0.14.9 app/App#is_expanded. = true; |
| 1282 | self.is_force_redrawrust-analyzer cargo bottom 0.14.9 app/App#is_force_redraw. = true; |
| 1283 | } |
| 1284 | } |
| 1285 | } |
| 1286 | } |
| 1287 | |
| 1288 | pub fn move_widget_selectionrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection().(&mut self, direction: &WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#) { |
| 1289 | // Since we only want to call reset once, we do it like this to avoid |
| 1290 | // redundant calls on recursion. |
| 1291 | self.move_widget_selection_logicrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection_logic().(direction); |
| 1292 | self.reset_multi_tap_keysrust-analyzer cargo bottom 0.14.9 app/impl#[App]reset_multi_tap_keys().(); |
| 1293 | } |
| 1294 | |
| 1295 | fn move_widget_selection_logicrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection_logic().(&mut self, direction: &WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#) { |
| 1296 | // The actual logic for widget movement. |
| 1297 | |
| 1298 | // We follow these following steps: |
| 1299 | // 1. Send a movement signal in `direction`. |
| 1300 | // 2. Check if this new widget we've landed on is hidden. If not, halt. |
| 1301 | // 3. If it hidden, loop and either send: |
| 1302 | // - A signal equal to the current direction, if it is opposite of the |
| 1303 | // reflection. |
| 1304 | // - Reflection direction. |
| 1305 | |
| 1306 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.ignore_normal_keybindsrust-analyzer cargo bottom 0.14.9 app/impl#[App]ignore_normal_keybinds().() && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.is_expandedrust-analyzer cargo bottom 0.14.9 app/App#is_expanded. { |
| 1307 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_widget_id) = &(match direction { |
| 1308 | WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Leftrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Left# => self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#left_neighbour., |
| 1309 | WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Rightrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Right# => self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#right_neighbour., |
| 1310 | WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Uprust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Up# => self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#up_neighbour., |
| 1311 | WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Downrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Down# => self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..down_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#down_neighbour., |
| 1312 | }) && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_widget) = self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(new_widget_id) |
| 1313 | { |
| 1314 | match &new_widget.widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1315 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Temprust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Temp# |
| 1316 | | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# |
| 1317 | | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# |
| 1318 | | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Diskrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Disk# |
| 1319 | | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Batteryrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Battery# |
| 1320 | if self.statesrust-analyzer cargo bottom 0.14.9 app/App#states..basic_table_widget_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#basic_table_widget_state..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() |
| 1321 | && (*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().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().WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Leftrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Left# |
| 1322 | || *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().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().WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Rightrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Right#) => |
| 1323 | { |
| 1324 | // Gotta do this for the sort widget |
| 1325 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# = new_widget.widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1326 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 1327 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1328 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1329 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 1330 | .getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&(new_widget_id rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub().2)) |
| 1331 | { |
| 1332 | if proc_widget_state.is_sort_openrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#is_sort_open. { |
| 1333 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1334 | } else if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(next_new_widget_id) = match direction { |
| 1335 | WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Leftrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Left# => new_widget.left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#left_neighbour., |
| 1336 | _ => new_widget.right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#right_neighbour., |
| 1337 | } && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(next_new_widget) = |
| 1338 | self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&next_new_widget_id) |
| 1339 | { |
| 1340 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = next_new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1341 | } |
| 1342 | } |
| 1343 | } else { |
| 1344 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1345 | } |
| 1346 | |
| 1347 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(basic_table_widget_state) = |
| 1348 | &mut self.statesrust-analyzer cargo bottom 0.14.9 app/App#states..basic_table_widget_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#basic_table_widget_state. |
| 1349 | { |
| 1350 | basic_table_widget_state.currently_displayed_widget_idrust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#currently_displayed_widget_id. = |
| 1351 | self.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.; |
| 1352 | basic_table_widget_state.currently_displayed_widget_typerust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#currently_displayed_widget_type. = |
| 1353 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type..clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType][Clone]clone().(); |
| 1354 | } |
| 1355 | |
| 1356 | // And let's not forget: |
| 1357 | self.is_determining_widget_boundaryrust-analyzer cargo bottom 0.14.9 app/App#is_determining_widget_boundary. = true; |
| 1358 | } |
| 1359 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::BasicTablesrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#BasicTables# => { |
| 1360 | match &direction { |
| 1361 | WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Uprust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Up# => { |
| 1362 | // Note this case would fail if it moved up into a hidden |
| 1363 | // widget, but it's for basic so whatever, it's all hard-coded |
| 1364 | // right now anyways... |
| 1365 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(next_new_widget_id) = new_widget.up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#up_neighbour. |
| 1366 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(next_new_widget) = |
| 1367 | self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&next_new_widget_id) |
| 1368 | { |
| 1369 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = next_new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1370 | } |
| 1371 | } |
| 1372 | WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Downrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Down# => { |
| 1373 | // Assuming we're in basic mode (BasicTables), then |
| 1374 | // we want to move DOWN to the currently shown widget. |
| 1375 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(basic_table_widget_state) = |
| 1376 | &mut self.statesrust-analyzer cargo bottom 0.14.9 app/App#states..basic_table_widget_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#basic_table_widget_state. |
| 1377 | { |
| 1378 | // We also want to move towards Proc if we had set it to |
| 1379 | // ProcSort. |
| 1380 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# = |
| 1381 | basic_table_widget_state.currently_displayed_widget_typerust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#currently_displayed_widget_type. |
| 1382 | { |
| 1383 | basic_table_widget_state.currently_displayed_widget_typerust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#currently_displayed_widget_type. = |
| 1384 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc#; |
| 1385 | basic_table_widget_state.currently_displayed_widget_idrust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#currently_displayed_widget_id. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`SubAssign<Self>`]sub_assign().2; |
| 1386 | } |
| 1387 | |
| 1388 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(next_new_widget) = self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().( |
| 1389 | &basic_table_widget_state.currently_displayed_widget_idrust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#currently_displayed_widget_id., |
| 1390 | ) { |
| 1391 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = next_new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1392 | } |
| 1393 | } |
| 1394 | } |
| 1395 | _ => self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(), |
| 1396 | } |
| 1397 | } |
| 1398 | _ if new_widget.parent_reflectorrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#parent_reflector..is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() => { |
| 1399 | // It may be hidden... |
| 1400 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((parent_direction, offset)) = &new_widget.parent_reflectorrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#parent_reflector. { |
| 1401 | if direction.is_oppositerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[WidgetDirection]is_opposite().(parent_direction) { |
| 1402 | // Keep going in the current direction if hidden... |
| 1403 | // unless we hit a wall of sorts. |
| 1404 | let option_next_neighbour_id = match &direction { |
| 1405 | WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Leftrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Left# => new_widget.left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#left_neighbour., |
| 1406 | WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Rightrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Right# => new_widget.right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#right_neighbour., |
| 1407 | WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Uprust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Up# => new_widget.up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#up_neighbour., |
| 1408 | WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Downrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Down# => new_widget.down_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#down_neighbour., |
| 1409 | }; |
| 1410 | match &new_widget.widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1411 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::CpuLegendrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#CpuLegend# => { |
| 1412 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(cpu_widget_state) = self |
| 1413 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1414 | .cpu_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#cpu_state. |
| 1415 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/CpuState#widget_states. |
| 1416 | .getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&(new_widget_id rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().offset)) |
| 1417 | { |
| 1418 | if cpu_widget_state.is_legend_hiddenrust-analyzer cargo bottom 0.14.9 widgets/cpu_graph/CpuWidgetState#is_legend_hidden. { |
| 1419 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(next_neighbour_id) = |
| 1420 | option_next_neighbour_id |
| 1421 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(next_neighbour_widget) = |
| 1422 | self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&next_neighbour_id) |
| 1423 | { |
| 1424 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = |
| 1425 | next_neighbour_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1426 | } |
| 1427 | } else { |
| 1428 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1429 | } |
| 1430 | } |
| 1431 | } |
| 1432 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# => { |
| 1433 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 1434 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1435 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1436 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 1437 | .getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&(new_widget_id rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().offset)) |
| 1438 | { |
| 1439 | match &new_widget.widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1440 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# => |
| 1441 | { |
| 1442 | #[allow(clippy::collapsible_match)] |
| 1443 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().proc_widget_state.is_search_enabledrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]is_search_enabled().() { |
| 1444 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(next_neighbour_id) = |
| 1445 | option_next_neighbour_id |
| 1446 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(next_neighbour_widget) = |
| 1447 | self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map. |
| 1448 | .getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&next_neighbour_id) |
| 1449 | { |
| 1450 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = |
| 1451 | next_neighbour_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1452 | } |
| 1453 | } else { |
| 1454 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1455 | } |
| 1456 | } |
| 1457 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# => { |
| 1458 | #[allow(clippy::collapsible_match)] |
| 1459 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().proc_widget_state.is_sort_openrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#is_sort_open. { |
| 1460 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(next_neighbour_id) = |
| 1461 | option_next_neighbour_id |
| 1462 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(next_neighbour_widget) = |
| 1463 | self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map. |
| 1464 | .getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&next_neighbour_id) |
| 1465 | { |
| 1466 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = |
| 1467 | next_neighbour_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1468 | } |
| 1469 | } else { |
| 1470 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1471 | } |
| 1472 | } |
| 1473 | _ => { |
| 1474 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1475 | } |
| 1476 | } |
| 1477 | } |
| 1478 | } |
| 1479 | _ => { |
| 1480 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1481 | } |
| 1482 | } |
| 1483 | } else { |
| 1484 | // Reflect |
| 1485 | match &new_widget.widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1486 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::CpuLegendrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#CpuLegend# => { |
| 1487 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(cpu_widget_state) = self |
| 1488 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1489 | .cpu_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#cpu_state. |
| 1490 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/CpuState#widget_states. |
| 1491 | .getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&(new_widget_id rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().offset)) |
| 1492 | { |
| 1493 | if cpu_widget_state.is_legend_hiddenrust-analyzer cargo bottom 0.14.9 widgets/cpu_graph/CpuWidgetState#is_legend_hidden. { |
| 1494 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(parent_cpu_widget) = |
| 1495 | self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&(new_widget_id rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().offset)) |
| 1496 | { |
| 1497 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = parent_cpu_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1498 | } |
| 1499 | } else { |
| 1500 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1501 | } |
| 1502 | } |
| 1503 | } |
| 1504 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# => { |
| 1505 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 1506 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1507 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1508 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 1509 | .getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&(new_widget_id rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().offset)) |
| 1510 | { |
| 1511 | match &new_widget.widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1512 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# => |
| 1513 | { |
| 1514 | #[allow(clippy::collapsible_match)] |
| 1515 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().proc_widget_state.is_search_enabledrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]is_search_enabled().() { |
| 1516 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(parent_proc_widget) = self |
| 1517 | .widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map. |
| 1518 | .getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&(new_widget_id rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().offset)) |
| 1519 | { |
| 1520 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = |
| 1521 | parent_proc_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1522 | } |
| 1523 | } else { |
| 1524 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1525 | } |
| 1526 | } |
| 1527 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# => { |
| 1528 | #[allow(clippy::collapsible_match)] |
| 1529 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().proc_widget_state.is_sort_openrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#is_sort_open. { |
| 1530 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(parent_proc_widget) = self |
| 1531 | .widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map. |
| 1532 | .getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&(new_widget_id rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u64`][`Sub<u64>`]sub().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().offset)) |
| 1533 | { |
| 1534 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = |
| 1535 | parent_proc_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1536 | } |
| 1537 | } else { |
| 1538 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1539 | } |
| 1540 | } |
| 1541 | _ => { |
| 1542 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1543 | } |
| 1544 | } |
| 1545 | } |
| 1546 | } |
| 1547 | _ => { |
| 1548 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1549 | } |
| 1550 | } |
| 1551 | } |
| 1552 | } |
| 1553 | } |
| 1554 | _ => { |
| 1555 | // Cannot be hidden, does not special treatment. |
| 1556 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1557 | } |
| 1558 | } |
| 1559 | |
| 1560 | let mut reflection_dir: 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#> = Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#; |
| 1561 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((parent_direction, offset)) = &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..parent_reflectorrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#parent_reflector. { |
| 1562 | match &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1563 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::CpuLegendrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#CpuLegend# => { |
| 1564 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(cpu_widget_state) = self |
| 1565 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1566 | .cpu_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#cpu_state. |
| 1567 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/CpuState#widget_states. |
| 1568 | .getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().offset)) |
| 1569 | && cpu_widget_state.is_legend_hiddenrust-analyzer cargo bottom 0.14.9 widgets/cpu_graph/CpuWidgetState#is_legend_hidden. |
| 1570 | { |
| 1571 | reflection_dir = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(parent_direction.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[WidgetDirection][Clone]clone().()); |
| 1572 | } |
| 1573 | } |
| 1574 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# => { |
| 1575 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 1576 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1577 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1578 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 1579 | .getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().offset)) |
| 1580 | { |
| 1581 | match &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1582 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# |
| 1583 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().proc_widget_state.is_search_enabledrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]is_search_enabled().() => |
| 1584 | { |
| 1585 | reflection_dir = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(parent_direction.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[WidgetDirection][Clone]clone().()); |
| 1586 | } |
| 1587 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# |
| 1588 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().proc_widget_state.is_sort_openrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#is_sort_open. => |
| 1589 | { |
| 1590 | reflection_dir = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(parent_direction.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[WidgetDirection][Clone]clone().()); |
| 1591 | } |
| 1592 | _ => {} |
| 1593 | } |
| 1594 | } |
| 1595 | } |
| 1596 | _ => {} |
| 1597 | } |
| 1598 | } |
| 1599 | |
| 1600 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(ref_dir) = &reflection_dir { |
| 1601 | self.move_widget_selection_logicrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection_logic().(ref_dir); |
| 1602 | } |
| 1603 | } |
| 1604 | } else { |
| 1605 | match direction { |
| 1606 | WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Leftrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Left# => self.handle_left_expanded_movementrust-analyzer cargo bottom 0.14.9 app/impl#[App]handle_left_expanded_movement().(), |
| 1607 | WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Rightrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Right# => self.handle_right_expanded_movementrust-analyzer cargo bottom 0.14.9 app/impl#[App]handle_right_expanded_movement().(), |
| 1608 | WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Uprust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Up# => { |
| 1609 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSearchrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSearch# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. |
| 1610 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(current_widget) = |
| 1611 | self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&self.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.) |
| 1612 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_widget_id) = current_widget.up_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#up_neighbour. |
| 1613 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_widget) = self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&new_widget_id) |
| 1614 | { |
| 1615 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1616 | } |
| 1617 | } |
| 1618 | WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Downrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Down# => match &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1619 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# => { |
| 1620 | let widget_id = self.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. |
| 1621 | -rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().match &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1622 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# => 2, |
| 1623 | _ => 0, |
| 1624 | }; |
| 1625 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(current_widget) = self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&widget_id) |
| 1626 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_widget_id) = current_widget.down_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#down_neighbour. |
| 1627 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_widget) = self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&new_widget_id) |
| 1628 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = |
| 1629 | self.statesrust-analyzer cargo bottom 0.14.9 app/App#states..proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state..get_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_widget_state().(widget_id) |
| 1630 | && proc_widget_state.is_search_enabledrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]is_search_enabled().() |
| 1631 | { |
| 1632 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1633 | } |
| 1634 | } |
| 1635 | _ => {} |
| 1636 | }, |
| 1637 | } |
| 1638 | } |
| 1639 | } |
| 1640 | |
| 1641 | fn handle_left_expanded_movementrust-analyzer cargo bottom 0.14.9 app/impl#[App]handle_left_expanded_movement().(&mut self) { |
| 1642 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1643 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_widget_id) = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#left_neighbour. |
| 1644 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 1645 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1646 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1647 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 1648 | .getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&self.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.) |
| 1649 | && proc_widget_state.is_sort_openrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#is_sort_open. |
| 1650 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_sort_widget) = self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&new_widget_id) |
| 1651 | { |
| 1652 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = proc_sort_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); // TODO: Could I remove this clone w/ static references? |
| 1653 | } |
| 1654 | } else if self.app_config_fieldsrust-analyzer cargo bottom 0.14.9 app/App#app_config_fields..cpu_left_legendrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#cpu_left_legend. { |
| 1655 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Cpurust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Cpu# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. |
| 1656 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(current_widget) = self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&self.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.) |
| 1657 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(cpu_widget_state) = self |
| 1658 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1659 | .cpu_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#cpu_state. |
| 1660 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/CpuState#widget_states. |
| 1661 | .getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&self.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.) |
| 1662 | && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().cpu_widget_state.is_legend_hiddenrust-analyzer cargo bottom 0.14.9 widgets/cpu_graph/CpuWidgetState#is_legend_hidden. |
| 1663 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_widget_id) = current_widget.left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#left_neighbour. |
| 1664 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_widget) = self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&new_widget_id) |
| 1665 | { |
| 1666 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1667 | } |
| 1668 | } else if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::CpuLegendrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#CpuLegend# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. |
| 1669 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(current_widget) = self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&self.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.) |
| 1670 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_widget_id) = current_widget.left_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#left_neighbour. |
| 1671 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_widget) = self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&new_widget_id) |
| 1672 | { |
| 1673 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1674 | } |
| 1675 | } |
| 1676 | |
| 1677 | fn handle_right_expanded_movementrust-analyzer cargo bottom 0.14.9 app/impl#[App]handle_right_expanded_movement().(&mut self) { |
| 1678 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1679 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_widget_id) = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#right_neighbour. |
| 1680 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_sort_widget) = self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&new_widget_id) |
| 1681 | { |
| 1682 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = proc_sort_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1683 | } |
| 1684 | } else if self.app_config_fieldsrust-analyzer cargo bottom 0.14.9 app/App#app_config_fields..cpu_left_legendrust-analyzer cargo bottom 0.14.9 app/AppConfigFields#cpu_left_legend. { |
| 1685 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::CpuLegendrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#CpuLegend# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. |
| 1686 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(current_widget) = self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&self.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.) |
| 1687 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_widget_id) = current_widget.right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#right_neighbour. |
| 1688 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_widget) = self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&new_widget_id) |
| 1689 | { |
| 1690 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1691 | } |
| 1692 | } else if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Cpurust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Cpu# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. |
| 1693 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(current_widget) = self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&self.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.) |
| 1694 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(cpu_widget_state) = self |
| 1695 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1696 | .cpu_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#cpu_state. |
| 1697 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/CpuState#widget_states. |
| 1698 | .getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&self.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.) |
| 1699 | && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().cpu_widget_state.is_legend_hiddenrust-analyzer cargo bottom 0.14.9 widgets/cpu_graph/CpuWidgetState#is_legend_hidden. |
| 1700 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_widget_id) = current_widget.right_neighbourrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#right_neighbour. |
| 1701 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_widget) = self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&new_widget_id) |
| 1702 | { |
| 1703 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 1704 | } |
| 1705 | } |
| 1706 | |
| 1707 | pub fn skip_to_firstrust-analyzer cargo bottom 0.14.9 app/impl#[App]skip_to_first().(&mut self) { |
| 1708 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.ignore_normal_keybindsrust-analyzer cargo bottom 0.14.9 app/impl#[App]ignore_normal_keybinds().() { |
| 1709 | match self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1710 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# => { |
| 1711 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 1712 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1713 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1714 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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.) |
| 1715 | { |
| 1716 | proc_widget_state.tablerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#table..scroll_to_firstrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]scroll_to_first().(); |
| 1717 | } |
| 1718 | } |
| 1719 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# => { |
| 1720 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 1721 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1722 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1723 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().2) |
| 1724 | { |
| 1725 | proc_widget_state.sort_tablerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#sort_table..scroll_to_firstrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]scroll_to_first().(); |
| 1726 | } |
| 1727 | } |
| 1728 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Temprust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Temp# => { |
| 1729 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(temp_widget_state) = self |
| 1730 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1731 | .temp_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#temp_state. |
| 1732 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[TempState]get_mut_widget_state().(self.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.) |
| 1733 | { |
| 1734 | temp_widget_state.tablerust-analyzer cargo bottom 0.14.9 widgets/temperature_table/TempWidgetState#table..scroll_to_firstrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]scroll_to_first().(); |
| 1735 | } |
| 1736 | } |
| 1737 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Diskrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Disk# => { |
| 1738 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(disk_widget_state) = self |
| 1739 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1740 | .disk_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#disk_state. |
| 1741 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskState]get_mut_widget_state().(self.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.) |
| 1742 | { |
| 1743 | disk_widget_state.tablerust-analyzer cargo bottom 0.14.9 widgets/disk_table/DiskTableWidget#table..scroll_to_firstrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]scroll_to_first().(); |
| 1744 | } |
| 1745 | } |
| 1746 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::CpuLegendrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#CpuLegend# => { |
| 1747 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(cpu_widget_state) = self |
| 1748 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1749 | .cpu_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#cpu_state. |
| 1750 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[CpuState]get_mut_widget_state().(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().1) |
| 1751 | { |
| 1752 | cpu_widget_state.tablerust-analyzer cargo bottom 0.14.9 widgets/cpu_graph/CpuWidgetState#table..scroll_to_firstrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]scroll_to_first().(); |
| 1753 | } |
| 1754 | } |
| 1755 | |
| 1756 | _ => {} |
| 1757 | } |
| 1758 | self.reset_multi_tap_keysrust-analyzer cargo bottom 0.14.9 app/impl#[App]reset_multi_tap_keys().(); |
| 1759 | } else if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help. { |
| 1760 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..scroll_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#scroll_state..current_scroll_indexrust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#current_scroll_index. = 0; |
| 1761 | } else if self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..is_openrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]is_open().() { |
| 1762 | self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..go_to_firstrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]go_to_first().(); |
| 1763 | } |
| 1764 | } |
| 1765 | |
| 1766 | pub fn skip_to_lastrust-analyzer cargo bottom 0.14.9 app/impl#[App]skip_to_last().(&mut self) { |
| 1767 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.ignore_normal_keybindsrust-analyzer cargo bottom 0.14.9 app/impl#[App]ignore_normal_keybinds().() { |
| 1768 | match self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1769 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# => { |
| 1770 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 1771 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1772 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1773 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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.) |
| 1774 | { |
| 1775 | proc_widget_state.tablerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#table..scroll_to_lastrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]scroll_to_last().(); |
| 1776 | } |
| 1777 | } |
| 1778 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# => { |
| 1779 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 1780 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1781 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1782 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().2) |
| 1783 | { |
| 1784 | proc_widget_state.sort_tablerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#sort_table..scroll_to_lastrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]scroll_to_last().(); |
| 1785 | } |
| 1786 | } |
| 1787 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Temprust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Temp# => { |
| 1788 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(temp_widget_state) = self |
| 1789 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1790 | .temp_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#temp_state. |
| 1791 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[TempState]get_mut_widget_state().(self.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.) |
| 1792 | { |
| 1793 | temp_widget_state.tablerust-analyzer cargo bottom 0.14.9 widgets/temperature_table/TempWidgetState#table..scroll_to_lastrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]scroll_to_last().(); |
| 1794 | } |
| 1795 | } |
| 1796 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Diskrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Disk# => { |
| 1797 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(disk_widget_state) = self |
| 1798 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1799 | .disk_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#disk_state. |
| 1800 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskState]get_mut_widget_state().(self.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.) |
| 1801 | && !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.data_storerust-analyzer cargo bottom 0.14.9 app/App#data_store..get_datarust-analyzer cargo bottom 0.14.9 app/data/store/impl#[DataStore]get_data().().disk_harvestrust-analyzer cargo bottom 0.14.9 app/data/store/InnerData#disk_harvest..is_emptyrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]is_empty().() |
| 1802 | { |
| 1803 | disk_widget_state.tablerust-analyzer cargo bottom 0.14.9 widgets/disk_table/DiskTableWidget#table..scroll_to_lastrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]scroll_to_last().(); |
| 1804 | } |
| 1805 | } |
| 1806 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::CpuLegendrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#CpuLegend# => { |
| 1807 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(cpu_widget_state) = self |
| 1808 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1809 | .cpu_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#cpu_state. |
| 1810 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[CpuState]get_mut_widget_state().(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().1) |
| 1811 | { |
| 1812 | cpu_widget_state.tablerust-analyzer cargo bottom 0.14.9 widgets/cpu_graph/CpuWidgetState#table..scroll_to_lastrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]scroll_to_last().(); |
| 1813 | } |
| 1814 | } |
| 1815 | _ => {} |
| 1816 | } |
| 1817 | self.reset_multi_tap_keysrust-analyzer cargo bottom 0.14.9 app/impl#[App]reset_multi_tap_keys().(); |
| 1818 | } else if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help. { |
| 1819 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..scroll_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#scroll_state..current_scroll_indexrust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#current_scroll_index. = |
| 1820 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..scroll_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#scroll_state..max_scroll_indexrust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#max_scroll_index.; |
| 1821 | } else if self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..is_openrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]is_open().() { |
| 1822 | self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..go_to_lastrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]go_to_last().(); |
| 1823 | } |
| 1824 | } |
| 1825 | |
| 1826 | pub fn decrement_position_countrust-analyzer cargo bottom 0.14.9 app/impl#[App]decrement_position_count().(&mut self) { |
| 1827 | self.change_position_countrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_position_count().(-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][Neg]neg().1); |
| 1828 | } |
| 1829 | |
| 1830 | pub fn increment_position_countrust-analyzer cargo bottom 0.14.9 app/impl#[App]increment_position_count().(&mut self) { |
| 1831 | self.change_position_countrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_position_count().(1); |
| 1832 | } |
| 1833 | |
| 1834 | fn change_position_countrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_position_count().(&mut self, amount: i64) { |
| 1835 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.ignore_normal_keybindsrust-analyzer cargo bottom 0.14.9 app/impl#[App]ignore_normal_keybinds().() { |
| 1836 | match self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1837 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# => { |
| 1838 | self.change_process_positionrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_process_position().(amount); |
| 1839 | } |
| 1840 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# => self.change_process_sort_positionrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_process_sort_position().(amount), |
| 1841 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Temprust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Temp# => self.change_temp_positionrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_temp_position().(amount), |
| 1842 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Diskrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Disk# => self.change_disk_positionrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_disk_position().(amount), |
| 1843 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::CpuLegendrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#CpuLegend# => self.change_cpu_legend_positionrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_cpu_legend_position().(amount), |
| 1844 | _ => {} |
| 1845 | } |
| 1846 | } |
| 1847 | } |
| 1848 | |
| 1849 | fn change_process_sort_positionrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_process_sort_position().(&mut self, num_to_change_by: i64) { |
| 1850 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 1851 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1852 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1853 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().2) |
| 1854 | { |
| 1855 | proc_widget_state |
| 1856 | .sort_tablerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#sort_table. |
| 1857 | .increment_positionrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]increment_position().(num_to_change_by); |
| 1858 | } |
| 1859 | } |
| 1860 | |
| 1861 | fn change_cpu_legend_positionrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_cpu_legend_position().(&mut self, num_to_change_by: i64) { |
| 1862 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(cpu_widget_state) = self |
| 1863 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1864 | .cpu_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#cpu_state. |
| 1865 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/CpuState#widget_states. |
| 1866 | .get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().1)) |
| 1867 | { |
| 1868 | cpu_widget_state.tablerust-analyzer cargo bottom 0.14.9 widgets/cpu_graph/CpuWidgetState#table..increment_positionrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]increment_position().(num_to_change_by); |
| 1869 | } |
| 1870 | } |
| 1871 | |
| 1872 | /// Returns the new position. |
| 1873 | fn change_process_positionrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_process_position().(&mut self, num_to_change_by: i64) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<usize> { |
| 1874 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 1875 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1876 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1877 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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.) |
| 1878 | { |
| 1879 | proc_widget_state.tablerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#table..increment_positionrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]increment_position().(num_to_change_by) |
| 1880 | } else { |
| 1881 | Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# |
| 1882 | } |
| 1883 | } |
| 1884 | |
| 1885 | fn change_temp_positionrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_temp_position().(&mut self, num_to_change_by: i64) { |
| 1886 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(temp_widget_state) = self |
| 1887 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1888 | .temp_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#temp_state. |
| 1889 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/TempState#widget_states. |
| 1890 | .get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&self.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.) |
| 1891 | { |
| 1892 | temp_widget_state.tablerust-analyzer cargo bottom 0.14.9 widgets/temperature_table/TempWidgetState#table..increment_positionrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]increment_position().(num_to_change_by); |
| 1893 | } |
| 1894 | } |
| 1895 | |
| 1896 | fn change_disk_positionrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_disk_position().(&mut self, num_to_change_by: i64) { |
| 1897 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(disk_widget_state) = self |
| 1898 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1899 | .disk_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#disk_state. |
| 1900 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/DiskState#widget_states. |
| 1901 | .get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&self.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.) |
| 1902 | { |
| 1903 | disk_widget_state.tablerust-analyzer cargo bottom 0.14.9 widgets/disk_table/DiskTableWidget#table..increment_positionrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]increment_position().(num_to_change_by); |
| 1904 | } |
| 1905 | } |
| 1906 | |
| 1907 | fn help_scroll_uprust-analyzer cargo bottom 0.14.9 app/impl#[App]help_scroll_up().(&mut self) { |
| 1908 | if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..scroll_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#scroll_state..current_scroll_indexrust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#current_scroll_index. 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 { |
| 1909 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..scroll_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#scroll_state..current_scroll_indexrust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#current_scroll_index. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`SubAssign<Self>`]sub_assign().-=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`SubAssign<Self>`]sub_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u16][`SubAssign<Self>`]sub_assign().1; |
| 1910 | } |
| 1911 | } |
| 1912 | |
| 1913 | fn help_scroll_downrust-analyzer cargo bottom 0.14.9 app/impl#[App]help_scroll_down().(&mut self) { |
| 1914 | if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..scroll_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#scroll_state..current_scroll_indexrust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#current_scroll_index. |
| 1915 | <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().self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..scroll_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#scroll_state..max_scroll_indexrust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#max_scroll_index. |
| 1916 | { |
| 1917 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..scroll_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#scroll_state..current_scroll_indexrust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#current_scroll_index. 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().1; |
| 1918 | } |
| 1919 | } |
| 1920 | |
| 1921 | fn help_scroll_to_or_maxrust-analyzer cargo bottom 0.14.9 app/impl#[App]help_scroll_to_or_max().(&mut self, new_position: u16) { |
| 1922 | if new_position 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().self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..scroll_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#scroll_state..max_scroll_indexrust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#max_scroll_index. { |
| 1923 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..scroll_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#scroll_state..current_scroll_indexrust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#current_scroll_index. = new_position; |
| 1924 | } else { |
| 1925 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..scroll_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#scroll_state..current_scroll_indexrust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#current_scroll_index. = |
| 1926 | self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..scroll_staterust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#scroll_state..max_scroll_indexrust-analyzer cargo bottom 0.14.9 app/states/ParagraphScrollState#max_scroll_index.; |
| 1927 | } |
| 1928 | } |
| 1929 | |
| 1930 | pub fn handle_scroll_uprust-analyzer cargo bottom 0.14.9 app/impl#[App]handle_scroll_up().(&mut self) { |
| 1931 | if self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..is_openrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]is_open().() { |
| 1932 | self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..on_scroll_uprust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]on_scroll_up().(); |
| 1933 | } else if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help. { |
| 1934 | self.help_scroll_uprust-analyzer cargo bottom 0.14.9 app/impl#[App]help_scroll_up().(); |
| 1935 | } else if self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type..is_widget_graphrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType]is_widget_graph().() { |
| 1936 | self.zoom_inrust-analyzer cargo bottom 0.14.9 app/impl#[App]zoom_in().(); |
| 1937 | } else if self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type..is_widget_tablerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType]is_widget_table().() { |
| 1938 | self.decrement_position_countrust-analyzer cargo bottom 0.14.9 app/impl#[App]decrement_position_count().(); |
| 1939 | } |
| 1940 | } |
| 1941 | |
| 1942 | pub fn handle_scroll_downrust-analyzer cargo bottom 0.14.9 app/impl#[App]handle_scroll_down().(&mut self) { |
| 1943 | if self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..is_openrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]is_open().() { |
| 1944 | self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..on_scroll_downrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]on_scroll_down().(); |
| 1945 | } else if self.help_dialog_staterust-analyzer cargo bottom 0.14.9 app/App#help_dialog_state..is_showing_helprust-analyzer cargo bottom 0.14.9 app/states/AppHelpDialogState#is_showing_help. { |
| 1946 | self.help_scroll_downrust-analyzer cargo bottom 0.14.9 app/impl#[App]help_scroll_down().(); |
| 1947 | } else if self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type..is_widget_graphrust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType]is_widget_graph().() { |
| 1948 | self.zoom_outrust-analyzer cargo bottom 0.14.9 app/impl#[App]zoom_out().(); |
| 1949 | } else if self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type..is_widget_tablerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType]is_widget_table().() { |
| 1950 | self.increment_position_countrust-analyzer cargo bottom 0.14.9 app/impl#[App]increment_position_count().(); |
| 1951 | } |
| 1952 | } |
| 1953 | |
| 1954 | fn on_plusrust-analyzer cargo bottom 0.14.9 app/impl#[App]on_plus().(&mut self) { |
| 1955 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1956 | // Toggle collapsing if tree |
| 1957 | self.toggle_collapsing_process_branchrust-analyzer cargo bottom 0.14.9 app/impl#[App]toggle_collapsing_process_branch().(); |
| 1958 | } else { |
| 1959 | self.zoom_inrust-analyzer cargo bottom 0.14.9 app/impl#[App]zoom_in().(); |
| 1960 | } |
| 1961 | } |
| 1962 | |
| 1963 | fn on_minusrust-analyzer cargo bottom 0.14.9 app/impl#[App]on_minus().(&mut self) { |
| 1964 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# = self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1965 | // Toggle collapsing if tree |
| 1966 | self.toggle_collapsing_process_branchrust-analyzer cargo bottom 0.14.9 app/impl#[App]toggle_collapsing_process_branch().(); |
| 1967 | } else { |
| 1968 | self.zoom_outrust-analyzer cargo bottom 0.14.9 app/impl#[App]zoom_out().(); |
| 1969 | } |
| 1970 | } |
| 1971 | |
| 1972 | fn toggle_collapsing_process_branchrust-analyzer cargo bottom 0.14.9 app/impl#[App]toggle_collapsing_process_branch().(&mut self) { |
| 1973 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(pws) = self |
| 1974 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1975 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 1976 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 1977 | .get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&self.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.) |
| 1978 | { |
| 1979 | pws.toggle_current_tree_branch_entryrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]toggle_current_tree_branch_entry().(); |
| 1980 | } |
| 1981 | } |
| 1982 | |
| 1983 | #[inline] |
| 1984 | fn current_ts_staterust-analyzer cargo bottom 0.14.9 app/impl#[App]current_ts_state().(&mut self) -> Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<&mut TimeseriesStaterust-analyzer cargo bottom 0.14.9 components/time_series/TimeseriesState#> { |
| 1985 | match self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 1986 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Cpurust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Cpu# |
| 1987 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(widget_state) = self |
| 1988 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1989 | .cpu_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#cpu_state. |
| 1990 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[CpuState]get_mut_widget_state().(self.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.) => |
| 1991 | { |
| 1992 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(widget_state.graphrust-analyzer cargo bottom 0.14.9 widgets/cpu_graph/CpuWidgetState#graph..state_mutrust-analyzer cargo bottom 0.14.9 components/time_series/percent/impl#[PercentTimeGraph]state_mut().()) |
| 1993 | } |
| 1994 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Memrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Mem# |
| 1995 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(widget_state) = self |
| 1996 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 1997 | .mem_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#mem_state. |
| 1998 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[MemState]get_mut_widget_state().(self.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.) => |
| 1999 | { |
| 2000 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(widget_state.graphrust-analyzer cargo bottom 0.14.9 widgets/mem_graph/MemWidgetState#graph..state_mutrust-analyzer cargo bottom 0.14.9 components/time_series/percent/impl#[PercentTimeGraph]state_mut().()) |
| 2001 | } |
| 2002 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Netrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Net# |
| 2003 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(widget_state) = self |
| 2004 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 2005 | .net_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#net_state. |
| 2006 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[NetState]get_mut_widget_state().(self.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.) => |
| 2007 | { |
| 2008 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(widget_state.graphrust-analyzer cargo bottom 0.14.9 widgets/network_graph/NetWidgetState#graph..state_mutrust-analyzer cargo bottom 0.14.9 components/time_series/auto_y/impl#[AutoYAxisTimeGraph]state_mut().()) |
| 2009 | } |
| 2010 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::TempGraphrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#TempGraph# |
| 2011 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(widget_state) = self |
| 2012 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 2013 | .temp_graph_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#temp_graph_state. |
| 2014 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[TempGraphStates]get_mut_widget_state().(self.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.) => |
| 2015 | { |
| 2016 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(widget_state.graphrust-analyzer cargo bottom 0.14.9 widgets/temperature_graph/TempGraphWidgetState#graph..state_mutrust-analyzer cargo bottom 0.14.9 components/time_series/auto_y/impl#[AutoYAxisTimeGraph]state_mut().()) |
| 2017 | } |
| 2018 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::DiskIoGraphrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#DiskIoGraph# |
| 2019 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(widget_state) = self |
| 2020 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 2021 | .disk_io_graph_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#disk_io_graph_state. |
| 2022 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskIoGraphStates]get_mut_widget_state().(self.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.) => |
| 2023 | { |
| 2024 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(widget_state.graphrust-analyzer cargo bottom 0.14.9 widgets/disk_io_graph/DiskIoGraphWidgetState#graph..state_mutrust-analyzer cargo bottom 0.14.9 components/time_series/auto_y/impl#[AutoYAxisTimeGraph]state_mut().()) |
| 2025 | } |
| 2026 | _ => Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 2027 | } |
| 2028 | } |
| 2029 | |
| 2030 | fn zoom_outrust-analyzer cargo bottom 0.14.9 app/impl#[App]zoom_out().(&mut self) { |
| 2031 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(ts_state) = self.current_ts_staterust-analyzer cargo bottom 0.14.9 app/impl#[App]current_ts_state().() { |
| 2032 | ts_state.zoom_outrust-analyzer cargo bottom 0.14.9 components/time_series/impl#[TimeseriesState]zoom_out().(); |
| 2033 | } |
| 2034 | } |
| 2035 | |
| 2036 | fn zoom_inrust-analyzer cargo bottom 0.14.9 app/impl#[App]zoom_in().(&mut self) { |
| 2037 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(ts_state) = self.current_ts_staterust-analyzer cargo bottom 0.14.9 app/impl#[App]current_ts_state().() { |
| 2038 | ts_state.zoom_inrust-analyzer cargo bottom 0.14.9 components/time_series/impl#[TimeseriesState]zoom_in().(); |
| 2039 | } |
| 2040 | } |
| 2041 | |
| 2042 | fn reset_zoomrust-analyzer cargo bottom 0.14.9 app/impl#[App]reset_zoom().(&mut self) { |
| 2043 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(ts_state) = self.current_ts_staterust-analyzer cargo bottom 0.14.9 app/impl#[App]current_ts_state().() { |
| 2044 | ts_state.reset_zoomrust-analyzer cargo bottom 0.14.9 components/time_series/impl#[TimeseriesState]reset_zoom().(); |
| 2045 | } |
| 2046 | } |
| 2047 | |
| 2048 | /// Moves the mouse to the widget that was clicked on, then propagates the |
| 2049 | /// click down to be handled by the widget specifically. |
| 2050 | pub fn on_left_mouse_uprust-analyzer cargo bottom 0.14.9 app/impl#[App]on_left_mouse_up().(&mut self, x: u16, y: u16) { |
| 2051 | // Pretty dead simple - iterate through the widget map and go to the widget |
| 2052 | // where the click is within. |
| 2053 | |
| 2054 | // TODO: [REFACTOR] might want to refactor this, it's really ugly. |
| 2055 | // TODO: [REFACTOR] Might wanna refactor ALL state things in general, currently |
| 2056 | // everything is grouped up as an app state. We should separate stuff |
| 2057 | // like event state and gui state and etc. |
| 2058 | |
| 2059 | // TODO: [MOUSE] double click functionality...? We would do this above all |
| 2060 | // other actions and SC if needed. |
| 2061 | |
| 2062 | // Short circuit if we're in basic table... we might have to handle the basic |
| 2063 | // table arrow case here... |
| 2064 | |
| 2065 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(bt) = &mut self.statesrust-analyzer cargo bottom 0.14.9 app/App#states..basic_table_widget_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#basic_table_widget_state. |
| 2066 | && let ( |
| 2067 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((left_tlc_x, left_tlc_y)), |
| 2068 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((left_brc_x, left_brc_y)), |
| 2069 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((right_tlc_x, right_tlc_y)), |
| 2070 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((right_brc_x, right_brc_y)), |
| 2071 | ) = (bt.left_tlcrust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#left_tlc., bt.left_brcrust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#left_brc., bt.right_tlcrust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#right_tlc., bt.right_brcrust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#right_brc.) |
| 2072 | { |
| 2073 | if (x 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().left_tlc_x && y 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().left_tlc_y) && (x 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().left_brc_x && y 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().left_brc_y) { |
| 2074 | // Case for the left "button" in the simple arrow. |
| 2075 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_widget) = self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&(bt.currently_displayed_widget_idrust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#currently_displayed_widget_id.)) { |
| 2076 | // We have to move to the current table widget first... |
| 2077 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 2078 | |
| 2079 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# = &new_widget.widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. |
| 2080 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 2081 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 2082 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 2083 | .get_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_widget_state().(new_widget.widget_idrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_id.) |
| 2084 | && proc_widget_state.is_sort_openrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#is_sort_open. |
| 2085 | { |
| 2086 | self.move_widget_selectionrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection().(&WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Leftrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Left#); |
| 2087 | } |
| 2088 | self.move_widget_selectionrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection().(&WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Leftrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Left#); |
| 2089 | return; |
| 2090 | } |
| 2091 | } else if (x 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().right_tlc_x && y 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().right_tlc_y) && (x 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().right_brc_x && y 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().right_brc_y) |
| 2092 | { |
| 2093 | // Case for the right "button" in the simple arrow. |
| 2094 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_widget) = self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(&(bt.currently_displayed_widget_idrust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#currently_displayed_widget_id.)) { |
| 2095 | // We have to move to the current table widget first... |
| 2096 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 2097 | |
| 2098 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# = &new_widget.widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. |
| 2099 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 2100 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 2101 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 2102 | .get_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_widget_state().(new_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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().2) |
| 2103 | && proc_widget_state.is_sort_openrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#is_sort_open. |
| 2104 | { |
| 2105 | self.move_widget_selectionrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection().(&WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Rightrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Right#); |
| 2106 | } |
| 2107 | } |
| 2108 | self.move_widget_selectionrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection().(&WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Rightrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Right#); |
| 2109 | // Bit extra logic to ensure you always land on a proc widget, not the sort |
| 2110 | if let BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# = &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 2111 | self.move_widget_selectionrust-analyzer cargo bottom 0.14.9 app/impl#[App]move_widget_selection().(&WidgetDirectionrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#::Rightrust-analyzer cargo bottom 0.14.9 app/layout_manager/WidgetDirection#Right#); |
| 2112 | } |
| 2113 | return; |
| 2114 | } |
| 2115 | } |
| 2116 | |
| 2117 | // Second short circuit --- are we in the dd dialog state? If so, only check |
| 2118 | // yes/no/signals and bail after. |
| 2119 | if self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..is_openrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]is_open().() && self.process_kill_dialogrust-analyzer cargo bottom 0.14.9 app/App#process_kill_dialog..on_clickrust-analyzer cargo bottom 0.14.9 canvas/dialogs/process_kill_dialog/impl#[ProcessKillDialog]on_click().(x, y) { |
| 2120 | return; |
| 2121 | } |
| 2122 | |
| 2123 | let mut failed_to_get = true; |
| 2124 | for (new_widget_id, widget) in &self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map. { |
| 2125 | if let (Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((tlc_x, tlc_y)), Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((brc_x, brc_y))) = |
| 2126 | (widget.top_left_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#top_left_corner., widget.bottom_right_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#bottom_right_corner.) |
| 2127 | && (x 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().tlc_x && y 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().tlc_y) |
| 2128 | && (x 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().brc_x && y 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().brc_y) |
| 2129 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(new_widget) = self.widget_maprust-analyzer cargo bottom 0.14.9 app/App#widget_map..getrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get().(new_widget_id) |
| 2130 | { |
| 2131 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget. = new_widget.clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidget][Clone]clone().(); |
| 2132 | match &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 2133 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Temprust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Temp# |
| 2134 | | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# |
| 2135 | | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# |
| 2136 | | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Diskrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Disk# |
| 2137 | | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Batteryrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Battery# => { |
| 2138 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(basic_table_widget_state) = |
| 2139 | &mut self.statesrust-analyzer cargo bottom 0.14.9 app/App#states..basic_table_widget_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#basic_table_widget_state. |
| 2140 | { |
| 2141 | basic_table_widget_state.currently_displayed_widget_idrust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#currently_displayed_widget_id. = |
| 2142 | self.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.; |
| 2143 | basic_table_widget_state.currently_displayed_widget_typerust-analyzer cargo bottom 0.14.9 app/states/BasicTableWidgetState#currently_displayed_widget_type. = |
| 2144 | self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type..clonerust-analyzer cargo bottom 0.14.9 app/layout_manager/impl#[BottomWidgetType][Clone]clone().(); |
| 2145 | } |
| 2146 | } |
| 2147 | _ => {} |
| 2148 | } |
| 2149 | |
| 2150 | failed_to_get = false; |
| 2151 | break; |
| 2152 | } |
| 2153 | } |
| 2154 | |
| 2155 | if failed_to_get { |
| 2156 | return; |
| 2157 | } |
| 2158 | |
| 2159 | // Now handle click propagation down to widget. |
| 2160 | if let (Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((_tlc_x, tlc_y)), Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((_brc_x, brc_y))) = ( |
| 2161 | &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..top_left_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#top_left_corner., |
| 2162 | &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..bottom_right_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#bottom_right_corner., |
| 2163 | ) { |
| 2164 | let border_offset = u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<bool>`]from().(self.is_drawing_borderrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_drawing_border().()); |
| 2165 | |
| 2166 | // This check ensures the click isn't actually just clicking on the bottom |
| 2167 | // border. |
| 2168 | if y 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().(brc_y rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u16`][`Sub<u16>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u16`][`Sub<u16>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[`&u16`][`Sub<u16>`]sub().border_offset) { |
| 2169 | match &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 2170 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# |
| 2171 | | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# |
| 2172 | | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::CpuLegendrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#CpuLegend# |
| 2173 | | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Temprust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Temp# |
| 2174 | | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Diskrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Disk# => { |
| 2175 | // Get our index... |
| 2176 | let clicked_entry = y 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().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().tlc_y; |
| 2177 | let header_offset = self.header_offsetrust-analyzer cargo bottom 0.14.9 app/impl#[App]header_offset().(&self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget.); |
| 2178 | let offset = border_offset 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().header_offset; |
| 2179 | if clicked_entry 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().offset { |
| 2180 | let offset_clicked_entry = clicked_entry 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().offset; |
| 2181 | match &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 2182 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# => { |
| 2183 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 2184 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 2185 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 2186 | .get_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_widget_state().(self.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.) |
| 2187 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(visual_index) = |
| 2188 | proc_widget_state.tablerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#table..ratatui_selectedrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]ratatui_selected().() |
| 2189 | { |
| 2190 | let is_tree_mode = matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/matches!!( |
| 2191 | proc_widget_state.moderust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#mode., |
| 2192 | ProcWidgetModerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetMode#::Treerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetMode#Tree# { .. } |
| 2193 | ); |
| 2194 | let change = |
| 2195 | offset_clicked_entry as i64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().visual_index as i64; |
| 2196 | |
| 2197 | self.change_process_positionrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_process_position().(change); |
| 2198 | |
| 2199 | // If in tree mode, also check to see if this click is |
| 2200 | // on |
| 2201 | // the same entry as the already selected one - if it |
| 2202 | // is, |
| 2203 | // then we minimize. |
| 2204 | if is_tree_mode && change rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i64][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i64][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[i64][`PartialEq<Self>`]eq().0 { |
| 2205 | self.toggle_collapsing_process_branchrust-analyzer cargo bottom 0.14.9 app/impl#[App]toggle_collapsing_process_branch().(); |
| 2206 | } |
| 2207 | } |
| 2208 | } |
| 2209 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::ProcSortrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#ProcSort# => { |
| 2210 | // TODO: [Feature] This could sort if you double click! |
| 2211 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 2212 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 2213 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 2214 | .get_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_widget_state().(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().2) |
| 2215 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(visual_index) = |
| 2216 | proc_widget_state.sort_tablerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#sort_table..ratatui_selectedrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]ratatui_selected().() |
| 2217 | { |
| 2218 | self.change_process_sort_positionrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_process_sort_position().( |
| 2219 | offset_clicked_entry as i64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().visual_index as i64, |
| 2220 | ); |
| 2221 | } |
| 2222 | } |
| 2223 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::CpuLegendrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#CpuLegend# => { |
| 2224 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(cpu_widget_state) = self |
| 2225 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 2226 | .cpu_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#cpu_state. |
| 2227 | .get_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[CpuState]get_widget_state().(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().1) |
| 2228 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(visual_index) = |
| 2229 | cpu_widget_state.tablerust-analyzer cargo bottom 0.14.9 widgets/cpu_graph/CpuWidgetState#table..ratatui_selectedrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]ratatui_selected().() |
| 2230 | { |
| 2231 | self.change_cpu_legend_positionrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_cpu_legend_position().( |
| 2232 | offset_clicked_entry as i64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().visual_index as i64, |
| 2233 | ); |
| 2234 | } |
| 2235 | } |
| 2236 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Temprust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Temp# => { |
| 2237 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(temp_widget_state) = self |
| 2238 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 2239 | .temp_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#temp_state. |
| 2240 | .get_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[TempState]get_widget_state().(self.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.) |
| 2241 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(visual_index) = |
| 2242 | temp_widget_state.tablerust-analyzer cargo bottom 0.14.9 widgets/temperature_table/TempWidgetState#table..ratatui_selectedrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]ratatui_selected().() |
| 2243 | { |
| 2244 | self.change_temp_positionrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_temp_position().( |
| 2245 | offset_clicked_entry as i64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().visual_index as i64, |
| 2246 | ); |
| 2247 | } |
| 2248 | } |
| 2249 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Diskrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Disk# => { |
| 2250 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(disk_widget_state) = self |
| 2251 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 2252 | .disk_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#disk_state. |
| 2253 | .get_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskState]get_widget_state().(self.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.) |
| 2254 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(visual_index) = |
| 2255 | disk_widget_state.tablerust-analyzer cargo bottom 0.14.9 widgets/disk_table/DiskTableWidget#table..ratatui_selectedrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/impl#[`DataTable<DataType, H, S, C>`]ratatui_selected().() |
| 2256 | { |
| 2257 | self.change_disk_positionrust-analyzer cargo bottom 0.14.9 app/impl#[App]change_disk_position().( |
| 2258 | offset_clicked_entry as i64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[i64][`Sub<Self>`]sub().visual_index as i64, |
| 2259 | ); |
| 2260 | } |
| 2261 | } |
| 2262 | _ => {} |
| 2263 | } |
| 2264 | } else { |
| 2265 | // We might have clicked on a header! Check if we only exceeded the |
| 2266 | // table + border offset, and it's implied |
| 2267 | // we exceeded the gap offset. |
| 2268 | if clicked_entry rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().==rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u16][`PartialEq<Self>`]eq().border_offset { |
| 2269 | match &self.current_widgetrust-analyzer cargo bottom 0.14.9 app/App#current_widget..widget_typerust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#widget_type. { |
| 2270 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Procrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Proc# => { |
| 2271 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(state) = self |
| 2272 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 2273 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 2274 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[ProcState]get_mut_widget_state().(self.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.) |
| 2275 | && state.tablerust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#table..try_select_locationrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/sortable/impl#[`DataTable<D, H, Sortable, SortColumn<H>>`]try_select_location().(x, y).is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() |
| 2276 | { |
| 2277 | state.force_data_updaterust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]force_data_update().(); |
| 2278 | } |
| 2279 | } |
| 2280 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Temprust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Temp# => { |
| 2281 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(temp) = self |
| 2282 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 2283 | .temp_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#temp_state. |
| 2284 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[TempState]get_mut_widget_state().(self.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.) |
| 2285 | && temp.tablerust-analyzer cargo bottom 0.14.9 widgets/temperature_table/TempWidgetState#table..try_select_locationrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/sortable/impl#[`DataTable<D, H, Sortable, SortColumn<H>>`]try_select_location().(x, y).is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() |
| 2286 | { |
| 2287 | temp.force_data_updaterust-analyzer cargo bottom 0.14.9 widgets/temperature_table/impl#[TempWidgetState]force_data_update().(); |
| 2288 | } |
| 2289 | } |
| 2290 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Diskrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Disk# => { |
| 2291 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(disk) = self |
| 2292 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 2293 | .disk_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#disk_state. |
| 2294 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[DiskState]get_mut_widget_state().(self.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.) |
| 2295 | && disk.tablerust-analyzer cargo bottom 0.14.9 widgets/disk_table/DiskTableWidget#table..try_select_locationrust-analyzer cargo bottom 0.14.9 canvas/components/data_table/sortable/impl#[`DataTable<D, H, Sortable, SortColumn<H>>`]try_select_location().(x, y).is_somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]is_some().() |
| 2296 | { |
| 2297 | disk.force_data_updaterust-analyzer cargo bottom 0.14.9 widgets/disk_table/impl#[DiskTableWidget]force_data_update().(); |
| 2298 | } |
| 2299 | } |
| 2300 | _ => (), |
| 2301 | } |
| 2302 | } |
| 2303 | } |
| 2304 | } |
| 2305 | BottomWidgetTyperust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#::Batteryrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidgetType#Battery# => { |
| 2306 | #[cfg(feature = "battery")] |
| 2307 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(battery_widget_state) = self |
| 2308 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 2309 | .battery_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#battery_state. |
| 2310 | .get_mut_widget_staterust-analyzer cargo bottom 0.14.9 app/states/impl#[AppBatteryState]get_mut_widget_state().(self.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.) |
| 2311 | && let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(tab_spacing) = &battery_widget_state.tab_click_locsrust-analyzer cargo bottom 0.14.9 widgets/battery_info/BatteryWidgetState#tab_click_locs. |
| 2312 | { |
| 2313 | for (itx, ((tlc_x, tlc_y), (brc_x, brc_y))) in |
| 2314 | tab_spacing.iterrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]iter().().enumeraterust-analyzer cargo core https://github.com/rust-lang/rust/library/core iter/traits/iterator/Iterator#enumerate().() |
| 2315 | { |
| 2316 | if (x 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().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().tlc_x && y 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().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().tlc_y) && (x 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().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().brc_x && y 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().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&T`][Deref]deref().brc_y) { |
| 2317 | let num_batteries = |
| 2318 | self.data_storerust-analyzer cargo bottom 0.14.9 app/App#data_store..get_datarust-analyzer cargo bottom 0.14.9 app/data/store/impl#[DataStore]get_data().().battery_harvestrust-analyzer cargo bottom 0.14.9 app/data/store/InnerData#battery_harvest..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().(); |
| 2319 | if itx rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]ge().>=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]ge(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]ge().num_batteries { |
| 2320 | // range check to keep within current data |
| 2321 | battery_widget_state.currently_selected_battery_indexrust-analyzer cargo bottom 0.14.9 widgets/battery_info/BatteryWidgetState#currently_selected_battery_index. = |
| 2322 | num_batteries rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().1; |
| 2323 | } else { |
| 2324 | battery_widget_state.currently_selected_battery_indexrust-analyzer cargo bottom 0.14.9 widgets/battery_info/BatteryWidgetState#currently_selected_battery_index. = itx; |
| 2325 | } |
| 2326 | break; |
| 2327 | } |
| 2328 | } |
| 2329 | } |
| 2330 | } |
| 2331 | _ => {} |
| 2332 | } |
| 2333 | } |
| 2334 | } |
| 2335 | } |
| 2336 | |
| 2337 | fn is_drawing_borderrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_drawing_border().(&self) -> bool { |
| 2338 | self.is_expandedrust-analyzer cargo bottom 0.14.9 app/App#is_expanded. || !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.app_config_fieldsrust-analyzer cargo bottom 0.14.9 app/App#app_config_fields..use_basic_moderust-analyzer cargo bottom 0.14.9 app/AppConfigFields#use_basic_mode. |
| 2339 | } |
| 2340 | |
| 2341 | fn header_offsetrust-analyzer cargo bottom 0.14.9 app/impl#[App]header_offset().(&self, widget: &BottomWidgetrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#) -> u16 { |
| 2342 | if let (Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((_tlc_x, tlc_y)), Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#((_brc_x, brc_y))) = |
| 2343 | (widget.top_left_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#top_left_corner., widget.bottom_right_cornerrust-analyzer cargo bottom 0.14.9 app/layout_manager/BottomWidget#bottom_right_corner.) |
| 2344 | { |
| 2345 | let height_diff = brc_y 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().tlc_y; |
| 2346 | if height_diff 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().constantsrust-analyzer cargo bottom 0.14.9 constants/::TABLE_GAP_HEIGHT_LIMITrust-analyzer cargo bottom 0.14.9 constants/TABLE_GAP_HEIGHT_LIMIT. { |
| 2347 | 1 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().self.app_config_fieldsrust-analyzer cargo bottom 0.14.9 app/App#app_config_fields..table_gaprust-analyzer cargo bottom 0.14.9 app/AppConfigFields#table_gap..heightrust-analyzer cargo bottom 0.14.9 options/config/flags/impl#[TableGap]height().() |
| 2348 | } else { |
| 2349 | let min_height_for_header = if self.is_drawing_borderrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_drawing_border().() { 3 } else { 1 }; |
| 2350 | u16::fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/num/impl#[u16][`From<bool>`]from().(height_diff 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().min_height_for_header) |
| 2351 | } |
| 2352 | } else { |
| 2353 | 1 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().self.app_config_fieldsrust-analyzer cargo bottom 0.14.9 app/App#app_config_fields..table_gaprust-analyzer cargo bottom 0.14.9 app/AppConfigFields#table_gap..heightrust-analyzer cargo bottom 0.14.9 options/config/flags/impl#[TableGap]height().() |
| 2354 | } |
| 2355 | } |
| 2356 | |
| 2357 | /// A quick and dirty way to handle paste events. |
| 2358 | pub fn handle_pasterust-analyzer cargo bottom 0.14.9 app/impl#[App]handle_paste().(&mut self, paste: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#) { |
| 2359 | let is_in_search_widget = self.is_in_search_widgetrust-analyzer cargo bottom 0.14.9 app/impl#[App]is_in_search_widget().(); |
| 2360 | if let Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(proc_widget_state) = self |
| 2361 | .statesrust-analyzer cargo bottom 0.14.9 app/App#states. |
| 2362 | .proc_staterust-analyzer cargo bottom 0.14.9 app/states/AppWidgetStates#proc_state. |
| 2363 | .widget_statesrust-analyzer cargo bottom 0.14.9 app/states/ProcState#widget_states. |
| 2364 | .get_mutrust-analyzer cargo std https://github.com/rust-lang/rust/library/std collections/hash/map/impl#[`HashMap<K, V, S, A>`]get_mut().(&(self.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 ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().1)) |
| 2365 | && is_in_search_widget |
| 2366 | && proc_widget_state.is_search_enabledrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]is_search_enabled().() |
| 2367 | { |
| 2368 | proc_widget_state |
| 2369 | .proc_searchrust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcWidgetState#proc_search. |
| 2370 | .search_staterust-analyzer cargo bottom 0.14.9 widgets/process_table/ProcessSearchState#search_state. |
| 2371 | .input_field_staterust-analyzer cargo bottom 0.14.9 app/states/AppSearchState#input_field_state. |
| 2372 | .insert_stringrust-analyzer cargo bottom 0.14.9 utils/input/impl#[InputFieldState]insert_string().(paste); |
| 2373 | |
| 2374 | proc_widget_state.update_queryrust-analyzer cargo bottom 0.14.9 widgets/process_table/impl#[ProcWidgetState]update_query().(); |
| 2375 | } |
| 2376 | } |
| 2377 | } |