Add more doc-links in docstrings (#1419)
This commit is contained in:
@@ -22,7 +22,7 @@ pub fn drag_source(ui: &mut Ui, id: Id, body: impl FnOnce(&mut Ui)) {
|
||||
// Normally you need to decide a location for a widget first,
|
||||
// because otherwise that widget cannot interact with the mouse.
|
||||
// However, a dragged component cannot be interacted with anyway
|
||||
// (anything with `Order::Tooltip` always gets an empty `Response`)
|
||||
// (anything with `Order::Tooltip` always gets an empty [`Response`])
|
||||
// So this is fine!
|
||||
|
||||
if let Some(pointer_pos) = ui.ctx().pointer_interact_pos() {
|
||||
|
||||
@@ -18,7 +18,7 @@ pub fn password_ui(ui: &mut egui::Ui, password: &mut String) -> egui::Response {
|
||||
let state_id = ui.id().with("show_plaintext");
|
||||
|
||||
// Get state for this widget.
|
||||
// You should get state by value, not by reference to avoid borrowing of `Memory`.
|
||||
// You should get state by value, not by reference to avoid borrowing of [`Memory`].
|
||||
let mut show_plaintext = ui.data().get_temp::<bool>(state_id).unwrap_or(false);
|
||||
|
||||
// Process ui, change a local copy of the state
|
||||
|
||||
@@ -159,7 +159,7 @@ impl super::View for ManualLayoutTest {
|
||||
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
|
||||
// Showing how to place a widget anywhere in the `Ui`:
|
||||
// Showing how to place a widget anywhere in the [`Ui`]:
|
||||
match *widget_type {
|
||||
WidgetType::Button => {
|
||||
ui.put(widget_rect, egui::Button::new("Example button"));
|
||||
|
||||
@@ -93,7 +93,7 @@ impl super::View for TextEdit {
|
||||
let ccursor = egui::text::CCursor::new(0);
|
||||
state.set_ccursor_range(Some(egui::text::CCursorRange::one(ccursor)));
|
||||
state.store(ui.ctx(), text_edit_id);
|
||||
ui.ctx().memory().request_focus(text_edit_id); // give focus back to the `TextEdit`.
|
||||
ui.ctx().memory().request_focus(text_edit_id); // give focus back to the [`TextEdit`].
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ impl super::View for TextEdit {
|
||||
let ccursor = egui::text::CCursor::new(text.chars().count());
|
||||
state.set_ccursor_range(Some(egui::text::CCursorRange::one(ccursor)));
|
||||
state.store(ui.ctx(), text_edit_id);
|
||||
ui.ctx().memory().request_focus(text_edit_id); // give focus back to the `TextEdit`.
|
||||
ui.ctx().memory().request_focus(text_edit_id); // give focus back to the [`TextEdit`].
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user