1 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #include <gtkmm/textattributes.h>
4 #include <gtkmm/private/textattributes_p.h>
11 * Copyright 1998-2002 The gtkmm Development Team
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Library General Public
15 * License as published by the Free Software Foundation; either
16 * version 2 of the License, or (at your option) any later version.
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Library General Public License for more details.
23 * You should have received a copy of the GNU Library General Public
24 * License along with this library; if not, write to the Free
25 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #include <gtk/gtktexttag.h>
33 } // anonymous namespace
39 Gtk::TextAttributes wrap(GtkTextAttributes* object, bool take_copy)
41 return Gtk::TextAttributes(object, take_copy);
52 GType TextAttributes::get_type()
54 return gtk_text_attributes_get_type();
57 TextAttributes::TextAttributes()
59 gobject_ (gtk_text_attributes_new())
62 TextAttributes::TextAttributes(const TextAttributes& other)
64 gobject_ ((other.gobject_) ? gtk_text_attributes_copy(other.gobject_) : 0)
67 TextAttributes::TextAttributes(GtkTextAttributes* gobject, bool make_a_copy)
69 // For BoxedType wrappers, make_a_copy is true by default. The static
70 // BoxedType wrappers must always take a copy, thus make_a_copy = true
71 // ensures identical behaviour if the default argument is used.
72 gobject_ ((make_a_copy && gobject) ? gtk_text_attributes_copy(gobject) : gobject)
75 TextAttributes& TextAttributes::operator=(const TextAttributes& other)
77 TextAttributes temp (other);
82 TextAttributes::~TextAttributes()
85 gtk_text_attributes_unref(gobject_);
88 void TextAttributes::swap(TextAttributes& other)
90 GtkTextAttributes *const temp = gobject_;
91 gobject_ = other.gobject_;
92 other.gobject_ = temp;
95 GtkTextAttributes* TextAttributes::gobj_copy() const
97 return gtk_text_attributes_copy(gobject_);