Skip to main content

StatusbarExt

Trait StatusbarExt 

Source
pub trait StatusbarExt:
    IsA<Statusbar>
    + Sealed
    + 'static {
    // Provided methods
    fn context_id(&self, context_description: &str) -> u32 { ... }
    fn message_area(&self) -> Option<Box> { ... }
    fn pop(&self, context_id: u32) { ... }
    fn push(&self, context_id: u32, text: &str) -> u32 { ... }
    fn remove(&self, context_id: u32, message_id: u32) { ... }
    fn remove_all(&self, context_id: u32) { ... }
    fn connect_text_popped<F: Fn(&Self, u32, &str) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
    fn connect_text_pushed<F: Fn(&Self, u32, &str) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all Statusbar methods.

§Implementors

Statusbar

Provided Methods§

Source

fn context_id(&self, context_description: &str) -> u32

Returns a new context identifier, given a description of the actual context. Note that the description is not shown in the UI.

§context_description

textual description of what context the new message is being used in

§Returns

an integer id

Source

fn message_area(&self) -> Option<Box>

Retrieves the box containing the label widget.

§Returns

a Box

Source

fn pop(&self, context_id: u32)

Removes the first message in the Statusbar’s stack with the given context id.

Note that this may not change the displayed message, if the message at the top of the stack has a different context id.

§context_id

a context identifier

Source

fn push(&self, context_id: u32, text: &str) -> u32

Pushes a new message onto a statusbar’s stack.

§context_id

the message’s context id, as returned by context_id()

§text

the message to add to the statusbar

§Returns

a message id that can be used with remove().

Source

fn remove(&self, context_id: u32, message_id: u32)

Forces the removal of a message from a statusbar’s stack. The exact context_id and message_id must be specified.

§context_id

a context identifier

§message_id

a message identifier, as returned by push()

Source

fn remove_all(&self, context_id: u32)

Forces the removal of all messages from a statusbar’s stack with the exact context_id.

§context_id

a context identifier

Source

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

Is emitted whenever a new message is popped off a statusbar’s stack.

§context_id

the context id of the relevant message/statusbar

§text

the message that was just popped

Source

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

Is emitted whenever a new message gets pushed onto a statusbar’s stack.

§context_id

the context id of the relevant message/statusbar

§text

the message that was pushed

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§