pub struct Hyperlink { /* private fields */ }
Expand description
A clickable hyperlink, e.g. to "https://github.com/emilk/egui"
.
See also Ui::hyperlink
and Ui::hyperlink_to
.
// These are equivalent:
ui.hyperlink("https://github.com/emilk/egui");
ui.add(egui::Hyperlink::new("https://github.com/emilk/egui"));
// These are equivalent:
ui.hyperlink_to("My favorite repo", "https://github.com/emilk/egui");
ui.add(egui::Hyperlink::from_label_and_url("My favorite repo", "https://github.com/emilk/egui"));
Implementations§
source§impl Hyperlink
impl Hyperlink
pub fn new(url: impl ToString) -> Self
pub fn from_label_and_url( text: impl Into<WidgetText>, url: impl ToString ) -> Self
sourcepub fn open_in_new_tab(self, new_tab: bool) -> Self
pub fn open_in_new_tab(self, new_tab: bool) -> Self
Always open this hyperlink in a new browser tab.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Hyperlink
impl Send for Hyperlink
impl Sync for Hyperlink
impl Unpin for Hyperlink
impl UnwindSafe for Hyperlink
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more