pub fn refresh(&mut self, data: &T, env: &Env) -> PlatformMenu {
        if let Some(menu) = self.menu.as_mut() {
            let mut ctx = MenuBuildCtx::new(self.popup);
            menu.refresh_children(&mut ctx, data, env);
            ctx.current
        } else {
            tracing::error!("tried to refresh uninitialized menus");
            PlatformMenu::new()
        }
    }
/// Builds a new menu for displaying the given data.
///
/// Mostly you should probably use `update` instead, because that actually checks whether a
/// refresh is necessary.
Builds a new menu for displaying the given data.
Mostly you should probably use `update` instead, because that actually checks whether a
refresh is necessary.
Builds a new menu for displaying the given data . Mostly you should probably use ` update ` instead because that actually checks whether a refresh is necessary .
pub fn refresh(&mut self, data: &T, env: &Env) -> PlatformMenu {
        if let Some(menu) = self.menu.as_mut() {
            let mut ctx = MenuBuildCtx::new(self.popup);
            menu.refresh_children(&mut ctx, data, env);
            ctx.current
        } else {
            tracing::error!("tried to refresh uninitialized menus");
            PlatformMenu::new()
        }
    }
pub fn refresh ( & mut self , data : & T , env : & Env ) -> PlatformMenu { if let Some ( menu ) = self . menu . as_mut ( ) { let mut ctx = MenuBuildCtx :: new ( self . popup ) ; menu . refresh_children ( & mut ctx , data , env ) ; ctx . current } else { tracing :: error ! ( " " ) ; PlatformMenu :: new ( ) } }
Builds a new menu for displaying the given data.
Builds a new menu for displaying the given data .
&mut self
data
&T
env
&Env
&mut self
data
&T
env
&Env