1
/* Copyright (C) 2010 The gtkmm Development Team
3
* This library is free software; you can redistribute it and/or
4
* modify it under the terms of the GNU Lesser General Public
5
* License as published by the Free Software Foundation; either
6
* version 2.1 of the License, or (at your option) any later version.
8
* This library is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
* Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public
14
* License along with this library; if not, write to the Free
15
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
_CONFIGINCLUDE(gtkmmconfig.h)
20
#include <giomm/emblemedicon.h>
21
#include <gtkmm/stylecontext.h>
24
_PINCLUDE(giomm/private/emblemedicon_p.h)
29
/** A Gio::Icon that allows numbered emblems.
31
* GtkNumerableIcon is a subclass of EmblemedIcon that can show a number or short string as an emblem.
32
* The number can be overlayed on top of another emblem, if desired.
34
* It supports theming by taking font and color information from a provided StyleContext. See set_style_context().
38
class NumerableIcon : public Gio::EmblemedIcon
40
_CLASS_GOBJECT(NumerableIcon, GtkNumerableIcon, GTK_NUMERABLE_ICON, Gio::EmblemedIcon, GEmblemedIcon)
43
_WRAP_CTOR(NumerableIcon(const Glib::RefPtr<Gio::Icon>& icon), gtk_numerable_icon_new)
45
_WRAP_CTOR(NumerableIcon(const Glib::RefPtr<Gio::Icon>& icon, const Glib::RefPtr<StyleContext>& style_context), gtk_numerable_icon_new_with_style_context)
48
_WRAP_CREATE(const Glib::RefPtr<Gio::Icon>& icon)
50
_WRAP_CREATE(const Glib::RefPtr<Gio::Icon>& icon, const Glib::RefPtr<StyleContext>& context)
52
_WRAP_METHOD(Glib::RefPtr<StyleContext> get_style_context(), gtk_numerable_icon_get_style_context, refreturn)
53
_WRAP_METHOD(Glib::RefPtr<const StyleContext> get_style_context() const, gtk_numerable_icon_get_style_context, refreturn, constversion)
55
_WRAP_METHOD(void set_style_context(const Glib::RefPtr<StyleContext>& style), gtk_numerable_icon_set_style_context)
57
_WRAP_METHOD(int get_count() const, gtk_numerable_icon_get_count)
58
_WRAP_METHOD(void set_count(int count), gtk_numerable_icon_set_count)
60
_WRAP_METHOD(Glib::ustring get_label() const, gtk_numerable_icon_get_label)
61
_WRAP_METHOD(void set_label(const Glib::ustring& label), gtk_numerable_icon_set_label)
63
_WRAP_METHOD(void set_background_gicon(const Glib::RefPtr<Gio::Icon>& icon), gtk_numerable_icon_set_background_gicon)
65
_WRAP_METHOD(Glib::RefPtr<Gio::Icon> get_background_gicon(), gtk_numerable_icon_get_background_gicon, refreturn)
66
_WRAP_METHOD(Glib::RefPtr<const Gio::Icon> get_background_gicon() const, gtk_numerable_icon_get_background_gicon, refreturn, constversion)
68
_WRAP_METHOD(void set_background_icon_name(const Glib::ustring& icon_name), gtk_numerable_icon_set_background_icon_name)
69
_WRAP_METHOD(Glib::ustring get_background_icon_name() const, gtk_numerable_icon_get_background_icon_name)
71
_WRAP_PROPERTY("count", int)
72
_WRAP_PROPERTY("label", Glib::ustring)
73
_WRAP_PROPERTY("style-context", Glib::RefPtr<StyleContext>)
74
_WRAP_PROPERTY("background-icon", Glib::RefPtr<Gio::Icon>)
75
_WRAP_PROPERTY("background-icon-name", Glib::ustring)