Trait gtk::prelude::InfoBarExt[][src]

pub trait InfoBarExt: 'static {
Show methods fn add_action_widget<P: IsA<Widget>>(
        &self,
        child: &P,
        response_id: ResponseType
    );
fn add_button(
        &self,
        button_text: &str,
        response_id: ResponseType
    ) -> Option<Button>;
fn action_area(&self) -> Option<Box>;
fn content_area(&self) -> Box;
fn message_type(&self) -> MessageType;
fn is_revealed(&self) -> bool;
fn shows_close_button(&self) -> bool;
fn response(&self, response_id: ResponseType);
fn set_default_response(&self, response_id: ResponseType);
fn set_message_type(&self, message_type: MessageType);
fn set_response_sensitive(&self, response_id: ResponseType, setting: bool);
fn set_revealed(&self, revealed: bool);
fn set_show_close_button(&self, setting: bool);
fn connect_close<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn emit_close(&self);
fn connect_response<F: Fn(&Self, ResponseType) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_message_type_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_revealed_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_show_close_button_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
}
Expand description

Trait containing all InfoBar methods.

Implementors

InfoBar

Required methods

Add an activatable widget to the action area of a InfoBar, connecting a signal handler that will emit the signal::InfoBar::response signal on the message area when the widget is activated. The widget is appended to the end of the message areas action area.

child

an activatable widget

response_id

response ID for child

Adds a button with the given text and sets things up so that clicking the button will emit the “response” signal with the given response_id. The button is appended to the end of the info bars’s action area. The button widget is returned, but usually you don’t need it.

button_text

text of button

response_id

response ID for the button

Returns

the Button widget that was added

Returns the action area of self.

Returns

the action area

Returns the content area of self.

Returns

the content area

Returns the message type of the message area.

Returns

the message type of the message area.

This is supported on crate feature v3_22_29 only.

Returns

the current value of the GtkInfoBar:revealed property.

Returns whether the widget will display a standard close button.

Returns

true if the widget displays standard close button

Emits the “response” signal with the given response_id.

response_id

a response ID

Sets the last widget in the info bar’s action area with the given response_id as the default widget for the dialog. Pressing “Enter” normally activates the default widget.

Note that this function currently requires self to be added to a widget hierarchy.

response_id

a response ID

Sets the message type of the message area.

GTK+ uses this type to determine how the message is displayed.

message_type

a MessageType

Calls gtk_widget_set_sensitive (widget, setting) for each widget in the info bars’s action area with the given response_id. A convenient way to sensitize/desensitize dialog buttons.

response_id

a response ID

setting

TRUE for sensitive

This is supported on crate feature v3_22_29 only.

Sets the GtkInfoBar:revealed property to revealed. This will cause self to show up with a slide-in transition.

Note that this property does not automatically show self and thus won’t have any effect if it is invisible.

revealed

The new value of the property

If true, a standard close button is shown. When clicked it emits the response ResponseType::Close.

setting

true to include a close button

The ::close signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user uses a keybinding to dismiss the info bar.

The default binding for this signal is the Escape key.

Emitted when an action widget is clicked or the application programmer calls DialogExt::response(). The response_id depends on which action widget was clicked.

response_id

the response ID

This is supported on crate feature v3_22_29 only.

Implementors