gtk4::prelude

Trait ApplicationWindowExt

Source
pub trait ApplicationWindowExt:
    IsA<ApplicationWindow>
    + Sealed
    + 'static {
    // Provided methods
    fn help_overlay(&self) -> Option<ShortcutsWindow> { ... }
    fn id(&self) -> u32 { ... }
    fn shows_menubar(&self) -> bool { ... }
    fn set_help_overlay(&self, help_overlay: Option<&ShortcutsWindow>) { ... }
    fn set_show_menubar(&self, show_menubar: bool) { ... }
    fn connect_show_menubar_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all ApplicationWindow methods.

§Implementors

ApplicationWindow

Provided Methods§

Source

fn help_overlay(&self) -> Option<ShortcutsWindow>

Gets the ShortcutsWindow that is associated with @self.

See set_help_overlay().

§Returns

the help overlay associated with @self

Source

fn id(&self) -> u32

Returns the unique ID of the window.

If the window has not yet been added to a Application, returns 0.

§Returns

the unique ID for @self, or 0 if the window has not yet been added to a Application

Source

fn shows_menubar(&self) -> bool

Returns whether the window will display a menubar for the app menu and menubar as needed.

§Returns

true if @self will display a menubar when needed

Source

fn set_help_overlay(&self, help_overlay: Option<&ShortcutsWindow>)

Associates a shortcuts window with the application window.

Additionally, sets up an action with the name win.show-help-overlay to present it.

@self takes responsibility for destroying @help_overlay.

§help_overlay

a ShortcutsWindow

Source

fn set_show_menubar(&self, show_menubar: bool)

Sets whether the window will display a menubar for the app menu and menubar as needed.

§show_menubar

whether to show a menubar when needed

Source

fn connect_show_menubar_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§