Class: Gtk::InfoBar

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#action_areaGtk::Box

Returns the action area of info_bar.

Returns:

#add_action_widget(child, response_id) ⇒ nil

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

Parameters:

  • child (Gtk::Widget)

    an activatable widget

  • response_id (Integer)

    response ID for child

Returns:

  • (nil)

#add_button(button_text, response_id) ⇒ Gtk::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. that was added

Parameters:

  • button_text (String)

    text of button

  • response_id (Integer)

    response ID for the button

Returns:

#add_buttons(first_button_text, array) ⇒ nil

Adds more buttons, same as calling gtk_info_bar_add_button() repeatedly. The variable argument list should be nil-terminated as with gtk_info_bar_new_with_buttons(). Each button must have both text and response ID.

Parameters:

  • first_button_text (String)

    button text or stock ID

  • array (Array)

    response ID for first button, then more text-response_id pairs, ending with nil

Returns:

  • (nil)

#content_areaGtk::Box

Returns the content area of info_bar.

Returns:

#default_response=(response_id) ⇒ nil

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 info_bar to be added to a widget hierarchy.

Parameters:

  • response_id (Integer)

    a response ID

Returns:

  • (nil)

#message_typeGtk::MessageType

The type of the message.

The type may be used to determine the appearance of the info bar.

Returns:

#message_type=(message_type) ⇒ Gtk::MessageType

The type of the message.

The type may be used to determine the appearance of the info bar.

Parameters:

Returns:

#newGtk::Widget

Creates a new Gtk::InfoBar object.

Returns:

#new_with_buttons(first_button_text, array) ⇒ Gtk::Widget

Creates a new Gtk::InfoBar with buttons. Button text/response ID pairs should be listed, with a nil pointer ending the list. Button text can be either a stock ID such as %GTK_STOCK_OK, or some arbitrary text. A response ID can be any positive number, or one of the values in the Gtk::ResponseType enumeration. If the user clicks one of these dialog buttons, GtkInfoBar will emit the “response” signal with the corresponding response ID.

Parameters:

  • first_button_text (String)

    stock ID or text to go in first button, or nil

  • array (Array)

    response ID for first button, then additional buttons, ending with nil

Returns:

#response(response_id) ⇒ nil

Emits the “response” signal with the given response_id.

Parameters:

  • response_id (Integer)

    a response ID

Returns:

  • (nil)

#revealedTrueClass

Returns the current value of the GtkInfoBar:revealed property.

Returns:

  • (TrueClass)

    the current value of the GtkInfoBar:revealed property.

#revealed=(revealed) ⇒ TrueClass

Parameters:

  • revealed (TrueClass)

Returns:

  • (TrueClass)

    revealed

  • (TrueClass)

    revealed

#revealed?TrueClass

Returns revealed.

Returns:

  • (TrueClass)

    revealed

#set_response_sensitive(response_id, setting) ⇒ nil

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.

Parameters:

  • response_id (Integer)

    a response ID

  • setting (TrueClass)

    TRUE for sensitive

Returns:

  • (nil)

#show_close_buttonTrueClass

Returns whether the widget will display a standard close button.

Returns:

  • (TrueClass)

    true if the widget displays standard close button

#show_close_button=(show_close_button) ⇒ TrueClass

Whether to include a standard close button.

Parameters:

  • show_close_button (TrueClass)

Returns:

  • (TrueClass)

    show-close-button

  • (TrueClass)

    show-close-button

#show_close_button?TrueClass

Whether to include a standard close button.

Returns:

  • (TrueClass)

    show-close-button