1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkCellLayout: GTK+ 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
<link rel="up" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
<link rel="prev" href="GtkTreeModelFilter.html" title="GtkTreeModelFilter">
<link rel="next" href="GtkCellArea.html" title="GtkCellArea">
<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#GtkCellLayout.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#GtkCellLayout.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_prerequisites"> <span class="dim">|</span>
<a href="#GtkCellLayout.prerequisites" class="shortcut">Prerequisites</a></span><span id="nav_implementations"> <span class="dim">|</span>
<a href="#GtkCellLayout.implementations" class="shortcut">Known Implementations</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="TreeWidgetObjects.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GtkTreeModelFilter.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GtkCellArea.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GtkCellLayout"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkCellLayout.top_of_page"></a>GtkCellLayout</span></h2>
<p>GtkCellLayout — An interface for packing cells</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GtkCellLayout.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="GtkCellLayout.html#GtkCellLayoutDataFunc" title="GtkCellLayoutDataFunc ()">*GtkCellLayoutDataFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkCellLayout.html#gtk-cell-layout-pack-start" title="gtk_cell_layout_pack_start ()">gtk_cell_layout_pack_start</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkCellLayout.html#gtk-cell-layout-pack-end" title="gtk_cell_layout_pack_end ()">gtk_cell_layout_pack_end</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="returnvalue">GtkCellArea</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkCellLayout.html#gtk-cell-layout-get-area" title="gtk_cell_layout_get_area ()">gtk_cell_layout_get_area</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkCellLayout.html#gtk-cell-layout-get-cells" title="gtk_cell_layout_get_cells ()">gtk_cell_layout_get_cells</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkCellLayout.html#gtk-cell-layout-reorder" title="gtk_cell_layout_reorder ()">gtk_cell_layout_reorder</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkCellLayout.html#gtk-cell-layout-clear" title="gtk_cell_layout_clear ()">gtk_cell_layout_clear</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkCellLayout.html#gtk-cell-layout-set-attributes" title="gtk_cell_layout_set_attributes ()">gtk_cell_layout_set_attributes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkCellLayout.html#gtk-cell-layout-add-attribute" title="gtk_cell_layout_add_attribute ()">gtk_cell_layout_add_attribute</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkCellLayout.html#gtk-cell-layout-set-cell-data-func" title="gtk_cell_layout_set_cell_data_func ()">gtk_cell_layout_set_cell_data_func</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkCellLayout.html#gtk-cell-layout-clear-attributes" title="gtk_cell_layout_clear_attributes ()">gtk_cell_layout_clear_attributes</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkCellLayout.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GtkCellLayout.html#GtkCellLayout-struct" title="GtkCellLayout">GtkCellLayout</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GtkCellLayout.html#GtkCellLayoutIface" title="struct GtkCellLayoutIface">GtkCellLayoutIface</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkCellLayout.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="https://developer.gnome.org/gobject/unstable/GTypeModule.html">GInterface</a>
<span class="lineart">╰──</span> GtkCellLayout
</pre>
</div>
<div class="refsect1">
<a name="GtkCellLayout.prerequisites"></a><h2>Prerequisites</h2>
<p>
GtkCellLayout requires
<a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>.</p>
</div>
<div class="refsect1">
<a name="GtkCellLayout.implementations"></a><h2>Known Implementations</h2>
<p>
GtkCellLayout is implemented by
<a class="link" href="GtkAppChooserButton.html" title="GtkAppChooserButton">GtkAppChooserButton</a>, <a class="link" href="GtkCellArea.html" title="GtkCellArea">GtkCellArea</a>, <a class="link" href="GtkCellAreaBox.html" title="GtkCellAreaBox">GtkCellAreaBox</a>, <a class="link" href="GtkCellView.html" title="GtkCellView">GtkCellView</a>, <a class="link" href="GtkComboBox.html" title="GtkComboBox">GtkComboBox</a>, <a class="link" href="GtkComboBoxText.html" title="GtkComboBoxText">GtkComboBoxText</a>, <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion">GtkEntryCompletion</a>, <a class="link" href="GtkIconView.html" title="GtkIconView">GtkIconView</a> and <a class="link" href="GtkTreeViewColumn.html" title="GtkTreeViewColumn">GtkTreeViewColumn</a>.</p>
</div>
<div class="refsect1">
<a name="GtkCellLayout.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <gtk/gtk.h>
</pre>
</div>
<div class="refsect1">
<a name="GtkCellLayout.description"></a><h2>Description</h2>
<p><a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a> is an interface to be implemented by all objects which
want to provide a <a class="link" href="GtkTreeViewColumn.html" title="GtkTreeViewColumn"><span class="type">GtkTreeViewColumn</span></a> like API for packing cells,
setting attributes and data funcs.</p>
<p>One of the notable features provided by implementations of
GtkCellLayout are attributes. Attributes let you set the properties
in flexible ways. They can just be set to constant values like regular
properties. But they can also be mapped to a column of the underlying
tree model with <a class="link" href="GtkCellLayout.html#gtk-cell-layout-set-attributes" title="gtk_cell_layout_set_attributes ()"><code class="function">gtk_cell_layout_set_attributes()</code></a>, which means that the value
of the attribute can change from cell to cell as they are rendered by
the cell renderer. Finally, it is possible to specify a function with
<a class="link" href="GtkCellLayout.html#gtk-cell-layout-set-cell-data-func" title="gtk_cell_layout_set_cell_data_func ()"><code class="function">gtk_cell_layout_set_cell_data_func()</code></a> that is called to determine the
value of the attribute for each cell that is rendered.</p>
<div class="refsect2">
<a name="id-1.3.12.13.9.4"></a><h3>GtkCellLayouts as GtkBuildable</h3>
<p>Implementations of GtkCellLayout which also implement the GtkBuildable
interface (<a class="link" href="GtkCellView.html" title="GtkCellView"><span class="type">GtkCellView</span></a>, <a class="link" href="GtkIconView.html" title="GtkIconView"><span class="type">GtkIconView</span></a>, <a class="link" href="GtkComboBox.html" title="GtkComboBox"><span class="type">GtkComboBox</span></a>,
<a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>, <a class="link" href="GtkTreeViewColumn.html" title="GtkTreeViewColumn"><span class="type">GtkTreeViewColumn</span></a>) accept GtkCellRenderer objects
as <child> elements in UI definitions. They support a custom <attributes>
element for their children, which can contain multiple <attribute>
elements. Each <attribute> element has a name attribute which specifies
a property of the cell renderer; the content of the element is the
attribute value.</p>
<p>This is an example of a UI definition fragment specifying attributes:</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="gtkdoc opt"><</span>object <span class="gtkdoc kwc">class</span><span class="gtkdoc opt">=</span><span class="string">"GtkCellView"</span><span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>child<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>object <span class="gtkdoc kwc">class</span><span class="gtkdoc opt">=</span><span class="string">"GtkCellRendererText"</span><span class="gtkdoc opt">/></span>
<span class="gtkdoc opt"><</span>attributes<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>attribute name<span class="gtkdoc opt">=</span><span class="string">"text"</span><span class="gtkdoc opt">></span><span class="number">0</span><span class="gtkdoc opt"></</span>attribute<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"></</span>attributes<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"></</span>child<span class="gtkdoc opt">></span><span class="string">"</span>
<span class="string"></object></span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<p>Furthermore for implementations of GtkCellLayout that use a <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a>
to lay out cells (all GtkCellLayouts in GTK+ use a GtkCellArea)
cell properties can also be defined in the format by
specifying the custom <cell-packing> attribute which can contain multiple
<property> elements defined in the normal way.</p>
<p>Here is a UI definition fragment specifying cell properties:</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="gtkdoc opt"><</span>object <span class="gtkdoc kwc">class</span><span class="gtkdoc opt">=</span><span class="string">"GtkTreeViewColumn"</span><span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>child<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>object <span class="gtkdoc kwc">class</span><span class="gtkdoc opt">=</span><span class="string">"GtkCellRendererText"</span><span class="gtkdoc opt">/></span>
<span class="gtkdoc opt"><</span>cell<span class="gtkdoc opt">-</span>packing<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>property name<span class="gtkdoc opt">=</span><span class="string">"align"</span><span class="gtkdoc opt">></span>True<span class="gtkdoc opt"></</span>property<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>property name<span class="gtkdoc opt">=</span><span class="string">"expand"</span><span class="gtkdoc opt">></span>False<span class="gtkdoc opt"></</span>property<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"></</span>cell<span class="gtkdoc opt">-</span>packing<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"></</span>child<span class="gtkdoc opt">></span><span class="string">"</span>
<span class="string"></object></span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
</div>
<hr>
<div class="refsect2">
<a name="id-1.3.12.13.9.5"></a><h3>Subclassing GtkCellLayout implementations</h3>
<p>When subclassing a widget that implements <a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a> like
<a class="link" href="GtkIconView.html" title="GtkIconView"><span class="type">GtkIconView</span></a> or <a class="link" href="GtkComboBox.html" title="GtkComboBox"><span class="type">GtkComboBox</span></a>, there are some considerations related
to the fact that these widgets internally use a <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a>.
The cell area is exposed as a construct-only property by these
widgets. This means that it is possible to e.g. do</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1</pre></td>
<td class="listing_code"><pre class="programlisting">combo <span class="gtkdoc opt">=</span> <span class="function"><a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-new">g_object_new</a></span> <span class="gtkdoc opt">(</span>GTK_TYPE_COMBO_BOX<span class="gtkdoc opt">,</span> <span class="string">"cell-area"</span><span class="gtkdoc opt">,</span> my_cell_area<span class="gtkdoc opt">,</span> NULL<span class="gtkdoc opt">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<p>to use a custom cell area with a combo box. But construct properties
are only initialized after instance <code class="function">init()</code>
functions have run, which means that using functions which rely on
the existence of the cell area in your subclass’ <code class="function">init()</code> function will
cause the default cell area to be instantiated. In this case, a provided
construct property value will be ignored (with a warning, to alert
you to the problem).</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="gtkdoc kwb">static void</span>
<span class="function">my_combo_box_init</span> <span class="gtkdoc opt">(</span>MyComboBox <span class="gtkdoc opt">*</span>b<span class="gtkdoc opt">)</span>
<span class="gtkdoc opt">{</span>
GtkCellRenderer <span class="gtkdoc opt">*</span>cell<span class="gtkdoc opt">;</span>
cell <span class="gtkdoc opt">=</span> <span class="function"><a href="GtkCellRendererPixbuf.html#gtk-cell-renderer-pixbuf-new">gtk_cell_renderer_pixbuf_new</a></span> <span class="gtkdoc opt">();</span>
<span class="gtkdoc slc">// The following call causes the default cell area for combo boxes,</span>
<span class="gtkdoc slc">// a GtkCellAreaBox, to be instantiated</span>
<span class="function"><a href="GtkCellLayout.html#gtk-cell-layout-pack-start">gtk_cell_layout_pack_start</a></span> <span class="gtkdoc opt">(</span><span class="function">GTK_CELL_LAYOUT</span> <span class="gtkdoc opt">(</span>b<span class="gtkdoc opt">),</span> cell<span class="gtkdoc opt">,</span> FALSE<span class="gtkdoc opt">);</span>
<span class="gtkdoc opt">...</span>
<span class="gtkdoc opt">}</span>
GtkWidget <span class="gtkdoc opt">*</span>
<span class="function">my_combo_box_new</span> <span class="gtkdoc opt">(</span>GtkCellArea <span class="gtkdoc opt">*</span>area<span class="gtkdoc opt">)</span>
<span class="gtkdoc opt">{</span>
<span class="gtkdoc slc">// This call is going to cause a warning about area being ignored</span>
<span class="keyword">return</span> <span class="function"><a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-new">g_object_new</a></span> <span class="gtkdoc opt">(</span>MY_TYPE_COMBO_BOX<span class="gtkdoc opt">,</span> <span class="string">"cell-area"</span><span class="gtkdoc opt">,</span> area<span class="gtkdoc opt">,</span> NULL<span class="gtkdoc opt">);</span>
<span class="gtkdoc opt">}</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<p>If supporting alternative cell areas with your derived widget is
not important, then this does not have to concern you. If you want
to support alternative cell areas, you can do so by moving the
problematic calls out of <code class="function">init()</code> and into a <code class="function">constructor()</code>
for your class.</p>
</div>
</div>
<div class="refsect1">
<a name="GtkCellLayout.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="GtkCellLayoutDataFunc"></a><h3>GtkCellLayoutDataFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
<span class="c_punctuation">(</span>*GtkCellLayoutDataFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a> *cell_layout</code></em>,
<em class="parameter"><code><a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a> *cell</code></em>,
<em class="parameter"><code><a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> *tree_model</code></em>,
<em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
<p>A function which should set the value of <em class="parameter"><code>cell_layout</code></em>
’s cell renderer(s)
as appropriate.</p>
<div class="refsect3">
<a name="GtkCellLayoutDataFunc.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>cell_layout</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cell</p></td>
<td class="parameter_description"><p>the cell renderer whose value is to be set</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>tree_model</p></td>
<td class="parameter_description"><p>the model</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iter</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> indicating the row to set the value for</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p> user data passed to <a class="link" href="GtkCellLayout.html#gtk-cell-layout-set-cell-data-func" title="gtk_cell_layout_set_cell_data_func ()"><code class="function">gtk_cell_layout_set_cell_data_func()</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-layout-pack-start"></a><h3>gtk_cell_layout_pack_start ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_cell_layout_pack_start (<em class="parameter"><code><a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a> *cell_layout</code></em>,
<em class="parameter"><code><a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a> *cell</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> expand</code></em>);</pre>
<p>Packs the <em class="parameter"><code>cell</code></em>
into the beginning of <em class="parameter"><code>cell_layout</code></em>
. If <em class="parameter"><code>expand</code></em>
is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>,
then the <em class="parameter"><code>cell</code></em>
is allocated no more space than it needs. Any unused space
is divided evenly between cells for which <em class="parameter"><code>expand</code></em>
is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.</p>
<p>Note that reusing the same cell renderer is not supported.</p>
<div class="refsect3">
<a name="gtk-cell-layout-pack-start.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>cell_layout</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cell</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>expand</p></td>
<td class="parameter_description"><p><a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>cell</code></em>
is to be given extra space allocated to <em class="parameter"><code>cell_layout</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-layout-pack-end"></a><h3>gtk_cell_layout_pack_end ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_cell_layout_pack_end (<em class="parameter"><code><a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a> *cell_layout</code></em>,
<em class="parameter"><code><a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a> *cell</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> expand</code></em>);</pre>
<p>Adds the <em class="parameter"><code>cell</code></em>
to the end of <em class="parameter"><code>cell_layout</code></em>
. If <em class="parameter"><code>expand</code></em>
is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, then the
<em class="parameter"><code>cell</code></em>
is allocated no more space than it needs. Any unused space is
divided evenly between cells for which <em class="parameter"><code>expand</code></em>
is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.</p>
<p>Note that reusing the same cell renderer is not supported.</p>
<div class="refsect3">
<a name="gtk-cell-layout-pack-end.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>cell_layout</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cell</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>expand</p></td>
<td class="parameter_description"><p><a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>cell</code></em>
is to be given extra space allocated to <em class="parameter"><code>cell_layout</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-layout-get-area"></a><h3>gtk_cell_layout_get_area ()</h3>
<pre class="programlisting"><a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="returnvalue">GtkCellArea</span></a> *
gtk_cell_layout_get_area (<em class="parameter"><code><a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a> *cell_layout</code></em>);</pre>
<p>Returns the underlying <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> which might be <em class="parameter"><code>cell_layout</code></em>
if called on a <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> or might be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a>
is used by <em class="parameter"><code>cell_layout</code></em>
.</p>
<div class="refsect3">
<a name="gtk-cell-layout-get-area.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>cell_layout</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-cell-layout-get-area.returns"></a><h4>Returns</h4>
<p> the cell area used by <em class="parameter"><code>cell_layout</code></em>
,
or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> in case no cell area is used. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-layout-get-cells"></a><h3>gtk_cell_layout_get_cells ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> *
gtk_cell_layout_get_cells (<em class="parameter"><code><a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a> *cell_layout</code></em>);</pre>
<p>Returns the cell renderers which have been added to <em class="parameter"><code>cell_layout</code></em>
.</p>
<div class="refsect3">
<a name="gtk-cell-layout-get-cells.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>cell_layout</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-cell-layout-get-cells.returns"></a><h4>Returns</h4>
<p> a list of cell renderers. The list, but not the renderers has
been newly allocated and should be freed with <a href="https://developer.gnome.org/glib/unstable/glib-Doubly-Linked-Lists.html#g-list-free"><code class="function">g_list_free()</code></a>
when no longer needed. </p>
<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkCellRenderer][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.12</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-layout-reorder"></a><h3>gtk_cell_layout_reorder ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_cell_layout_reorder (<em class="parameter"><code><a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a> *cell_layout</code></em>,
<em class="parameter"><code><a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a> *cell</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> position</code></em>);</pre>
<p>Re-inserts <em class="parameter"><code>cell</code></em>
at <em class="parameter"><code>position</code></em>
.</p>
<p>Note that <em class="parameter"><code>cell</code></em>
has already to be packed into <em class="parameter"><code>cell_layout</code></em>
for this to function properly.</p>
<div class="refsect3">
<a name="gtk-cell-layout-reorder.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>cell_layout</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cell</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a> to reorder</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>position</p></td>
<td class="parameter_description"><p>new position to insert <em class="parameter"><code>cell</code></em>
at</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-layout-clear"></a><h3>gtk_cell_layout_clear ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_cell_layout_clear (<em class="parameter"><code><a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a> *cell_layout</code></em>);</pre>
<p>Unsets all the mappings on all renderers on <em class="parameter"><code>cell_layout</code></em>
and
removes all renderers from <em class="parameter"><code>cell_layout</code></em>
.</p>
<div class="refsect3">
<a name="gtk-cell-layout-clear.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>cell_layout</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-layout-set-attributes"></a><h3>gtk_cell_layout_set_attributes ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_cell_layout_set_attributes (<em class="parameter"><code><a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a> *cell_layout</code></em>,
<em class="parameter"><code><a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a> *cell</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>Sets the attributes in list as the attributes of <em class="parameter"><code>cell_layout</code></em>
.</p>
<p>The attributes should be in attribute/column order, as in
<a class="link" href="GtkCellLayout.html#gtk-cell-layout-add-attribute" title="gtk_cell_layout_add_attribute ()"><code class="function">gtk_cell_layout_add_attribute()</code></a>. All existing attributes are
removed, and replaced with the new attributes.</p>
<div class="refsect3">
<a name="gtk-cell-layout-set-attributes.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>cell_layout</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cell</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated list of attributes</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-layout-add-attribute"></a><h3>gtk_cell_layout_add_attribute ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_cell_layout_add_attribute (<em class="parameter"><code><a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a> *cell_layout</code></em>,
<em class="parameter"><code><a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a> *cell</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *attribute</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> column</code></em>);</pre>
<p>Adds an attribute mapping to the list in <em class="parameter"><code>cell_layout</code></em>
.</p>
<p>The <em class="parameter"><code>column</code></em>
is the column of the model to get a value from, and the
<em class="parameter"><code>attribute</code></em>
is the parameter on <em class="parameter"><code>cell</code></em>
to be set from the value. So for
example if column 2 of the model contains strings, you could have the
“text” attribute of a <a class="link" href="GtkCellRendererText.html" title="GtkCellRendererText"><span class="type">GtkCellRendererText</span></a> get its values from column 2.</p>
<div class="refsect3">
<a name="gtk-cell-layout-add-attribute.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>cell_layout</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cell</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>attribute</p></td>
<td class="parameter_description"><p>an attribute on the renderer</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>column</p></td>
<td class="parameter_description"><p>the column position on the model to get the attribute from</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-layout-set-cell-data-func"></a><h3>gtk_cell_layout_set_cell_data_func ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_cell_layout_set_cell_data_func (<em class="parameter"><code><a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a> *cell_layout</code></em>,
<em class="parameter"><code><a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a> *cell</code></em>,
<em class="parameter"><code><a class="link" href="GtkCellLayout.html#GtkCellLayoutDataFunc" title="GtkCellLayoutDataFunc ()"><span class="type">GtkCellLayoutDataFunc</span></a> func</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> func_data</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy</code></em>);</pre>
<p>Sets the <a class="link" href="GtkCellLayout.html#GtkCellLayoutDataFunc" title="GtkCellLayoutDataFunc ()"><span class="type">GtkCellLayoutDataFunc</span></a> to use for <em class="parameter"><code>cell_layout</code></em>
.</p>
<p>This function is used instead of the standard attributes mapping
for setting the column value, and should set the value of <em class="parameter"><code>cell_layout</code></em>
’s
cell renderer(s) as appropriate.</p>
<p><em class="parameter"><code>func</code></em>
may be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to remove a previously set function.</p>
<div class="refsect3">
<a name="gtk-cell-layout-set-cell-data-func.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>cell_layout</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cell</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p> the <a class="link" href="GtkCellLayout.html#GtkCellLayoutDataFunc" title="GtkCellLayoutDataFunc ()"><span class="type">GtkCellLayoutDataFunc</span></a> to use, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>func_data</p></td>
<td class="parameter_description"><p> user data for <em class="parameter"><code>func</code></em>
. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>destroy</p></td>
<td class="parameter_description"><p>destroy notify for <em class="parameter"><code>func_data</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-cell-layout-clear-attributes"></a><h3>gtk_cell_layout_clear_attributes ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_cell_layout_clear_attributes (<em class="parameter"><code><a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a> *cell_layout</code></em>,
<em class="parameter"><code><a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a> *cell</code></em>);</pre>
<p>Clears all existing attributes previously set with
<a class="link" href="GtkCellLayout.html#gtk-cell-layout-set-attributes" title="gtk_cell_layout_set_attributes ()"><code class="function">gtk_cell_layout_set_attributes()</code></a>.</p>
<div class="refsect3">
<a name="gtk-cell-layout-clear-attributes.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>cell_layout</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cell</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a> to clear the attribute mapping on</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
</div>
<div class="refsect1">
<a name="GtkCellLayout.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkCellLayout-struct"></a><h3>GtkCellLayout</h3>
<pre class="programlisting">typedef struct _GtkCellLayout GtkCellLayout;</pre>
</div>
<hr>
<div class="refsect2">
<a name="GtkCellLayoutIface"></a><h3>struct GtkCellLayoutIface</h3>
<pre class="programlisting">struct GtkCellLayoutIface {
/* Virtual Table */
void (* pack_start) (GtkCellLayout *cell_layout,
GtkCellRenderer *cell,
gboolean expand);
void (* pack_end) (GtkCellLayout *cell_layout,
GtkCellRenderer *cell,
gboolean expand);
void (* clear) (GtkCellLayout *cell_layout);
void (* add_attribute) (GtkCellLayout *cell_layout,
GtkCellRenderer *cell,
const gchar *attribute,
gint column);
void (* set_cell_data_func) (GtkCellLayout *cell_layout,
GtkCellRenderer *cell,
GtkCellLayoutDataFunc func,
gpointer func_data,
GDestroyNotify destroy);
void (* clear_attributes) (GtkCellLayout *cell_layout,
GtkCellRenderer *cell);
void (* reorder) (GtkCellLayout *cell_layout,
GtkCellRenderer *cell,
gint position);
GList* (* get_cells) (GtkCellLayout *cell_layout);
GtkCellArea *(* get_area) (GtkCellLayout *cell_layout);
};
</pre>
<div class="refsect3">
<a name="GtkCellLayoutIface.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkCellLayoutIface.pack-start"></a>pack_start</code></em> ()</p></td>
<td class="struct_member_description"><p>Packs the cell into the beginning of cell_layout.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkCellLayoutIface.pack-end"></a>pack_end</code></em> ()</p></td>
<td class="struct_member_description"><p>Adds the cell to the end of cell_layout.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkCellLayoutIface.clear"></a>clear</code></em> ()</p></td>
<td class="struct_member_description"><p>Unsets all the mappings on all renderers on cell_layout and
removes all renderers from cell_layout.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkCellLayoutIface.add-attribute"></a>add_attribute</code></em> ()</p></td>
<td class="struct_member_description"><p>Adds an attribute mapping to the list in
cell_layout.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkCellLayoutIface.set-cell-data-func"></a>set_cell_data_func</code></em> ()</p></td>
<td class="struct_member_description"><p>Sets the <a class="link" href="GtkCellLayout.html#GtkCellLayoutDataFunc" title="GtkCellLayoutDataFunc ()"><span class="type">GtkCellLayoutDataFunc</span></a> to use for
cell_layout.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkCellLayoutIface.clear-attributes"></a>clear_attributes</code></em> ()</p></td>
<td class="struct_member_description"><p>Clears all existing attributes previously set
with <a class="link" href="GtkCellLayout.html#gtk-cell-layout-set-attributes" title="gtk_cell_layout_set_attributes ()"><code class="function">gtk_cell_layout_set_attributes()</code></a>.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkCellLayoutIface.reorder"></a>reorder</code></em> ()</p></td>
<td class="struct_member_description"><p>Re-inserts cell at position.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkCellLayoutIface.get-cells"></a>get_cells</code></em> ()</p></td>
<td class="struct_member_description"><p>Get the cell renderers which have been added to
cell_layout.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkCellLayoutIface.get-area"></a>get_area</code></em> ()</p></td>
<td class="struct_member_description"><p>Get the underlying <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> which might be
cell_layout if called on a <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> or might be NULL if no
<a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> is used by cell_layout.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25.1</div>
</body>
</html>
|