fltk_builder/extensions/builder/
button.rs1use fltk::{
2 enums::{FrameType, Shortcut},
3 prelude::ButtonExt,
4};
5
6pub trait ButtonBuilderExt {
8 fn with_shortcut(self, shortcut: Shortcut) -> Self;
10 fn with_down_frame(self, f: FrameType) -> Self;
12}
13
14impl<B> ButtonBuilderExt for B
15where
16 B: ButtonExt,
17{
18 fn with_shortcut(mut self, shortcut: Shortcut) -> Self {
19 self.set_shortcut(shortcut);
20 self
21 }
22
23 fn with_down_frame(mut self, f: FrameType) -> Self {
24 self.set_down_frame(f);
25 self
26 }
27}