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