~ubuntu-branches/ubuntu/precise/gtk+2.0/precise-updates

« back to all changes in this revision

Viewing changes to docs/reference/gtk/tmpl/gtkscrolledwindow.sgml

  • Committer: Package Import Robot
  • Author(s): Ken VanDine
  • Date: 2011-12-01 11:40:06 UTC
  • mfrom: (1.14.11)
  • Revision ID: package-import@ubuntu.com-20111201114006-nrmf6qu3pg512veo
Tags: 2.24.8-0ubuntu1
* New upstream release 
  - gtkfilechooser should be more robust to malformed URIs
    in .gtk-bookmarks (LP: #189494)
* debian/patches/010_make_bg_changes_queue_repaint.patch
  - dropped it introduces performance regressions in some gtk2 
    apps (LP: #889019)
* 101_filechooser.patch, 000git_file_chooser.patch: dropped, upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!-- ##### SECTION Title ##### -->
2
 
GtkScrolledWindow
3
 
 
4
 
<!-- ##### SECTION Short_Description ##### -->
5
 
Adds scrollbars to its child widget
6
 
 
7
 
<!-- ##### SECTION Long_Description ##### -->
8
 
<para>
9
 
#GtkScrolledWindow is a #GtkBin subclass: it's a container 
10
 
the accepts a single child widget. #GtkScrolledWindow adds scrollbars
11
 
to the child widget and optionally draws a beveled frame around the 
12
 
child widget.
13
 
</para>
14
 
 
15
 
<para>
16
 
The scrolled window can work in two ways. Some widgets have native
17
 
scrolling support; these widgets have "slots" for #GtkAdjustment
18
 
objects. 
19
 
<footnote><para>The scrolled window installs #GtkAdjustment objects in
20
 
the child window's slots using the set_scroll_adjustments_signal,
21
 
found in #GtkWidgetClass. (Conceptually, these widgets implement a
22
 
"Scrollable" interface; because GTK+ 1.2 lacked interface support in
23
 
the object system, this interface is hackily implemented as a signal
24
 
in #GtkWidgetClass. The GTK+ 2.0 object system would allow a clean
25
 
implementation, but it wasn't worth breaking the
26
 
API.)</para></footnote>
27
 
Widgets with native scroll support include #GtkTreeView, #GtkTextView, 
28
 
and #GtkLayout.
29
 
</para>
30
 
 
31
 
<para>
32
 
For widgets that lack native scrolling support, the #GtkViewport
33
 
widget acts as an adaptor class, implementing scrollability for child
34
 
widgets that lack their own scrolling capabilities. Use #GtkViewport
35
 
to scroll child widgets such as #GtkTable, #GtkBox, and so on.
36
 
</para>
37
 
 
38
 
<para>
39
 
If a widget has native scrolling abilities, it can be added to the
40
 
#GtkScrolledWindow with gtk_container_add(). If a widget does not, you
41
 
must first add the widget to a #GtkViewport, then add the #GtkViewport
42
 
to the scrolled window. The convenience function
43
 
gtk_scrolled_window_add_with_viewport() does exactly this, so you can
44
 
ignore the presence of the viewport.
45
 
</para>
46
 
 
47
 
<para>
48
 
The position of the scrollbars is controlled by the scroll
49
 
adjustments. See #GtkAdjustment for the fields in an adjustment - for
50
 
#GtkScrollbar, used by #GtkScrolledWindow, the "value" field
51
 
represents the position of the scrollbar, which must be between the
52
 
"lower" field and "upper - page_size." The "page_size" field
53
 
represents the size of the visible scrollable area. The
54
 
"step_increment" and "page_increment" fields are used when the user
55
 
asks to step down (using the small stepper arrows) or page down (using
56
 
for example the PageDown key).
57
 
</para>
58
 
 
59
 
<para>
60
 
If a #GtkScrolledWindow doesn't behave quite as you would like, or
61
 
doesn't have exactly the right layout, it's very possible to set up
62
 
your own scrolling with #GtkScrollbar and for example a #GtkTable.
63
 
</para>
64
 
 
65
 
<!-- ##### SECTION See_Also ##### -->
66
 
<para>
67
 
#GtkViewport, #GtkAdjustment, #GtkWidgetClass
68
 
</para>
69
 
 
70
 
<!-- ##### SECTION Stability_Level ##### -->
71
 
 
72
 
 
73
 
<!-- ##### SECTION Image ##### -->
74
 
 
75
 
 
76
 
<!-- ##### STRUCT GtkScrolledWindow ##### -->
77
 
<para>
78
 
There are no public fields in the #GtkScrolledWindow struct; it should 
79
 
only be accessed using the functions below.
80
 
</para>
81
 
 
82
 
 
83
 
<!-- ##### SIGNAL GtkScrolledWindow::move-focus-out ##### -->
84
 
<para>
85
 
 
86
 
</para>
87
 
 
88
 
@scrolledwindow: 
89
 
@arg1: 
90
 
 
91
 
<!-- ##### SIGNAL GtkScrolledWindow::scroll-child ##### -->
92
 
<para>
93
 
 
94
 
</para>
95
 
 
96
 
@scrolledwindow: 
97
 
@arg1: 
98
 
@arg2: 
99
 
@Returns: 
100
 
 
101
 
<!-- ##### ARG GtkScrolledWindow:hadjustment ##### -->
102
 
<para>
103
 
 
104
 
</para>
105
 
 
106
 
<!-- ##### ARG GtkScrolledWindow:hscrollbar-policy ##### -->
107
 
<para>
108
 
 
109
 
</para>
110
 
 
111
 
<!-- ##### ARG GtkScrolledWindow:shadow-type ##### -->
112
 
<para>
113
 
 
114
 
</para>
115
 
 
116
 
<!-- ##### ARG GtkScrolledWindow:vadjustment ##### -->
117
 
<para>
118
 
 
119
 
</para>
120
 
 
121
 
<!-- ##### ARG GtkScrolledWindow:vscrollbar-policy ##### -->
122
 
<para>
123
 
 
124
 
</para>
125
 
 
126
 
<!-- ##### ARG GtkScrolledWindow:window-placement ##### -->
127
 
<para>
128
 
 
129
 
</para>
130
 
 
131
 
<!-- ##### ARG GtkScrolledWindow:window-placement-set ##### -->
132
 
<para>
133
 
 
134
 
</para>
135
 
 
136
 
<!-- ##### ARG GtkScrolledWindow:scrollbar-spacing ##### -->
137
 
<para>
138
 
 
139
 
</para>
140
 
 
141
 
<!-- ##### ARG GtkScrolledWindow:scrollbars-within-bevel ##### -->
142
 
<para>
143
 
 
144
 
</para>
145
 
 
146
 
<!-- ##### FUNCTION gtk_scrolled_window_new ##### -->
147
 
<para>
148
 
 
149
 
</para>
150
 
 
151
 
@hadjustment: 
152
 
@vadjustment: 
153
 
@Returns: 
154
 
 
155
 
 
156
 
<!-- ##### FUNCTION gtk_scrolled_window_get_hadjustment ##### -->
157
 
<para>
158
 
 
159
 
</para>
160
 
 
161
 
@scrolled_window: 
162
 
@Returns: 
163
 
 
164
 
 
165
 
<!-- ##### FUNCTION gtk_scrolled_window_get_vadjustment ##### -->
166
 
<para>
167
 
 
168
 
</para>
169
 
 
170
 
@scrolled_window: 
171
 
@Returns: 
172
 
 
173
 
 
174
 
<!-- ##### FUNCTION gtk_scrolled_window_get_hscrollbar ##### -->
175
 
<para>
176
 
 
177
 
</para>
178
 
 
179
 
@scrolled_window: 
180
 
@Returns: 
181
 
 
182
 
 
183
 
<!-- ##### FUNCTION gtk_scrolled_window_get_vscrollbar ##### -->
184
 
<para>
185
 
 
186
 
</para>
187
 
 
188
 
@scrolled_window: 
189
 
@Returns: 
190
 
 
191
 
 
192
 
<!-- ##### FUNCTION gtk_scrolled_window_set_policy ##### -->
193
 
<para>
194
 
 
195
 
</para>
196
 
 
197
 
@scrolled_window: 
198
 
@hscrollbar_policy: 
199
 
@vscrollbar_policy: 
200
 
 
201
 
 
202
 
<!-- ##### FUNCTION gtk_scrolled_window_add_with_viewport ##### -->
203
 
<para>
204
 
 
205
 
</para>
206
 
 
207
 
@scrolled_window: 
208
 
@child: 
209
 
 
210
 
 
211
 
<!-- ##### FUNCTION gtk_scrolled_window_set_placement ##### -->
212
 
<para>
213
 
 
214
 
</para>
215
 
 
216
 
@scrolled_window: 
217
 
@window_placement: 
218
 
 
219
 
 
220
 
<!-- ##### FUNCTION gtk_scrolled_window_unset_placement ##### -->
221
 
<para>
222
 
 
223
 
</para>
224
 
 
225
 
@scrolled_window: 
226
 
 
227
 
 
228
 
<!-- ##### FUNCTION gtk_scrolled_window_set_shadow_type ##### -->
229
 
<para>
230
 
 
231
 
</para>
232
 
 
233
 
@scrolled_window: 
234
 
@type: 
235
 
 
236
 
 
237
 
<!-- ##### FUNCTION gtk_scrolled_window_set_hadjustment ##### -->
238
 
<para>
239
 
 
240
 
</para>
241
 
 
242
 
@scrolled_window: 
243
 
@hadjustment: 
244
 
 
245
 
 
246
 
<!-- ##### FUNCTION gtk_scrolled_window_set_vadjustment ##### -->
247
 
<para>
248
 
 
249
 
</para>
250
 
 
251
 
@scrolled_window: 
252
 
@vadjustment: 
253
 
 
254
 
 
255
 
<!-- ##### FUNCTION gtk_scrolled_window_get_placement ##### -->
256
 
<para>
257
 
 
258
 
</para>
259
 
 
260
 
@scrolled_window: 
261
 
@Returns: 
262
 
 
263
 
 
264
 
<!-- ##### FUNCTION gtk_scrolled_window_get_policy ##### -->
265
 
<para>
266
 
 
267
 
</para>
268
 
 
269
 
@scrolled_window: 
270
 
@hscrollbar_policy: 
271
 
@vscrollbar_policy: 
272
 
 
273
 
 
274
 
<!-- ##### FUNCTION gtk_scrolled_window_get_shadow_type ##### -->
275
 
<para>
276
 
 
277
 
</para>
278
 
 
279
 
@scrolled_window: 
280
 
@Returns: 
281
 
 
282