/* 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, see <https://www.gnu.org/licenses/>.
 */

_DEFS(gtkmm,gtk)
_CONFIGINCLUDE(gtkmmconfig.h)
_IS_DEPRECATED // The entire file is deprecated.

#include <gtkmm/appchooser.h>
#include <gtkmm/dialog.h>
#include <giomm/file.h>

_PINCLUDE(gtkmm/private/dialog_p.h)

#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
#undef GTK_DISABLE_DEPRECATED
#define GDK_DISABLE_DEPRECATION_WARNINGS 1
#m4 _POP()

namespace Gtk
{

/** 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.
 *
 * To set the heading that is shown above the AppChooserWidget, use set_heading().
 *
 * See @ref giommContentType in glibmm for more information about content types.
 *
 * The AppChooserDialog dialog looks like this:
 * @image html appchooserdialog1.png
 *
 * @ingroup Dialogs
 *
 * @newin{3,0}
 * @deprecated 4.10: The application selection widgets should be
 *   implemented according to the design of each platform and/or
 *   application requiring them.
 *   This dialog will be removed in GTK 5.
 */
class GTKMM_API AppChooserDialog
  : public Dialog,
    public AppChooser
{
  _CLASS_GTKOBJECT(AppChooserDialog, GtkAppChooserDialog, GTK_APP_CHOOSER_DIALOG, Dialog, GtkDialog, , , GTKMM_API)
  _IMPLEMENTS_INTERFACE(AppChooser)
  _UNMANAGEABLE
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
