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

pub trait InfoBarExt: 'static {
    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 get_action_area(&self) -> Option<Box>;
fn get_content_area(&self) -> Box;
fn get_message_type(&self) -> MessageType;
fn get_revealed(&self) -> bool;
fn get_show_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_property_message_type_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_revealed_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_show_close_button_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all InfoBar methods.

Implementors

InfoBar

Required methods

fn add_action_widget<P: IsA<Widget>>(
    &self,
    child: &P,
    response_id: ResponseType
)

Add an activatable widget to the action area of a InfoBar, connecting a signal handler that will emit the 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

fn add_button(
    &self,
    button_text: &str,
    response_id: ResponseType
) -> Option<Button>

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

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

Returns the action area of self.

Returns

the action area

fn get_content_area(&self) -> Box

Returns the content area of self.

Returns

the content area

fn get_message_type(&self) -> MessageType

Returns the message type of the message area.

Returns

the message type of the message area.

fn get_revealed(&self) -> bool

Feature: v3_22_29

Returns

the current value of the InfoBar:revealed property.

fn get_show_close_button(&self) -> bool

Returns whether the widget will display a standard close button.

Returns

true if the widget displays standard close button

fn response(&self, response_id: ResponseType)

Emits the “response” signal with the given response_id.

response_id

a response ID

fn set_default_response(&self, response_id: ResponseType)

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

fn set_message_type(&self, message_type: MessageType)

Sets the message type of the message area.

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

message_type

a MessageType

fn set_response_sensitive(&self, response_id: ResponseType, setting: bool)

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

fn set_revealed(&self, revealed: bool)

Sets the InfoBar: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.

Feature: v3_22_29

revealed

The new value of the property

fn set_show_close_button(&self, setting: bool)

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

setting

true to include a close button

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

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

The default binding for this signal is the Escape key.

fn emit_close(&self)

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

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

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

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

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

Loading content...

Implementors

impl<O: IsA<InfoBar>> InfoBarExt for O[src]

Loading content...