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