Trait libpanel::prelude::WorkspaceExt

source ·
pub trait WorkspaceExt: IsA<Workspace> + Sealed + 'static {
    // Provided methods
    fn action_set_enabled(&self, action_name: &str, enabled: bool) { ... }
    fn id(&self) -> GString { ... }
    fn workbench(&self) -> Option<Workbench> { ... }
    fn inhibit(
        &self,
        flags: ApplicationInhibitFlags,
        reason: &str,
    ) -> Option<Inhibitor> { ... }
    fn set_id(&self, id: &str) { ... }
    fn connect_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
}
Expand description

Trait containing all Workspace methods.

§Implementors

DocumentWorkspace, Workspace

Provided Methods§

source

fn action_set_enabled(&self, action_name: &str, enabled: bool)

source

fn id(&self) -> GString

source

fn workbench(&self) -> Option<Workbench>

Gets the Workbench self is a part of.

§Returns

a Workbench, or None

source

fn inhibit( &self, flags: ApplicationInhibitFlags, reason: &str, ) -> Option<Inhibitor>

Inhibits one or more particular actions in the session.

When the resulting Inhibitor releases it’s last reference the inhibitor will be dismissed. Alternatively, you may force the release of the inhibit using Inhibitor::uninhibit().

§flags

the inhibit flags

§reason

the reason for the inhibit

§Returns

a Inhibitor or None

source

fn set_id(&self, id: &str)

source

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

Object Safety§

This trait is not object safe.

Implementors§