pub struct HoverButton { /* private fields */ }
Implementations§
Source§impl HoverButton
impl HoverButton
Source§impl HoverButton
impl HoverButton
Sourcepub fn with_label(self, title: &str) -> Self
pub fn with_label(self, title: &str) -> Self
Initialize with a label
Examples found in repository?
examples/buttons.rs (line 20)
4fn main() {
5 let a = app::App::default();
6 app::set_background_color(0, 0, 0);
7 app::set_foreground_color(255, 255, 255);
8 app::set_background2_color(128, 128, 128);
9 let mut w = window::Window::default().with_size(400, 400);
10 let col = group::Flex::default()
11 .with_size(80, 300)
12 .column()
13 .center_of_parent();
14 Toggle::default();
15 RoundToggle::default();
16 RoundToggle2::default();
17 CheckButton::default().with_label("Done?");
18 HollowRoundToggle::default();
19 RadioButton::default().with_label("Radio");
20 HoverButton::default().with_label("Hello");
21 col.end();
22 w.end();
23 w.show();
24 a.run().unwrap();
25}
Sourcepub fn with_align(self, align: Align) -> Self
pub fn with_align(self, align: Align) -> Self
Initialize with alignment
Sourcepub fn with_type<T: WidgetType>(self, typ: T) -> Self
pub fn with_type<T: WidgetType>(self, typ: T) -> Self
Initialize with type
Sourcepub fn below_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
pub fn below_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
Initialize at bottom of another widget
Sourcepub fn above_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
pub fn above_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
Initialize above of another widget
Sourcepub fn right_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
pub fn right_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
Initialize right of another widget
Sourcepub fn left_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
pub fn left_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
Initialize left of another widget
Sourcepub fn center_x<W: WidgetExt>(self, w: &W) -> Self
pub fn center_x<W: WidgetExt>(self, w: &W) -> Self
Initialize center of another widget on the x axis
Sourcepub fn center_y<W: WidgetExt>(self, w: &W) -> Self
pub fn center_y<W: WidgetExt>(self, w: &W) -> Self
Initialize center of another widget on the y axis
Sourcepub fn center_of_parent(self) -> Self
pub fn center_of_parent(self) -> Self
Initialize center of parent
Sourcepub fn size_of_parent(self) -> Self
pub fn size_of_parent(self) -> Self
Initialize to the size of the parent
Trait Implementations§
Source§impl Clone for HoverButton
impl Clone for HoverButton
Source§fn clone(&self) -> HoverButton
fn clone(&self) -> HoverButton
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for HoverButton
impl Default for HoverButton
Source§impl Deref for HoverButton
impl Deref for HoverButton
Auto Trait Implementations§
impl Freeze for HoverButton
impl !RefUnwindSafe for HoverButton
impl !Send for HoverButton
impl !Sync for HoverButton
impl Unpin for HoverButton
impl !UnwindSafe for HoverButton
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