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.ScrollableIF; 26 27 private import gobject.ObjectG; 28 private import gtk.Adjustment; 29 private import gtkc.gtk; 30 public import gtkc.gtktypes; 31 32 33 /** 34 * #GtkScrollable is an interface that is implemented by widgets with native 35 * scrolling ability. 36 * 37 * To implement this interface you should override the 38 * #GtkScrollable:hadjustment and #GtkScrollable:vadjustment properties. 39 * 40 * ## Creating a scrollable widget 41 * 42 * All scrollable widgets should do the following. 43 * 44 * - When a parent widget sets the scrollable child widget’s adjustments, 45 * the widget should populate the adjustments’ 46 * #GtkAdjustment:lower, #GtkAdjustment:upper, 47 * #GtkAdjustment:step-increment, #GtkAdjustment:page-increment and 48 * #GtkAdjustment:page-size properties and connect to the 49 * #GtkAdjustment::value-changed signal. 50 * 51 * - Because its preferred size is the size for a fully expanded widget, 52 * the scrollable widget must be able to cope with underallocations. 53 * This means that it must accept any value passed to its 54 * #GtkWidgetClass.size_allocate() function. 55 * 56 * - When the parent allocates space to the scrollable child widget, 57 * the widget should update the adjustments’ properties with new values. 58 * 59 * - When any of the adjustments emits the #GtkAdjustment::value-changed signal, 60 * the scrollable widget should scroll its contents. 61 */ 62 public interface ScrollableIF{ 63 /** Get the main Gtk struct */ 64 public GtkScrollable* getScrollableStruct(); 65 66 /** the main Gtk struct as a void* */ 67 protected void* getStruct(); 68 69 /** 70 */ 71 72 /** 73 * Retrieves the #GtkAdjustment used for horizontal scrolling. 74 * 75 * Return: horizontal #GtkAdjustment. 76 * 77 * Since: 3.0 78 */ 79 public Adjustment getHadjustment(); 80 81 /** 82 * Gets the horizontal #GtkScrollablePolicy. 83 * 84 * Return: The horizontal #GtkScrollablePolicy. 85 * 86 * Since: 3.0 87 */ 88 public GtkScrollablePolicy getHscrollPolicy(); 89 90 /** 91 * Retrieves the #GtkAdjustment used for vertical scrolling. 92 * 93 * Return: vertical #GtkAdjustment. 94 * 95 * Since: 3.0 96 */ 97 public Adjustment getVadjustment(); 98 99 /** 100 * Gets the vertical #GtkScrollablePolicy. 101 * 102 * Return: The vertical #GtkScrollablePolicy. 103 * 104 * Since: 3.0 105 */ 106 public GtkScrollablePolicy getVscrollPolicy(); 107 108 /** 109 * Sets the horizontal adjustment of the #GtkScrollable. 110 * 111 * Params: 112 * hadjustment = a #GtkAdjustment 113 * 114 * Since: 3.0 115 */ 116 public void setHadjustment(Adjustment hadjustment); 117 118 /** 119 * Sets the #GtkScrollablePolicy to determine whether 120 * horizontal scrolling should start below the minimum width or 121 * below the natural width. 122 * 123 * Params: 124 * policy = the horizontal #GtkScrollablePolicy 125 * 126 * Since: 3.0 127 */ 128 public void setHscrollPolicy(GtkScrollablePolicy policy); 129 130 /** 131 * Sets the vertical adjustment of the #GtkScrollable. 132 * 133 * Params: 134 * vadjustment = a #GtkAdjustment 135 * 136 * Since: 3.0 137 */ 138 public void setVadjustment(Adjustment vadjustment); 139 140 /** 141 * Sets the #GtkScrollablePolicy to determine whether 142 * vertical scrolling should start below the minimum height or 143 * below the natural height. 144 * 145 * Params: 146 * policy = the vertical #GtkScrollablePolicy 147 * 148 * Since: 3.0 149 */ 150 public void setVscrollPolicy(GtkScrollablePolicy policy); 151 }