pub struct NoopNativeMenuBackend;Expand description
Backend that renders nothing. Used on platforms without a native-menu
implementation (everything except macOS today) so cross-platform code that
installs a native menu compiles and runs — the in-window MenuBar remains
the menu surface there.
Implementations§
Trait Implementations§
Source§impl Default for NoopNativeMenuBackend
impl Default for NoopNativeMenuBackend
Source§fn default() -> NoopNativeMenuBackend
fn default() -> NoopNativeMenuBackend
Returns the “default value” for a type. Read more
Source§impl NativeMenuBackend for NoopNativeMenuBackend
impl NativeMenuBackend for NoopNativeMenuBackend
Build (or replace) the native menu for
window_id from menu. For
every item the user later chooses, the backend MUST post a
NativeMenuEventPayload — with window_id_owner == window_id —
through poster. If window_id is (or becomes) the active window, the
backend should also make this menu the visible one.Source§fn activate_window(&mut self, _window_id: TeksiloWindowId)
fn activate_window(&mut self, _window_id: TeksiloWindowId)
Make
window_id’s previously-set menu the active/visible one (focus
follows window). No-op if that window never set a menu.Source§fn clear_window(&mut self, _window_id: TeksiloWindowId)
fn clear_window(&mut self, _window_id: TeksiloWindowId)
Forget
window_id’s menu (window closed).Source§fn update_item(&mut self, _id: MenuItemId, _delta: MenuItemDelta)
fn update_item(&mut self, _id: MenuItemId, _delta: MenuItemDelta)
Apply a reactive delta to a single already-installed item.
Auto Trait Implementations§
impl Freeze for NoopNativeMenuBackend
impl RefUnwindSafe for NoopNativeMenuBackend
impl Send for NoopNativeMenuBackend
impl Sync for NoopNativeMenuBackend
impl Unpin for NoopNativeMenuBackend
impl UnsafeUnpin for NoopNativeMenuBackend
impl UnwindSafe for NoopNativeMenuBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.