/* Copyright (C) 2010 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
 */

_CONFIGINCLUDE(gtkmmconfig.h)

#include <giomm/emblemedicon.h>
#include <gtkmm/stylecontext.h>

_DEFS(gtkmm,gtk)
_PINCLUDE(giomm/private/emblemedicon_p.h)

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

_IS_DEPRECATED // This whole file is deprecated.

namespace Gtk
{

/** A Gio::Icon that allows numbered emblems.
 *
 * Gtk::NumerableIcon is a subclass of Gio::EmblemedIcon that can show a number or short string as an emblem.
 * The number can be overlayed on top of another emblem, if desired.
 *
 * It supports theming by taking font and color information from a provided StyleContext. See set_style_context().
 *
 * @newin{3,0}
 * @deprecated No replacement available.
 */
class NumerableIcon : public Gio::EmblemedIcon
{
  _CLASS_GOBJECT(NumerableIcon, GtkNumerableIcon, GTK_NUMERABLE_ICON, Gio::EmblemedIcon, GEmblemedIcon)

protected:
  _WRAP_CTOR(NumerableIcon(const Glib::RefPtr<Gio::Icon>& icon), gtk_numerable_icon_new)

  _WRAP_CTOR(NumerableIcon(const Glib::RefPtr<Gio::Icon>& icon, const Glib::RefPtr<StyleContext>& style_context), gtk_numerable_icon_new_with_style_context)

public:
  _WRAP_CREATE(const Glib::RefPtr<Gio::Icon>& icon)

  _WRAP_CREATE(const Glib::RefPtr<Gio::Icon>& icon, const Glib::RefPtr<StyleContext>& context)

  _WRAP_METHOD(Glib::RefPtr<StyleContext> get_style_context(), gtk_numerable_icon_get_style_context, refreturn)
  _WRAP_METHOD(Glib::RefPtr<const StyleContext> get_style_context() const, gtk_numerable_icon_get_style_context, refreturn, constversion)

  _WRAP_METHOD(void set_style_context(const Glib::RefPtr<StyleContext>& style), gtk_numerable_icon_set_style_context)

  _WRAP_METHOD(int get_count() const, gtk_numerable_icon_get_count)
  _WRAP_METHOD(void set_count(int count), gtk_numerable_icon_set_count)

  _WRAP_METHOD(Glib::ustring get_label() const, gtk_numerable_icon_get_label)
  _WRAP_METHOD(void set_label(const Glib::ustring& label), gtk_numerable_icon_set_label)

  _WRAP_METHOD(void set_background_gicon(const Glib::RefPtr<Gio::Icon>& icon), gtk_numerable_icon_set_background_gicon)

  _WRAP_METHOD(Glib::RefPtr<Gio::Icon> get_background_gicon(), gtk_numerable_icon_get_background_gicon, refreturn)
  _WRAP_METHOD(Glib::RefPtr<const Gio::Icon> get_background_gicon() const, gtk_numerable_icon_get_background_gicon, refreturn, constversion)

  _WRAP_METHOD(void set_background_icon_name(const Glib::ustring& icon_name), gtk_numerable_icon_set_background_icon_name)
  _WRAP_METHOD(Glib::ustring get_background_icon_name() const, gtk_numerable_icon_get_background_icon_name)

  _WRAP_PROPERTY("count", int)
  _WRAP_PROPERTY("label", Glib::ustring)
  _WRAP_PROPERTY("style-context", Glib::RefPtr<StyleContext>)
  _WRAP_PROPERTY("background-icon", Glib::RefPtr<Gio::Icon>)
  _WRAP_PROPERTY("background-icon-name", Glib::ustring)
};

} // namespace Gtk
