1use fltk::{enums::*, prelude::*, *};
2
3fn main() {
4 let app = app::App::default();
5 let mut win = window::Window::default().with_size(400, 300);
6 let mut frame = frame::Frame::default()
7 .with_size(200, 100)
8 .with_label("Right click me!")
9 .center_of_parent();
10 frame.set_frame(FrameType::BorderFrame);
11 frame.set_color(Color::Red);
12 let mut menu = menu::MenuButton::default()
13 .size_of(&frame)
14 .center_of(&frame)
15 .with_type(menu::MenuButtonType::Popup3);
16 menu.add_choice("1st menu item\t|2nd menu item\t|3rd menu item\t");
17 menu.set_callback(|m| println!("{:?}", m.choice()));
18 win.end();
19 win.show();
20
21 app.run().unwrap();
22}