pub fn fit(&self) -> Result<(), stretch::Error> {
        let inner = self.inner.borrow();
        if inner.base.is_null() {
            panic!("FlexboxLayout is not bound to a parent control.")
        }

        if let Some(parent_layout) = &inner.parent_layout {
            parent_layout.fit()
        } 
        else {
            let (w, h) = unsafe { wh::get_window_size(inner.base) };
            self.update_layout(w, h, (0, 0))
        }
    }
/** 
        Resize the layout to fit the parent window size
        
        Panic:
        - The layout must have been successfully built otherwise this function will panic.
    */
Resize the layout to fit the parent window size
Panic:
The layout must have been successfully built otherwise this function will panic.
Resize the layout to fit the parent window size Panic : The layout must have been successfully built otherwise this function will panic .
pub fn fit(&self) -> Result<(), stretch::Error> {
        let inner = self.inner.borrow();
        if inner.base.is_null() {
            panic!("FlexboxLayout is not bound to a parent control.")
        }
        if let Some(parent_layout) = &inner.parent_layout {
            parent_layout.fit()
        } 
        else {
            let (w, h) = unsafe { wh::get_window_size(inner.base) };
            self.update_layout(w, h, (0, 0))
        }
    }
pub fn fit ( & self ) -> Result < ( ) , stretch :: Error > { let inner = self . inner . borrow ( ) ; if inner . base . is_null ( ) { panic ! ( " " ) } if let Some ( parent_layout ) = & inner . parent_layout { parent_layout . fit ( ) } else { let ( w , h ) = unsafe { wh :: get_window_size ( inner . base ) } ; self . update_layout ( w , h , ( 0 , 0 ) ) } }
Resize the layout to fit the parent window size
Panic:
 The layout must have been successfully built otherwise this function will panic.
Resize the layout to fit the parent window size Panic : The layout must have been successfully built otherwise this function will panic .
&self