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 private import glib.ListG;
79 
80 
81 
82 /**
83  * You may wish to begin by reading the text widget
84  * conceptual overview which gives an overview of all the objects and data
85  * types related to the text widget and how they work together.
86  */
87 public class TextChildAnchor
88 {
89 	
90 	/** the main Gtk struct */
91 	protected GtkTextChildAnchor* gtkTextChildAnchor;
92 	
93 	
94 	/** Get the main Gtk struct */
95 	public GtkTextChildAnchor* getTextChildAnchorStruct()
96 	{
97 		return gtkTextChildAnchor;
98 	}
99 	
100 	
101 	/** the main Gtk struct as a void* */
102 	protected void* getStruct()
103 	{
104 		return cast(void*)gtkTextChildAnchor;
105 	}
106 	
107 	/**
108 	 * Sets our main struct and passes it to the parent class
109 	 */
110 	public this (GtkTextChildAnchor* gtkTextChildAnchor)
111 	{
112 		this.gtkTextChildAnchor = gtkTextChildAnchor;
113 	}
114 	
115 	/**
116 	 */
117 	
118 	/**
119 	 * Creates a new GtkTextChildAnchor. Usually you would then insert
120 	 * it into a GtkTextBuffer with gtk_text_buffer_insert_child_anchor().
121 	 * To perform the creation and insertion in one step, use the
122 	 * convenience function gtk_text_buffer_create_child_anchor().
123 	 * Throws: ConstructionException GTK+ fails to create the object.
124 	 */
125 	public this ()
126 	{
127 		// GtkTextChildAnchor * gtk_text_child_anchor_new (void);
128 		auto p = gtk_text_child_anchor_new();
129 		if(p is null)
130 		{
131 			throw new ConstructionException("null returned by gtk_text_child_anchor_new()");
132 		}
133 		this(cast(GtkTextChildAnchor*) p);
134 	}
135 	
136 	/**
137 	 * Gets a list of all widgets anchored at this child anchor.
138 	 * The returned list should be freed with g_list_free().
139 	 * Returns: list of widgets anchored at anchor. [element-type GtkWidget][transfer container]
140 	 */
141 	public ListG getWidgets()
142 	{
143 		// GList * gtk_text_child_anchor_get_widgets (GtkTextChildAnchor *anchor);
144 		auto p = gtk_text_child_anchor_get_widgets(gtkTextChildAnchor);
145 		
146 		if(p is null)
147 		{
148 			return null;
149 		}
150 		
151 		return ObjectG.getDObject!(ListG)(cast(GList*) p);
152 	}
153 	
154 	/**
155 	 * Determines whether a child anchor has been deleted from
156 	 * the buffer. Keep in mind that the child anchor will be
157 	 * unreferenced when removed from the buffer, so you need to
158 	 * hold your own reference (with g_object_ref()) if you plan
159 	 * to use this function — otherwise all deleted child anchors
160 	 * will also be finalized.
161 	 * Returns: TRUE if the child anchor has been deleted from its buffer
162 	 */
163 	public int getDeleted()
164 	{
165 		// gboolean gtk_text_child_anchor_get_deleted (GtkTextChildAnchor *anchor);
166 		return gtk_text_child_anchor_get_deleted(gtkTextChildAnchor);
167 	}
168 }