~ubuntu-branches/ubuntu/precise/gtkmm3.0/precise

« back to all changes in this revision

Viewing changes to gtk/src/numerableicon.hg

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2011-06-17 00:12:44 UTC
  • Revision ID: james.westby@ubuntu.com-20110617001244-9hl5an15hiaaahi6
Tags: upstream-3.0.1
ImportĀ upstreamĀ versionĀ 3.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2010 The gtkmm Development Team
 
2
 *
 
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.
 
7
 *
 
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.
 
12
 *
 
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.
 
16
 */
 
17
 
 
18
_CONFIGINCLUDE(gtkmmconfig.h)
 
19
 
 
20
#include <giomm/emblemedicon.h>
 
21
#include <gtkmm/stylecontext.h>
 
22
 
 
23
_DEFS(gtkmm,gtk)
 
24
_PINCLUDE(giomm/private/emblemedicon_p.h)
 
25
 
 
26
namespace Gtk
 
27
{
 
28
 
 
29
/** A Gio::Icon that allows numbered emblems.
 
30
 *
 
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.
 
33
 *
 
34
 * It supports theming by taking font and color information from a provided StyleContext. See set_style_context().
 
35
 *
 
36
 * @newin{3,0}
 
37
 */
 
38
class NumerableIcon : public Gio::EmblemedIcon
 
39
{
 
40
  _CLASS_GOBJECT(NumerableIcon, GtkNumerableIcon, GTK_NUMERABLE_ICON, Gio::EmblemedIcon, GEmblemedIcon)
 
41
 
 
42
protected:
 
43
  _WRAP_CTOR(NumerableIcon(const Glib::RefPtr<Gio::Icon>& icon), gtk_numerable_icon_new)
 
44
 
 
45
  _WRAP_CTOR(NumerableIcon(const Glib::RefPtr<Gio::Icon>& icon, const Glib::RefPtr<StyleContext>& style_context), gtk_numerable_icon_new_with_style_context)
 
46
 
 
47
public:
 
48
  _WRAP_CREATE(const Glib::RefPtr<Gio::Icon>& icon)
 
49
 
 
50
  _WRAP_CREATE(const Glib::RefPtr<Gio::Icon>& icon, const Glib::RefPtr<StyleContext>& context)
 
51
 
 
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)
 
54
 
 
55
  _WRAP_METHOD(void set_style_context(const Glib::RefPtr<StyleContext>& style), gtk_numerable_icon_set_style_context)
 
56
 
 
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)
 
59
 
 
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)
 
62
 
 
63
  _WRAP_METHOD(void set_background_gicon(const Glib::RefPtr<Gio::Icon>& icon), gtk_numerable_icon_set_background_gicon)
 
64
 
 
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)
 
67
 
 
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)
 
70
 
 
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)
 
76
};
 
77
 
 
78
} // namespace Gtk