Trait gtk::prelude::StatusbarExt
source · [−]pub trait StatusbarExt: 'static {
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
Required Methods
fn context_id(&self, context_description: &str) -> u32
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
fn message_area(&self) -> Option<Box>
fn message_area(&self) -> Option<Box>
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
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()
.
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()
fn remove_all(&self, context_id: u32)
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
fn connect_text_popped<F: Fn(&Self, u32, &str) + 'static>(
&self,
f: F
) -> SignalHandlerId
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
fn connect_text_pushed<F: Fn(&Self, u32, &str) + 'static>(
&self,
f: F
) -> SignalHandlerId
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