1/*
2 * Copyright (C) 1998-2002 The gtkmm Development Team
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
17 */
18
19#include <vector>
20
21#include <gtkmm/widget.h>
22
23_DEFS(gtkmm,gtk)
24_PINCLUDE(glibmm/private/object_p.h)
25
26namespace Gtk
27{
28
29/** A TextChildAnchor is a spot in the buffer where child widgets can be "anchored"
30 * (inserted inline, as if they were characters). The anchor can have multiple widgets anchored,
31 * to allow for multiple views.
32 *
33 * Typedefed as Gtk::TextBuffer::ChildAnchor.
34 * @ingroup TextView
35 */
36class TextChildAnchor : public Glib::Object
37{
38   _CLASS_GOBJECT(TextChildAnchor, GtkTextChildAnchor, GTK_TEXT_CHILD_ANCHOR, Glib::Object, GObject)
39protected:
40  _CTOR_DEFAULT()
41
42public:
43  _WRAP_CREATE()
44
45#m4 _CONVERSION(`GList*',`std::vector<Widget*>',`Glib::ListHandler<Widget*>::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)')
46  _WRAP_METHOD(std::vector<Widget*> get_widgets(), gtk_text_child_anchor_get_widgets)
47#m4 _CONVERSION(`GList*',`std::vector<const Widget*>',`Glib::ListHandler<const Widget*>::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)')
48  _WRAP_METHOD(std::vector<const Widget*> get_widgets() const, gtk_text_child_anchor_get_widgets)
49  _WRAP_METHOD(bool get_deleted() const, gtk_text_child_anchor_get_deleted)
50
51  //These methods, and GtkTextLayout are semi-private:
52  _IGNORE(gtk_text_child_anchor_register_child, gtk_text_child_anchor_unregister_child, gtk_text_child_anchor_queue_resize)
53  //_WRAP_METHOD(void Register_child(TextLayout& layout), gtk_text_child_anchor_register_child)
54  //_WRAP_METHOD(void unregister_child(Widget& child), gtk_text_child_anchor_unregister_child)
55  //_WRAP_METHOD(void queue_resize(TextLayout& layout), gtk_text_child_anchor_queue_resize)
56
57};
58
59} //namespace Gtk
60
61