]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkcellrenderer.sgml
Merge branch 'gtk-2-90'
[~andy/gtk] / docs / reference / gtk / tmpl / gtkcellrenderer.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkCellRenderer
3
4 <!-- ##### SECTION Short_Description ##### -->
5 An object for rendering a single cell on a GdkDrawable
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 The #GtkCellRenderer is a base class of a set of objects used for
10 rendering a cell to a #GdkDrawable.  These objects are used primarily by
11 the #GtkTreeView widget, though they aren't tied to them in any
12 specific way.  It is worth noting that #GtkCellRenderer is not a
13 #GtkWidget and cannot be treated as such.
14 </para>
15
16 <para>
17 The primary use of a #GtkCellRenderer is for drawing a certain graphical
18 elements on a #GdkDrawable.  Typically, one cell renderer is used to
19 draw many cells on the screen.  To this extent, it isn't expected that a
20 CellRenderer keep any permanent state around.  Instead, any state is set
21 just prior to use using #GObject<!-- -->s property system.  Then, the
22 cell is measured using gtk_cell_renderer_get_size().  Finally, the cell
23 is rendered in the correct location using gtk_cell_renderer_render().
24 </para>
25
26 <para>
27 There are a number of rules that must be followed when writing a new
28 #GtkCellRenderer.  First and formost, it's important that a certain set
29 of properties will always yield a cell renderer of the same size,
30 barring a #GtkStyle change.  The #GtkCellRenderer also has a number of
31 generic properties that are expected to be honored by all children.
32 </para>
33
34 <para>
35 Beyond merely rendering a cell, cell renderers can optionally 
36 provide active user interface elements. A cell renderer can be 
37 <firstterm>activatable</firstterm> like #GtkCellRendererToggle, 
38 which toggles when it gets activated by a mouse click, or it can be 
39 <firstterm>editable</firstterm> like #GtkCellRendererText, which 
40 allows the user to edit the text using a #GtkEntry.
41 To make a cell renderer activatable or editable, you have to 
42 implement the @activate or @start_editing virtual functions, 
43 respectively.
44 </para>
45
46 <!-- ##### SECTION See_Also ##### -->
47 <para>
48 #GtkCellRendererText,#GtkCellRendererPixbuf,#GtkCellRendererToggle
49 </para>
50
51 <!-- ##### SECTION Stability_Level ##### -->
52
53
54 <!-- ##### ENUM GtkCellRendererState ##### -->
55 <para>
56 Tells how a cell is to be rendererd.
57 </para>
58
59 @GTK_CELL_RENDERER_SELECTED: The cell is currently selected, and
60 probably has a selection colored background to render to.
61 @GTK_CELL_RENDERER_PRELIT: The mouse is hovering over the cell.
62 @GTK_CELL_RENDERER_INSENSITIVE: The cell is drawn in an insensitive manner
63 @GTK_CELL_RENDERER_SORTED: The cell is in a sorted row
64 @GTK_CELL_RENDERER_FOCUSED: The cell is in the focus row.
65
66 <!-- ##### ENUM GtkCellRendererMode ##### -->
67 <para>
68 Identifies how the user can interact with a particular cell.
69 </para>
70
71 @GTK_CELL_RENDERER_MODE_INERT: The cell is just for display
72 and cannot be interacted with.  Note that this doesn't mean that eg. the
73 row being drawn can't be selected -- just that a particular element of
74 it cannot be individually modified.
75 @GTK_CELL_RENDERER_MODE_ACTIVATABLE: The cell can be clicked.
76 @GTK_CELL_RENDERER_MODE_EDITABLE: The cell can be edited or otherwise modified.
77
78 <!-- ##### STRUCT GtkCellRenderer ##### -->
79 <para>
80
81 </para>
82
83
84 <!-- ##### SIGNAL GtkCellRenderer::editing-canceled ##### -->
85 <para>
86
87 </para>
88
89 @cellrenderer: the object which received the signal.
90
91 <!-- ##### SIGNAL GtkCellRenderer::editing-started ##### -->
92 <para>
93
94 </para>
95
96 @cellrenderer: the object which received the signal.
97 @arg1: 
98 @arg2: 
99
100 <!-- ##### ARG GtkCellRenderer:cell-background ##### -->
101 <para>
102
103 </para>
104
105 <!-- ##### ARG GtkCellRenderer:cell-background-gdk ##### -->
106 <para>
107
108 </para>
109
110 <!-- ##### ARG GtkCellRenderer:cell-background-set ##### -->
111 <para>
112
113 </para>
114
115 <!-- ##### ARG GtkCellRenderer:editing ##### -->
116 <para>
117
118 </para>
119
120 <!-- ##### ARG GtkCellRenderer:height ##### -->
121 <para>
122
123 </para>
124
125 <!-- ##### ARG GtkCellRenderer:is-expanded ##### -->
126 <para>
127
128 </para>
129
130 <!-- ##### ARG GtkCellRenderer:is-expander ##### -->
131 <para>
132
133 </para>
134
135 <!-- ##### ARG GtkCellRenderer:mode ##### -->
136 <para>
137
138 </para>
139
140 <!-- ##### ARG GtkCellRenderer:sensitive ##### -->
141 <para>
142
143 </para>
144
145 <!-- ##### ARG GtkCellRenderer:visible ##### -->
146 <para>
147
148 </para>
149
150 <!-- ##### ARG GtkCellRenderer:width ##### -->
151 <para>
152
153 </para>
154
155 <!-- ##### ARG GtkCellRenderer:xalign ##### -->
156 <para>
157
158 </para>
159
160 <!-- ##### ARG GtkCellRenderer:xpad ##### -->
161 <para>
162
163 </para>
164
165 <!-- ##### ARG GtkCellRenderer:yalign ##### -->
166 <para>
167
168 </para>
169
170 <!-- ##### ARG GtkCellRenderer:ypad ##### -->
171 <para>
172
173 </para>
174
175 <!-- ##### STRUCT GtkCellRendererClass ##### -->
176 <para>
177
178 </para>
179
180 @parent_class: 
181 @get_size: 
182 @render: 
183 @activate: 
184 @start_editing: 
185 @editing_canceled: 
186 @editing_started: 
187 @_gtk_reserved1: 
188 @_gtk_reserved2: 
189
190 <!-- ##### FUNCTION gtk_cell_renderer_get_size ##### -->
191 <para>
192
193 </para>
194
195 @cell: 
196 @widget: 
197 @cell_area: 
198 @x_offset: 
199 @y_offset: 
200 @width: 
201 @height: 
202
203
204 <!-- ##### FUNCTION gtk_cell_renderer_render ##### -->
205 <para>
206
207 </para>
208
209 @cell: 
210 @window: 
211 @widget: 
212 @background_area: 
213 @cell_area: 
214 @expose_area: 
215 @flags: 
216
217
218 <!-- ##### FUNCTION gtk_cell_renderer_activate ##### -->
219 <para>
220
221 </para>
222
223 @cell: 
224 @event: 
225 @widget: 
226 @path: 
227 @background_area: 
228 @cell_area: 
229 @flags: 
230 @Returns: 
231
232
233 <!-- ##### FUNCTION gtk_cell_renderer_start_editing ##### -->
234 <para>
235
236 </para>
237
238 @cell: 
239 @event: 
240 @widget: 
241 @path: 
242 @background_area: 
243 @cell_area: 
244 @flags: 
245 @Returns: 
246
247
248 <!-- ##### FUNCTION gtk_cell_renderer_stop_editing ##### -->
249 <para>
250
251 </para>
252
253 @cell: 
254 @canceled: 
255
256
257 <!-- ##### FUNCTION gtk_cell_renderer_get_fixed_size ##### -->
258 <para>
259
260 </para>
261
262 @cell: 
263 @width: 
264 @height: 
265
266
267 <!-- ##### FUNCTION gtk_cell_renderer_set_fixed_size ##### -->
268 <para>
269
270 </para>
271
272 @cell: 
273 @width: 
274 @height: 
275
276
277 <!-- ##### FUNCTION gtk_cell_renderer_get_visible ##### -->
278 <para>
279
280 </para>
281
282 @cell: 
283 @Returns: 
284
285
286 <!-- ##### FUNCTION gtk_cell_renderer_set_visible ##### -->
287 <para>
288
289 </para>
290
291 @cell: 
292 @visible: 
293
294
295 <!-- ##### FUNCTION gtk_cell_renderer_get_sensitive ##### -->
296 <para>
297
298 </para>
299
300 @cell: 
301 @Returns: 
302
303
304 <!-- ##### FUNCTION gtk_cell_renderer_set_sensitive ##### -->
305 <para>
306
307 </para>
308
309 @cell: 
310 @sensitive: 
311
312
313 <!-- ##### FUNCTION gtk_cell_renderer_get_alignment ##### -->
314 <para>
315
316 </para>
317
318 @cell: 
319 @xalign: 
320 @yalign: 
321
322
323 <!-- ##### FUNCTION gtk_cell_renderer_set_alignment ##### -->
324 <para>
325
326 </para>
327
328 @cell: 
329 @xalign: 
330 @yalign: 
331
332
333 <!-- ##### FUNCTION gtk_cell_renderer_get_padding ##### -->
334 <para>
335
336 </para>
337
338 @cell: 
339 @xpad: 
340 @ypad: 
341
342
343 <!-- ##### FUNCTION gtk_cell_renderer_set_padding ##### -->
344 <para>
345
346 </para>
347
348 @cell: 
349 @xpad: 
350 @ypad: 
351
352