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