(
row: &mut TableRow<'_, '_>,
ctx: FunctionDiffContext<'_>,
appearance: &Appearance,
ins_view_state: &FunctionViewState,
diff_config: &DiffObjConfig,
column: usize,
)
| 246 | |
| 247 | #[must_use] |
| 248 | pub(crate) fn asm_col_ui( |
| 249 | row: &mut TableRow<'_, '_>, |
| 250 | ctx: FunctionDiffContext<'_>, |
| 251 | appearance: &Appearance, |
| 252 | ins_view_state: &FunctionViewState, |
| 253 | diff_config: &DiffObjConfig, |
| 254 | column: usize, |
| 255 | ) -> Option<DiffViewAction> { |
| 256 | let mut ret = None; |
| 257 | let symbol_ref = ctx.symbol_ref?; |
| 258 | let ins_row = &ctx.diff.symbols[symbol_ref].instruction_rows[row.index()]; |
| 259 | let response_cb = |response: Response| { |
| 260 | if let Some(ins_ref) = ins_row.ins_ref { |
| 261 | response.context_menu(|ui| { |
| 262 | ins_context_menu(ui, ctx.obj, symbol_ref, ins_ref, column, diff_config, appearance) |
| 263 | }); |
| 264 | response.on_hover_ui_at_pointer(|ui| { |
| 265 | ins_hover_ui(ui, ctx.obj, symbol_ref, ins_ref, diff_config, appearance) |
| 266 | }) |
| 267 | } else { |
| 268 | response |
| 269 | } |
| 270 | }; |
| 271 | let (_, response) = row.col(|ui| { |
| 272 | if let Some(action) = asm_row_ui( |
| 273 | ui, |
| 274 | ctx.obj, |
| 275 | ins_row, |
| 276 | symbol_ref, |
| 277 | appearance, |
| 278 | ins_view_state, |
| 279 | diff_config, |
| 280 | column, |
| 281 | response_cb, |
| 282 | ) { |
| 283 | ret = Some(action); |
| 284 | } |
| 285 | }); |
| 286 | response_cb(response); |
| 287 | ret |
| 288 | } |
| 289 | |
| 290 | #[derive(Clone, Copy)] |
| 291 | pub struct FunctionDiffContext<'a> { |
no test coverage detected