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 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>GTK+ Foundation Classes</title>
<link href="gfc.css" rel="stylesheet" type="text/css">
<meta content="The GFC Development Team" name="author">
<meta content="Core Library Reference Manual" name="description">
</head>
<body style="color: rgb(0, 0, 0); background-color: rgb(243, 244, 248);"
alink="#000099" link="#000099" vlink="#990099">
<table style="text-align: left; width: 1227px; height: 117px;"
border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td
style="text-align: center; background-color: rgb(255, 255, 255); width: 220px; vertical-align: top;"><img
alt="GFC Logo" src="../images/gfc.png"
style="width: 207px; height: 92px;"></td>
<td
style="text-align: center; background-color: rgb(87, 107, 152); vertical-align: middle;"><img
alt="GFC Title Logo" src="../images/gfc-title.png"
style="width: 418px; height: 76px;"><br>
</td>
</tr>
<tr>
<td
style="text-align: center; background-color: rgb(65, 77, 104); vertical-align: middle;"><big><span
style="color: rgb(255, 255, 153); font-weight: bold;">Reference Manual</span></big><br>
</td>
<td
style="text-align: center; background-color: rgb(148, 164, 200); vertical-align: middle;"><small
style="font-family: helvetica,arial,sans-serif;"><a
href="../html/index.html">Main Page</a> | <a
href="../html/namespaces.html">Namespace List</a> | <a
href="classes.html">Alphabetical List</a> | <a
href="../html/annotated.html">Class List</a> | <a
href="../html/files.html">File List</a></small><br>
</td>
</tr>
</tbody>
</table>
<small> </small>
</body>
</html>
<!-- Generated by Doxygen 1.3.8 -->
<h1>GFC::Gtk::ListStore Class Reference</h1>A GtkListStore C++ wrapper class.
<a href="#_details">More...</a>
<p>
<code>#include <<a class="el" href="liststore_8hh-source.html">gfc/gtk/liststore.hh</a>></code>
<p>
<p>Inheritance diagram for GFC::Gtk::ListStore:
<p><center><img src="classGFC_1_1Gtk_1_1ListStore.png" usemap="#GFC::Gtk::ListStore_map" border="0" alt=""></center>
<map name="GFC::Gtk::ListStore_map">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Object.html" alt="GFC::G::Object" shape="rect" coords="0,168,163,192">
<area href="classGFC_1_1Gtk_1_1TreeModel.html" alt="GFC::Gtk::TreeModel" shape="rect" coords="173,168,336,192">
<area href="classGFC_1_1Gtk_1_1TreeSortable.html" alt="GFC::Gtk::TreeSortable" shape="rect" coords="346,168,509,192">
<area href="classGFC_1_1Gtk_1_1TreeDragSource.html" alt="GFC::Gtk::TreeDragSource" shape="rect" coords="519,168,682,192">
<area href="classGFC_1_1Gtk_1_1TreeDragDest.html" alt="GFC::Gtk::TreeDragDest" shape="rect" coords="692,168,855,192">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInstance.html" alt="GFC::G::TypeInstance" shape="rect" coords="0,112,163,136">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInterface.html" alt="GFC::G::TypeInterface" shape="rect" coords="173,112,336,136">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInterface.html" alt="GFC::G::TypeInterface" shape="rect" coords="346,112,509,136">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInterface.html" alt="GFC::G::TypeInterface" shape="rect" coords="519,112,682,136">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInterface.html" alt="GFC::G::TypeInterface" shape="rect" coords="692,112,855,136">
<area doxygen="gfccore.tag:" href="classGFC_1_1Trackable.html" alt="GFC::Trackable" shape="rect" coords="0,56,163,80">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInstance.html" alt="GFC::G::TypeInstance" shape="rect" coords="173,56,336,80">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInstance.html" alt="GFC::G::TypeInstance" shape="rect" coords="346,56,509,80">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInstance.html" alt="GFC::G::TypeInstance" shape="rect" coords="519,56,682,80">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInstance.html" alt="GFC::G::TypeInstance" shape="rect" coords="692,56,855,80">
<area doxygen="gfccore.tag:" href="classGFC_1_1Trackable.html" alt="GFC::Trackable" shape="rect" coords="173,0,336,24">
<area doxygen="gfccore.tag:" href="classGFC_1_1Trackable.html" alt="GFC::Trackable" shape="rect" coords="346,0,509,24">
<area doxygen="gfccore.tag:" href="classGFC_1_1Trackable.html" alt="GFC::Trackable" shape="rect" coords="519,0,682,24">
<area doxygen="gfccore.tag:" href="classGFC_1_1Trackable.html" alt="GFC::Trackable" shape="rect" coords="692,0,855,24">
</map>
<a href="classGFC_1_1Gtk_1_1ListStore-members.html">List of all members.</a><h2>Public Member Functions</h2>
<tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr>
<ul>
<li><a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z632_0">ListStore</a> (int n_columns,...)
<dl class="el"><dd class="mdescRight">Construct a list store of <em>n_columns</em> columns of each of the types passed in the variable argument list. <a href="#z632_0"></a><br></dl><li><a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z632_1">ListStore</a> (int n_columns, const GType types[])
<dl class="el"><dd class="mdescRight">Construct a list store of <em>n_columns</em> columns of each of the types passed in the array of GType. <a href="#z632_1"></a><br></dl><li><a class="anchor" name="z632_2" doxytag="GFC::Gtk::ListStore::~ListStore" ></a>
virtual <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z632_2">~ListStore</a> ()
<dl class="el"><dd class="mdescRight">Destructor. <br></dl></ul>
<tr><td colspan="2"><div class="groupHeader">Accessors</div></td></tr>
<ul>
<li><a class="anchor" name="z633_0" doxytag="GFC::Gtk::ListStore::gtk_list_store" ></a>
GtkListStore * <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z633_0">gtk_list_store</a> () const
<dl class="el"><dd class="mdescRight">Get a pointer to the GtkListStore structure. <br></dl><li><a class="anchor" name="z633_1" doxytag="GFC::Gtk::ListStore::operator GtkListStore *" ></a>
<a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z633_1">operator GtkListStore *</a> () const
<dl class="el"><dd class="mdescRight">Conversion operator; safely converts a <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html">ListStore</a> to a GtkListStore pointer. <br></dl><li>bool <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z633_2">iter_is_valid</a> (const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> &iter) const
<dl class="el"><dd class="mdescRight">Checks if the given <em>iter</em> is a valid iter for the list store. <a href="#z633_2"></a><br></dl></ul>
<tr><td colspan="2"><div class="groupHeader">Methods</div></td></tr>
<ul>
<li><a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z634_0">prepend</a> ()
<dl class="el"><dd class="mdescRight">Prepends a new row to a <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html">ListStore</a>. <a href="#z634_0"></a><br></dl><li><a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z634_1">append</a> ()
<dl class="el"><dd class="mdescRight">Appends a new row to a <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html">ListStore</a>. <a href="#z634_1"></a><br></dl><li><a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z634_2">insert</a> (int position)
<dl class="el"><dd class="mdescRight">Inserts a new row at <em>position</em>. <a href="#z634_2"></a><br></dl><li><a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z634_3">insert_before</a> (<a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> &sibling)
<dl class="el"><dd class="mdescRight">Inserts a new row before sibling. <a href="#z634_3"></a><br></dl><li><a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z634_4">insert_after</a> (<a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> &sibling)
<dl class="el"><dd class="mdescRight">Inserts a new row after sibling. <a href="#z634_4"></a><br></dl><li>bool <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z634_5">remove</a> (<a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> &iter)
<dl class="el"><dd class="mdescRight">Removes the given row from the list store. <a href="#z634_5"></a><br></dl><li><a class="anchor" name="z634_6" doxytag="GFC::Gtk::ListStore::clear" ></a>
void <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z634_6">clear</a> ()
<dl class="el"><dd class="mdescRight">Removes all rows from the list store. <br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z634_7">reorder</a> (int *new_order)
<dl class="el"><dd class="mdescRight">Reorders the list store to follow the order indicated by <em>new_order</em>. <a href="#z634_7"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z634_8">swap</a> (const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> &a, const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> &b)
<dl class="el"><dd class="mdescRight">Swaps <em>a</em> and <em>b</em> in the list store. <a href="#z634_8"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z634_9">move_after</a> (const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> &iter, const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> *position)
<dl class="el"><dd class="mdescRight">Moves <em>iter</em> in the list store to the position after position. <a href="#z634_9"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z634_10">move_before</a> (const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> &iter, const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> *position)
<dl class="el"><dd class="mdescRight">Moves <em>iter</em> in the list store to the position before position. <a href="#z634_10"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z634_11">set_value</a> (const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> &iter, int column, const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Value.html">G::Value</a> &value)
<dl class="el"><dd class="mdescRight">Sets the data in the cell specified by iter and column. <a href="#z634_11"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z634_12">set_value</a> (const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> &iter, int column, const char *str)
<dl class="el"><dd class="mdescRight">Sets a string value in the cell specified by iter and column. <a href="#z634_12"></a><br></dl></ul>
<tr><td colspan="2"><div class="groupHeader">Templates</div></td></tr>
<ul>
<li>template<typename DataType> void <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z635_0">set_value</a> (const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> &iter, int column, const DataType &data)
<dl class="el"><dd class="mdescRight">Sets the data in the cell specified by iter and column. <a href="#z635_0"></a><br></dl><li>template<typename DataType> void <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z635_1">set_enum</a> (const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> &iter, int column, const DataType &data)
<dl class="el"><dd class="mdescRight">Sets the enum data in the cell specified by iter and column. <a href="#z635_1"></a><br></dl><li>template<typename DataType> void <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z635_2">set_object</a> (const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> &iter, int column, const DataType &data)
<dl class="el"><dd class="mdescRight">Sets the object pointer <em>data</em> in the cell specified by iter and column. <a href="#z635_2"></a><br></dl><li>template<typename DataType> void <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z635_3">set_pointer</a> (const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> &iter, int column, const DataType &data)
<dl class="el"><dd class="mdescRight">Sets the pointer <em>data</em> in the cell specified by iter and column. <a href="#z635_3"></a><br></dl></ul>
<h2>Protected Member Functions</h2>
<tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr>
<ul>
<li><a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z631_0">ListStore</a> (GtkListStore *list_store, bool <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1Trackable.html#z143_1">owns_reference</a>=true)
<dl class="el"><dd class="mdescRight">Construct a new <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html">ListStore</a> from an existing GtkListStore. <a href="#z631_0"></a><br></dl></ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A GtkListStore C++ wrapper class.
<p>
The <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html">ListStore</a> object is a list model for use with a <a class="el" href="classGFC_1_1Gtk_1_1TreeView.html">TreeView</a> widget. It implements the <a class="el" href="classGFC_1_1Gtk_1_1TreeModel.html">TreeModel</a> interface, and consequentialy, can use all of the methods available there. It also implements the <a class="el" href="classGFC_1_1Gtk_1_1TreeSortable.html">TreeSortable</a> interface so it can be sorted by the view. Finally, it also implements the tree drag and drop interfaces.<p>
<b>Example:</b> Creating a simple list store. <div class="fragment"><pre><span class="preprocessor"> #include <gfc/main.h></span>
<span class="preprocessor"> #include <gfc/gtk/window.h></span>
<span class="preprocessor"> #include "gfc/gtk/liststore.h"</span>
<span class="preprocessor"> #include <gfc/gtk/treeview.h></span>
<span class="preprocessor"> #include "gfc/gtk/cellrenderer.h"</span>
<span class="keyword">using</span> <span class="keyword">namespace </span>GFC;
<span class="keyword">class </span>ListStoreWindow : <span class="keyword">public</span> Gtk::Window
{
Pointer<Gtk::ListStore> list_store;
Gtk::TreeView *tree_view;
<span class="keyword">public</span>:
ListStoreWindow();
};
<span class="keyword">enum</span>
{
COLUMN_STRING,
COLUMN_INT,
COLUMN_BOOLEAN,
N_COLUMNS
};
ListStoreWindow::ListStoreWindow()
{
list_store = <span class="keyword">new</span> Gtk::ListStore(N_COLUMNS, G_TYPE_STRING, G_TYPE_INT, G_TYPE_BOOLEAN);
Gtk::TreeIter iter;
<span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < 10; i++)
{
<span class="comment">// Add a new row to the model</span>
iter = list_store->append();
list_store->set_value(iter, COLUMN_STRING, <span class="stringliteral">"Some Data"</span>);
list_store->set_value(iter, COLUMN_INT, i);
list_store->set_value(iter, COLUMN_BOOLEAN, <span class="keyword">false</span>);
}
<span class="comment">// Modify a particular row</span>
Pointer<Gtk::TreePath> path = <span class="keyword">new</span> Gtk::TreePath(<span class="stringliteral">"4"</span>);
list_store->get_iter(iter, *path);
list_store->set_value(iter, COLUMN_BOOLEAN, <span class="keyword">true</span>);
<span class="comment">// Create a TreeView</span>
tree_view = <span class="keyword">new</span> Gtk::TreeView(*list_store);
<span class="comment">// Create first column, associating the "text" attribute of the cell_renderer</span>
<span class="comment">// with the first column of the list_store. Add column to TreeView.</span>
Gtk::CellRendererText *renderer = <span class="keyword">new</span> Gtk::CellRendererText;
renderer->prop_foreground().set(<span class="stringliteral">"red"</span>);
Gtk::TreeViewColumn *column = <span class="keyword">new</span> Gtk::TreeViewColumn(<span class="stringliteral">"Text"</span>, renderer, <span class="stringliteral">"text"</span>, COLUMN_STRING, 0);
tree_view->append_column(*column);
<span class="comment">// Create second column, associating the "text" attribute of the cell_renderer</span>
<span class="comment">// with the second column of the list_store. Add column to TreeView.</span>
renderer = <span class="keyword">new</span> Gtk::CellRendererText;
renderer->prop_foreground().set(<span class="stringliteral">"blue"</span>);
column = <span class="keyword">new</span> Gtk::TreeViewColumn(<span class="stringliteral">"Number"</span>, renderer, <span class="stringliteral">"text"</span>, COLUMN_INT, 0);
tree_view->append_column(*column);
<span class="comment">// Create third column, associating the "active" attribute of the toggle cell_renderer</span>
<span class="comment">// with the second column of the list_store. Add column to TreeView. To update checkbox</span>
<span class="comment">// when toggled you must connect to the "toggled_signal".</span>
Gtk::CellRendererToggle *toggle_renderer = <span class="keyword">new</span> Gtk::CellRendererToggle;
column = <span class="keyword">new</span> Gtk::TreeViewColumn(<span class="stringliteral">"Boolean"</span>, toggle_renderer, <span class="stringliteral">"active"</span>, COLUMN_BOOLEAN, 0);
tree_view->append_column(*column);
add(*tree_view);
show_all();
}
<span class="keywordtype">int</span> main (<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *argv[])
{
<span class="keyword">using</span> <span class="keyword">namespace </span>Main;
<a class="code" href="namespaceGFC_1_1Main.html#a2">init</a>(&argc, &argv);
ListStoreWindow window;
window.sig_destroy().connect(slot(&GFC::Main::quit));
<a class="code" href="namespaceGFC_1_1Main.html#a11">run</a>();
<span class="keywordflow">return</span> 0;
}
</pre></div>
<p>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="z631_0" doxytag="GFC::Gtk::ListStore::ListStore" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> GFC::Gtk::ListStore::ListStore </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">GtkListStore * </td>
<td class="mdname" nowrap> <em>list_store</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>bool </td>
<td class="mdname" nowrap> <em>owns_reference</em> = <code>true</code></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [explicit, protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Construct a new <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html">ListStore</a> from an existing GtkListStore.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>list_store</em> </td><td>A pointer to a GtkListStore. </td></tr>
<tr><td></td><td valign=top><em>owns_reference</em> </td><td>Set false if the initial reference count is floating, set true if it's not.</td></tr>
</table>
</dl>
<br>
The <em>list_store</em> can be a newly created GtkListStore or an existing GtkListStore (see <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Object.html#z68_0">G::Object::Object</a>). </td>
</tr>
</table>
<a class="anchor" name="z632_0" doxytag="GFC::Gtk::ListStore::ListStore" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> GFC::Gtk::ListStore::ListStore </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">int </td>
<td class="mdname" nowrap> <em>n_columns</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap> </td>
<td class="mdname" nowrap> <em>...</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Construct a list store of <em>n_columns</em> columns of each of the types passed in the variable argument list.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>n_columns</em> </td><td>The number of columns in the list store. </td></tr>
<tr><td></td><td valign=top><em>...</em> </td><td>All the GType types for the columns, from first to last.</td></tr>
</table>
</dl>
<br>
As an example, ListStore(3, G_TYPE_INT, G_TYPE_STRING, GDK_TYPE_PIXBUF); will create a new list store with three columns, of type int, string and GdkPixbuf respectively. </td>
</tr>
</table>
<a class="anchor" name="z632_1" doxytag="GFC::Gtk::ListStore::ListStore" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> GFC::Gtk::ListStore::ListStore </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">int </td>
<td class="mdname" nowrap> <em>n_columns</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const GType </td>
<td class="mdname" nowrap> <em>types</em>[]</td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Construct a list store of <em>n_columns</em> columns of each of the types passed in the array of GType.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>n_columns</em> </td><td>The number of columns in the list store. </td></tr>
<tr><td></td><td valign=top><em>types</em> </td><td>An array of GType containing the column types, from first to last. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="z634_1" doxytag="GFC::Gtk::ListStore::append" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> GFC::Gtk::ListStore::append </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Appends a new row to a <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html">ListStore</a>.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>An unset <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> set to the appended row.</dd></dl>
<br>
The row will be empty after this method is called. To fill in values, you need to call <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z634_11">set_value()</a>, <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z635_2">set_object()</a> or <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z635_3">set_pointer()</a>. </td>
</tr>
</table>
<a class="anchor" name="z634_2" doxytag="GFC::Gtk::ListStore::insert" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> GFC::Gtk::ListStore::insert </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">int </td>
<td class="mdname1" valign="top" nowrap> <em>position</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Inserts a new row at <em>position</em>.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>position</em> </td><td>The position to insert the new row. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>An unset <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> set to the inserted row.</dd></dl>
<br>
If position is larger than the number of rows on the list, then the new row will be appended to the list.The row will be empty after this method is called. To fill in values, you need to call <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z634_11">set_value()</a>, <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z635_2">set_object()</a> or <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z635_3">set_pointer()</a>. </td>
</tr>
</table>
<a class="anchor" name="z634_4" doxytag="GFC::Gtk::ListStore::insert_after" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> GFC::Gtk::ListStore::insert_after </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>sibling</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Inserts a new row after sibling.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>sibling</em> </td><td>A valid <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a>. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>An unset <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> set to the inserted row.</dd></dl>
<br>
The row will be empty after this method is called. To fill in values, you need to call <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z634_11">set_value()</a>, <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z635_2">set_object()</a> or <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z635_3">set_pointer()</a>. </td>
</tr>
</table>
<a class="anchor" name="z634_3" doxytag="GFC::Gtk::ListStore::insert_before" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> GFC::Gtk::ListStore::insert_before </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>sibling</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Inserts a new row before sibling.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>sibling</em> </td><td>A valid <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a>. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>An unset <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> set to the inserted row.</dd></dl>
<br>
The row will be empty after this method is called. To fill in values, you need to call <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z634_11">set_value()</a>, <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z635_2">set_object()</a> or <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z635_3">set_pointer()</a>. </td>
</tr>
</table>
<a class="anchor" name="z633_2" doxytag="GFC::Gtk::ListStore::iter_is_valid" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> bool GFC::Gtk::ListStore::iter_is_valid </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>iter</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Checks if the given <em>iter</em> is a valid iter for the list store.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>iter</em> </td><td>A <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a>. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><em>true</em> if the iter is valid, <em>false</em> if it's not.</dd></dl>
<br>
<b>WARNING:</b> This function is slow. Only use it for debugging and/or testing purposes. </td>
</tr>
</table>
<a class="anchor" name="z634_9" doxytag="GFC::Gtk::ListStore::move_after" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void GFC::Gtk::ListStore::move_after </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> & </td>
<td class="mdname" nowrap> <em>iter</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> * </td>
<td class="mdname" nowrap> <em>position</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Moves <em>iter</em> in the list store to the position after position.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>iter</em> </td><td>A <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a>. </td></tr>
<tr><td></td><td valign=top><em>position</em> </td><td>A <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a>, or null.</td></tr>
</table>
</dl>
<br>
<b>Note:</b> This function only works with unsorted stores. If position is null, iter will be moved to the start of the list. </td>
</tr>
</table>
<a class="anchor" name="z634_10" doxytag="GFC::Gtk::ListStore::move_before" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void GFC::Gtk::ListStore::move_before </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> & </td>
<td class="mdname" nowrap> <em>iter</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> * </td>
<td class="mdname" nowrap> <em>position</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Moves <em>iter</em> in the list store to the position before position.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>iter</em> </td><td>A <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a>. </td></tr>
<tr><td></td><td valign=top><em>position</em> </td><td>A <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a>, or null.</td></tr>
</table>
</dl>
<br>
<b>Note:</b> This function only works with unsorted stores. If position is null, iter will be moved to the end of the list. </td>
</tr>
</table>
<a class="anchor" name="z634_0" doxytag="GFC::Gtk::ListStore::prepend" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> GFC::Gtk::ListStore::prepend </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Prepends a new row to a <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html">ListStore</a>.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>An unset <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> set to the prepended row.</dd></dl>
<br>
The row will be empty after this method is called. To fill in values, you need to call <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z634_11">set_value()</a>, <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z635_2">set_object()</a> or <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z635_3">set_pointer()</a>. </td>
</tr>
</table>
<a class="anchor" name="z634_5" doxytag="GFC::Gtk::ListStore::remove" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> bool GFC::Gtk::ListStore::remove </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>iter</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Removes the given row from the list store.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>iter</em> </td><td>A valid <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a>. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><em>true</em> if <em>iter</em> is valid, <em>false</em> if it's not.</dd></dl>
<br>
After being removed, iter is set to be the next valid row, or invalidated if it pointed to the last row in list_store. </td>
</tr>
</table>
<a class="anchor" name="z634_7" doxytag="GFC::Gtk::ListStore::reorder" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void GFC::Gtk::ListStore::reorder </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">int * </td>
<td class="mdname1" valign="top" nowrap> <em>new_order</em> </td>
<td class="md" valign="top"> ) </td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Reorders the list store to follow the order indicated by <em>new_order</em>.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>new_order</em> </td><td>An integer array indicating the new order for the list.</td></tr>
</table>
</dl>
<br>
<b>Note:</b> This method only works with unsorted stores. </td>
</tr>
</table>
<a class="anchor" name="z635_1" doxytag="GFC::Gtk::ListStore::set_enum" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<typename DataType> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void GFC::Gtk::ListStore::set_enum </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> & </td>
<td class="mdname" nowrap> <em>iter</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>column</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const DataType & </td>
<td class="mdname" nowrap> <em>data</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Sets the enum data in the cell specified by iter and column.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>iter</em> </td><td>A valid <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> for the row being modified. </td></tr>
<tr><td></td><td valign=top><em>column</em> </td><td>The column number to modify. </td></tr>
<tr><td></td><td valign=top><em>data</em> </td><td>The enum value to set.</td></tr>
</table>
</dl>
<br>
This method is used to set enumeration values. The DataType is the type of the enumeration being set. There is a good example of setting values in the gfc-demo program <demos/gfc-demo/liststore.cc>. </td>
</tr>
</table>
<a class="anchor" name="z635_2" doxytag="GFC::Gtk::ListStore::set_object" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<typename DataType> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void GFC::Gtk::ListStore::set_object </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> & </td>
<td class="mdname" nowrap> <em>iter</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>column</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const DataType & </td>
<td class="mdname" nowrap> <em>data</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Sets the object pointer <em>data</em> in the cell specified by iter and column.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>iter</em> </td><td>A valid <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> for the row being modified. </td></tr>
<tr><td></td><td valign=top><em>column</em> </td><td>The column number to modify. </td></tr>
<tr><td></td><td valign=top><em>data</em> </td><td>A pointer to an object derived from <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Object.html">G::Object</a>, passed by reference.</td></tr>
</table>
</dl>
<br>
There is a good example of setting values in the gfc-demo program <demos/gfc-demo/liststore.cc>. </td>
</tr>
</table>
<a class="anchor" name="z635_3" doxytag="GFC::Gtk::ListStore::set_pointer" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<typename DataType> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void GFC::Gtk::ListStore::set_pointer </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> & </td>
<td class="mdname" nowrap> <em>iter</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>column</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const DataType & </td>
<td class="mdname" nowrap> <em>data</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Sets the pointer <em>data</em> in the cell specified by iter and column.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>iter</em> </td><td>A valid <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> for the row being modified. </td></tr>
<tr><td></td><td valign=top><em>column</em> </td><td>The column number to modify. </td></tr>
<tr><td></td><td valign=top><em>data</em> </td><td>The pointer to set in the cell.</td></tr>
</table>
</dl>
<br>
The <em>data</em> argument can be a pointer to any object. The pointer is managed internally as a generic (void*) pointer. Unlike <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z635_2">set_object()</a> which passes the <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Object.html">G::Object</a> pointer internally as a GObject pointer, <a class="el" href="classGFC_1_1Gtk_1_1ListStore.html#z635_3">set_pointer()</a> passes the pointer as is, without interpretation. There is a good example of setting values in the gfc-demo program <demos/gfc-demo/liststore.cc>. </td>
</tr>
</table>
<a class="anchor" name="z635_0" doxytag="GFC::Gtk::ListStore::set_value" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template<typename DataType> </td>
</tr>
<tr>
<td class="md" nowrap valign="top"> void GFC::Gtk::ListStore::set_value </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> & </td>
<td class="mdname" nowrap> <em>iter</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>column</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const DataType & </td>
<td class="mdname" nowrap> <em>data</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Sets the data in the cell specified by iter and column.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>iter</em> </td><td>A valid <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> for the row being modified. </td></tr>
<tr><td></td><td valign=top><em>column</em> </td><td>The column number to modify. </td></tr>
<tr><td></td><td valign=top><em>data</em> </td><td>The data to set for the cell.</td></tr>
</table>
</dl>
<br>
This method is used to set values corresponding to the standard data types used by <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Value.html">G::Value</a>, such as bool, int, double, <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> and unsigned int. There is a good example of setting values in the gfc-demo program <demos/gfc-demo/liststore.cc>. </td>
</tr>
</table>
<a class="anchor" name="z634_12" doxytag="GFC::Gtk::ListStore::set_value" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void GFC::Gtk::ListStore::set_value </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> & </td>
<td class="mdname" nowrap> <em>iter</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>column</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const char * </td>
<td class="mdname" nowrap> <em>str</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Sets a string value in the cell specified by iter and column.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>iter</em> </td><td>A valid <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> for the row being modified. </td></tr>
<tr><td></td><td valign=top><em>column</em> </td><td>The column number to modify. </td></tr>
<tr><td></td><td valign=top><em>str</em> </td><td>The new string for the cell. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="z634_11" doxytag="GFC::Gtk::ListStore::set_value" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void GFC::Gtk::ListStore::set_value </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> & </td>
<td class="mdname" nowrap> <em>iter</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>column</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Value.html">G::Value</a> & </td>
<td class="mdname" nowrap> <em>value</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Sets the data in the cell specified by iter and column.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>iter</em> </td><td>A valid <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> for the row being modified. </td></tr>
<tr><td></td><td valign=top><em>column</em> </td><td>The column number to modify. </td></tr>
<tr><td></td><td valign=top><em>value</em> </td><td>The new value for the cell.</td></tr>
</table>
</dl>
<br>
The type of value must be convertible to the type of the column. </td>
</tr>
</table>
<a class="anchor" name="z634_8" doxytag="GFC::Gtk::ListStore::swap" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"> void GFC::Gtk::ListStore::swap </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> & </td>
<td class="mdname" nowrap> <em>a</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>const <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a> & </td>
<td class="mdname" nowrap> <em>b</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Swaps <em>a</em> and <em>b</em> in the list store.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>a</em> </td><td>A <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a>. </td></tr>
<tr><td></td><td valign=top><em>b</em> </td><td>Another <a class="el" href="classGFC_1_1Gtk_1_1TreeIter.html">TreeIter</a>.</td></tr>
</table>
</dl>
<br>
<b>Note:</b> This method only works with unsorted stores. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="liststore_8hh-source.html">liststore.hh</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Aug 24 00:34:40 2004 for GFC-UI by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>
</body>
</html>
|