diff --git a/src/Library/demos/Link Button/code.rs b/src/Library/demos/Link Button/code.rs new file mode 100644 index 000000000..105671413 --- /dev/null +++ b/src/Library/demos/Link Button/code.rs @@ -0,0 +1,15 @@ +use crate::workbench; +use gtk::prelude::*; +use gtk::traits::ButtonExt; + +pub fn main() { + let linkbutton: gtk::LinkButton = workbench::builder().object("linkbutton").unwrap(); + + linkbutton.connect_clicked(move |_| { + println!("Link has been visited"); + }); + + linkbutton.connect_notify(Some("visited"), |button, _| { + println!("About to activate {}", button.uri()); + }); +}