1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* Copyright (C) 2007 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., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <glibmm/listhandle.h>
#include <glibmm/object.h>
#include <giomm/icon.h>
#include <giomm/emblem.h>
_DEFS(giomm,gio)
_PINCLUDE(glibmm/private/object_p.h)
namespace Gio
{
/** Icons with Emblems
*
* EmblemedIcon is an implementation of Icon that supports adding an emblem to
* an icon. Adding multiple emblems to an icon is ensured via add_emblem().
*
* Note that EmblemedIcon allows no control over the position of the emblems.
* See also Emblem for more information.
*
* @newin{2,20}
*/
class EmblemedIcon
: public Glib::Object,
public Icon
{
_CLASS_GOBJECT(EmblemedIcon, GEmblemedIcon, G_EMBLEMED_ICON, Glib::Object, GObject)
_IMPLEMENTS_INTERFACE(Icon)
protected:
//We have this constructor because g_emblemed_icon_new() may take a NULL emblem parameter.
/** Creates a new emblemed icon for @a icon with the emblem @a emblem.
* @param icon An Icon.
* @param emblem An Emblem.
*
* @newin{2,28}
*/
explicit EmblemedIcon(const Glib::RefPtr<Icon>& icon);
/** Creates a new emblemed icon for @a icon with the emblem @a emblem.
* @param icon An Icon.
* @param emblem An Emblem.
*/
_WRAP_CTOR(EmblemedIcon(const Glib::RefPtr<Icon>& icon, const Glib::RefPtr<Emblem>& emblem), g_emblemed_icon_new)
public:
/** Creates a new emblemed icon for @a icon with the emblem @a emblem.
* @param icon An Icon.
* @param emblem An Emblem.
* @result An Icon.
*/
_WRAP_CREATE(const Glib::RefPtr<Icon>& icon, const Glib::RefPtr<Emblem>& emblem)
/** Creates a new emblemed icon for @a icon with no emblem.
* @param icon An Icon.
* @result An Icon.
*
* @newin{2,28}
*/
_WRAP_CREATE(const Glib::RefPtr<Icon>& icon)
_WRAP_METHOD(Glib::RefPtr<Icon> get_icon(), g_emblemed_icon_get_icon)
_WRAP_METHOD(Glib::RefPtr<const Icon> get_icon() const, g_emblemed_icon_get_icon, constversion)
#m4 _CONVERSION(`GList*',`Glib::ListHandle<Glib::RefPtr<Emblem> >',`$2($3, Glib::OWNERSHIP_NONE)')
_WRAP_METHOD(Glib::ListHandle<Glib::RefPtr<Emblem> > get_emblems(), g_emblemed_icon_get_emblems)
//TODO: #m4 _CONVERSION(`GList*',`Glib::ListHandle<Glib::RefPtr<const Emblem> >',`$2($3, Glib::OWNERSHIP_NONE)')
// _WRAP_METHOD(Glib::ListHandle<Glib::RefPtr<const Emblem> > get_emblems() const, g_emblemed_icon_get_emblems, constversion)
_WRAP_METHOD(void add_emblem(const Glib::RefPtr<Emblem>& emblem), g_emblemed_icon_add_emblem)
};
} // namespace Gio
|