1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19  
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 /*
25  * Conversion parameters:
26  * inFile  = 
27  * outPack = gtk
28  * outFile = TextChildAnchor
29  * strct   = GtkTextChildAnchor
30  * realStrct=
31  * ctorStrct=
32  * clss    = TextChildAnchor
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gtk_text_child_anchor_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * 	- backspace
46  * 	- copy-clipboard
47  * 	- cut-clipboard
48  * 	- delete-from-cursor
49  * 	- insert-at-cursor
50  * 	- move-cursor
51  * 	- move-viewport
52  * 	- paste-clipboard
53  * 	- populate-popup
54  * 	- preedit-changed
55  * 	- select-all
56  * 	- set-anchor
57  * 	- toggle-cursor-visible
58  * 	- toggle-overwrite
59  * imports:
60  * 	- glib.ListG
61  * structWrap:
62  * 	- GList* -> ListG
63  * module aliases:
64  * local aliases:
65  * overrides:
66  */
67 
68 module gtk.TextChildAnchor;
69 
70 public  import gtkc.gtktypes;
71 
72 private import gtkc.gtk;
73 private import glib.ConstructionException;
74 private import gobject.ObjectG;
75 
76 private import gobject.Signals;
77 public  import gtkc.gdktypes;
78 
79 private import glib.ListG;
80 
81 
82 
83 
84 /**
85  * You may wish to begin by reading the text widget
86  * conceptual overview which gives an overview of all the objects and data
87  * types related to the text widget and how they work together.
88  */
89 public class TextChildAnchor
90 {
91 	
92 	/** the main Gtk struct */
93 	protected GtkTextChildAnchor* gtkTextChildAnchor;
94 	
95 	
96 	public GtkTextChildAnchor* getTextChildAnchorStruct()
97 	{
98 		return gtkTextChildAnchor;
99 	}
100 	
101 	
102 	/** the main Gtk struct as a void* */
103 	protected void* getStruct()
104 	{
105 		return cast(void*)gtkTextChildAnchor;
106 	}
107 	
108 	/**
109 	 * Sets our main struct and passes it to the parent class
110 	 */
111 	public this (GtkTextChildAnchor* gtkTextChildAnchor)
112 	{
113 		this.gtkTextChildAnchor = gtkTextChildAnchor;
114 	}
115 	
116 	/**
117 	 */
118 	
119 	/**
120 	 * Creates a new GtkTextChildAnchor. Usually you would then insert
121 	 * it into a GtkTextBuffer with gtk_text_buffer_insert_child_anchor().
122 	 * To perform the creation and insertion in one step, use the
123 	 * convenience function gtk_text_buffer_create_child_anchor().
124 	 * Throws: ConstructionException GTK+ fails to create the object.
125 	 */
126 	public this ()
127 	{
128 		// GtkTextChildAnchor * gtk_text_child_anchor_new (void);
129 		auto p = gtk_text_child_anchor_new();
130 		if(p is null)
131 		{
132 			throw new ConstructionException("null returned by gtk_text_child_anchor_new()");
133 		}
134 		this(cast(GtkTextChildAnchor*) p);
135 	}
136 	
137 	/**
138 	 * Gets a list of all widgets anchored at this child anchor.
139 	 * The returned list should be freed with g_list_free().
140 	 * Returns: list of widgets anchored at anchor. [element-type GtkWidget][transfer container]
141 	 */
142 	public ListG getWidgets()
143 	{
144 		// GList * gtk_text_child_anchor_get_widgets (GtkTextChildAnchor *anchor);
145 		auto p = gtk_text_child_anchor_get_widgets(gtkTextChildAnchor);
146 		
147 		if(p is null)
148 		{
149 			return null;
150 		}
151 		
152 		return ObjectG.getDObject!(ListG)(cast(GList*) p);
153 	}
154 	
155 	/**
156 	 * Determines whether a child anchor has been deleted from
157 	 * the buffer. Keep in mind that the child anchor will be
158 	 * unreferenced when removed from the buffer, so you need to
159 	 * hold your own reference (with g_object_ref()) if you plan
160 	 * to use this function — otherwise all deleted child anchors
161 	 * will also be finalized.
162 	 * Returns: TRUE if the child anchor has been deleted from its buffer
163 	 */
164 	public int getDeleted()
165 	{
166 		// gboolean gtk_text_child_anchor_get_deleted (GtkTextChildAnchor *anchor);
167 		return gtk_text_child_anchor_get_deleted(gtkTextChildAnchor);
168 	}
169 }