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