[−][src]Trait gtk::InfoBarExt
Required methods
fn add_action_widget<P: IsA<Widget>>(
&self,
child: &P,
response_id: ResponseType
)
&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>
&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>
fn get_content_area(&self) -> Box
fn get_message_type(&self) -> MessageType
fn get_revealed(&self) -> bool
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)
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
&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
&self,
f: F
) -> SignalHandlerId
fn connect_property_revealed_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_show_close_button_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<InfoBar>> InfoBarExt for O[src]
fn add_action_widget<P: IsA<Widget>>(
&self,
child: &P,
response_id: ResponseType
)[src]
&self,
child: &P,
response_id: ResponseType
)
fn add_button(
&self,
button_text: &str,
response_id: ResponseType
) -> Option<Button>[src]
&self,
button_text: &str,
response_id: ResponseType
) -> Option<Button>
fn get_action_area(&self) -> Option<Box>[src]
fn get_content_area(&self) -> Box[src]
fn get_message_type(&self) -> MessageType[src]
fn get_revealed(&self) -> bool[src]
fn get_show_close_button(&self) -> bool[src]
fn response(&self, response_id: ResponseType)[src]
fn set_default_response(&self, response_id: ResponseType)[src]
fn set_message_type(&self, message_type: MessageType)[src]
fn set_response_sensitive(&self, response_id: ResponseType, setting: bool)[src]
fn set_revealed(&self, revealed: bool)[src]
fn set_show_close_button(&self, setting: bool)[src]
fn connect_close<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId[src]
fn emit_close(&self)[src]
fn connect_response<F: Fn(&Self, ResponseType) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_message_type_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_revealed_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_show_close_button_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId[src]
&self,
f: F
) -> SignalHandlerId