Main Page Widgets Namespaces Book

# Gtk::InfoBar Class Reference
[Widgets]

Inheritance diagram for Gtk::InfoBar:

[legend]

List of all members.

## Detailed Description

TODO.

The InfoBar widget looks like this: TODO

Since gtkmm 2.18:

## Public Member Functions

void | add_action_widget (Widget& child, int response_id)
| 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.
Button* | add_button (const Gtk::StockID& stock_id, int response_id)
| Adds a button with the given text (or a stock button, if button_text is a stock ID) and sets things up so that clicking the button will emit the "response" signal with the given response_id.
Button* | add_button (const Glib::ustring& button_text, int response_id)
| Adds a button with the given text (or a stock button, if button_text is a stock ID) and sets things up so that clicking the button will emit the "response" signal with the given response_id.
const Widget* | get_action_area () const
| Returns: the action area.
Widget* | get_action_area ()
| Returns: the action area.
const Widget* | get_content_area () const
| Returns: the content area.
Widget* | get_content_area ()
| Returns: the content area.
MessageType | get_message_type () const
| Returns: the message type of the message area.
const GtkInfoBar* | gobj () const
| Provides access to the underlying C GtkObject.
GtkInfoBar* | gobj ()
| Provides access to the underlying C GtkObject.
| InfoBar ()
void | response (int response_id)
| Emits the 'response' signal with the given response_id.
void | set_default_response (int 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.
void | set_message_type (MessageType message_type)
| Sets the message type of the message area.
void | set_response_sensitive (int response_id, bool setting=true)
| Calls gtk_widget_set_sensitive (widget, setting) for each widget in the info bars's action area with the given response_id.
virtual | ~InfoBar ()

## Related Functions

(Note that these are not member functions.)
Gtk::InfoBar* | wrap (GtkInfoBar* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Constructor & Destructor Documentation

virtual Gtk::InfoBar::~InfoBar | ( |  | ) | `[virtual]`

Gtk::InfoBar::InfoBar | ( |  | ) |

## Member Function Documentation

void Gtk::InfoBar::add_action_widget | ( | Widget& | child,
|  | int | response_id |
| ) |  |  |

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.

Since gtkmm 2.18:

Parameters:

  | child | An activatable widget.
  | response_id | Response ID for child.

Button* Gtk::InfoBar::add_button | ( | const Gtk::StockID& | stock_id,
|  | int | response_id |
| ) |  |  |

Adds a button with the given text (or a stock button, if button_text is a stock ID) 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.

Parameters:

  | button_text | Text of button, or stock ID.
  | response_id | Response ID for the button.

Returns:
  The button widget that was added

Since gtkmm 2.18:

Button* Gtk::InfoBar::add_button | ( | const Glib::ustring & | button_text,
|  | int | response_id |
| ) |  |  |

Adds a button with the given text (or a stock button, if button_text is a stock ID) 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.

Parameters:

  | button_text | Text of button, or stock ID.
  | response_id | Response ID for the button.

Returns:
  The button widget that was added

Since gtkmm 2.18:

const Widget* Gtk::InfoBar::get_action_area | ( |  | ) | const

Returns: the action area.

Returns:
  The action area.

Since gtkmm 2.18:

Widget* Gtk::InfoBar::get_action_area | ( |  | ) |

Returns: the action area.

Returns:
  The action area.

Since gtkmm 2.18:

const Widget* Gtk::InfoBar::get_content_area | ( |  | ) | const

Returns: the content area.

Returns:
  The content area.

Since gtkmm 2.18:

Widget* Gtk::InfoBar::get_content_area | ( |  | ) |

Returns: the content area.

Returns:
  The content area.

Since gtkmm 2.18:

MessageType Gtk::InfoBar::get_message_type | ( |  | ) | const

Returns: the message type of the message area.

Returns:
  The message type of the message area.

Since gtkmm 2.18:

const GtkInfoBar* Gtk::InfoBar::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::HBox.

GtkInfoBar* Gtk::InfoBar::gobj | ( |  | ) | `[inline]`

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::HBox.

void Gtk::InfoBar::response | ( | int | response_id | ) |

Emits the 'response' signal with the given response_id.

Since gtkmm 2.18:

Parameters:

  | response_id | A response ID.

void Gtk::InfoBar::set_default_response | ( | int | 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.

Since gtkmm 2.18:

Parameters:

  | response_id | A response ID.

void Gtk::InfoBar::set_message_type | ( | MessageType | message_type | ) |

Sets the message type of the message area.

GTK+ uses this type to determine what color to use when drawing the message area.

Since gtkmm 2.18:

Parameters:

  | message_type | A Gtk::MessageType.

void Gtk::InfoBar::set_response_sensitive | ( | int | response_id,
|  | bool | setting = `true` |
| ) |  |  |

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.

Since gtkmm 2.18:

Parameters:

  | response_id | A response ID.
  | setting | `true` for sensitive.

## Friends And Related Function Documentation

Gtk::InfoBar* wrap | ( | GtkInfoBar * | object,
|  | bool | take_copy = `false` |
| ) |  |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  | object | The C instance.
  | take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns:
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- infobar.h