/* Copyright (C) 2009 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#include <gtkmm/box.h>
#include <gtkmm/button.h>
#include <gtkmm/enums.h>

_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/box_p.h)


namespace Gtk
{

/** This widget that can be used to show messages to the user without showing a dialog.
 * It is often temporarily shown at the top or bottom of a document. In contrast to
 * Dialog, which has a horizontal action area at the bottom, InfoBar has a vertical
 * action area at the side.
 *
 * The API is very similar to Dialog, allowing you to add buttons to the action
 * area with add_button(). The sensitivity of action widgets can be controlled
 * with set_response_sensitive(). To add widgets to the main content area, use
 * get_content_area() and add your widgets to the container.
 *
 * Similar to MessageDialog, the contents can by classified as error message,
 * warning, informational message, etc, by using set_message_type(). This
 * determines the background color of the message area.
 *
 * The InfoBar widget looks like
 * @image html infobar1.png
 *
 * @newin{2,18}
 *
 * @ingroup Widgets
 */
class InfoBar : public Box
{
  _CLASS_GTKOBJECT(InfoBar, GtkInfoBar, GTK_INFO_BAR, Gtk::Box, GtkBox)
public:

  _CTOR_DEFAULT
  _IGNORE(gtk_info_bar_new, gtk_info_bar_new_with_buttons)



//TODO: What types are these widgets really?
  _WRAP_METHOD(Widget* get_action_area(), gtk_info_bar_get_action_area)
  _WRAP_METHOD(const Widget* get_action_area() const, gtk_info_bar_get_action_area)

  _WRAP_METHOD(Widget* get_content_area(), gtk_info_bar_get_content_area)
  _WRAP_METHOD(const Widget* get_content_area() const, gtk_info_bar_get_content_area)

  _WRAP_METHOD(void add_action_widget(Widget& child, int response_id), gtk_info_bar_add_action_widget)

  _WRAP_METHOD(Button* add_button(const Glib::ustring& button_text, int response_id), gtk_info_bar_add_button)

  _IGNORE(gtk_info_bar_add_buttons)
  _WRAP_METHOD(void set_response_sensitive(int response_id, bool setting = true), gtk_info_bar_set_response_sensitive)
  _WRAP_METHOD(void set_default_response(int response_id), gtk_info_bar_set_default_response)

  _WRAP_METHOD(void response(int response_id), gtk_info_bar_response)

  _WRAP_METHOD(void set_message_type(MessageType message_type), gtk_info_bar_set_message_type)
  _WRAP_METHOD(MessageType get_message_type() const, gtk_info_bar_get_message_type)

  _WRAP_METHOD(void set_show_close_button(bool setting = true), gtk_info_bar_set_show_close_button)
  _WRAP_METHOD(bool get_show_close_button() const, gtk_info_bar_get_show_close_button)

  _WRAP_METHOD(void set_revealed(bool revealed = true), gtk_info_bar_set_revealed)
  _WRAP_METHOD(bool get_revealed() const, gtk_info_bar_get_revealed)

  _IGNORE_SIGNAL("close")

  _WRAP_SIGNAL(void response(int response_id), "response")

  _WRAP_PROPERTY("message-type", MessageType)
  _WRAP_PROPERTY("show-close-button", bool)
  _WRAP_PROPERTY("revealed", bool)
};

} // namespace Gtk
