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 module gtk.FlowBox;
26 
27 private import glib.ConstructionException;
28 private import glib.ListG;
29 private import gobject.ObjectG;
30 private import gobject.Signals;
31 private import gtk.Adjustment;
32 private import gtk.Container;
33 private import gtk.FlowBoxChild;
34 private import gtk.OrientableIF;
35 private import gtk.OrientableT;
36 private import gtk.Widget;
37 public  import gtkc.gdktypes;
38 private import gtkc.gtk;
39 public  import gtkc.gtktypes;
40 
41 
42 /**
43  * A GtkFlowBox positions child widgets in sequence according to its
44  * orientation.
45  * 
46  * For instance, with the horizontal orientation, the widgets will be
47  * arranged from left to right, starting a new row under the previous
48  * row when necessary. Reducing the width in this case will require more
49  * rows, so a larger height will be requested.
50  * 
51  * Likewise, with the vertical orientation, the widgets will be arranged
52  * from top to bottom, starting a new column to the right when necessary.
53  * Reducing the height will require more columns, so a larger width will
54  * be requested.
55  * 
56  * The children of a GtkFlowBox can be dynamically sorted and filtered.
57  * 
58  * Although a GtkFlowBox must have only #GtkFlowBoxChild children,
59  * you can add any kind of widget to it via gtk_container_add(), and
60  * a GtkFlowBoxChild widget will automatically be inserted between
61  * the box and the widget.
62  * 
63  * Also see #GtkListBox.
64  * 
65  * GtkFlowBox was added in GTK+ 3.12.
66  */
67 public class FlowBox : Container, OrientableIF
68 {
69 	/** the main Gtk struct */
70 	protected GtkFlowBox* gtkFlowBox;
71 
72 	/** Get the main Gtk struct */
73 	public GtkFlowBox* getFlowBoxStruct()
74 	{
75 		return gtkFlowBox;
76 	}
77 
78 	/** the main Gtk struct as a void* */
79 	protected override void* getStruct()
80 	{
81 		return cast(void*)gtkFlowBox;
82 	}
83 
84 	protected override void setStruct(GObject* obj)
85 	{
86 		gtkFlowBox = cast(GtkFlowBox*)obj;
87 		super.setStruct(obj);
88 	}
89 
90 	/**
91 	 * Sets our main struct and passes it to the parent class.
92 	 */
93 	public this (GtkFlowBox* gtkFlowBox, bool ownedRef = false)
94 	{
95 		this.gtkFlowBox = gtkFlowBox;
96 		super(cast(GtkContainer*)gtkFlowBox, ownedRef);
97 	}
98 
99 	// add the Orientable capabilities
100 	mixin OrientableT!(GtkFlowBox);
101 
102 	/**
103 	 */
104 
105 	public static GType getType()
106 	{
107 		return gtk_flow_box_get_type();
108 	}
109 
110 	/**
111 	 * Creates a GtkFlowBox.
112 	 *
113 	 * Return: a new #GtkFlowBox container
114 	 *
115 	 * Since: 3.12
116 	 *
117 	 * Throws: ConstructionException GTK+ fails to create the object.
118 	 */
119 	public this()
120 	{
121 		auto p = gtk_flow_box_new();
122 		
123 		if(p is null)
124 		{
125 			throw new ConstructionException("null returned by new");
126 		}
127 		
128 		this(cast(GtkFlowBox*) p);
129 	}
130 
131 	/**
132 	 * Returns whether children activate on single clicks.
133 	 *
134 	 * Return: %TRUE if children are activated on single click,
135 	 *     %FALSE otherwise
136 	 *
137 	 * Since: 3.12
138 	 */
139 	public bool getActivateOnSingleClick()
140 	{
141 		return gtk_flow_box_get_activate_on_single_click(gtkFlowBox) != 0;
142 	}
143 
144 	/**
145 	 * Gets the nth child in the @box.
146 	 *
147 	 * Params:
148 	 *     idx = the position of the child
149 	 *
150 	 * Return: the child widget, which will
151 	 *     always be a #GtkFlowBoxChild
152 	 *
153 	 * Since: 3.12
154 	 */
155 	public FlowBoxChild getChildAtIndex(int idx)
156 	{
157 		auto p = gtk_flow_box_get_child_at_index(gtkFlowBox, idx);
158 		
159 		if(p is null)
160 		{
161 			return null;
162 		}
163 		
164 		return ObjectG.getDObject!(FlowBoxChild)(cast(GtkFlowBoxChild*) p);
165 	}
166 
167 	/**
168 	 * Gets the horizontal spacing.
169 	 *
170 	 * Return: the horizontal spacing
171 	 *
172 	 * Since: 3.12
173 	 */
174 	public uint getColumnSpacing()
175 	{
176 		return gtk_flow_box_get_column_spacing(gtkFlowBox);
177 	}
178 
179 	/**
180 	 * Returns whether the box is homogeneous (all children are the
181 	 * same size). See gtk_box_set_homogeneous().
182 	 *
183 	 * Return: %TRUE if the box is homogeneous.
184 	 *
185 	 * Since: 3.12
186 	 */
187 	public bool getHomogeneous()
188 	{
189 		return gtk_flow_box_get_homogeneous(gtkFlowBox) != 0;
190 	}
191 
192 	/**
193 	 * Gets the maximum number of children per line.
194 	 *
195 	 * Return: the maximum number of children per line
196 	 *
197 	 * Since: 3.12
198 	 */
199 	public uint getMaxChildrenPerLine()
200 	{
201 		return gtk_flow_box_get_max_children_per_line(gtkFlowBox);
202 	}
203 
204 	/**
205 	 * Gets the minimum number of children per line.
206 	 *
207 	 * Return: the minimum number of children per line
208 	 *
209 	 * Since: 3.12
210 	 */
211 	public uint getMinChildrenPerLine()
212 	{
213 		return gtk_flow_box_get_min_children_per_line(gtkFlowBox);
214 	}
215 
216 	/**
217 	 * Gets the vertical spacing.
218 	 *
219 	 * Return: the vertical spacing
220 	 *
221 	 * Since: 3.12
222 	 */
223 	public uint getRowSpacing()
224 	{
225 		return gtk_flow_box_get_row_spacing(gtkFlowBox);
226 	}
227 
228 	/**
229 	 * Creates a list of all selected children.
230 	 *
231 	 * Return: A #GList containing the #GtkWidget for each selected child.
232 	 *     Free with g_list_free() when done.
233 	 *
234 	 * Since: 3.12
235 	 */
236 	public ListG getSelectedChildren()
237 	{
238 		auto p = gtk_flow_box_get_selected_children(gtkFlowBox);
239 		
240 		if(p is null)
241 		{
242 			return null;
243 		}
244 		
245 		return new ListG(cast(GList*) p);
246 	}
247 
248 	/**
249 	 * Gets the selection mode of @box.
250 	 *
251 	 * Return: the #GtkSelectionMode
252 	 *
253 	 * Since: 3.12
254 	 */
255 	public GtkSelectionMode getSelectionMode()
256 	{
257 		return gtk_flow_box_get_selection_mode(gtkFlowBox);
258 	}
259 
260 	/**
261 	 * Inserts the @widget into @box at @position.
262 	 *
263 	 * If a sort function is set, the widget will actually be inserted
264 	 * at the calculated position and this function has the same effect
265 	 * as gtk_container_add().
266 	 *
267 	 * If @position is -1, or larger than the total number of children
268 	 * in the @box, then the @widget will be appended to the end.
269 	 *
270 	 * Params:
271 	 *     widget = the #GtkWidget to add
272 	 *     position = the position to insert @child in
273 	 *
274 	 * Since: 3.12
275 	 */
276 	public void insert(Widget widget, int position)
277 	{
278 		gtk_flow_box_insert(gtkFlowBox, (widget is null) ? null : widget.getWidgetStruct(), position);
279 	}
280 
281 	/**
282 	 * Updates the filtering for all children.
283 	 *
284 	 * Call this function when the result of the filter
285 	 * function on the @box is changed due ot an external
286 	 * factor. For instance, this would be used if the
287 	 * filter function just looked for a specific search
288 	 * term, and the entry with the string has changed.
289 	 *
290 	 * Since: 3.12
291 	 */
292 	public void invalidateFilter()
293 	{
294 		gtk_flow_box_invalidate_filter(gtkFlowBox);
295 	}
296 
297 	/**
298 	 * Updates the sorting for all children.
299 	 *
300 	 * Call this when the result of the sort function on
301 	 * @box is changed due to an external factor.
302 	 *
303 	 * Since: 3.12
304 	 */
305 	public void invalidateSort()
306 	{
307 		gtk_flow_box_invalidate_sort(gtkFlowBox);
308 	}
309 
310 	/**
311 	 * Select all children of @box, if the selection
312 	 * mode allows it.
313 	 *
314 	 * Since: 3.12
315 	 */
316 	public void selectAll()
317 	{
318 		gtk_flow_box_select_all(gtkFlowBox);
319 	}
320 
321 	/**
322 	 * Selects a single child of @box, if the selection
323 	 * mode allows it.
324 	 *
325 	 * Params:
326 	 *     child = a child of @box
327 	 *
328 	 * Since: 3.12
329 	 */
330 	public void selectChild(FlowBoxChild child)
331 	{
332 		gtk_flow_box_select_child(gtkFlowBox, (child is null) ? null : child.getFlowBoxChildStruct());
333 	}
334 
335 	/**
336 	 * Calls a function for each selected child.
337 	 *
338 	 * Note that the selection cannot be modified from within
339 	 * this function.
340 	 *
341 	 * Params:
342 	 *     func = the function to call for each selected child
343 	 *     data = user data to pass to the function
344 	 *
345 	 * Since: 3.12
346 	 */
347 	public void selectedForeach(GtkFlowBoxForeachFunc func, void* data)
348 	{
349 		gtk_flow_box_selected_foreach(gtkFlowBox, func, data);
350 	}
351 
352 	/**
353 	 * If @single is %TRUE, children will be activated when you click
354 	 * on them, otherwise you need to double-click.
355 	 *
356 	 * Params:
357 	 *     single = %TRUE to emit child-activated on a single click
358 	 *
359 	 * Since: 3.12
360 	 */
361 	public void setActivateOnSingleClick(bool single)
362 	{
363 		gtk_flow_box_set_activate_on_single_click(gtkFlowBox, single);
364 	}
365 
366 	/**
367 	 * Sets the horizontal space to add between children.
368 	 * See the #GtkFlowBox:column-spacing property.
369 	 *
370 	 * Params:
371 	 *     spacing = the spacing to use
372 	 *
373 	 * Since: 3.12
374 	 */
375 	public void setColumnSpacing(uint spacing)
376 	{
377 		gtk_flow_box_set_column_spacing(gtkFlowBox, spacing);
378 	}
379 
380 	/**
381 	 * By setting a filter function on the @box one can decide dynamically
382 	 * which of the children to show. For instance, to implement a search
383 	 * function that only shows the children matching the search terms.
384 	 *
385 	 * The @filter_func will be called for each child after the call, and
386 	 * it will continue to be called each time a child changes (via
387 	 * gtk_flow_box_child_changed()) or when gtk_flow_box_invalidate_filter()
388 	 * is called.
389 	 *
390 	 * Params:
391 	 *     filterFunc = callback that
392 	 *         lets you filter which children to show
393 	 *     userData = user data passed to @filter_func
394 	 *     destroy = destroy notifier for @user_data
395 	 *
396 	 * Since: 3.12
397 	 */
398 	public void setFilterFunc(GtkFlowBoxFilterFunc filterFunc, void* userData, GDestroyNotify destroy)
399 	{
400 		gtk_flow_box_set_filter_func(gtkFlowBox, filterFunc, userData, destroy);
401 	}
402 
403 	/**
404 	 * Hooks up an adjustment to focus handling in @box.
405 	 * The adjustment is also used for autoscrolling during
406 	 * rubberband selection. See gtk_scrolled_window_get_hadjustment()
407 	 * for a typical way of obtaining the adjustment, and
408 	 * gtk_flow_box_set_vadjustment()for setting the vertical
409 	 * adjustment.
410 	 *
411 	 * The adjustments have to be in pixel units and in the same
412 	 * coordinate system as the allocation for immediate children
413 	 * of the box.
414 	 *
415 	 * Params:
416 	 *     adjustment = an adjustment which should be adjusted
417 	 *         when the focus is moved among the descendents of @container
418 	 *
419 	 * Since: 3.12
420 	 */
421 	public void setHadjustment(Adjustment adjustment)
422 	{
423 		gtk_flow_box_set_hadjustment(gtkFlowBox, (adjustment is null) ? null : adjustment.getAdjustmentStruct());
424 	}
425 
426 	/**
427 	 * Sets the #GtkFlowBox:homogeneous property of @box, controlling
428 	 * whether or not all children of @box are given equal space
429 	 * in the box.
430 	 *
431 	 * Params:
432 	 *     homogeneous = %TRUE to create equal allotments,
433 	 *         %FALSE for variable allotments
434 	 *
435 	 * Since: 3.12
436 	 */
437 	public void setHomogeneous(bool homogeneous)
438 	{
439 		gtk_flow_box_set_homogeneous(gtkFlowBox, homogeneous);
440 	}
441 
442 	/**
443 	 * Sets the maximum number of children to request and
444 	 * allocate space for in @box’s orientation.
445 	 *
446 	 * Setting the maximum number of children per line
447 	 * limits the overall natural size request to be no more
448 	 * than @n_children children long in the given orientation.
449 	 *
450 	 * Params:
451 	 *     nChildren = the maximum number of children per line
452 	 *
453 	 * Since: 3.12
454 	 */
455 	public void setMaxChildrenPerLine(uint nChildren)
456 	{
457 		gtk_flow_box_set_max_children_per_line(gtkFlowBox, nChildren);
458 	}
459 
460 	/**
461 	 * Sets the minimum number of children to line up
462 	 * in @box’s orientation before flowing.
463 	 *
464 	 * Params:
465 	 *     nChildren = the minimum number of children per line
466 	 *
467 	 * Since: 3.12
468 	 */
469 	public void setMinChildrenPerLine(uint nChildren)
470 	{
471 		gtk_flow_box_set_min_children_per_line(gtkFlowBox, nChildren);
472 	}
473 
474 	/**
475 	 * Sets the vertical space to add between children.
476 	 * See the #GtkFlowBox:row-spacing property.
477 	 *
478 	 * Params:
479 	 *     spacing = the spacing to use
480 	 *
481 	 * Since: 3.12
482 	 */
483 	public void setRowSpacing(uint spacing)
484 	{
485 		gtk_flow_box_set_row_spacing(gtkFlowBox, spacing);
486 	}
487 
488 	/**
489 	 * Sets how selection works in @box.
490 	 * See #GtkSelectionMode for details.
491 	 *
492 	 * Params:
493 	 *     mode = the new selection mode
494 	 *
495 	 * Since: 3.12
496 	 */
497 	public void setSelectionMode(GtkSelectionMode mode)
498 	{
499 		gtk_flow_box_set_selection_mode(gtkFlowBox, mode);
500 	}
501 
502 	/**
503 	 * By setting a sort function on the @box, one can dynamically
504 	 * reorder the children of the box, based on the contents of
505 	 * the children.
506 	 *
507 	 * The @sort_func will be called for each child after the call,
508 	 * and will continue to be called each time a child changes (via
509 	 * gtk_flow_box_child_changed()) and when gtk_flow_box_invalidate_sort()
510 	 * is called.
511 	 *
512 	 * Params:
513 	 *     sortFunc = the sort function
514 	 *     userData = user data passed to @sort_func
515 	 *     destroy = destroy notifier for @user_data
516 	 *
517 	 * Since: 3.12
518 	 */
519 	public void setSortFunc(GtkFlowBoxSortFunc sortFunc, void* userData, GDestroyNotify destroy)
520 	{
521 		gtk_flow_box_set_sort_func(gtkFlowBox, sortFunc, userData, destroy);
522 	}
523 
524 	/**
525 	 * Hooks up an adjustment to focus handling in @box.
526 	 * The adjustment is also used for autoscrolling during
527 	 * rubberband selection. See gtk_scrolled_window_get_vadjustment()
528 	 * for a typical way of obtaining the adjustment, and
529 	 * gtk_flow_box_set_hadjustment()for setting the horizontal
530 	 * adjustment.
531 	 *
532 	 * The adjustments have to be in pixel units and in the same
533 	 * coordinate system as the allocation for immediate children
534 	 * of the box.
535 	 *
536 	 * Params:
537 	 *     adjustment = an adjustment which should be adjusted
538 	 *         when the focus is moved among the descendents of @container
539 	 *
540 	 * Since: 3.12
541 	 */
542 	public void setVadjustment(Adjustment adjustment)
543 	{
544 		gtk_flow_box_set_vadjustment(gtkFlowBox, (adjustment is null) ? null : adjustment.getAdjustmentStruct());
545 	}
546 
547 	/**
548 	 * Unselect all children of @box, if the selection
549 	 * mode allows it.
550 	 *
551 	 * Since: 3.12
552 	 */
553 	public void unselectAll()
554 	{
555 		gtk_flow_box_unselect_all(gtkFlowBox);
556 	}
557 
558 	/**
559 	 * Unselects a single child of @box, if the selection
560 	 * mode allows it.
561 	 *
562 	 * Params:
563 	 *     child = a child of @box
564 	 *
565 	 * Since: 3.12
566 	 */
567 	public void unselectChild(FlowBoxChild child)
568 	{
569 		gtk_flow_box_unselect_child(gtkFlowBox, (child is null) ? null : child.getFlowBoxChildStruct());
570 	}
571 
572 	int[string] connectedSignals;
573 
574 	void delegate(FlowBox)[] onActivateCursorChildListeners;
575 	/**
576 	 * The ::activate-cursor-child signal is a
577 	 * [keybinding signal][GtkBindingSignal]
578 	 * which gets emitted when the user activates the @box.
579 	 */
580 	void addOnActivateCursorChild(void delegate(FlowBox) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
581 	{
582 		if ( "activate-cursor-child" !in connectedSignals )
583 		{
584 			Signals.connectData(
585 				this,
586 				"activate-cursor-child",
587 				cast(GCallback)&callBackActivateCursorChild,
588 				cast(void*)this,
589 				null,
590 				connectFlags);
591 			connectedSignals["activate-cursor-child"] = 1;
592 		}
593 		onActivateCursorChildListeners ~= dlg;
594 	}
595 	extern(C) static void callBackActivateCursorChild(GtkFlowBox* flowboxStruct, FlowBox _flowbox)
596 	{
597 		foreach ( void delegate(FlowBox) dlg; _flowbox.onActivateCursorChildListeners )
598 		{
599 			dlg(_flowbox);
600 		}
601 	}
602 
603 	void delegate(FlowBoxChild, FlowBox)[] onChildActivatedListeners;
604 	/**
605 	 * The ::child-activated signal is emitted when a child has been
606 	 * activated by the user.
607 	 *
608 	 * Params:
609 	 *     child = the child that is activated
610 	 */
611 	void addOnChildActivated(void delegate(FlowBoxChild, FlowBox) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
612 	{
613 		if ( "child-activated" !in connectedSignals )
614 		{
615 			Signals.connectData(
616 				this,
617 				"child-activated",
618 				cast(GCallback)&callBackChildActivated,
619 				cast(void*)this,
620 				null,
621 				connectFlags);
622 			connectedSignals["child-activated"] = 1;
623 		}
624 		onChildActivatedListeners ~= dlg;
625 	}
626 	extern(C) static void callBackChildActivated(GtkFlowBox* flowboxStruct, GtkFlowBoxChild* child, FlowBox _flowbox)
627 	{
628 		foreach ( void delegate(FlowBoxChild, FlowBox) dlg; _flowbox.onChildActivatedListeners )
629 		{
630 			dlg(ObjectG.getDObject!(FlowBoxChild)(child), _flowbox);
631 		}
632 	}
633 
634 	void delegate(GtkMovementStep, int, FlowBox)[] onMoveCursorListeners;
635 	/**
636 	 * The ::move-cursor signal is a
637 	 * [keybinding signal][GtkBindingSignal]
638 	 * which gets emitted when the user initiates a cursor movement.
639 	 * If the cursor is not visible in @text_view, this signal causes
640 	 * the viewport to be moved instead.
641 	 *
642 	 * Applications should not connect to it, but may emit it with
643 	 * g_signal_emit_by_name() if they need to control the cursor
644 	 * programmatically.
645 	 *
646 	 * The default bindings for this signal come in two variants,
647 	 * the variant with the Shift modifier extends the selection,
648 	 * the variant without the Shift modifer does not.
649 	 * There are too many key combinations to list them all here.
650 	 * - Arrow keys move by individual children
651 	 * - Home/End keys move to the ends of the box
652 	 * - PageUp/PageDown keys move vertically by pages
653 	 *
654 	 * Params:
655 	 *     step = the granularity fo the move, as a #GtkMovementStep
656 	 *     count = the number of @step units to move
657 	 */
658 	void addOnMoveCursor(void delegate(GtkMovementStep, int, FlowBox) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
659 	{
660 		if ( "move-cursor" !in connectedSignals )
661 		{
662 			Signals.connectData(
663 				this,
664 				"move-cursor",
665 				cast(GCallback)&callBackMoveCursor,
666 				cast(void*)this,
667 				null,
668 				connectFlags);
669 			connectedSignals["move-cursor"] = 1;
670 		}
671 		onMoveCursorListeners ~= dlg;
672 	}
673 	extern(C) static void callBackMoveCursor(GtkFlowBox* flowboxStruct, GtkMovementStep step, int count, FlowBox _flowbox)
674 	{
675 		foreach ( void delegate(GtkMovementStep, int, FlowBox) dlg; _flowbox.onMoveCursorListeners )
676 		{
677 			dlg(step, count, _flowbox);
678 		}
679 	}
680 
681 	void delegate(FlowBox)[] onSelectAllListeners;
682 	/**
683 	 * The ::select-all signal is a
684 	 * [keybinding signal][GtkBindingSignal]
685 	 * which gets emitted to select all children of the box, if
686 	 * the selection mode permits it.
687 	 *
688 	 * The default bindings for this signal is Ctrl-a.
689 	 */
690 	void addOnSelectAll(void delegate(FlowBox) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
691 	{
692 		if ( "select-all" !in connectedSignals )
693 		{
694 			Signals.connectData(
695 				this,
696 				"select-all",
697 				cast(GCallback)&callBackSelectAll,
698 				cast(void*)this,
699 				null,
700 				connectFlags);
701 			connectedSignals["select-all"] = 1;
702 		}
703 		onSelectAllListeners ~= dlg;
704 	}
705 	extern(C) static void callBackSelectAll(GtkFlowBox* flowboxStruct, FlowBox _flowbox)
706 	{
707 		foreach ( void delegate(FlowBox) dlg; _flowbox.onSelectAllListeners )
708 		{
709 			dlg(_flowbox);
710 		}
711 	}
712 
713 	void delegate(FlowBox)[] onSelectedChildrenChangedListeners;
714 	/**
715 	 * The ::selected-children-changed signal is emitted when the
716 	 * set of selected children changes.
717 	 *
718 	 * Use gtk_flow_box_selected_foreach() or
719 	 * gtk_flow_box_get_selected_children() to obtain the
720 	 * selected children.
721 	 */
722 	void addOnSelectedChildrenChanged(void delegate(FlowBox) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
723 	{
724 		if ( "selected-children-changed" !in connectedSignals )
725 		{
726 			Signals.connectData(
727 				this,
728 				"selected-children-changed",
729 				cast(GCallback)&callBackSelectedChildrenChanged,
730 				cast(void*)this,
731 				null,
732 				connectFlags);
733 			connectedSignals["selected-children-changed"] = 1;
734 		}
735 		onSelectedChildrenChangedListeners ~= dlg;
736 	}
737 	extern(C) static void callBackSelectedChildrenChanged(GtkFlowBox* flowboxStruct, FlowBox _flowbox)
738 	{
739 		foreach ( void delegate(FlowBox) dlg; _flowbox.onSelectedChildrenChangedListeners )
740 		{
741 			dlg(_flowbox);
742 		}
743 	}
744 
745 	void delegate(FlowBox)[] onToggleCursorChildListeners;
746 	/**
747 	 * The ::toggle-cursor-child signal is a
748 	 * [keybinding signal][GtkBindingSignal]
749 	 * which toggles the selection of the child that has the focus.
750 	 *
751 	 * The default binding for this signal is Ctrl-Space.
752 	 */
753 	void addOnToggleCursorChild(void delegate(FlowBox) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
754 	{
755 		if ( "toggle-cursor-child" !in connectedSignals )
756 		{
757 			Signals.connectData(
758 				this,
759 				"toggle-cursor-child",
760 				cast(GCallback)&callBackToggleCursorChild,
761 				cast(void*)this,
762 				null,
763 				connectFlags);
764 			connectedSignals["toggle-cursor-child"] = 1;
765 		}
766 		onToggleCursorChildListeners ~= dlg;
767 	}
768 	extern(C) static void callBackToggleCursorChild(GtkFlowBox* flowboxStruct, FlowBox _flowbox)
769 	{
770 		foreach ( void delegate(FlowBox) dlg; _flowbox.onToggleCursorChildListeners )
771 		{
772 			dlg(_flowbox);
773 		}
774 	}
775 
776 	void delegate(FlowBox)[] onUnselectAllListeners;
777 	/**
778 	 * The ::unselect-all signal is a
779 	 * [keybinding signal][GtkBindingSignal]
780 	 * which gets emitted to unselect all children of the box, if
781 	 * the selection mode permits it.
782 	 *
783 	 * The default bindings for this signal is Ctrl-Shift-a.
784 	 */
785 	void addOnUnselectAll(void delegate(FlowBox) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
786 	{
787 		if ( "unselect-all" !in connectedSignals )
788 		{
789 			Signals.connectData(
790 				this,
791 				"unselect-all",
792 				cast(GCallback)&callBackUnselectAll,
793 				cast(void*)this,
794 				null,
795 				connectFlags);
796 			connectedSignals["unselect-all"] = 1;
797 		}
798 		onUnselectAllListeners ~= dlg;
799 	}
800 	extern(C) static void callBackUnselectAll(GtkFlowBox* flowboxStruct, FlowBox _flowbox)
801 	{
802 		foreach ( void delegate(FlowBox) dlg; _flowbox.onUnselectAllListeners )
803 		{
804 			dlg(_flowbox);
805 		}
806 	}
807 }