/* 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 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 .
*/
// To exclude this file from the documentation when build-deprecated-api=false.
_CONFIGINCLUDE(gtkmmconfig.h)
#include
#include
#include
//#include
#include
_DEFS(gtkmm,gtk)
#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
{
class GTKMM_API StyleContext;
class GTKMM_API Widget;
/** This manages a set of variants of a particular icon
* An IconSet contains variants for different sizes and widget states.
* Icons in an icon factory are named by a stock ID, which is a simple string identifying the icon. Each GtkStyle has a list of GtkIconFactory derived from the current theme; those icon factories are consulted first when searching for an icon. If the theme doesn't set a particular icon, GTK+ looks for the icon in a list of default icon factories, maintained by gtk_icon_factory_add_default() and gtk_icon_factory_remove_default(). Applications with icons should add a default icon factory with their icons, which will allow themes to override the icons for the application.
* @deprecated Use Gtk::IconTheme instead.
*/
class GTKMM_API IconSet final
{
//GtkIconSet is registered as a boxed type, but it has ref/unref functions instead of copy/free,
//so we use it via RefPtr.
_CLASS_OPAQUE_REFCOUNTED(IconSet, GtkIconSet, gtk_icon_set_new, gtk_icon_set_ref, gtk_icon_set_unref, GTKMM_API)
_IGNORE(gtk_icon_set_ref, gtk_icon_set_unref, gtk_icon_set_get_sizes)
public:
//TODO: Documentation
static Glib::RefPtr create(const Glib::RefPtr& pixbuf);
_WRAP_METHOD(Glib::RefPtr copy() const, gtk_icon_set_copy)
_WRAP_METHOD(Glib::RefPtr render_icon_pixbuf(const Glib::RefPtr& context, IconSize size), gtk_icon_set_render_icon_pixbuf)
_IGNORE(gtk_icon_set_render_icon) //deprecated.
_WRAP_METHOD(void add_source(const IconSource& source), gtk_icon_set_add_source)
std::vector get_sizes() const;
_WRAP_METHOD(static Glib::RefPtr lookup_default(const Gtk::StockID& stock_id), gtk_icon_factory_lookup_default, refreturn)
_IGNORE(gtk_icon_set_render_icon_surface)
};
} //namespace Gtk