Struct native_windows_gui::GridLayoutBuilder
source · [−]pub struct GridLayoutBuilder { /* private fields */ }
Expand description
Builder for a GridLayout
struct
Implementations
sourceimpl GridLayoutBuilder
impl GridLayoutBuilder
sourcepub fn parent<W: Into<ControlHandle>>(self, p: W) -> GridLayoutBuilder
pub fn parent<W: Into<ControlHandle>>(self, p: W) -> GridLayoutBuilder
Set the layout parent. The handle must be a window object otherwise the function will panic
sourcepub fn child<W: Into<ControlHandle>>(
self,
col: u32,
row: u32,
c: W
) -> GridLayoutBuilder
pub fn child<W: Into<ControlHandle>>(
self,
col: u32,
row: u32,
c: W
) -> GridLayoutBuilder
Add a children to the layout at the position col
and row
.
This is a shortcut over child_item
for item with default span.
The handle must be a window object otherwise the function will panic
sourcepub fn child_item(self, item: GridLayoutItem) -> GridLayoutBuilder
pub fn child_item(self, item: GridLayoutItem) -> GridLayoutBuilder
Add a children to the layout The handle must be a window object otherwise the function will panic
sourcepub fn margin(self, m: [u32; 4]) -> GridLayoutBuilder
pub fn margin(self, m: [u32; 4]) -> GridLayoutBuilder
Set the margins of the layout. The four values are in this order: top, right, bottom, left.
sourcepub fn spacing(self, sp: u32) -> GridLayoutBuilder
pub fn spacing(self, sp: u32) -> GridLayoutBuilder
Set the size of the space between the children in the layout. Default value is 5.
sourcepub fn max_column(self, count: Option<u32>) -> GridLayoutBuilder
pub fn max_column(self, count: Option<u32>) -> GridLayoutBuilder
Set the number of column in the layout
sourcepub fn max_row(self, count: Option<u32>) -> GridLayoutBuilder
pub fn max_row(self, count: Option<u32>) -> GridLayoutBuilder
Set the number of row in the layout
Auto Trait Implementations
impl RefUnwindSafe for GridLayoutBuilder
impl !Send for GridLayoutBuilder
impl !Sync for GridLayoutBuilder
impl Unpin for GridLayoutBuilder
impl UnwindSafe for GridLayoutBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more