pub struct DynLayout { /* private fields */ }
Implementations§
Source§impl DynLayout
impl DynLayout
pub fn builder() -> DynLayoutBuilder
Sourcepub fn parent<W: Into<ControlHandle>>(&self, p: W)
pub fn parent<W: Into<ControlHandle>>(&self, p: W)
Set the layout parent. The handle must be a window object otherwise the function will panic
Sourcepub fn add_child<W: Into<ControlHandle>>(
&self,
m: (i32, i32),
s: (i32, i32),
c: W,
)
pub fn add_child<W: Into<ControlHandle>>( &self, m: (i32, i32), s: (i32, i32), c: W, )
Add a children control to the layout.
This is a simplified interface over add_child_item
Panic:
- If the layout is not initialized
- If the control is not window-like (HWND handle)
Sourcepub fn add_child_item(&self, i: DynLayoutItem)
pub fn add_child_item(&self, i: DynLayoutItem)
Add a children control to the layout.
Panic: - If the layout is not initialized - If the control is not window-like (HWND handle)
Sourcepub fn remove_child<W: Into<ControlHandle>>(&self, c: W)
pub fn remove_child<W: Into<ControlHandle>>(&self, c: W)
Remove the children control in the layout. See also remove_child_by_pos
.
Note that the child control won’t be hidden after being removed from the control.
This method won’t do anything if there is no control at the specified position.
Panic:
- If the layout is not initialized
Sourcepub fn has_child<W: Into<ControlHandle>>(&self, c: W) -> bool
pub fn has_child<W: Into<ControlHandle>>(&self, c: W) -> bool
Check if a window control is a children of the layout
Panic:
- If the layout is not initialized
- If the child is not a window-like control
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DynLayout
impl !RefUnwindSafe for DynLayout
impl !Send for DynLayout
impl !Sync for DynLayout
impl Unpin for DynLayout
impl !UnwindSafe for DynLayout
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