/* Copyright (C) 2003 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 <glibmm/object.h>
#include <gdkmm/paintable.h>
#include <giomm/file.h>

_DEFS(gtkmm,gtk)
_PINCLUDE(glibmm/private/object_p.h)

namespace Gtk
{

/** An icon, used with Gtk::IconTheme.
 */
class IconPaintable : public Glib::Object, public Gdk::Paintable
{
  _CLASS_GOBJECT(IconPaintable, GtkIconPaintable, GTK_ICON_PAINTABLE, Glib::Object, GObject)
  _IMPLEMENTS_INTERFACE(Gdk::Paintable)

public:
  // gtk_icon_paintable_new_for_file() does more than call g_object_new().
  _WRAP_METHOD(static Glib::RefPtr<IconPaintable> create(const Glib::RefPtr<Gio::File>& file,
    int size, int scale = 1), gtk_icon_paintable_new_for_file)

  // The const get_file() can return a non-const Gio::File.
  // gtk_icon_paintable_get_file() returns a newly created GFile.
  _WRAP_METHOD(Glib::RefPtr<Gio::File> get_file() const, gtk_icon_paintable_get_file)
  _WRAP_METHOD(Glib::ustring get_icon_name() const, gtk_icon_paintable_get_icon_name)
  _WRAP_METHOD(bool is_symbolic() const, gtk_icon_paintable_is_symbolic)

  _WRAP_PROPERTY("file", Glib::RefPtr<Gio::File>)
  _WRAP_PROPERTY("icon-name", Glib::ustring)
  _WRAP_PROPERTY("is-symbolic", bool)
};

} // namespace Gtk
