1 // Generated by gtkmmproc -- DO NOT MODIFY!
4 #include <pangomm/attrlist.h>
5 #include <pangomm/private/attrlist_p.h>
12 * Copyright 1998-1999 The Gtk-- Development Team
13 * Copyright 2001 Free Software Foundation
15 * This library is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Library General Public
17 * License as published by the Free Software Foundation; either
18 * version 2 of the License, or (at your option) any later version.
20 * This library is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Library General Public License for more details.
25 * You should have received a copy of the GNU Library General Public
26 * License along with this library; if not, write to the Free
27 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
33 AttrList::AttrList(const Glib::ustring& markup_text, gunichar accel_marker)
35 gboolean bTest = pango_parse_markup(markup_text.c_str(), -1 /* means null-terminated */, accel_marker,
41 AttrList::operator bool()
46 AttrList::AttrList(const Glib::ustring& markup_text, gunichar accel_marker, Glib::ustring& text, gunichar& accel_char)
48 //initialize output parameters:
53 gboolean bTest = pango_parse_markup(markup_text.c_str(), -1 /* means null-terminated */, accel_marker,
54 &gobject_, &pchText, &accel_char, 0);
66 void AttrList::insert(Attribute& attr)
68 pango_attr_list_insert(gobj(), pango_attribute_copy(attr.gobj()));
71 void AttrList::insert_before(Attribute& attr)
73 pango_attr_list_insert_before(gobj(), pango_attribute_copy(attr.gobj()));
76 void AttrList::change(Attribute& attr)
78 pango_attr_list_change(gobj(), pango_attribute_copy(attr.gobj()));
81 } /* namespace Pango */
85 } // anonymous namespace
91 Pango::AttrList wrap(PangoAttrList* object, bool take_copy)
93 return Pango::AttrList(object, take_copy);
104 GType AttrList::get_type()
106 return pango_attr_list_get_type();
111 gobject_ (pango_attr_list_new())
114 AttrList::AttrList(const AttrList& other)
116 gobject_ ((other.gobject_) ? pango_attr_list_copy(other.gobject_) : 0)
119 AttrList::AttrList(PangoAttrList* gobject, bool make_a_copy)
121 // For BoxedType wrappers, make_a_copy is true by default. The static
122 // BoxedType wrappers must always take a copy, thus make_a_copy = true
123 // ensures identical behaviour if the default argument is used.
124 gobject_ ((make_a_copy && gobject) ? pango_attr_list_copy(gobject) : gobject)
127 AttrList& AttrList::operator=(const AttrList& other)
129 AttrList temp (other);
134 AttrList::~AttrList()
137 pango_attr_list_unref(gobject_);
140 void AttrList::swap(AttrList& other)
142 PangoAttrList *const temp = gobject_;
143 gobject_ = other.gobject_;
144 other.gobject_ = temp;
147 PangoAttrList* AttrList::gobj_copy() const
149 return pango_attr_list_copy(gobject_);
153 void AttrList::splice(AttrList& other, int pos, int len)
155 pango_attr_list_splice(gobj(), (other).gobj(), pos, len);
158 AttrIter AttrList::get_iter()
160 return Glib::wrap((pango_attr_list_get_iterator(gobj())));