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 
73 	/**
74 	 * Returns the size of a non-scrolling border around the
75 	 * outside of the scrollable. An example for this would
76 	 * be treeview headers. GTK+ can use this information to
77 	 * display overlayed graphics, like the overshoot indication,
78 	 * at the right position.
79 	 *
80 	 * Params:
81 	 *     border = return location for the results
82 	 *
83 	 * Return: %TRUE if @border has been set
84 	 *
85 	 * Since: 3.16
86 	 */
87 	public bool getBorder(Border border);
88 
89 	/**
90 	 * Retrieves the #GtkAdjustment used for horizontal scrolling.
91 	 *
92 	 * Return: horizontal #GtkAdjustment.
93 	 *
94 	 * Since: 3.0
95 	 */
96 	public Adjustment getHadjustment();
97 
98 	/**
99 	 * Gets the horizontal #GtkScrollablePolicy.
100 	 *
101 	 * Return: The horizontal #GtkScrollablePolicy.
102 	 *
103 	 * Since: 3.0
104 	 */
105 	public GtkScrollablePolicy getHscrollPolicy();
106 
107 	/**
108 	 * Retrieves the #GtkAdjustment used for vertical scrolling.
109 	 *
110 	 * Return: vertical #GtkAdjustment.
111 	 *
112 	 * Since: 3.0
113 	 */
114 	public Adjustment getVadjustment();
115 
116 	/**
117 	 * Gets the vertical #GtkScrollablePolicy.
118 	 *
119 	 * Return: The vertical #GtkScrollablePolicy.
120 	 *
121 	 * Since: 3.0
122 	 */
123 	public GtkScrollablePolicy getVscrollPolicy();
124 
125 	/**
126 	 * Sets the horizontal adjustment of the #GtkScrollable.
127 	 *
128 	 * Params:
129 	 *     hadjustment = a #GtkAdjustment
130 	 *
131 	 * Since: 3.0
132 	 */
133 	public void setHadjustment(Adjustment hadjustment);
134 
135 	/**
136 	 * Sets the #GtkScrollablePolicy to determine whether
137 	 * horizontal scrolling should start below the minimum width or
138 	 * below the natural width.
139 	 *
140 	 * Params:
141 	 *     policy = the horizontal #GtkScrollablePolicy
142 	 *
143 	 * Since: 3.0
144 	 */
145 	public void setHscrollPolicy(GtkScrollablePolicy policy);
146 
147 	/**
148 	 * Sets the vertical adjustment of the #GtkScrollable.
149 	 *
150 	 * Params:
151 	 *     vadjustment = a #GtkAdjustment
152 	 *
153 	 * Since: 3.0
154 	 */
155 	public void setVadjustment(Adjustment vadjustment);
156 
157 	/**
158 	 * Sets the #GtkScrollablePolicy to determine whether
159 	 * vertical scrolling should start below the minimum height or
160 	 * below the natural height.
161 	 *
162 	 * Params:
163 	 *     policy = the vertical #GtkScrollablePolicy
164 	 *
165 	 * Since: 3.0
166 	 */
167 	public void setVscrollPolicy(GtkScrollablePolicy policy);
168 }