pub(crate) fn build_native(
        &self,
        state: &mut AppState<T> ////
        ////state: &Rc<RefCell<AppState<T>>>,
    ) -> Result<WindowHandle<DruidHandler<T>>, PlatformError> { ////
    ////) -> Result<WindowHandle, PlatformError> {
        /* ////
        let mut title = self
            .title
            .clone()
            .unwrap_or_else(|| LocalizedString::new("app-name"));
        title.resolve(&state.borrow().data, &state.borrow().env);
        let mut menu = self.menu.to_owned();
        let platform_menu = menu
            .as_mut()
            .map(|m| m.build_window_menu(&state.borrow().data, &state.borrow().env));
        */ ////

        let handler: DruidHandler<T> = DruidHandler::new_shared(self.id); ////
        ////let handler = DruidHandler::new_shared(state.clone(), self.id);

        let mut builder: WindowBuilder<DruidHandler<T>> = WindowBuilder::new();
        builder.set_handler(handler); ////
        ////builder.set_handler(Box::new(handler));
        if let Some(size) = self.size {
            builder.set_size(size);
        }
        /* ////
        builder.set_title(title.localized_str());
        if let Some(menu) = platform_menu {
            builder.set_menu(menu);
        }
        */ ////

        let root_widget = (self.root_builder)(); ////
        let root_box = root_widget.new_window(); ////
        //let root_win = Window::new(root_widget); ////
        //let root_box = WindowBox::new(&mut root_win); ////
        ////let root = (self.root_builder)();
        state
            ////.borrow_mut()
            .add_window(self.id, root_box); ////
            ////.add_window(self.id, Window::new(root, title, menu));

        builder.build()
    }
/// Attempt to create a platform window from this `WindowDesc`.
Attempt to create a platform window from this `WindowDesc`.
Attempt to create a platform window from this ` WindowDesc ` .
pub(crate) fn build_native(
        &self,
        state: &mut AppState<T> ////
        ////state: &Rc<RefCell<AppState<T>>>,
    ) -> Result<WindowHandle<DruidHandler<T>>, PlatformError> { ////
    ////) -> Result<WindowHandle, PlatformError> {
        /* ////
        let mut title = self
            .title
            .clone()
            .unwrap_or_else(|| LocalizedString::new("app-name"));
        title.resolve(&state.borrow().data, &state.borrow().env);
        let mut menu = self.menu.to_owned();
        let platform_menu = menu
            .as_mut()
            .map(|m| m.build_window_menu(&state.borrow().data, &state.borrow().env));
        */ ////
        let handler: DruidHandler<T> = DruidHandler::new_shared(self.id); ////
        ////let handler = DruidHandler::new_shared(state.clone(), self.id);
        let mut builder: WindowBuilder<DruidHandler<T>> = WindowBuilder::new();
        builder.set_handler(handler); ////
        ////builder.set_handler(Box::new(handler));
        if let Some(size) = self.size {
            builder.set_size(size);
        }
        /* ////
        builder.set_title(title.localized_str());
        if let Some(menu) = platform_menu {
            builder.set_menu(menu);
        }
        */ ////
        let root_widget = (self.root_builder)(); ////
        let root_box = root_widget.new_window(); ////
        //let root_win = Window::new(root_widget); ////
        //let root_box = WindowBox::new(&mut root_win); ////
        ////let root = (self.root_builder)();
        state
            ////.borrow_mut()
            .add_window(self.id, root_box); ////
            ////.add_window(self.id, Window::new(root, title, menu));
        builder.build()
    }
pub ( crate ) fn build_native ( & self , state : & mut AppState < T > //// ////state: &Rc<RefCell<AppState<T>>>, ) -> Result < WindowHandle < DruidHandler < T > > , PlatformError > { //// ////) -> Result<WindowHandle, PlatformError> { /* ////
        let mut title = self
            .title
            .clone()
            .unwrap_or_else(|| LocalizedString::new("app-name"));
        title.resolve(&state.borrow().data, &state.borrow().env);
        let mut menu = self.menu.to_owned();
        let platform_menu = menu
            .as_mut()
            .map(|m| m.build_window_menu(&state.borrow().data, &state.borrow().env));
        */ //// let handler : DruidHandler < T > = DruidHandler :: new_shared ( self . id ) ; //// ////let handler = DruidHandler::new_shared(state.clone(), self.id); let mut builder : WindowBuilder < DruidHandler < T > > = WindowBuilder :: new ( ) ; builder . set_handler ( handler ) ; //// ////builder.set_handler(Box::new(handler)); if let Some ( size ) = self . size { builder . set_size ( size ) ; } /* ////
        builder.set_title(title.localized_str());
        if let Some(menu) = platform_menu {
            builder.set_menu(menu);
        }
        */ //// let root_widget = ( self . root_builder ) ( ) ; //// let root_box = root_widget . new_window ( ) ; //// //let root_win = Window::new(root_widget); //// //let root_box = WindowBox::new(&mut root_win); //// ////let root = (self.root_builder)(); state ////.borrow_mut() . add_window ( self . id , root_box ) ; //// ////.add_window(self.id, Window::new(root, title, menu)); builder . build ( ) }
Attempt to create a platform window from this `WindowDesc`.
Attempt to create a platform window from this ` WindowDesc ` .
&self
state
&mut AppState<T>
&self
state
&mut AppState<T>