Skip to content

Commit

Permalink
library: Ported Popover in RUST
Browse files Browse the repository at this point in the history
  • Loading branch information
onkarrai06 committed Sep 5, 2023
1 parent 26b1c3b commit 497a360
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Library/demos/Popovers/code.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use crate::workbench;
use gtk::prelude::*;

pub fn main() {
let popover_ids = ["plain_popover", "popover_menu"];

for id in popover_ids {
let popover: gtk::Popover = workbench::builder().object(id).unwrap();

popover.connect_closed(move |popover| {
let popover_name = popover.name();
println!("{} closed.", popover_name);
});
}
}

0 comments on commit 497a360

Please sign in to comment.