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