1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
<title>GtkViewport</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
7
<link rel="start" href="index.html" title="GTK+ Reference Manual">
8
<link rel="up" href="MiscObjects.html" title="Miscellaneous">
9
<link rel="prev" href="GtkTooltips.html" title="GtkTooltips">
10
<link rel="next" href="GtkAccessible.html" title="GtkAccessible">
11
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="part" href="gtk.html" title="Part I. GTK+ Overview">
14
<link rel="part" href="gtkbase.html" title="Part II. GTK+ Core Reference">
15
<link rel="part" href="gtkobjects.html" title="Part III. GTK+ Widgets and Objects">
16
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
17
<link rel="chapter" href="ch02.html" title="Widget Gallery">
18
<link rel="chapter" href="WindowWidgets.html" title="Windows">
19
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
20
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
21
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
22
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
23
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
24
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
25
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
26
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
27
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
28
<link rel="chapter" href="Ornaments.html" title="Ornaments">
29
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
30
<link rel="chapter" href="Printing.html" title="Printing">
31
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
32
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
33
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
34
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
35
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
36
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
37
<link rel="part" href="migrating.html" title="Part IV. Migrating from Previous Versions of GTK+">
38
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
39
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
40
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
41
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and GtkComboBoxEntry">
42
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
43
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
44
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
45
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
46
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
47
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
48
<link rel="part" href="pt05.html" title="Part V. GTK+ Tools">
49
<link rel="glossary" href="glossary.html" title="Glossary">
50
<link rel="index" href="ix01.html" title="Index">
51
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
52
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
53
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
54
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
55
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
56
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
58
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
59
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
61
<td><a accesskey="p" href="GtkTooltips.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
62
<td><a accesskey="u" href="MiscObjects.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
63
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
64
<th width="100%" align="center">GTK+ Reference Manual</th>
65
<td><a accesskey="n" href="GtkAccessible.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
67
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3680057" class="shortcut">Top</a>
69
<a href="#id3680460" class="shortcut">Description</a>
71
<a href="#id3680277" class="shortcut">Object Hierarchy</a>
73
<a href="#id3680339" class="shortcut">Implemented Interfaces</a>
75
<a href="#id3680361" class="shortcut">Properties</a>
77
<a href="#id3680432" class="shortcut">Signals</a></nobr></td></tr>
79
<div class="refentry" lang="en">
80
<a name="GtkViewport"></a><div class="titlepage"></div>
81
<div class="refnamediv"><table width="100%"><tr>
84
<a name="id3680057"></a><span class="refentrytitle">GtkViewport</span>
86
<p>GtkViewport — An adapter which makes widgets scrollable</p>
88
<td valign="top" align="right"></td>
90
<div class="refsynopsisdiv">
92
<pre class="synopsis">
94
#include <gtk/gtk.h>
97
<a href="GtkViewport.html#GtkViewport-struct">GtkViewport</a>;
98
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* <a href="GtkViewport.html#gtk-viewport-new">gtk_viewport_new</a> (<a href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> *hadjustment,
99
<a href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> *vadjustment);
100
<a href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a>* <a href="GtkViewport.html#gtk-viewport-get-hadjustment">gtk_viewport_get_hadjustment</a> (<a href="GtkViewport.html" title="GtkViewport">GtkViewport</a> *viewport);
101
<a href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a>* <a href="GtkViewport.html#gtk-viewport-get-vadjustment">gtk_viewport_get_vadjustment</a> (<a href="GtkViewport.html" title="GtkViewport">GtkViewport</a> *viewport);
102
void <a href="GtkViewport.html#gtk-viewport-set-hadjustment">gtk_viewport_set_hadjustment</a> (<a href="GtkViewport.html" title="GtkViewport">GtkViewport</a> *viewport,
103
<a href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> *adjustment);
104
void <a href="GtkViewport.html#gtk-viewport-set-vadjustment">gtk_viewport_set_vadjustment</a> (<a href="GtkViewport.html" title="GtkViewport">GtkViewport</a> *viewport,
105
<a href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> *adjustment);
106
void <a href="GtkViewport.html#gtk-viewport-set-shadow-type">gtk_viewport_set_shadow_type</a> (<a href="GtkViewport.html" title="GtkViewport">GtkViewport</a> *viewport,
107
<a href="gtk-Standard-Enumerations.html#GtkShadowType">GtkShadowType</a> type);
108
<a href="gtk-Standard-Enumerations.html#GtkShadowType">GtkShadowType</a> <a href="GtkViewport.html#gtk-viewport-get-shadow-type">gtk_viewport_get_shadow_type</a> (<a href="GtkViewport.html" title="GtkViewport">GtkViewport</a> *viewport);
113
<div class="refsect1" lang="en">
114
<a name="id3680277"></a><h2>Object Hierarchy</h2>
115
<pre class="synopsis">
118
+----GInitiallyUnowned
119
+----<a href="GtkObject.html" title="GtkObject">GtkObject</a>
120
+----<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
121
+----<a href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
122
+----<a href="GtkBin.html" title="GtkBin">GtkBin</a>
126
<div class="refsect1" lang="en">
127
<a name="id3680339"></a><h2>Implemented Interfaces</h2>
129
GtkViewport implements
130
AtkImplementorIface.</p>
132
<div class="refsect1" lang="en">
133
<a name="id3680361"></a><h2>Properties</h2>
134
<pre class="synopsis">
136
"<a href="GtkViewport.html#GtkViewport--hadjustment">hadjustment</a>" <a href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> : Read / Write / Construct
137
"<a href="GtkViewport.html#GtkViewport--shadow-type">shadow-type</a>" <a href="gtk-Standard-Enumerations.html#GtkShadowType">GtkShadowType</a> : Read / Write
138
"<a href="GtkViewport.html#GtkViewport--vadjustment">vadjustment</a>" <a href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> : Read / Write / Construct
141
<div class="refsect1" lang="en">
142
<a name="id3680432"></a><h2>Signals</h2>
143
<pre class="synopsis">
145
"<a href="GtkViewport.html#GtkViewport-set-scroll-adjustments">set-scroll-adjustments</a>" : Run Last / Action
148
<div class="refsect1" lang="en">
149
<a name="id3680460"></a><h2>Description</h2>
154
<div class="refsect1" lang="en">
155
<a name="id3680474"></a><h2>Details</h2>
156
<div class="refsect2" lang="en">
157
<a name="id3680485"></a><h3>
158
<a name="GtkViewport-struct"></a>GtkViewport</h3>
159
<a class="indexterm" name="id3680498"></a><pre class="programlisting">typedef struct _GtkViewport GtkViewport;</pre>
165
<div class="refsect2" lang="en">
166
<a name="id3680513"></a><h3>
167
<a name="gtk-viewport-new"></a>gtk_viewport_new ()</h3>
168
<a class="indexterm" name="id3680526"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_viewport_new (<a href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> *hadjustment,
169
<a href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> *vadjustment);</pre>
171
Creates a new <a href="GtkViewport.html" title="GtkViewport"><span class="type">GtkViewport</span></a> with the given adjustments.</p>
175
<div class="variablelist"><table border="0">
176
<col align="left" valign="top">
179
<td><span class="term"><em class="parameter"><code>hadjustment</code></em> :</span></td>
180
<td> horizontal adjustment.
184
<td><span class="term"><em class="parameter"><code>vadjustment</code></em> :</span></td>
185
<td> vertical adjustment.
189
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
190
<td> a new <a href="GtkViewport.html" title="GtkViewport"><span class="type">GtkViewport</span></a>.
197
<div class="refsect2" lang="en">
198
<a name="id3680625"></a><h3>
199
<a name="gtk-viewport-get-hadjustment"></a>gtk_viewport_get_hadjustment ()</h3>
200
<a class="indexterm" name="id3680638"></a><pre class="programlisting"><a href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a>* gtk_viewport_get_hadjustment (<a href="GtkViewport.html" title="GtkViewport">GtkViewport</a> *viewport);</pre>
202
Returns the horizontal adjustment of the viewport.</p>
206
<div class="variablelist"><table border="0">
207
<col align="left" valign="top">
210
<td><span class="term"><em class="parameter"><code>viewport</code></em> :</span></td>
211
<td> a <a href="GtkViewport.html" title="GtkViewport"><span class="type">GtkViewport</span></a>.
215
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
216
<td> the horizontal adjustment of <em class="parameter"><code>viewport</code></em>.
223
<div class="refsect2" lang="en">
224
<a name="id3680714"></a><h3>
225
<a name="gtk-viewport-get-vadjustment"></a>gtk_viewport_get_vadjustment ()</h3>
226
<a class="indexterm" name="id3680727"></a><pre class="programlisting"><a href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a>* gtk_viewport_get_vadjustment (<a href="GtkViewport.html" title="GtkViewport">GtkViewport</a> *viewport);</pre>
228
Returns the vertical adjustment of the viewport.</p>
232
<div class="variablelist"><table border="0">
233
<col align="left" valign="top">
236
<td><span class="term"><em class="parameter"><code>viewport</code></em> :</span></td>
237
<td> a <a href="GtkViewport.html" title="GtkViewport"><span class="type">GtkViewport</span></a>.
241
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
242
<td> the vertical adjustment of <em class="parameter"><code>viewport</code></em>.
249
<div class="refsect2" lang="en">
250
<a name="id3680803"></a><h3>
251
<a name="gtk-viewport-set-hadjustment"></a>gtk_viewport_set_hadjustment ()</h3>
252
<a class="indexterm" name="id3680816"></a><pre class="programlisting">void gtk_viewport_set_hadjustment (<a href="GtkViewport.html" title="GtkViewport">GtkViewport</a> *viewport,
253
<a href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> *adjustment);</pre>
255
Sets the horizontal adjustment of the viewport.</p>
259
<div class="variablelist"><table border="0">
260
<col align="left" valign="top">
263
<td><span class="term"><em class="parameter"><code>viewport</code></em> :</span></td>
264
<td> a <a href="GtkViewport.html" title="GtkViewport"><span class="type">GtkViewport</span></a>.
268
<td><span class="term"><em class="parameter"><code>adjustment</code></em> :</span></td>
269
<td> a <a href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a>.
276
<div class="refsect2" lang="en">
277
<a name="id3680905"></a><h3>
278
<a name="gtk-viewport-set-vadjustment"></a>gtk_viewport_set_vadjustment ()</h3>
279
<a class="indexterm" name="id3680918"></a><pre class="programlisting">void gtk_viewport_set_vadjustment (<a href="GtkViewport.html" title="GtkViewport">GtkViewport</a> *viewport,
280
<a href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> *adjustment);</pre>
282
Sets the vertical adjustment of the viewport.</p>
286
<div class="variablelist"><table border="0">
287
<col align="left" valign="top">
290
<td><span class="term"><em class="parameter"><code>viewport</code></em> :</span></td>
291
<td> a <a href="GtkViewport.html" title="GtkViewport"><span class="type">GtkViewport</span></a>.
295
<td><span class="term"><em class="parameter"><code>adjustment</code></em> :</span></td>
296
<td> a <a href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a>.
303
<div class="refsect2" lang="en">
304
<a name="id3681007"></a><h3>
305
<a name="gtk-viewport-set-shadow-type"></a>gtk_viewport_set_shadow_type ()</h3>
306
<a class="indexterm" name="id3681021"></a><pre class="programlisting">void gtk_viewport_set_shadow_type (<a href="GtkViewport.html" title="GtkViewport">GtkViewport</a> *viewport,
307
<a href="gtk-Standard-Enumerations.html#GtkShadowType">GtkShadowType</a> type);</pre>
309
Sets the shadow type of the viewport.</p>
313
<div class="variablelist"><table border="0">
314
<col align="left" valign="top">
317
<td><span class="term"><em class="parameter"><code>viewport</code></em> :</span></td>
318
<td> a <a href="GtkViewport.html" title="GtkViewport"><span class="type">GtkViewport</span></a>.
322
<td><span class="term"><em class="parameter"><code>type</code></em> :</span></td>
323
<td> the new shadow type.
330
<div class="refsect2" lang="en">
331
<a name="id3681101"></a><h3>
332
<a name="gtk-viewport-get-shadow-type"></a>gtk_viewport_get_shadow_type ()</h3>
333
<a class="indexterm" name="id3681115"></a><pre class="programlisting"><a href="gtk-Standard-Enumerations.html#GtkShadowType">GtkShadowType</a> gtk_viewport_get_shadow_type (<a href="GtkViewport.html" title="GtkViewport">GtkViewport</a> *viewport);</pre>
335
Gets the shadow type of the <a href="GtkViewport.html" title="GtkViewport"><span class="type">GtkViewport</span></a>. See
336
<a href="GtkViewport.html#gtk-viewport-set-shadow-type"><code class="function">gtk_viewport_set_shadow_type()</code></a>.</p>
340
<div class="variablelist"><table border="0">
341
<col align="left" valign="top">
344
<td><span class="term"><em class="parameter"><code>viewport</code></em> :</span></td>
345
<td> a <a href="GtkViewport.html" title="GtkViewport"><span class="type">GtkViewport</span></a>
349
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
357
<div class="refsect1" lang="en">
358
<a name="id3681204"></a><h2>Property Details</h2>
359
<div class="refsect2" lang="en">
360
<a name="id3681215"></a><h3>
361
<a name="GtkViewport--hadjustment"></a>The "<code class="literal">hadjustment</code>" property</h3>
362
<a class="indexterm" name="id3681231"></a><pre class="programlisting"> "hadjustment" <a href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> : Read / Write / Construct</pre>
363
<p>The GtkAdjustment that determines the values of the horizontal position for this viewport.</p>
366
<div class="refsect2" lang="en">
367
<a name="id3681256"></a><h3>
368
<a name="GtkViewport--shadow-type"></a>The "<code class="literal">shadow-type</code>" property</h3>
369
<a class="indexterm" name="id3681272"></a><pre class="programlisting"> "shadow-type" <a href="gtk-Standard-Enumerations.html#GtkShadowType">GtkShadowType</a> : Read / Write</pre>
370
<p>Determines how the shadowed box around the viewport is drawn.</p>
371
<p>Default value: GTK_SHADOW_IN</p>
374
<div class="refsect2" lang="en">
375
<a name="id3681300"></a><h3>
376
<a name="GtkViewport--vadjustment"></a>The "<code class="literal">vadjustment</code>" property</h3>
377
<a class="indexterm" name="id3681316"></a><pre class="programlisting"> "vadjustment" <a href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> : Read / Write / Construct</pre>
378
<p>The GtkAdjustment that determines the values of the vertical position for this viewport.</p>
381
<div class="refsect1" lang="en">
382
<a name="id3681342"></a><h2>Signal Details</h2>
383
<div class="refsect2" lang="en">
384
<a name="id3681352"></a><h3>
385
<a name="GtkViewport-set-scroll-adjustments"></a>The "set-scroll-adjustments" signal</h3>
386
<a class="indexterm" name="id3681364"></a><pre class="programlisting">void user_function (<a href="GtkViewport.html" title="GtkViewport">GtkViewport</a> *viewport,
387
<a href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> *arg1,
388
<a href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> *arg2,
389
gpointer user_data) : Run Last / Action</pre>
393
<div class="variablelist"><table border="0">
394
<col align="left" valign="top">
397
<td><span class="term"><em class="parameter"><code>viewport</code></em> :</span></td>
398
<td>the object which received the signal.
402
<td><span class="term"><em class="parameter"><code>arg1</code></em> :</span></td>
407
<td><span class="term"><em class="parameter"><code>arg2</code></em> :</span></td>
413
<td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
414
<td>user data set when the signal handler was connected.</td>