(
ui: &mut Ui,
ctx: SymbolDiffContext<'_>,
symbol_idx: usize,
symbol: &Symbol,
section: Option<&Section>,
column: usize,
appearance: &Appearance,
)
| 497 | } |
| 498 | |
| 499 | pub fn symbol_context_menu_ui( |
| 500 | ui: &mut Ui, |
| 501 | ctx: SymbolDiffContext<'_>, |
| 502 | symbol_idx: usize, |
| 503 | symbol: &Symbol, |
| 504 | section: Option<&Section>, |
| 505 | column: usize, |
| 506 | appearance: &Appearance, |
| 507 | ) -> Option<DiffViewAction> { |
| 508 | let mut ret = None; |
| 509 | ui.scope(|ui| { |
| 510 | ui.style_mut().override_text_style = Some(egui::TextStyle::Monospace); |
| 511 | ui.style_mut().wrap_mode = Some(egui::TextWrapMode::Truncate); |
| 512 | |
| 513 | if let Some(action) = |
| 514 | context_menu_items_ui(ui, symbol_context(ctx.obj, symbol_idx), column, appearance) |
| 515 | { |
| 516 | ret = Some(action); |
| 517 | } |
| 518 | |
| 519 | if let Some(section) = section |
| 520 | && ui.button("Map symbol").clicked() |
| 521 | { |
| 522 | let symbol_ref = SymbolRefByName::new(symbol, Some(section)); |
| 523 | if column == 0 { |
| 524 | ret = Some(DiffViewAction::SelectingRight(symbol_ref)); |
| 525 | } else { |
| 526 | ret = Some(DiffViewAction::SelectingLeft(symbol_ref)); |
| 527 | } |
| 528 | ui.close(); |
| 529 | } |
| 530 | }); |
| 531 | ret |
| 532 | } |
| 533 | |
| 534 | pub fn symbol_hover_ui( |
| 535 | ui: &mut Ui, |
no test coverage detected