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
|
<!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::Label Class Reference</h1>A GtkLabel C++ wrapper class.
<a href="#_details">More...</a>
<p>
<code>#include <<a class="el" href="label_8hh-source.html">gfc/gtk/label.hh</a>></code>
<p>
<p>Inheritance diagram for GFC::Gtk::Label:
<p><center><img src="classGFC_1_1Gtk_1_1Label.png" usemap="#GFC::Gtk::Label_map" border="0" alt=""></center>
<map name="GFC::Gtk::Label_map">
<area href="classGFC_1_1Gtk_1_1Misc.html" alt="GFC::Gtk::Misc" shape="rect" coords="73,280,210,304">
<area href="classGFC_1_1Gtk_1_1Widget.html" alt="GFC::Gtk::Widget" shape="rect" coords="73,224,210,248">
<area href="classGFC_1_1Gtk_1_1Object.html" alt="GFC::Gtk::Object" shape="rect" coords="0,168,137,192">
<area href="classGFC_1_1Atk_1_1Implementor.html" alt="GFC::Atk::Implementor" shape="rect" coords="147,168,284,192">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Object.html" alt="GFC::G::Object" shape="rect" coords="0,112,137,136">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInterface.html" alt="GFC::G::TypeInterface" shape="rect" coords="147,112,284,136">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInstance.html" alt="GFC::G::TypeInstance" shape="rect" coords="0,56,137,80">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInstance.html" alt="GFC::G::TypeInstance" shape="rect" coords="147,56,284,80">
<area doxygen="gfccore.tag:" href="classGFC_1_1Trackable.html" alt="GFC::Trackable" shape="rect" coords="0,0,137,24">
<area doxygen="gfccore.tag:" href="classGFC_1_1Trackable.html" alt="GFC::Trackable" shape="rect" coords="147,0,284,24">
<area href="classGFC_1_1Gtk_1_1AccelLabel.html" alt="GFC::Gtk::AccelLabel" shape="rect" coords="73,392,210,416">
</map>
<a href="classGFC_1_1Gtk_1_1Label-members.html">List of all members.</a><h2>Signal Prototypes</h2>
<ul>
<li>const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Signal.html">PopulatePopupSignalType</a> <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z616_2">populate_popup_signal</a>
<dl class="el"><dd class="mdescRight">Populate popup signal (see <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z620_0">sig_populate_popup()</a>). <a href="#z616_2"></a><br></dl></ul>
<h2>Public Member Functions</h2>
<tr><td colspan="2"><div class="groupHeader">Constructors</div></td></tr>
<ul>
<li><a class="anchor" name="z617_0" doxytag="GFC::Gtk::Label::Label" ></a>
<a class="el" href="classGFC_1_1Gtk_1_1Label.html#z617_0">Label</a> ()
<dl class="el"><dd class="mdescRight">Construct an empty <a class="el" href="classGFC_1_1Gtk_1_1Label.html">Label</a>. <br></dl><li><a class="el" href="classGFC_1_1Gtk_1_1Label.html#z617_2">Label</a> (const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> &str, bool use_underline=false)
<dl class="el"><dd class="mdescRight">Construct a new <a class="el" href="classGFC_1_1Gtk_1_1Label.html">Label</a> with <em>str</em> as its text. <a href="#z617_2"></a><br></dl><li><a class="anchor" name="z617_3" doxytag="GFC::Gtk::Label::~Label" ></a>
virtual <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z617_3">~Label</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="z618_0" doxytag="GFC::Gtk::Label::gtk_label" ></a>
GtkLabel * <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_0">gtk_label</a> () const
<dl class="el"><dd class="mdescRight">Get a pointer to the GtkLabel structure. <br></dl><li><a class="anchor" name="z618_1" doxytag="GFC::Gtk::Label::operator GtkLabel *" ></a>
<a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_1">operator GtkLabel *</a> () const
<dl class="el"><dd class="mdescRight">Conversion operator; safely converts a <a class="el" href="classGFC_1_1Gtk_1_1Label.html">Label</a> to a GtkLabel pointer. <br></dl><li><a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_2">get_text</a> () const
<dl class="el"><dd class="mdescRight">Fetches the text from a label widget, as displayed on the screen. <a href="#z618_2"></a><br></dl><li><a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1Pointer.html">Pointer</a>< <a class="el" href="classGFC_1_1Pango_1_1AttrList.html">Pango::AttrList</a> > <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_3">get_attributes</a> () const
<dl class="el"><dd class="mdescRight">Gets the attribute list that was set on the label using <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_2">set_attributes()</a>, if any. <a href="#z618_3"></a><br></dl><li><a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_4">get_label</a> () const
<dl class="el"><dd class="mdescRight">Fetches the text from a label widget including any embedded underlines indicating mnemonics and <a class="el" href="namespaceGFC_1_1Pango.html">Pango</a> markup (see <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_2">get_text()</a>). <a href="#z618_4"></a><br></dl><li><a class="anchor" name="z618_5" doxytag="GFC::Gtk::Label::get_use_markup" ></a>
bool <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_5">get_use_markup</a> () const
<dl class="el"><dd class="mdescRight">Returns whether the label's text is interpreted as marked up with the <a class="el" href="namespaceGFC_1_1Pango.html">Pango</a> text markup language (see <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_18">set_use_markup()</a>). <br></dl><li><a class="anchor" name="z618_6" doxytag="GFC::Gtk::Label::get_use_underline" ></a>
bool <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_6">get_use_underline</a> () const
<dl class="el"><dd class="mdescRight">Returns whether an embedded underline in the label indicates a mnemonic character key (see <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_19">set_use_underline()</a>). <br></dl><li>unsigned int <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_7">get_mnemonic_keyval</a> () const
<dl class="el"><dd class="mdescRight">If the label has been set so that it has an mnemonic key this function returns the keyval used for the mnemonic accelerator. <a href="#z618_7"></a><br></dl><li><a class="el" href="classGFC_1_1Gtk_1_1Widget.html">Widget</a> * <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_8">get_mnemonic_widget</a> () const
<dl class="el"><dd class="mdescRight">Retrieves the target of the mnemonic (keyboard shortcut) of this label (see <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_9">set_mnemonic_widget()</a>). <a href="#z618_8"></a><br></dl><li><a class="anchor" name="z618_9" doxytag="GFC::Gtk::Label::get_justify" ></a>
<a class="el" href="namespaceGFC_1_1Gtk.html#a326">Justification</a> <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_9">get_justify</a> () const
<dl class="el"><dd class="mdescRight">Returns the justification of the label (see <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_12">set_justify()</a>). <br></dl><li><a class="anchor" name="z618_10" doxytag="GFC::Gtk::Label::get_line_wrap" ></a>
bool <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_10">get_line_wrap</a> () const
<dl class="el"><dd class="mdescRight">Returns whether lines in the label are automatically wrapped (see <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_15">set_line_wrap()</a>). <br></dl><li>bool <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_11">get_selectable</a> () const
<dl class="el"><dd class="mdescRight">Gets the value set by <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_16">set_selectable()</a>. <a href="#z618_11"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_12">get_layout_offsets</a> (int *x, int *y) const
<dl class="el"><dd class="mdescRight">Obtains the coordinates where the label will draw the <a class="el" href="classGFC_1_1Pango_1_1Layout.html">Pango::Layout</a> representing the text in the label. <a href="#z618_12"></a><br></dl><li>bool <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_13">get_selection_bounds</a> (int *start, int *end) const
<dl class="el"><dd class="mdescRight">Gets the selected range of characters in the label. <a href="#z618_13"></a><br></dl><li><a class="el" href="classGFC_1_1Pango_1_1Layout.html">Pango::Layout</a> * <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_14">get_layout</a> () const
<dl class="el"><dd class="mdescRight">Gets the <a class="el" href="classGFC_1_1Pango_1_1Layout.html">Pango::Layout</a> used to display the label. <a href="#z618_14"></a><br></dl></ul>
<tr><td colspan="2"><div class="groupHeader">Methods</div></td></tr>
<ul>
<li>void <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_1">set_text</a> (const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> &str)
<dl class="el"><dd class="mdescRight">Sets the text within the <a class="el" href="classGFC_1_1Gtk_1_1Label.html">Label</a> widget, overwriting any text that was there before. <a href="#z619_1"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_2">set_attributes</a> (<a class="el" href="classGFC_1_1Pango_1_1AttrList.html">Pango::AttrList</a> *attrs)
<dl class="el"><dd class="mdescRight">Sets a <a class="el" href="classGFC_1_1Pango_1_1AttrList.html">Pango::AttrList</a>; the attributes in the list are applied to the label text. <a href="#z619_2"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_4">set_markup</a> (const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> &str)
<dl class="el"><dd class="mdescRight">Parses str which is marked up with the <a class="el" href="namespaceGFC_1_1Pango.html">Pango</a> text markup language, setting the label's text and attribute list based on the parse results. <a href="#z619_4"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_6">set_label</a> (const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> &str)
<dl class="el"><dd class="mdescRight">Sets the text of the label. <a href="#z619_6"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_8">set_markup_with_mnemonic</a> (const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> &str)
<dl class="el"><dd class="mdescRight">Parses str which is marked up with the <a class="el" href="namespaceGFC_1_1Pango.html">Pango</a> text markup language, setting the label's text and attribute list based on the parse results. <a href="#z619_8"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_9">set_mnemonic_widget</a> (<a class="el" href="classGFC_1_1Gtk_1_1Widget.html">Widget</a> *widget)
<dl class="el"><dd class="mdescRight">If the label has been set so that it has an mnemonic key (using the constructor, <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_8">set_markup_with_mnemonic()</a>, <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_11">set_text_with_mnemonic()</a>, or the "use_underline" property) the label can be associated with a widget that is the target of the mnemonic. <a href="#z619_9"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_11">set_text_with_mnemonic</a> (const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> &str)
<dl class="el"><dd class="mdescRight">Sets the label's text from the string <em>str</em>. <a href="#z619_11"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_12">set_justify</a> (<a class="el" href="namespaceGFC_1_1Gtk.html#a326">Justification</a> jtype)
<dl class="el"><dd class="mdescRight">Sets the alignment of the lines in the text of the label relative to each other. <a href="#z619_12"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_14">set_pattern</a> (const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> &pattern)
<dl class="el"><dd class="mdescRight">The pattern of underlines you want under the existing text within the <a class="el" href="classGFC_1_1Gtk_1_1Label.html">Label</a> widget. <a href="#z619_14"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_15">set_line_wrap</a> (bool <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Object.html#z74_0">wrap</a>)
<dl class="el"><dd class="mdescRight">Toggles line wrapping within the <a class="el" href="classGFC_1_1Gtk_1_1Label.html">Label</a> widget. <a href="#z619_15"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_16">set_selectable</a> (bool setting)
<dl class="el"><dd class="mdescRight">Selectable labels allow the user to select text from the label, for copy-and-paste. <a href="#z619_16"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_17">select_region</a> (int start_offset, int end_offset)
<dl class="el"><dd class="mdescRight">Selects a range of characters in the label, if the label is selectable (see <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_16">set_selectable()</a>). <a href="#z619_17"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_18">set_use_markup</a> (bool setting)
<dl class="el"><dd class="mdescRight">Sets whether the text of the label contains markup in Pango's text markup language (see <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_4">set_markup()</a>). <a href="#z619_18"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_19">set_use_underline</a> (bool setting)
<dl class="el"><dd class="mdescRight">If <em>setting</em> is true, an underline in the text indicates the next character should be used for the mnemonic accelerator key. <a href="#z619_19"></a><br></dl></ul>
<tr><td colspan="2"><div class="groupHeader">Signal Proxies</div></td></tr>
<ul>
<li><a class="anchor" name="z620_0" doxytag="GFC::Gtk::Label::sig_populate_popup" ></a>
const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1SignalProxy.html">PopulatePopupSignalProxy</a> <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z620_0">sig_populate_popup</a> ()
<dl class="el"><dd class="mdescRight">Connect to the populate_popup_signal; emitted just before the popup menu is displayed in response the a right-click on a selectable label. <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_1Label.html#z615_0">Label</a> (GtkLabel *label, bool <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1Trackable.html#z143_1">owns_reference</a>=false)
<dl class="el"><dd class="mdescRight">Construct a new <a class="el" href="classGFC_1_1Gtk_1_1Label.html">Label</a> from an existing GtkLabel. <a href="#z615_0"></a><br></dl></ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A GtkLabel C++ wrapper class.
<p>
The <a class="el" href="classGFC_1_1Gtk_1_1Label.html">Label</a> widget displays a small amount of text. As the name implies, most labels are used to label another widget such as a <a class="el" href="classGFC_1_1Gtk_1_1Button.html">Button</a>, a <a class="el" href="classGFC_1_1Gtk_1_1MenuItem.html">MenuItem</a>, or an OptionMenu.<p>
<b>Mnemonics</b><p>
Labels may contain mnemonics. Mnemonics are underlined characters in the label, used for keyboard navigation. Mnemonics are created by providing a string with an underscore before the mnemonic character, such as "_File". Constructors and methods that can handle mnemonics have a bool argument <em>use_underline</em> to indicate whether or not the string has a mnemonic character.<p>
Mnemonics automatically activate any activatable widget the label is inside, such as a <a class="el" href="classGFC_1_1Gtk_1_1Button.html">Button</a>; if the label is not inside the mnemonic's target widget, you have to tell the label about the target using <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_9">Gtk::Label::set_mnemonic_widget()</a>. Here's a simple example where the label is inside a button: <div class="fragment"><pre> <span class="comment">// Pressing Alt+H will activate this button</span>
Gtk::Button *button = <span class="keyword">new</span> Gtk::Button(<span class="stringliteral">"_Hello"</span>, <span class="keyword">true</span>);
</pre></div><p>
To create a mnemonic for a widget alongside the label, such as an <a class="el" href="classGFC_1_1Gtk_1_1Entry.html">Entry</a>, you have to point the label at the entry with <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_9">Gtk::Label::set_mnemonic_widget()</a>: <div class="fragment"><pre> <span class="comment">// Pressing Alt+H will activate this button</span>
Gtk::Entry *entry = <span class="keyword">new</span> Gtk::Entry;
Gtk::Label *label = <span class="keyword">new</span> Gtk::Label(<span class="stringliteral">"_Hello"</span>, <span class="keyword">true</span>);
label->set_mnemonic_widget(entry);
</pre></div><p>
<b>Markup (styled text)</b><p>
To make it easy to format text in a label (changing colors, fonts, etc.), label text can be provided in a simple markup format. Here's how to create a label with a small font: <div class="fragment"><pre> Gtk::Label *label = <span class="keyword">new</span> Gtk::Label;
label->set_markup(<span class="stringliteral">"<small>Small text</small>"</span>);
</pre></div><p>
(See complete documentation of available tags in the <a class="el" href="namespaceGFC_1_1Pango.html">Pango</a> manual.) The markup passed to <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_4">set_markup()</a> must be valid; for example, literal </>/& characters must be escaped as <, >, and &. If you pass text obtained from the user, file, or a network to <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_4">set_markup()</a>, you'll want to escape it with g_markup_escape_text(). Markup strings are just a convenient way to set the <a class="el" href="classGFC_1_1Pango_1_1AttrList.html">Pango::AttrList</a> on a label; <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_2">set_attributes()</a> may be a simpler way to set attributes in some cases. Be careful though; <a class="el" href="classGFC_1_1Pango_1_1AttrList.html">Pango::AttrList</a> tends to cause internationalization problems, unless you're applying attributes to the entire string (i.e. unless you set the range of each attribute to [0, G_MAXINT)). The reason is that specifying the start_index and end_index for a <a class="el" href="classGFC_1_1Pango_1_1Attribute.html">Pango::Attribute</a> requires knowledge of the exact string being displayed, so translations will cause problems.<p>
<b>Selectable labels</b><p>
Labels can be made selectable with <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_16">Gtk::Label::set_selectable()</a>. Selectable labels allow the user to copy the label contents to the clipboard. Only labels that contain useful-to-copy information - such as error messages - should be made selectable.<p>
<b>Text layout</b><p>
A label can contain any number of paragraphs, but will have performance problems if it contains more than a small number. Paragraphs are separated by newlines or other paragraph separators understood by <a class="el" href="namespaceGFC_1_1Pango.html">Pango</a>. Labels can automatically wrap text if you call <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_15">set_line_wrap()</a>. <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_12">set_justify()</a> sets how the lines in a label align with one another. If you want to set how the label as a whole aligns in its available space, see <a class="el" href="classGFC_1_1Gtk_1_1Misc.html#z668_0">Gtk::Misc::set_alignment()</a>.
<p>
<hr><h2>Constructor & Destructor Documentation</h2>
<a class="anchor" name="z615_0" doxytag="GFC::Gtk::Label::Label" ></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::Label::Label </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">GtkLabel * </td>
<td class="mdname" nowrap> <em>label</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>false</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_1Label.html">Label</a> from an existing GtkLabel.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>label</em> </td><td>A pointer to a GtkLabel. </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>label</em> can be a newly created GtkLabel or an existing GtkLabel (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="z617_2" doxytag="GFC::Gtk::Label::Label" ></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::Label::Label </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> & </td>
<td class="mdname" nowrap> <em>str</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>bool </td>
<td class="mdname" nowrap> <em>use_underline</em> = <code>false</code></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"><code> [explicit]</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_1Label.html">Label</a> with <em>str</em> as its text.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>str</em> </td><td>The label text. </td></tr>
<tr><td></td><td valign=top><em>use_underline</em> </td><td>Set to <em>true</em> if <em>str</em> contains a mnemonic character. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="z618_3" doxytag="GFC::Gtk::Label::get_attributes" ></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="elRef" doxygen="gfccore.tag:" href="classGFC_1_1Pointer.html">Pointer</a><<a class="el" href="classGFC_1_1Pango_1_1AttrList.html">Pango::AttrList</a>> GFC::Gtk::Label::get_attributes </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </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>
Gets the attribute list that was set on the label using <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_2">set_attributes()</a>, if any.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The attribute list, or null if none was set.</dd></dl>
<br>
This method does not reflect attributes that come from the label's markup (see <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_4">set_markup()</a>). If you want to get the effective attributes for the label, use <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_14">get_layout()</a>-><a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_3">get_attributes()</a>. </td>
</tr>
</table>
<a class="anchor" name="z618_4" doxytag="GFC::Gtk::Label::get_label" ></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="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> GFC::Gtk::Label::get_label </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </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>
Fetches the text from a label widget including any embedded underlines indicating mnemonics and <a class="el" href="namespaceGFC_1_1Pango.html">Pango</a> markup (see <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_2">get_text()</a>).
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The text of the label widget. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="z618_14" doxytag="GFC::Gtk::Label::get_layout" ></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_1Pango_1_1Layout.html">Pango::Layout</a>* GFC::Gtk::Label::get_layout </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </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>
Gets the <a class="el" href="classGFC_1_1Pango_1_1Layout.html">Pango::Layout</a> used to display the label.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The <a class="el" href="classGFC_1_1Pango_1_1Layout.html">Pango::Layout</a> for the <a class="el" href="classGFC_1_1Gtk_1_1Label.html">Label</a>.</dd></dl>
<br>
The layout is useful to e.g. convert text positions to pixel positions, in combination with <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_12">Gtk::Label::get_layout_offsets()</a>. The returned layout is owned by the label. </td>
</tr>
</table>
<a class="anchor" name="z618_12" doxytag="GFC::Gtk::Label::get_layout_offsets" ></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::Label::get_layout_offsets </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">int * </td>
<td class="mdname" nowrap> <em>x</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>int * </td>
<td class="mdname" nowrap> <em>y</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Obtains the coordinates where the label will draw the <a class="el" href="classGFC_1_1Pango_1_1Layout.html">Pango::Layout</a> representing the text in the label.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>x</em> </td><td>The location to store X offset of layout, or null. </td></tr>
<tr><td></td><td valign=top><em>y</em> </td><td>The Location to store Y offset of layout, or null.</td></tr>
</table>
</dl>
<br>
This method is useful to convert mouse events into coordinates inside the <a class="el" href="classGFC_1_1Pango_1_1Layout.html">Pango::Layout</a>, e.g. to take some action if some part of the label is clicked. Of course you will need to create an <a class="el" href="classGFC_1_1Gtk_1_1EventBox.html">EventBox</a> to receive the events, and pack the label inside it, since labels are a NO_WINDOW widget. Remember when using the <a class="el" href="classGFC_1_1Pango_1_1Layout.html">Pango::Layout</a> methods you need to convert to and from pixels using PANGO_PIXELS() or PANGO_SCALE. </td>
</tr>
</table>
<a class="anchor" name="z618_7" doxytag="GFC::Gtk::Label::get_mnemonic_keyval" ></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"> unsigned int GFC::Gtk::Label::get_mnemonic_keyval </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </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>
If the label has been set so that it has an mnemonic key this function returns the keyval used for the mnemonic accelerator.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The mnemonic accelerator if set, otherwise GDK_VoidSymbol. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="z618_8" doxytag="GFC::Gtk::Label::get_mnemonic_widget" ></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_1Widget.html">Widget</a>* GFC::Gtk::Label::get_mnemonic_widget </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </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>
Retrieves the target of the mnemonic (keyboard shortcut) of this label (see <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_9">set_mnemonic_widget()</a>).
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The target of the label's mnemonic, or null if none has been set. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="z618_11" doxytag="GFC::Gtk::Label::get_selectable" ></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::Label::get_selectable </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </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>
Gets the value set by <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_16">set_selectable()</a>.
<p>
<dl compact><dt><b>Returns:</b></dt><dd><em>true</em> if the user can copy text from the label. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="z618_13" doxytag="GFC::Gtk::Label::get_selection_bounds" ></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::Label::get_selection_bounds </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">int * </td>
<td class="mdname" nowrap> <em>start</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>int * </td>
<td class="mdname" nowrap> <em>end</em></td>
</tr>
<tr>
<td></td>
<td class="md">) </td>
<td class="md" colspan="2"> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Gets the selected range of characters in the label.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>start</em> </td><td>The location for start of selection, as a character offset. </td></tr>
<tr><td></td><td valign=top><em>end</em> </td><td>The location for end of selection, as a character offset. </td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><em>true</em> if there's a selection. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="z618_2" doxytag="GFC::Gtk::Label::get_text" ></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="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> GFC::Gtk::Label::get_text </td>
<td class="md" valign="top">( </td>
<td class="mdname1" valign="top" nowrap> </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>
Fetches the text from a label widget, as displayed on the screen.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The text in the label widget.</dd></dl>
<br>
This does not include any embedded underlines indicating mnemonics or <a class="el" href="namespaceGFC_1_1Pango.html">Pango</a> markup (see <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z618_4">get_label()</a>). </td>
</tr>
</table>
<a class="anchor" name="z619_17" doxytag="GFC::Gtk::Label::select_region" ></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::Label::select_region </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">int </td>
<td class="mdname" nowrap> <em>start_offset</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>int </td>
<td class="mdname" nowrap> <em>end_offset</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>
Selects a range of characters in the label, if the label is selectable (see <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_16">set_selectable()</a>).
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>start_offset</em> </td><td>The start offset (in characters not bytes). </td></tr>
<tr><td></td><td valign=top><em>end_offset</em> </td><td>The end offset (in characters not bytes).</td></tr>
</table>
</dl>
<br>
If the label is not selectable, this function has no effect. If start_offset or end_offset are -1, then the end of the label will be substituted. </td>
</tr>
</table>
<a class="anchor" name="z619_2" doxytag="GFC::Gtk::Label::set_attributes" ></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::Label::set_attributes </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="classGFC_1_1Pango_1_1AttrList.html">Pango::AttrList</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>attrs</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>
Sets a <a class="el" href="classGFC_1_1Pango_1_1AttrList.html">Pango::AttrList</a>; the attributes in the list are applied to the label text.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>attrs</em> </td><td>A <a class="el" href="classGFC_1_1Pango_1_1AttrList.html">Pango::AttrList</a>, or null to remove any previously set attributes.</td></tr>
</table>
</dl>
<br>
The attributes set with this method will be ignored if the "use_underline" property or the "use_markup" property is <em>true</em>. </td>
</tr>
</table>
<a class="anchor" name="z619_12" doxytag="GFC::Gtk::Label::set_justify" ></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::Label::set_justify </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="namespaceGFC_1_1Gtk.html#a326">Justification</a> </td>
<td class="mdname1" valign="top" nowrap> <em>jtype</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>
Sets the alignment of the lines in the text of the label relative to each other.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>jtype</em> </td><td>A Justification. JUSTIFY_LEFT is the default value when the widget is first created. If you instead want to set the alignment of the label as a whole, use <a class="el" href="classGFC_1_1Gtk_1_1Misc.html#z668_0">Gtk::Misc::set_alignment()</a> instead. <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_12">set_justify()</a> has no effect on labels containing only a single line. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="z619_6" doxytag="GFC::Gtk::Label::set_label" ></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::Label::set_label </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>str</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>
Sets the text of the label.
<p>
The label is interpreted as including embedded underlines and/or <a class="el" href="namespaceGFC_1_1Pango.html">Pango</a> markup depending on the values of use_underline() and use_markup(). <dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>str</em> </td><td>The new text to set for the label. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="z619_15" doxytag="GFC::Gtk::Label::set_line_wrap" ></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::Label::set_line_wrap </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">bool </td>
<td class="mdname1" valign="top" nowrap> <em>wrap</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>
Toggles line wrapping within the <a class="el" href="classGFC_1_1Gtk_1_1Label.html">Label</a> widget.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>wrap</em> </td><td>The setting.</td></tr>
</table>
</dl>
<br>
If wrap is <em>true</em> lines are broken if text exceeds the widget's size. If wrap is <em>false</em> the text will get cut off by the edge of the widget if it exceeds the widget size. </td>
</tr>
</table>
<a class="anchor" name="z619_4" doxytag="GFC::Gtk::Label::set_markup" ></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::Label::set_markup </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>str</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>
Parses str which is marked up with the <a class="el" href="namespaceGFC_1_1Pango.html">Pango</a> text markup language, setting the label's text and attribute list based on the parse results.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>str</em> </td><td>A markup string (see <a class="el" href="namespaceGFC_1_1Pango.html">Pango</a> markup format). </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="z619_8" doxytag="GFC::Gtk::Label::set_markup_with_mnemonic" ></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::Label::set_markup_with_mnemonic </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>str</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>
Parses str which is marked up with the <a class="el" href="namespaceGFC_1_1Pango.html">Pango</a> text markup language, setting the label's text and attribute list based on the parse results.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>str</em> </td><td>A markup string (see <a class="el" href="namespaceGFC_1_1Pango.html">Pango</a> markup format).</td></tr>
</table>
</dl>
<br>
If characters in str are preceded by an underscore, they are underlined indicating that they represent a keyboard accelerator called a mnemonic. The mnemonic key can be used to activate another widget, chosen automatically, or explicitly using <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_9">Gtk::Label::set_mnemonic_widget()</a>. </td>
</tr>
</table>
<a class="anchor" name="z619_9" doxytag="GFC::Gtk::Label::set_mnemonic_widget" ></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::Label::set_mnemonic_widget </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="classGFC_1_1Gtk_1_1Widget.html">Widget</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>widget</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>
If the label has been set so that it has an mnemonic key (using the constructor, <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_8">set_markup_with_mnemonic()</a>, <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_11">set_text_with_mnemonic()</a>, or the "use_underline" property) the label can be associated with a widget that is the target of the mnemonic.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>widget</em> </td><td>The target <a class="el" href="classGFC_1_1Gtk_1_1Widget.html">Widget</a>.</td></tr>
</table>
</dl>
<br>
When the label is inside a widget (like a <a class="el" href="classGFC_1_1Gtk_1_1Button.html">Button</a> or a <a class="el" href="classGFC_1_1Gtk_1_1Notebook.html">Notebook</a> tab) it is automatically associated with the correct widget, but sometimes (i.e. when the target is a <a class="el" href="classGFC_1_1Gtk_1_1Entry.html">Entry</a> next to the label) you need to set it explicitly using this method. The target widget will be accelerated by emitting "mnemonic_activate" on it. The default handler for this signal will activate the widget if there are no mnemonic collisions and toggle focus between the colliding widgets otherwise. </td>
</tr>
</table>
<a class="anchor" name="z619_14" doxytag="GFC::Gtk::Label::set_pattern" ></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::Label::set_pattern </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>pattern</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>
The pattern of underlines you want under the existing text within the <a class="el" href="classGFC_1_1Gtk_1_1Label.html">Label</a> widget.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>pattern</em> </td><td>The pattern string as described below.</td></tr>
</table>
</dl>
<br>
For example, if the current text of the label says "FooBarBaz" passing a pattern of "___ ___" will underline "Foo" and "Baz" but not "Bar". </td>
</tr>
</table>
<a class="anchor" name="z619_16" doxytag="GFC::Gtk::Label::set_selectable" ></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::Label::set_selectable </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">bool </td>
<td class="mdname1" valign="top" nowrap> <em>setting</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>
Selectable labels allow the user to select text from the label, for copy-and-paste.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>setting</em> </td><td><em>true</em> to allow selecting text in the label. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="z619_1" doxytag="GFC::Gtk::Label::set_text" ></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::Label::set_text </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>str</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>
Sets the text within the <a class="el" href="classGFC_1_1Gtk_1_1Label.html">Label</a> widget, overwriting any text that was there before.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>str</em> </td><td>The text you want to set.</td></tr>
</table>
</dl>
<br>
Note this will also clear any previously set mnemonic accelerators. </td>
</tr>
</table>
<a class="anchor" name="z619_11" doxytag="GFC::Gtk::Label::set_text_with_mnemonic" ></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::Label::set_text_with_mnemonic </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1String.html">String</a> & </td>
<td class="mdname1" valign="top" nowrap> <em>str</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>
Sets the label's text from the string <em>str</em>.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>str</em> </td><td>A string.</td></tr>
</table>
</dl>
<br>
If characters in str are preceded by an underscore, they are underlined indicatin that they represent a keyboard accelerator called a mnemonic. The mnemonic key can be used to activate another widget, chosen automatically, or explicitly using <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_9">set_mnemonic_widget()</a>. </td>
</tr>
</table>
<a class="anchor" name="z619_18" doxytag="GFC::Gtk::Label::set_use_markup" ></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::Label::set_use_markup </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">bool </td>
<td class="mdname1" valign="top" nowrap> <em>setting</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>
Sets whether the text of the label contains markup in Pango's text markup language (see <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z619_4">set_markup()</a>).
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>setting</em> </td><td><em>true</em> if the label's text should be parsed for markup. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="z619_19" doxytag="GFC::Gtk::Label::set_use_underline" ></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::Label::set_use_underline </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">bool </td>
<td class="mdname1" valign="top" nowrap> <em>setting</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>
If <em>setting</em> is true, an underline in the text indicates the next character should be used for the mnemonic accelerator key.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>setting</em> </td><td><em>true</em> if underlines in the text indicate mnemonics. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="z616_2" doxytag="GFC::Gtk::Label::populate_popup_signal" ></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"> const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Signal.html">PopulatePopupSignalType</a> <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z616_2">GFC::Gtk::Label::populate_popup_signal</a><code> [static, protected]</code> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Populate popup signal (see <a class="el" href="classGFC_1_1Gtk_1_1Label.html#z620_0">sig_populate_popup()</a>).
<p>
Calls a slot with the signature: <div class="fragment"><pre> <span class="keywordtype">void</span> function(Gtk::Menu& menu);
<span class="comment">// menu: The popup menu.</span>
</pre></div> </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="label_8hh-source.html">label.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>
|