Struct native_windows_gui::DynLayout [−][src]
pub struct DynLayout { /* fields omitted */ }Implementations
impl DynLayout[src]
pub fn builder() -> DynLayoutBuilder[src]
pub fn parent<W: Into<ControlHandle>>(&self, p: W)[src]
Set the layout parent. The handle must be a window object otherwise the function will panic
pub fn add_child<W: Into<ControlHandle>>(
&self,
m: (i32, i32),
s: (i32, i32),
c: W
)[src]
&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)
pub fn add_child_item(&self, i: DynLayoutItem)[src]
Add a children control to the layout.
Panic: - If the layout is not initialized - If the control is not window-like (HWND handle)
pub fn remove_child<W: Into<ControlHandle>>(&self, c: W)[src]
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
pub fn has_child<W: Into<ControlHandle>>(&self, c: W) -> bool[src]
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
pub fn resize(&self, w: u32, h: u32)[src]
Resize the layout as if the parent window had the specified size.
Arguments: w: New width of the layout h: New height of the layout
Panic:
- The layout must have been successfully built otherwise this function will panic.
pub fn fit(&self)[src]
Resize the layout to fit the parent window size
Panic:
- The layout must have been successfully built otherwise this function will panic.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for DynLayout
impl !Send for DynLayout
impl !Sync for DynLayout
impl Unpin for DynLayout
impl !UnwindSafe for DynLayout
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,