pub fn add(&self, toolbar_icon: &Arc<ToolbarIcon>, window:*mut Window ) -> usize {
        let mut items = self.items.borrow_mut();
        let id = items.len();
        items.push(toolbar_icon.clone());
        //add also to parent window
        unsafe{(*window).add(&toolbar_icon.clone());}
        id
    }
/// add item to toolbar (and also to window)
add item to toolbar (and also to window)
add item to toolbar ( and also to window )
pub fn add(&self, toolbar_icon: &Arc<ToolbarIcon>, window:*mut Window ) -> usize {
        let mut items = self.items.borrow_mut();
        let id = items.len();
        items.push(toolbar_icon.clone());
        //add also to parent window
        unsafe{(*window).add(&toolbar_icon.clone());}
        id
    }
pub fn add ( & self , toolbar_icon : & Arc < ToolbarIcon > , window : * mut Window ) -> usize { let mut items = self . items . borrow_mut ( ) ; let id = items . len ( ) ; items . push ( toolbar_icon . clone ( ) ) ; //add also to parent window unsafe { ( * window ) . add ( & toolbar_icon . clone ( ) ) ; } id }
add item to toolbar (and also to window)
add item to toolbar ( and also to window )
&self
toolbar_icon
&Arc<ToolbarIcon>
window
*mut Window
&self
toolbar_icon
&Arc<ToolbarIcon>
window
*mut Window