pub fn add_child<W: Into<ControlHandle>>(&self, m: (i32, i32), s: (i32, i32), c: W) {
        let hwnd = c.into().hwnd().expect("Child must be a window-like control (HWND handle)");
        let pos = unsafe { wh::get_window_position(hwnd) };
        let size = unsafe { wh::get_window_size(hwnd) };

        let (whost, hhost) = unsafe { wh::get_window_size(self.inner.borrow_mut().base) };

        let xdelta = 0.01 * whost as f32;
        let ydelta = 0.01 * hhost as f32;

        let mut xpos = pos.0;
        if m.0 > 0 { xpos -= (xdelta * m.0 as f32) as i32; }

        let mut ypos = pos.1;
        if m.1 > 0 { ypos -= (ydelta * m.1 as f32) as i32; }

        let mut xsize = size.0 as i32;
        if s.0 > 0 { xsize -= (xdelta * s.0 as f32) as i32; }

        let mut ysize = size.1 as i32;
        if s.1 > 0 { ysize -= (ydelta * s.1 as f32) as i32; }

        let item = DynLayoutItem {
            control: hwnd,
            pos_init: (xpos, ypos),
            size_init: (xsize, ysize),
            mv: m,
            sz: s
        };

        self.add_child_item(item);
    }
/**
        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)
    */
Add a children control to the layout.
This is a simplified interface over `add_child_item`

If the layout is not initialized
If the control is not window-like (HWND handle)
Add a children control to the layout . This is a simplified interface over ` add_child_item ` If the layout is not initialized If the control is not window - like ( HWND handle )
pub fn add_child<W: Into<ControlHandle>>(&self, m: (i32, i32), s: (i32, i32), c: W) {
        let hwnd = c.into().hwnd().expect("Child must be a window-like control (HWND handle)");
        let pos = unsafe { wh::get_window_position(hwnd) };
        let size = unsafe { wh::get_window_size(hwnd) };
        let (whost, hhost) = unsafe { wh::get_window_size(self.inner.borrow_mut().base) };
        let xdelta = 0.01 * whost as f32;
        let ydelta = 0.01 * hhost as f32;
        let mut xpos = pos.0;
        if m.0 > 0 { xpos -= (xdelta * m.0 as f32) as i32; }
        let mut ypos = pos.1;
        if m.1 > 0 { ypos -= (ydelta * m.1 as f32) as i32; }
        let mut xsize = size.0 as i32;
        if s.0 > 0 { xsize -= (xdelta * s.0 as f32) as i32; }
        let mut ysize = size.1 as i32;
        if s.1 > 0 { ysize -= (ydelta * s.1 as f32) as i32; }
        let item = DynLayoutItem {
            control: hwnd,
            pos_init: (xpos, ypos),
            size_init: (xsize, ysize),
            mv: m,
            sz: s
        };
        self.add_child_item(item);
    }
pub fn add_child < W : Into < ControlHandle > > ( & self , m : ( i32 , i32 ) , s : ( i32 , i32 ) , c : W ) { let hwnd = c . into ( ) . hwnd ( ) . expect ( " " ) ; let pos = unsafe { wh :: get_window_position ( hwnd ) } ; let size = unsafe { wh :: get_window_size ( hwnd ) } ; let ( whost , hhost ) = unsafe { wh :: get_window_size ( self . inner . borrow_mut ( ) . base ) } ; let xdelta = 0.01 * whost as f32 ; let ydelta = 0.01 * hhost as f32 ; let mut xpos = pos . 0 ; if m . 0 > 0 { xpos -= ( xdelta * m . 0 as f32 ) as i32 ; } let mut ypos = pos . 1 ; if m . 1 > 0 { ypos -= ( ydelta * m . 1 as f32 ) as i32 ; } let mut xsize = size . 0 as i32 ; if s . 0 > 0 { xsize -= ( xdelta * s . 0 as f32 ) as i32 ; } let mut ysize = size . 1 as i32 ; if s . 1 > 0 { ysize -= ( ydelta * s . 1 as f32 ) as i32 ; } let item = DynLayoutItem { control : hwnd , pos_init : ( xpos , ypos ) , size_init : ( xsize , ysize ) , mv : m , sz : s } ; self . add_child_item ( item ) ; }
Add a children control to the layout.
Add a children control to the layout .
&self
m
(i32, i32)
s
(i32, i32)
c
W