/* $Id: messagedialog.hg,v 1.15 2006/06/20 18:46:59 murrayc Exp $ */

/* messagedialog.h
 *
 * Copyright (C) 1998-2002 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <gtkmm/dialog.h>

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

namespace Gtk
{

_CC_INCLUDE(gtk/gtktypebuiltins.h)
_WRAP_ENUM(MessageType, GtkMessageType)
_WRAP_ENUM(ButtonsType, GtkButtonsType)


/** Convenient message window.
 *
 * Gtk::MessageDialog presents a dialog with an image representing the type
 * of message (Error, Question, etc.) alongside some message text. It's
 * simply a convenience widget; you could construct the equivalent of
 * Gtk::MessageDialog from Gtk::Dialog without too much effort, but
 * Gtk::MessageDialog saves typing. 
 *
 * @ingroup Dialogs
 */
class MessageDialog : public Dialog
{
  _CLASS_GTKOBJECT(MessageDialog, GtkMessageDialog, GTK_MESSAGE_DIALOG, Gtk::Dialog, GtkDialog)
  _UNMANAGEABLE
public:
  explicit MessageDialog(const Glib::ustring& message, bool use_markup = false, MessageType type = MESSAGE_INFO, ButtonsType buttons = BUTTONS_OK, bool modal = false);
  MessageDialog(Gtk::Window& parent, const Glib::ustring& message, bool use_markup = false, MessageType type = MESSAGE_INFO, ButtonsType buttons = BUTTONS_OK, bool modal = false);
  _IGNORE(gtk_message_dialog_new, gtk_message_dialog_new_with_markup)

  _WRAP_METHOD(void set_image(Widget& image), gtk_message_dialog_set_image)

  _WRAP_METHOD(void set_markup(const Glib::ustring& str), gtk_message_dialog_set_markup, deprecated "Use set_message(string, true).")

  /** Sets the primary text of the message dialog.
   *
   * @param text The message.
   * @param use_markup Whether @a message contains pango markup.
   */
  void set_message(const Glib::ustring& message, bool use_markup = false);
  _IGNORE()
  
  /** Sets the secondary text of the message dialog.
   * Note that setting a secondary text makes the primary text become bold, unless you have provided explicit markup.
   *
   * @newin2p6.
   *
   * @param text The message.
   * @param use_markup Whether @a message contains pango markup.
   */
  void set_secondary_text(const Glib::ustring& text, bool use_markup = false);
  _IGNORE(gtk_message_dialog_format_secondary_text, gtk_message_dialog_format_secondary_markup)

  _WRAP_PROPERTY("message-type", MessageType)
  _WRAP_PROPERTY("buttons", ButtonsType)
  _WRAP_PROPERTY("text", Glib::ustring)
  _WRAP_PROPERTY("use-markup", bool)
  _WRAP_PROPERTY("secondary-text", Glib::ustring)
  _WRAP_PROPERTY("secondary-use-markup", bool)
  _WRAP_PROPERTY("image", Widget*)

};

} // namespace Gtk

