pub trait WidgetProps {
Show 15 methods
// Required methods
fn with_pos(self, x: i32, y: i32) -> Self
where Self: Sized;
fn with_size(self, width: i32, height: i32) -> Self
where Self: Sized;
fn with_label(self, title: &str) -> Self
where Self: Sized;
fn with_align(self, align: Align) -> Self
where Self: Sized;
fn with_type<T: WidgetType>(self, typ: T) -> Self
where Self: Sized;
fn below_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
where Self: Sized;
fn above_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
where Self: Sized;
fn right_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
where Self: Sized;
fn left_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Self
where Self: Sized;
fn center_of<W: WidgetExt>(self, w: &W) -> Self
where Self: Sized;
fn center_x<W: WidgetExt>(self, w: &W) -> Self
where Self: Sized;
fn center_y<W: WidgetExt>(self, w: &W) -> Self
where Self: Sized;
fn center_of_parent(self) -> Self
where Self: Sized;
fn size_of<W: WidgetExt>(self, w: &W) -> Self
where Self: Sized;
fn size_of_parent(self) -> Self
where Self: Sized;
}
Expand description
Builder pattern helper
Required Methods§
Sourcefn with_size(self, width: i32, height: i32) -> Selfwhere
Self: Sized,
fn with_size(self, width: i32, height: i32) -> Selfwhere
Self: Sized,
Initialize to size width, height
Sourcefn with_label(self, title: &str) -> Selfwhere
Self: Sized,
fn with_label(self, title: &str) -> Selfwhere
Self: Sized,
Initialize with a label
Sourcefn with_align(self, align: Align) -> Selfwhere
Self: Sized,
fn with_align(self, align: Align) -> Selfwhere
Self: Sized,
Initialize with alignment
Sourcefn with_type<T: WidgetType>(self, typ: T) -> Selfwhere
Self: Sized,
fn with_type<T: WidgetType>(self, typ: T) -> Selfwhere
Self: Sized,
Initialize with type
Sourcefn below_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Selfwhere
Self: Sized,
fn below_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Selfwhere
Self: Sized,
Initialize at bottom of another widget
Sourcefn above_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Selfwhere
Self: Sized,
fn above_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Selfwhere
Self: Sized,
Initialize above of another widget
Sourcefn right_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Selfwhere
Self: Sized,
fn right_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Selfwhere
Self: Sized,
Initialize right of another widget
Sourcefn left_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Selfwhere
Self: Sized,
fn left_of<W: WidgetExt>(self, wid: &W, padding: i32) -> Selfwhere
Self: Sized,
Initialize left of another widget
Sourcefn center_of<W: WidgetExt>(self, w: &W) -> Selfwhere
Self: Sized,
fn center_of<W: WidgetExt>(self, w: &W) -> Selfwhere
Self: Sized,
Initialize center of another widget
Sourcefn center_x<W: WidgetExt>(self, w: &W) -> Selfwhere
Self: Sized,
fn center_x<W: WidgetExt>(self, w: &W) -> Selfwhere
Self: Sized,
Initialize center of another widget on the x axis
Sourcefn center_y<W: WidgetExt>(self, w: &W) -> Selfwhere
Self: Sized,
fn center_y<W: WidgetExt>(self, w: &W) -> Selfwhere
Self: Sized,
Initialize center of another widget on the y axis
Sourcefn center_of_parent(self) -> Selfwhere
Self: Sized,
fn center_of_parent(self) -> Selfwhere
Self: Sized,
Initialize center of parent
Sourcefn size_of<W: WidgetExt>(self, w: &W) -> Selfwhere
Self: Sized,
fn size_of<W: WidgetExt>(self, w: &W) -> Selfwhere
Self: Sized,
Initialize to the size of another widget
Sourcefn size_of_parent(self) -> Selfwhere
Self: Sized,
fn size_of_parent(self) -> Selfwhere
Self: Sized,
Initialize to the size of the parent