/* Copyright (C) 2011 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/appchooser.h>
#include <gtkmm/dialog.h>
#include <gtkmm/menu.h>
#include <giomm/file.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/dialog_p.h)


namespace Gtk
{

//TODO: The AppChooser content-type is not documented properly: https://bugzilla.gnome.org/show_bug.cgi?id=650012

/** An application chooser dialog.
 *
 * This dialog shows an AppChooserWidget inside a Dialog.
 *
 * Note that AppChooserDialog does not have any interesting methods of its own.
 * Instead, you should get the embedded AppChooserWidget using get_widget() and
 * call its methods if the generic AppChooser base class API is not sufficient for your needs.
 *
 * The AppChooserDialog dialog looks like this:
 * @image html appchooserbutton1.png
 *
 * @ingroup Dialogs
 *
 * @newin{3,0}
 */
class AppChooserDialog
  : public Dialog,
    public AppChooser
{
  _CLASS_GTKOBJECT(AppChooserDialog, GtkAppChooserDialog, GTK_APP_CHOOSER_DIALOG, Dialog, GtkDialog)
  _IMPLEMENTS_INTERFACE(AppChooser)
public:

  explicit AppChooserDialog(const Glib::ustring& content_type);

  AppChooserDialog(const Glib::ustring& content_type, Gtk::Window& parent);
  _IGNORE(gtk_app_chooser_dialog_new_for_content_type)

  explicit AppChooserDialog(const Glib::RefPtr<Gio::File>& file);

  AppChooserDialog(const Glib::RefPtr<Gio::File>& file, Gtk::Window& parent);
  _IGNORE(gtk_app_chooser_dialog_new)

  _WRAP_METHOD(Widget* get_widget(), gtk_app_chooser_dialog_get_widget)
  _WRAP_METHOD(const Widget* get_widget() const, gtk_app_chooser_dialog_get_widget, constversion)

  _WRAP_METHOD(void set_heading(const Glib::ustring& heading), gtk_app_chooser_dialog_set_heading)
  _WRAP_METHOD(Glib::ustring get_heading() const, gtk_app_chooser_dialog_get_heading)

  _WRAP_PROPERTY("gfile", Glib::RefPtr<Gio::File>)
  _WRAP_PROPERTY("heading", Glib::ustring)
};


} // namespace Gtk
