2 * This file is part of gtkD.
4 * gtkD is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * gtkD 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
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
27 * outFile = TextChildAnchor
28 * strct = GtkTextChildAnchor
31 * clss = TextChildAnchor
39 * - gtk_text_child_anchor_
50 module gtk
.TextChildAnchor
;
56 import tango
.io
.Stdout
; // use the tango loging?
60 private import gtkc
.gtktypes
;
62 private import gtkc
.gtk
;
65 private import glib
.Str
;
72 * You may wish to begin by reading the text widget
73 * conceptual overview which gives an overview of all the objects and data
74 * types related to the text widget and how they work together.
76 public class TextChildAnchor
79 /** the main Gtk struct */
80 protected GtkTextChildAnchor
* gtkTextChildAnchor
;
83 public GtkTextChildAnchor
* getTextChildAnchorStruct()
85 return gtkTextChildAnchor
;
89 /** the main Gtk struct as a void* */
90 protected void* getStruct()
92 return cast(void*)gtkTextChildAnchor
;
96 * Sets our main struct and passes it to the parent class
98 public this (GtkTextChildAnchor
* gtkTextChildAnchor
)
102 if ( gtkTextChildAnchor
is null )
107 Stdout("struct gtkTextChildAnchor is null on constructor").newline
;
111 printf("struct gtkTextChildAnchor is null on constructor");
118 assert(gtkTextChildAnchor
!is null, "struct gtkTextChildAnchor is null on constructor");
120 this.gtkTextChildAnchor
= gtkTextChildAnchor
;
126 // imports for the signal processing
127 private import gobject
.Signals
;
128 private import gtkc
.gdktypes
;
129 int[char[]] connectedSignals
;
131 void delegate(TextChildAnchor
)[] onBackspaceListeners
;
132 void addOnBackspace(void delegate(TextChildAnchor
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
134 if ( !("backspace" in connectedSignals
) )
139 cast(GCallback
)&callBackBackspace
,
143 connectedSignals
["backspace"] = 1;
145 onBackspaceListeners
~= dlg
;
147 extern(C
) static void callBackBackspace(GtkTextView
* textviewStruct
, TextChildAnchor textChildAnchor
)
149 bool consumed
= false;
151 foreach ( void delegate(TextChildAnchor
) dlg
; textChildAnchor
.onBackspaceListeners
)
153 dlg(textChildAnchor
);
159 void delegate(TextChildAnchor
)[] onCopyClipboardListeners
;
160 void addOnCopyClipboard(void delegate(TextChildAnchor
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
162 if ( !("copy-clipboard" in connectedSignals
) )
167 cast(GCallback
)&callBackCopyClipboard
,
171 connectedSignals
["copy-clipboard"] = 1;
173 onCopyClipboardListeners
~= dlg
;
175 extern(C
) static void callBackCopyClipboard(GtkTextView
* textviewStruct
, TextChildAnchor textChildAnchor
)
177 bool consumed
= false;
179 foreach ( void delegate(TextChildAnchor
) dlg
; textChildAnchor
.onCopyClipboardListeners
)
181 dlg(textChildAnchor
);
187 void delegate(TextChildAnchor
)[] onCutClipboardListeners
;
188 void addOnCutClipboard(void delegate(TextChildAnchor
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
190 if ( !("cut-clipboard" in connectedSignals
) )
195 cast(GCallback
)&callBackCutClipboard
,
199 connectedSignals
["cut-clipboard"] = 1;
201 onCutClipboardListeners
~= dlg
;
203 extern(C
) static void callBackCutClipboard(GtkTextView
* textviewStruct
, TextChildAnchor textChildAnchor
)
205 bool consumed
= false;
207 foreach ( void delegate(TextChildAnchor
) dlg
; textChildAnchor
.onCutClipboardListeners
)
209 dlg(textChildAnchor
);
215 void delegate(GtkDeleteType
, gint
, TextChildAnchor
)[] onDeleteFromCursorListeners
;
216 void addOnDeleteFromCursor(void delegate(GtkDeleteType
, gint
, TextChildAnchor
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
218 if ( !("delete-from-cursor" in connectedSignals
) )
222 "delete-from-cursor",
223 cast(GCallback
)&callBackDeleteFromCursor
,
227 connectedSignals
["delete-from-cursor"] = 1;
229 onDeleteFromCursorListeners
~= dlg
;
231 extern(C
) static void callBackDeleteFromCursor(GtkTextView
* textviewStruct
, GtkDeleteType arg1
, gint arg2
, TextChildAnchor textChildAnchor
)
233 bool consumed
= false;
235 foreach ( void delegate(GtkDeleteType
, gint
, TextChildAnchor
) dlg
; textChildAnchor
.onDeleteFromCursorListeners
)
237 dlg(arg1
, arg2
, textChildAnchor
);
243 void delegate(char[], TextChildAnchor
)[] onInsertAtCursorListeners
;
244 void addOnInsertAtCursor(void delegate(char[], TextChildAnchor
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
246 if ( !("insert-at-cursor" in connectedSignals
) )
251 cast(GCallback
)&callBackInsertAtCursor
,
255 connectedSignals
["insert-at-cursor"] = 1;
257 onInsertAtCursorListeners
~= dlg
;
259 extern(C
) static void callBackInsertAtCursor(GtkTextView
* textviewStruct
, gchar
* arg1
, TextChildAnchor textChildAnchor
)
261 bool consumed
= false;
263 foreach ( void delegate(char[], TextChildAnchor
) dlg
; textChildAnchor
.onInsertAtCursorListeners
)
265 dlg(Str
.toString(arg1
), textChildAnchor
);
271 void delegate(GtkMovementStep
, gint
, gboolean
, TextChildAnchor
)[] onMoveCursorListeners
;
272 void addOnMoveCursor(void delegate(GtkMovementStep
, gint
, gboolean
, TextChildAnchor
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
274 if ( !("move-cursor" in connectedSignals
) )
279 cast(GCallback
)&callBackMoveCursor
,
283 connectedSignals
["move-cursor"] = 1;
285 onMoveCursorListeners
~= dlg
;
287 extern(C
) static void callBackMoveCursor(GtkTextView
* widgetStruct
, GtkMovementStep step
, gint count
, gboolean extendSelection
, TextChildAnchor textChildAnchor
)
289 bool consumed
= false;
291 foreach ( void delegate(GtkMovementStep
, gint
, gboolean
, TextChildAnchor
) dlg
; textChildAnchor
.onMoveCursorListeners
)
293 dlg(step
, count
, extendSelection
, textChildAnchor
);
299 void delegate(GtkDirectionType
, TextChildAnchor
)[] onMoveFocusListeners
;
300 void addOnMoveFocus(void delegate(GtkDirectionType
, TextChildAnchor
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
302 if ( !("move-focus" in connectedSignals
) )
307 cast(GCallback
)&callBackMoveFocus
,
311 connectedSignals
["move-focus"] = 1;
313 onMoveFocusListeners
~= dlg
;
315 extern(C
) static void callBackMoveFocus(GtkTextView
* textviewStruct
, GtkDirectionType arg1
, TextChildAnchor textChildAnchor
)
317 bool consumed
= false;
319 foreach ( void delegate(GtkDirectionType
, TextChildAnchor
) dlg
; textChildAnchor
.onMoveFocusListeners
)
321 dlg(arg1
, textChildAnchor
);
327 void delegate(GtkScrollStep
, gint
, TextChildAnchor
)[] onMoveViewportListeners
;
328 void addOnMoveViewport(void delegate(GtkScrollStep
, gint
, TextChildAnchor
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
330 if ( !("move-viewport" in connectedSignals
) )
335 cast(GCallback
)&callBackMoveViewport
,
339 connectedSignals
["move-viewport"] = 1;
341 onMoveViewportListeners
~= dlg
;
343 extern(C
) static void callBackMoveViewport(GtkTextView
* textviewStruct
, GtkScrollStep arg1
, gint arg2
, TextChildAnchor textChildAnchor
)
345 bool consumed
= false;
347 foreach ( void delegate(GtkScrollStep
, gint
, TextChildAnchor
) dlg
; textChildAnchor
.onMoveViewportListeners
)
349 dlg(arg1
, arg2
, textChildAnchor
);
355 void delegate(gint
, gboolean
, TextChildAnchor
)[] onPageHorizontallyListeners
;
356 void addOnPageHorizontally(void delegate(gint
, gboolean
, TextChildAnchor
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
358 if ( !("page-horizontally" in connectedSignals
) )
363 cast(GCallback
)&callBackPageHorizontally
,
367 connectedSignals
["page-horizontally"] = 1;
369 onPageHorizontallyListeners
~= dlg
;
371 extern(C
) static void callBackPageHorizontally(GtkTextView
* textviewStruct
, gint arg1
, gboolean arg2
, TextChildAnchor textChildAnchor
)
373 bool consumed
= false;
375 foreach ( void delegate(gint
, gboolean
, TextChildAnchor
) dlg
; textChildAnchor
.onPageHorizontallyListeners
)
377 dlg(arg1
, arg2
, textChildAnchor
);
383 void delegate(TextChildAnchor
)[] onPasteClipboardListeners
;
384 void addOnPasteClipboard(void delegate(TextChildAnchor
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
386 if ( !("paste-clipboard" in connectedSignals
) )
391 cast(GCallback
)&callBackPasteClipboard
,
395 connectedSignals
["paste-clipboard"] = 1;
397 onPasteClipboardListeners
~= dlg
;
399 extern(C
) static void callBackPasteClipboard(GtkTextView
* textviewStruct
, TextChildAnchor textChildAnchor
)
401 bool consumed
= false;
403 foreach ( void delegate(TextChildAnchor
) dlg
; textChildAnchor
.onPasteClipboardListeners
)
405 dlg(textChildAnchor
);
411 void delegate(GtkMenu
*, TextChildAnchor
)[] onPopulatePopupListeners
;
412 void addOnPopulatePopup(void delegate(GtkMenu
*, TextChildAnchor
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
414 if ( !("populate-popup" in connectedSignals
) )
419 cast(GCallback
)&callBackPopulatePopup
,
423 connectedSignals
["populate-popup"] = 1;
425 onPopulatePopupListeners
~= dlg
;
427 extern(C
) static void callBackPopulatePopup(GtkTextView
* textviewStruct
, GtkMenu
* arg1
, TextChildAnchor textChildAnchor
)
429 bool consumed
= false;
431 foreach ( void delegate(GtkMenu
*, TextChildAnchor
) dlg
; textChildAnchor
.onPopulatePopupListeners
)
433 dlg(arg1
, textChildAnchor
);
439 void delegate(gboolean
, TextChildAnchor
)[] onSelectAllListeners
;
440 void addOnSelectAll(void delegate(gboolean
, TextChildAnchor
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
442 if ( !("select-all" in connectedSignals
) )
447 cast(GCallback
)&callBackSelectAll
,
451 connectedSignals
["select-all"] = 1;
453 onSelectAllListeners
~= dlg
;
455 extern(C
) static void callBackSelectAll(GtkTextView
* textviewStruct
, gboolean arg1
, TextChildAnchor textChildAnchor
)
457 bool consumed
= false;
459 foreach ( void delegate(gboolean
, TextChildAnchor
) dlg
; textChildAnchor
.onSelectAllListeners
)
461 dlg(arg1
, textChildAnchor
);
467 void delegate(TextChildAnchor
)[] onSetAnchorListeners
;
468 void addOnSetAnchor(void delegate(TextChildAnchor
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
470 if ( !("set-anchor" in connectedSignals
) )
475 cast(GCallback
)&callBackSetAnchor
,
479 connectedSignals
["set-anchor"] = 1;
481 onSetAnchorListeners
~= dlg
;
483 extern(C
) static void callBackSetAnchor(GtkTextView
* textviewStruct
, TextChildAnchor textChildAnchor
)
485 bool consumed
= false;
487 foreach ( void delegate(TextChildAnchor
) dlg
; textChildAnchor
.onSetAnchorListeners
)
489 dlg(textChildAnchor
);
495 void delegate(GtkAdjustment
*, GtkAdjustment
*, TextChildAnchor
)[] onSetScrollAdjustmentsListeners
;
496 void addOnSetScrollAdjustments(void delegate(GtkAdjustment
*, GtkAdjustment
*, TextChildAnchor
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
498 if ( !("set-scroll-adjustments" in connectedSignals
) )
502 "set-scroll-adjustments",
503 cast(GCallback
)&callBackSetScrollAdjustments
,
507 connectedSignals
["set-scroll-adjustments"] = 1;
509 onSetScrollAdjustmentsListeners
~= dlg
;
511 extern(C
) static void callBackSetScrollAdjustments(GtkTextView
* textviewStruct
, GtkAdjustment
* arg1
, GtkAdjustment
* arg2
, TextChildAnchor textChildAnchor
)
513 bool consumed
= false;
515 foreach ( void delegate(GtkAdjustment
*, GtkAdjustment
*, TextChildAnchor
) dlg
; textChildAnchor
.onSetScrollAdjustmentsListeners
)
517 dlg(arg1
, arg2
, textChildAnchor
);
523 void delegate(TextChildAnchor
)[] onToggleOverwriteListeners
;
524 void addOnToggleOverwrite(void delegate(TextChildAnchor
) dlg
, ConnectFlags connectFlags
=cast(ConnectFlags
)0)
526 if ( !("toggle-overwrite" in connectedSignals
) )
531 cast(GCallback
)&callBackToggleOverwrite
,
535 connectedSignals
["toggle-overwrite"] = 1;
537 onToggleOverwriteListeners
~= dlg
;
539 extern(C
) static void callBackToggleOverwrite(GtkTextView
* textviewStruct
, TextChildAnchor textChildAnchor
)
541 bool consumed
= false;
543 foreach ( void delegate(TextChildAnchor
) dlg
; textChildAnchor
.onToggleOverwriteListeners
)
545 dlg(textChildAnchor
);
584 * Creates a new GtkTextChildAnchor. Usually you would then insert
585 * it into a GtkTextBuffer with gtk_text_buffer_insert_child_anchor().
586 * To perform the creation and insertion in one step, use the
587 * convenience function gtk_text_buffer_create_child_anchor().
589 * a new GtkTextChildAnchor
593 // GtkTextChildAnchor* gtk_text_child_anchor_new (void);
594 this(cast(GtkTextChildAnchor
*)gtk_text_child_anchor_new() );
598 * Gets a list of all widgets anchored at this child anchor.
599 * The returned list should be freed with g_list_free().
601 * a GtkTextChildAnchor
603 * list of widgets anchored at anchor
605 public GList
* getWidgets()
607 // GList* gtk_text_child_anchor_get_widgets (GtkTextChildAnchor *anchor);
608 return gtk_text_child_anchor_get_widgets(gtkTextChildAnchor
);
612 * Determines whether a child anchor has been deleted from
613 * the buffer. Keep in mind that the child anchor will be
614 * unreferenced when removed from the buffer, so you need to
615 * hold your own reference (with g_object_ref()) if you plan
616 * to use this function otherwise all deleted child anchors
617 * will also be finalized.
619 * a GtkTextChildAnchor
621 * TRUE if the child anchor has been deleted from its buffer
623 public int getDeleted()
625 // gboolean gtk_text_child_anchor_get_deleted (GtkTextChildAnchor *anchor);
626 return gtk_text_child_anchor_get_deleted(gtkTextChildAnchor
);