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.ScrolledWindow;
26 
27 private import glib.ConstructionException;
28 private import gobject.ObjectG;
29 private import gobject.Signals;
30 private import gtk.Adjustment;
31 private import gtk.Bin;
32 private import gtk.Widget;
33 private import gtk.c.functions;
34 public  import gtk.c.types;
35 public  import gtkc.gtktypes;
36 private import std.algorithm;
37 
38 
39 /**
40  * GtkScrolledWindow is a container that accepts a single child widget, makes
41  * that child scrollable using either internally added scrollbars or externally
42  * associated adjustments, and optionally draws a frame around the child.
43  * 
44  * Widgets with native scrolling support, i.e. those whose classes implement the
45  * #GtkScrollable interface, are added directly. For other types of widget, the
46  * class #GtkViewport acts as an adaptor, giving scrollability to other widgets.
47  * GtkScrolledWindow’s implementation of gtk_container_add() intelligently
48  * accounts for whether or not the added child is a #GtkScrollable. If it isn’t,
49  * #GtkScrolledWindow wraps the child in a #GtkViewport and adds that for you.
50  * Therefore, you can just add any child widget and not worry about the details.
51  * 
52  * If gtk_container_add() has added a #GtkViewport for you, you can remove
53  * both your added child widget from the #GtkViewport, and the #GtkViewport
54  * from the GtkScrolledWindow, like this:
55  * 
56  * |[<!-- language="C" -->
57  * GtkWidget *scrolled_window = gtk_scrolled_window_new (NULL, NULL);
58  * GtkWidget *child_widget = gtk_button_new ();
59  * 
60  * // GtkButton is not a GtkScrollable, so GtkScrolledWindow will automatically
61  * // add a GtkViewport.
62  * gtk_container_add (GTK_CONTAINER (scrolled_window),
63  * child_widget);
64  * 
65  * // Either of these will result in child_widget being unparented:
66  * gtk_container_remove (GTK_CONTAINER (scrolled_window),
67  * child_widget);
68  * // or
69  * gtk_container_remove (GTK_CONTAINER (scrolled_window),
70  * gtk_bin_get_child (GTK_BIN (scrolled_window)));
71  * ]|
72  * 
73  * Unless #GtkScrolledWindow:policy is GTK_POLICY_NEVER or GTK_POLICY_EXTERNAL,
74  * GtkScrolledWindow adds internal #GtkScrollbar widgets around its child. The
75  * scroll position of the child, and if applicable the scrollbars, is controlled
76  * by the #GtkScrolledWindow:hadjustment and #GtkScrolledWindow:vadjustment
77  * that are associated with the GtkScrolledWindow. See the docs on #GtkScrollbar
78  * for the details, but note that the “step_increment” and “page_increment”
79  * fields are only effective if the policy causes scrollbars to be present.
80  * 
81  * If a GtkScrolledWindow doesn’t behave quite as you would like, or
82  * doesn’t have exactly the right layout, it’s very possible to set up
83  * your own scrolling with #GtkScrollbar and for example a #GtkGrid.
84  * 
85  * # Touch support
86  * 
87  * GtkScrolledWindow has built-in support for touch devices. When a
88  * touchscreen is used, swiping will move the scrolled window, and will
89  * expose 'kinetic' behavior. This can be turned off with the
90  * #GtkScrolledWindow:kinetic-scrolling property if it is undesired.
91  * 
92  * GtkScrolledWindow also displays visual 'overshoot' indication when
93  * the content is pulled beyond the end, and this situation can be
94  * captured with the #GtkScrolledWindow::edge-overshot signal.
95  * 
96  * If no mouse device is present, the scrollbars will overlayed as
97  * narrow, auto-hiding indicators over the content. If traditional
98  * scrollbars are desired although no mouse is present, this behaviour
99  * can be turned off with the #GtkScrolledWindow:overlay-scrolling
100  * property.
101  * 
102  * # CSS nodes
103  * 
104  * GtkScrolledWindow has a main CSS node with name scrolledwindow.
105  * 
106  * It uses subnodes with names overshoot and undershoot to
107  * draw the overflow and underflow indications. These nodes get
108  * the .left, .right, .top or .bottom style class added depending
109  * on where the indication is drawn.
110  * 
111  * GtkScrolledWindow also sets the positional style classes (.left,
112  * .right, .top, .bottom) and style classes related to overlay
113  * scrolling (.overlay-indicator, .dragging, .hovering) on its scrollbars.
114  * 
115  * If both scrollbars are visible, the area where they meet is drawn
116  * with a subnode named junction.
117  */
118 public class ScrolledWindow : Bin
119 {
120 	/** the main Gtk struct */
121 	protected GtkScrolledWindow* gtkScrolledWindow;
122 
123 	/** Get the main Gtk struct */
124 	public GtkScrolledWindow* getScrolledWindowStruct(bool transferOwnership = false)
125 	{
126 		if (transferOwnership)
127 			ownedRef = false;
128 		return gtkScrolledWindow;
129 	}
130 
131 	/** the main Gtk struct as a void* */
132 	protected override void* getStruct()
133 	{
134 		return cast(void*)gtkScrolledWindow;
135 	}
136 
137 	/**
138 	 * Sets our main struct and passes it to the parent class.
139 	 */
140 	public this (GtkScrolledWindow* gtkScrolledWindow, bool ownedRef = false)
141 	{
142 		this.gtkScrolledWindow = gtkScrolledWindow;
143 		super(cast(GtkBin*)gtkScrolledWindow, ownedRef);
144 	}
145 
146 	/** */
147 	public this()
148 	{
149 		this(null, null);
150 	}
151 
152 	/** */
153 	public this(Widget widget)
154 	{
155 		this();
156 		add(widget);
157 	}
158 
159 	/**
160 	 * Creates a new Scrolled window and set the policy type
161 	 * Params:
162 	 *  hPolicy = the horizontal policy
163 	 *  vPolicy = the vertical policy
164 	 */
165 	this(PolicyType hPolicy, PolicyType vPolicy)
166 	{
167 		this();
168 		setPolicy(hPolicy, vPolicy);
169 	}
170 
171 	/**
172 	 */
173 
174 	/** */
175 	public static GType getType()
176 	{
177 		return gtk_scrolled_window_get_type();
178 	}
179 
180 	/**
181 	 * Creates a new scrolled window.
182 	 *
183 	 * The two arguments are the scrolled window’s adjustments; these will be
184 	 * shared with the scrollbars and the child widget to keep the bars in sync
185 	 * with the child. Usually you want to pass %NULL for the adjustments, which
186 	 * will cause the scrolled window to create them for you.
187 	 *
188 	 * Params:
189 	 *     hadjustment = horizontal adjustment
190 	 *     vadjustment = vertical adjustment
191 	 *
192 	 * Returns: a new scrolled window
193 	 *
194 	 * Throws: ConstructionException GTK+ fails to create the object.
195 	 */
196 	public this(Adjustment hadjustment, Adjustment vadjustment)
197 	{
198 		auto p = gtk_scrolled_window_new((hadjustment is null) ? null : hadjustment.getAdjustmentStruct(), (vadjustment is null) ? null : vadjustment.getAdjustmentStruct());
199 
200 		if(p is null)
201 		{
202 			throw new ConstructionException("null returned by new");
203 		}
204 
205 		this(cast(GtkScrolledWindow*) p);
206 	}
207 
208 	/**
209 	 * Used to add children without native scrolling capabilities. This
210 	 * is simply a convenience function; it is equivalent to adding the
211 	 * unscrollable child to a viewport, then adding the viewport to the
212 	 * scrolled window. If a child has native scrolling, use
213 	 * gtk_container_add() instead of this function.
214 	 *
215 	 * The viewport scrolls the child by moving its #GdkWindow, and takes
216 	 * the size of the child to be the size of its toplevel #GdkWindow.
217 	 * This will be very wrong for most widgets that support native scrolling;
218 	 * for example, if you add a widget such as #GtkTreeView with a viewport,
219 	 * the whole widget will scroll, including the column headings. Thus,
220 	 * widgets with native scrolling support should not be used with the
221 	 * #GtkViewport proxy.
222 	 *
223 	 * A widget supports scrolling natively if it implements the
224 	 * #GtkScrollable interface.
225 	 *
226 	 * Deprecated: gtk_container_add() will automatically add
227 	 * a #GtkViewport if the child doesn’t implement #GtkScrollable.
228 	 *
229 	 * Params:
230 	 *     child = the widget you want to scroll
231 	 */
232 	public void addWithViewport(Widget child)
233 	{
234 		gtk_scrolled_window_add_with_viewport(gtkScrolledWindow, (child is null) ? null : child.getWidgetStruct());
235 	}
236 
237 	/**
238 	 * Return whether button presses are captured during kinetic
239 	 * scrolling. See gtk_scrolled_window_set_capture_button_press().
240 	 *
241 	 * Returns: %TRUE if button presses are captured during kinetic scrolling
242 	 *
243 	 * Since: 3.4
244 	 */
245 	public bool getCaptureButtonPress()
246 	{
247 		return gtk_scrolled_window_get_capture_button_press(gtkScrolledWindow) != 0;
248 	}
249 
250 	/**
251 	 * Returns the horizontal scrollbar’s adjustment, used to connect the
252 	 * horizontal scrollbar to the child widget’s horizontal scroll
253 	 * functionality.
254 	 *
255 	 * Returns: the horizontal #GtkAdjustment
256 	 */
257 	public Adjustment getHadjustment()
258 	{
259 		auto p = gtk_scrolled_window_get_hadjustment(gtkScrolledWindow);
260 
261 		if(p is null)
262 		{
263 			return null;
264 		}
265 
266 		return ObjectG.getDObject!(Adjustment)(cast(GtkAdjustment*) p);
267 	}
268 
269 	/**
270 	 * Returns the horizontal scrollbar of @scrolled_window.
271 	 *
272 	 * Returns: the horizontal scrollbar of the scrolled window.
273 	 *
274 	 * Since: 2.8
275 	 */
276 	public Widget getHscrollbar()
277 	{
278 		auto p = gtk_scrolled_window_get_hscrollbar(gtkScrolledWindow);
279 
280 		if(p is null)
281 		{
282 			return null;
283 		}
284 
285 		return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p);
286 	}
287 
288 	/**
289 	 * Returns the specified kinetic scrolling behavior.
290 	 *
291 	 * Returns: the scrolling behavior flags.
292 	 *
293 	 * Since: 3.4
294 	 */
295 	public bool getKineticScrolling()
296 	{
297 		return gtk_scrolled_window_get_kinetic_scrolling(gtkScrolledWindow) != 0;
298 	}
299 
300 	/**
301 	 * Returns the maximum content height set.
302 	 *
303 	 * Returns: the maximum content height, or -1
304 	 *
305 	 * Since: 3.22
306 	 */
307 	public int getMaxContentHeight()
308 	{
309 		return gtk_scrolled_window_get_max_content_height(gtkScrolledWindow);
310 	}
311 
312 	/**
313 	 * Returns the maximum content width set.
314 	 *
315 	 * Returns: the maximum content width, or -1
316 	 *
317 	 * Since: 3.22
318 	 */
319 	public int getMaxContentWidth()
320 	{
321 		return gtk_scrolled_window_get_max_content_width(gtkScrolledWindow);
322 	}
323 
324 	/**
325 	 * Gets the minimal content height of @scrolled_window, or -1 if not set.
326 	 *
327 	 * Returns: the minimal content height
328 	 *
329 	 * Since: 3.0
330 	 */
331 	public int getMinContentHeight()
332 	{
333 		return gtk_scrolled_window_get_min_content_height(gtkScrolledWindow);
334 	}
335 
336 	/**
337 	 * Gets the minimum content width of @scrolled_window, or -1 if not set.
338 	 *
339 	 * Returns: the minimum content width
340 	 *
341 	 * Since: 3.0
342 	 */
343 	public int getMinContentWidth()
344 	{
345 		return gtk_scrolled_window_get_min_content_width(gtkScrolledWindow);
346 	}
347 
348 	/**
349 	 * Returns whether overlay scrolling is enabled for this scrolled window.
350 	 *
351 	 * Returns: %TRUE if overlay scrolling is enabled
352 	 *
353 	 * Since: 3.16
354 	 */
355 	public bool getOverlayScrolling()
356 	{
357 		return gtk_scrolled_window_get_overlay_scrolling(gtkScrolledWindow) != 0;
358 	}
359 
360 	/**
361 	 * Gets the placement of the contents with respect to the scrollbars
362 	 * for the scrolled window. See gtk_scrolled_window_set_placement().
363 	 *
364 	 * Returns: the current placement value.
365 	 *
366 	 *     See also gtk_scrolled_window_set_placement() and
367 	 *     gtk_scrolled_window_unset_placement().
368 	 */
369 	public GtkCornerType getPlacement()
370 	{
371 		return gtk_scrolled_window_get_placement(gtkScrolledWindow);
372 	}
373 
374 	/**
375 	 * Retrieves the current policy values for the horizontal and vertical
376 	 * scrollbars. See gtk_scrolled_window_set_policy().
377 	 *
378 	 * Params:
379 	 *     hscrollbarPolicy = location to store the policy
380 	 *         for the horizontal scrollbar, or %NULL
381 	 *     vscrollbarPolicy = location to store the policy
382 	 *         for the vertical scrollbar, or %NULL
383 	 */
384 	public void getPolicy(out GtkPolicyType hscrollbarPolicy, out GtkPolicyType vscrollbarPolicy)
385 	{
386 		gtk_scrolled_window_get_policy(gtkScrolledWindow, &hscrollbarPolicy, &vscrollbarPolicy);
387 	}
388 
389 	/**
390 	 * Reports whether the natural height of the child will be calculated and propagated
391 	 * through the scrolled window’s requested natural height.
392 	 *
393 	 * Returns: whether natural height propagation is enabled.
394 	 *
395 	 * Since: 3.22
396 	 */
397 	public bool getPropagateNaturalHeight()
398 	{
399 		return gtk_scrolled_window_get_propagate_natural_height(gtkScrolledWindow) != 0;
400 	}
401 
402 	/**
403 	 * Reports whether the natural width of the child will be calculated and propagated
404 	 * through the scrolled window’s requested natural width.
405 	 *
406 	 * Returns: whether natural width propagation is enabled.
407 	 *
408 	 * Since: 3.22
409 	 */
410 	public bool getPropagateNaturalWidth()
411 	{
412 		return gtk_scrolled_window_get_propagate_natural_width(gtkScrolledWindow) != 0;
413 	}
414 
415 	/**
416 	 * Gets the shadow type of the scrolled window. See
417 	 * gtk_scrolled_window_set_shadow_type().
418 	 *
419 	 * Returns: the current shadow type
420 	 */
421 	public GtkShadowType getShadowType()
422 	{
423 		return gtk_scrolled_window_get_shadow_type(gtkScrolledWindow);
424 	}
425 
426 	/**
427 	 * Returns the vertical scrollbar’s adjustment, used to connect the
428 	 * vertical scrollbar to the child widget’s vertical scroll functionality.
429 	 *
430 	 * Returns: the vertical #GtkAdjustment
431 	 */
432 	public Adjustment getVadjustment()
433 	{
434 		auto p = gtk_scrolled_window_get_vadjustment(gtkScrolledWindow);
435 
436 		if(p is null)
437 		{
438 			return null;
439 		}
440 
441 		return ObjectG.getDObject!(Adjustment)(cast(GtkAdjustment*) p);
442 	}
443 
444 	/**
445 	 * Returns the vertical scrollbar of @scrolled_window.
446 	 *
447 	 * Returns: the vertical scrollbar of the scrolled window.
448 	 *
449 	 * Since: 2.8
450 	 */
451 	public Widget getVscrollbar()
452 	{
453 		auto p = gtk_scrolled_window_get_vscrollbar(gtkScrolledWindow);
454 
455 		if(p is null)
456 		{
457 			return null;
458 		}
459 
460 		return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p);
461 	}
462 
463 	/**
464 	 * Changes the behaviour of @scrolled_window with regard to the initial
465 	 * event that possibly starts kinetic scrolling. When @capture_button_press
466 	 * is set to %TRUE, the event is captured by the scrolled window, and
467 	 * then later replayed if it is meant to go to the child widget.
468 	 *
469 	 * This should be enabled if any child widgets perform non-reversible
470 	 * actions on #GtkWidget::button-press-event. If they don't, and handle
471 	 * additionally handle #GtkWidget::grab-broken-event, it might be better
472 	 * to set @capture_button_press to %FALSE.
473 	 *
474 	 * This setting only has an effect if kinetic scrolling is enabled.
475 	 *
476 	 * Params:
477 	 *     captureButtonPress = %TRUE to capture button presses
478 	 *
479 	 * Since: 3.4
480 	 */
481 	public void setCaptureButtonPress(bool captureButtonPress)
482 	{
483 		gtk_scrolled_window_set_capture_button_press(gtkScrolledWindow, captureButtonPress);
484 	}
485 
486 	/**
487 	 * Sets the #GtkAdjustment for the horizontal scrollbar.
488 	 *
489 	 * Params:
490 	 *     hadjustment = horizontal scroll adjustment
491 	 */
492 	public void setHadjustment(Adjustment hadjustment)
493 	{
494 		gtk_scrolled_window_set_hadjustment(gtkScrolledWindow, (hadjustment is null) ? null : hadjustment.getAdjustmentStruct());
495 	}
496 
497 	/**
498 	 * Turns kinetic scrolling on or off.
499 	 * Kinetic scrolling only applies to devices with source
500 	 * %GDK_SOURCE_TOUCHSCREEN.
501 	 *
502 	 * Params:
503 	 *     kineticScrolling = %TRUE to enable kinetic scrolling
504 	 *
505 	 * Since: 3.4
506 	 */
507 	public void setKineticScrolling(bool kineticScrolling)
508 	{
509 		gtk_scrolled_window_set_kinetic_scrolling(gtkScrolledWindow, kineticScrolling);
510 	}
511 
512 	/**
513 	 * Sets the maximum height that @scrolled_window should keep visible. The
514 	 * @scrolled_window will grow up to this height before it starts scrolling
515 	 * the content.
516 	 *
517 	 * It is a programming error to set the maximum content height to a value
518 	 * smaller than #GtkScrolledWindow:min-content-height.
519 	 *
520 	 * Params:
521 	 *     height = the maximum content height
522 	 *
523 	 * Since: 3.22
524 	 */
525 	public void setMaxContentHeight(int height)
526 	{
527 		gtk_scrolled_window_set_max_content_height(gtkScrolledWindow, height);
528 	}
529 
530 	/**
531 	 * Sets the maximum width that @scrolled_window should keep visible. The
532 	 * @scrolled_window will grow up to this width before it starts scrolling
533 	 * the content.
534 	 *
535 	 * It is a programming error to set the maximum content width to a value
536 	 * smaller than #GtkScrolledWindow:min-content-width.
537 	 *
538 	 * Params:
539 	 *     width = the maximum content width
540 	 *
541 	 * Since: 3.22
542 	 */
543 	public void setMaxContentWidth(int width)
544 	{
545 		gtk_scrolled_window_set_max_content_width(gtkScrolledWindow, width);
546 	}
547 
548 	/**
549 	 * Sets the minimum height that @scrolled_window should keep visible.
550 	 * Note that this can and (usually will) be smaller than the minimum
551 	 * size of the content.
552 	 *
553 	 * It is a programming error to set the minimum content height to a
554 	 * value greater than #GtkScrolledWindow:max-content-height.
555 	 *
556 	 * Params:
557 	 *     height = the minimal content height
558 	 *
559 	 * Since: 3.0
560 	 */
561 	public void setMinContentHeight(int height)
562 	{
563 		gtk_scrolled_window_set_min_content_height(gtkScrolledWindow, height);
564 	}
565 
566 	/**
567 	 * Sets the minimum width that @scrolled_window should keep visible.
568 	 * Note that this can and (usually will) be smaller than the minimum
569 	 * size of the content.
570 	 *
571 	 * It is a programming error to set the minimum content width to a
572 	 * value greater than #GtkScrolledWindow:max-content-width.
573 	 *
574 	 * Params:
575 	 *     width = the minimal content width
576 	 *
577 	 * Since: 3.0
578 	 */
579 	public void setMinContentWidth(int width)
580 	{
581 		gtk_scrolled_window_set_min_content_width(gtkScrolledWindow, width);
582 	}
583 
584 	/**
585 	 * Enables or disables overlay scrolling for this scrolled window.
586 	 *
587 	 * Params:
588 	 *     overlayScrolling = whether to enable overlay scrolling
589 	 *
590 	 * Since: 3.16
591 	 */
592 	public void setOverlayScrolling(bool overlayScrolling)
593 	{
594 		gtk_scrolled_window_set_overlay_scrolling(gtkScrolledWindow, overlayScrolling);
595 	}
596 
597 	/**
598 	 * Sets the placement of the contents with respect to the scrollbars
599 	 * for the scrolled window.
600 	 *
601 	 * The default is %GTK_CORNER_TOP_LEFT, meaning the child is
602 	 * in the top left, with the scrollbars underneath and to the right.
603 	 * Other values in #GtkCornerType are %GTK_CORNER_TOP_RIGHT,
604 	 * %GTK_CORNER_BOTTOM_LEFT, and %GTK_CORNER_BOTTOM_RIGHT.
605 	 *
606 	 * See also gtk_scrolled_window_get_placement() and
607 	 * gtk_scrolled_window_unset_placement().
608 	 *
609 	 * Params:
610 	 *     windowPlacement = position of the child window
611 	 */
612 	public void setPlacement(GtkCornerType windowPlacement)
613 	{
614 		gtk_scrolled_window_set_placement(gtkScrolledWindow, windowPlacement);
615 	}
616 
617 	/**
618 	 * Sets the scrollbar policy for the horizontal and vertical scrollbars.
619 	 *
620 	 * The policy determines when the scrollbar should appear; it is a value
621 	 * from the #GtkPolicyType enumeration. If %GTK_POLICY_ALWAYS, the
622 	 * scrollbar is always present; if %GTK_POLICY_NEVER, the scrollbar is
623 	 * never present; if %GTK_POLICY_AUTOMATIC, the scrollbar is present only
624 	 * if needed (that is, if the slider part of the bar would be smaller
625 	 * than the trough — the display is larger than the page size).
626 	 *
627 	 * Params:
628 	 *     hscrollbarPolicy = policy for horizontal bar
629 	 *     vscrollbarPolicy = policy for vertical bar
630 	 */
631 	public void setPolicy(GtkPolicyType hscrollbarPolicy, GtkPolicyType vscrollbarPolicy)
632 	{
633 		gtk_scrolled_window_set_policy(gtkScrolledWindow, hscrollbarPolicy, vscrollbarPolicy);
634 	}
635 
636 	/**
637 	 * Sets whether the natural height of the child should be calculated and propagated
638 	 * through the scrolled window’s requested natural height.
639 	 *
640 	 * Params:
641 	 *     propagate = whether to propagate natural height
642 	 *
643 	 * Since: 3.22
644 	 */
645 	public void setPropagateNaturalHeight(bool propagate)
646 	{
647 		gtk_scrolled_window_set_propagate_natural_height(gtkScrolledWindow, propagate);
648 	}
649 
650 	/**
651 	 * Sets whether the natural width of the child should be calculated and propagated
652 	 * through the scrolled window’s requested natural width.
653 	 *
654 	 * Params:
655 	 *     propagate = whether to propagate natural width
656 	 *
657 	 * Since: 3.22
658 	 */
659 	public void setPropagateNaturalWidth(bool propagate)
660 	{
661 		gtk_scrolled_window_set_propagate_natural_width(gtkScrolledWindow, propagate);
662 	}
663 
664 	/**
665 	 * Changes the type of shadow drawn around the contents of
666 	 * @scrolled_window.
667 	 *
668 	 * Params:
669 	 *     type = kind of shadow to draw around scrolled window contents
670 	 */
671 	public void setShadowType(GtkShadowType type)
672 	{
673 		gtk_scrolled_window_set_shadow_type(gtkScrolledWindow, type);
674 	}
675 
676 	/**
677 	 * Sets the #GtkAdjustment for the vertical scrollbar.
678 	 *
679 	 * Params:
680 	 *     vadjustment = vertical scroll adjustment
681 	 */
682 	public void setVadjustment(Adjustment vadjustment)
683 	{
684 		gtk_scrolled_window_set_vadjustment(gtkScrolledWindow, (vadjustment is null) ? null : vadjustment.getAdjustmentStruct());
685 	}
686 
687 	/**
688 	 * Unsets the placement of the contents with respect to the scrollbars
689 	 * for the scrolled window. If no window placement is set for a scrolled
690 	 * window, it defaults to %GTK_CORNER_TOP_LEFT.
691 	 *
692 	 * See also gtk_scrolled_window_set_placement() and
693 	 * gtk_scrolled_window_get_placement().
694 	 *
695 	 * Since: 2.10
696 	 */
697 	public void unsetPlacement()
698 	{
699 		gtk_scrolled_window_unset_placement(gtkScrolledWindow);
700 	}
701 
702 	/**
703 	 * The ::edge-overshot signal is emitted whenever user initiated scrolling
704 	 * makes the scrolled window firmly surpass (i.e. with some edge resistance)
705 	 * the lower or upper limits defined by the adjustment in that orientation.
706 	 *
707 	 * A similar behavior without edge resistance is provided by the
708 	 * #GtkScrolledWindow::edge-reached signal.
709 	 *
710 	 * Note: The @pos argument is LTR/RTL aware, so callers should be aware too
711 	 * if intending to provide behavior on horizontal edges.
712 	 *
713 	 * Params:
714 	 *     pos = edge side that was hit
715 	 *
716 	 * Since: 3.16
717 	 */
718 	gulong addOnEdgeOvershot(void delegate(GtkPositionType, ScrolledWindow) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
719 	{
720 		return Signals.connect(this, "edge-overshot", dlg, connectFlags ^ ConnectFlags.SWAPPED);
721 	}
722 
723 	/**
724 	 * The ::edge-reached signal is emitted whenever user-initiated scrolling
725 	 * makes the scrolled window exactly reach the lower or upper limits
726 	 * defined by the adjustment in that orientation.
727 	 *
728 	 * A similar behavior with edge resistance is provided by the
729 	 * #GtkScrolledWindow::edge-overshot signal.
730 	 *
731 	 * Note: The @pos argument is LTR/RTL aware, so callers should be aware too
732 	 * if intending to provide behavior on horizontal edges.
733 	 *
734 	 * Params:
735 	 *     pos = edge side that was reached
736 	 *
737 	 * Since: 3.16
738 	 */
739 	gulong addOnEdgeReached(void delegate(GtkPositionType, ScrolledWindow) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
740 	{
741 		return Signals.connect(this, "edge-reached", dlg, connectFlags ^ ConnectFlags.SWAPPED);
742 	}
743 
744 	/**
745 	 * The ::move-focus-out signal is a
746 	 * [keybinding signal][GtkBindingSignal] which gets
747 	 * emitted when focus is moved away from the scrolled window by a
748 	 * keybinding. The #GtkWidget::move-focus signal is emitted with
749 	 * @direction_type on this scrolled window’s toplevel parent in the
750 	 * container hierarchy. The default bindings for this signal are
751 	 * `Ctrl + Tab` to move forward and `Ctrl + Shift + Tab` to move backward.
752 	 *
753 	 * Params:
754 	 *     directionType = either %GTK_DIR_TAB_FORWARD or
755 	 *         %GTK_DIR_TAB_BACKWARD
756 	 */
757 	gulong addOnMoveFocusOut(void delegate(GtkDirectionType, ScrolledWindow) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
758 	{
759 		return Signals.connect(this, "move-focus-out", dlg, connectFlags ^ ConnectFlags.SWAPPED);
760 	}
761 
762 	/**
763 	 * The ::scroll-child signal is a
764 	 * [keybinding signal][GtkBindingSignal]
765 	 * which gets emitted when a keybinding that scrolls is pressed.
766 	 * The horizontal or vertical adjustment is updated which triggers a
767 	 * signal that the scrolled window’s child may listen to and scroll itself.
768 	 *
769 	 * Params:
770 	 *     scroll = a #GtkScrollType describing how much to scroll
771 	 *     horizontal = whether the keybinding scrolls the child
772 	 *         horizontally or not
773 	 */
774 	gulong addOnScrollChild(bool delegate(GtkScrollType, bool, ScrolledWindow) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
775 	{
776 		return Signals.connect(this, "scroll-child", dlg, connectFlags ^ ConnectFlags.SWAPPED);
777 	}
778 }