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 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181
|
<!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::SpinButton Class Reference</h1>A GtkSpinButton C++ wrapper class.
<a href="#_details">More...</a>
<p>
<code>#include <<a class="el" href="spinbutton_8hh-source.html">gfc/gtk/spinbutton.hh</a>></code>
<p>
<p>Inheritance diagram for GFC::Gtk::SpinButton:
<p><center><img src="classGFC_1_1Gtk_1_1SpinButton.png" usemap="#GFC::Gtk::SpinButton_map" border="0" alt=""></center>
<map name="GFC::Gtk::SpinButton_map">
<area href="classGFC_1_1Gtk_1_1Entry.html" alt="GFC::Gtk::Entry" shape="rect" coords="294,280,431,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_1Editable.html" alt="GFC::Gtk::Editable" shape="rect" coords="294,224,431,248">
<area href="classGFC_1_1Gtk_1_1CellEditable.html" alt="GFC::Gtk::CellEditable" shape="rect" coords="441,224,578,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_1TypeInterface.html" alt="GFC::G::TypeInterface" shape="rect" coords="294,168,431,192">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInterface.html" alt="GFC::G::TypeInterface" shape="rect" coords="441,168,578,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="294,112,431,136">
<area doxygen="gfccore.tag:" href="classGFC_1_1G_1_1TypeInstance.html" alt="GFC::G::TypeInstance" shape="rect" coords="441,112,578,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="294,56,431,80">
<area doxygen="gfccore.tag:" href="classGFC_1_1Trackable.html" alt="GFC::Trackable" shape="rect" coords="441,56,578,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">
</map>
<a href="classGFC_1_1Gtk_1_1SpinButton-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">InputSignalType</a> <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z824_6">input_signal</a>
<dl class="el"><dd class="mdescRight">Input signal (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z828_0">sig_input()</a>). <a href="#z824_6"></a><br></dl><li>const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Signal.html">OutputSignalType</a> <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z824_7">output_signal</a>
<dl class="el"><dd class="mdescRight">Output signal (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z828_1">sig_output()</a>). <a href="#z824_7"></a><br></dl><li>const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1Signal.html">ValueChangedSignalType</a> <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z824_8">value_changed_signal</a>
<dl class="el"><dd class="mdescRight">Value changed signal (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z828_2">sig_value_changed()</a>). <a href="#z824_8"></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="z825_0" doxytag="GFC::Gtk::SpinButton::SpinButton" ></a>
<a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z825_0">SpinButton</a> ()
<dl class="el"><dd class="mdescRight">Construct a new spin button. <br></dl><li><a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z825_1">SpinButton</a> (<a class="el" href="classGFC_1_1Gtk_1_1Adjustment.html">Adjustment</a> *adjustment, double climb_rate, unsigned int digits)
<dl class="el"><dd class="mdescRight">Construct a new spin button with the specified <a class="el" href="classGFC_1_1Gtk_1_1Adjustment.html">Adjustment</a>, climb_rate and digits. <a href="#z825_1"></a><br></dl><li><a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z825_2">SpinButton</a> (double min, double max, double step=1.0)
<dl class="el"><dd class="mdescRight">Construct a new spin button without specifying an <a class="el" href="classGFC_1_1Gtk_1_1Adjustment.html">Adjustment</a>. <a href="#z825_2"></a><br></dl><li><a class="anchor" name="z825_3" doxytag="GFC::Gtk::SpinButton::~SpinButton" ></a>
virtual <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z825_3">~SpinButton</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="z826_0" doxytag="GFC::Gtk::SpinButton::gtk_spin_button" ></a>
GtkSpinButton * <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z826_0">gtk_spin_button</a> () const
<dl class="el"><dd class="mdescRight">Get a pointer to the GtkSpinButton structure. <br></dl><li><a class="anchor" name="z826_1" doxytag="GFC::Gtk::SpinButton::operator GtkSpinButton *" ></a>
<a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z826_1">operator GtkSpinButton *</a> () const
<dl class="el"><dd class="mdescRight">Conversion operator; safely converts a <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html">SpinButton</a> to a GtkSpinButton pointer. <br></dl><li><a class="anchor" name="z826_2" doxytag="GFC::Gtk::SpinButton::get_adjustment" ></a>
<a class="el" href="classGFC_1_1Gtk_1_1Adjustment.html">Adjustment</a> * <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z826_2">get_adjustment</a> () const
<dl class="el"><dd class="mdescRight">Get the adjustment associated with the <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html">SpinButton</a>. <br></dl><li>unsigned int <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z826_3">get_digits</a> () const
<dl class="el"><dd class="mdescRight">Fetches the precision of the spin button (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_2">set_digits()</a>). <a href="#z826_3"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z826_4">get_increments</a> (double *step, double *page) const
<dl class="el"><dd class="mdescRight">Gets the current step and page the increments used by the spin button (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_3">set_increments()</a>). <a href="#z826_4"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z826_5">get_range</a> (double *min, double *max) const
<dl class="el"><dd class="mdescRight">Gets the range allowed for the spin button (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_4">set_range()</a>). <a href="#z826_5"></a><br></dl><li><a class="anchor" name="z826_6" doxytag="GFC::Gtk::SpinButton::get_value" ></a>
double <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z826_6">get_value</a> () const
<dl class="el"><dd class="mdescRight">Get the value in the spin button. <br></dl><li>int <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z826_7">get_value_as_int</a> () const
<dl class="el"><dd class="mdescRight">Get the value of the spin button represented as an integer. <a href="#z826_7"></a><br></dl><li><a class="el" href="namespaceGFC_1_1Gtk.html#a359">SpinButtonUpdatePolicy</a> <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z826_8">get_update_policy</a> () const
<dl class="el"><dd class="mdescRight">Gets the update behavior of the spin button (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_6">set_update_policy()</a>). <a href="#z826_8"></a><br></dl><li>bool <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z826_9">get_numeric</a> () const
<dl class="el"><dd class="mdescRight">Returns whether non-numeric text can be typed into the spin button (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_7">set_numeric()</a>). <a href="#z826_9"></a><br></dl><li>bool <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z826_10">get_wrap</a> () const
<dl class="el"><dd class="mdescRight">Returns whether the spin button's value wraps around to the opposite limit when the upper or lower limit of the range is exceeded (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_9">set_wrap()</a>). <a href="#z826_10"></a><br></dl><li>bool <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z826_11">get_snap_to_ticks</a> () const
<dl class="el"><dd class="mdescRight">Returns whether the values are corrected to the nearest step (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_10">set_snap_to_ticks()</a>). <a href="#z826_11"></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_1SpinButton.html#z827_0">configure</a> (<a class="el" href="classGFC_1_1Gtk_1_1Adjustment.html">Adjustment</a> *adjustment, double climb_rate, unsigned int digits)
<dl class="el"><dd class="mdescRight">Changes the properties of an existing spin button. <a href="#z827_0"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_1">set_adjustment</a> (<a class="el" href="classGFC_1_1Gtk_1_1Adjustment.html">Adjustment</a> *adjustment)
<dl class="el"><dd class="mdescRight">Replaces the <a class="el" href="classGFC_1_1Gtk_1_1Adjustment.html">Adjustment</a> associated with the spin button. <a href="#z827_1"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_2">set_digits</a> (unsigned int digits)
<dl class="el"><dd class="mdescRight">Set the precision to be displayed by the spin button. <a href="#z827_2"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_3">set_increments</a> (double step, double page)
<dl class="el"><dd class="mdescRight">Sets the step and page increments for the spin button. <a href="#z827_3"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_4">set_range</a> (double min, double max)
<dl class="el"><dd class="mdescRight">Sets the minimum and maximum allowable values for the spin button. <a href="#z827_4"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_5">set_value</a> (double value)
<dl class="el"><dd class="mdescRight">Set the value of the spin button. <a href="#z827_5"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_6">set_update_policy</a> (<a class="el" href="namespaceGFC_1_1Gtk.html#a359">SpinButtonUpdatePolicy</a> policy)
<dl class="el"><dd class="mdescRight">Sets the update behavior of the spin button. <a href="#z827_6"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_7">set_numeric</a> (bool numeric)
<dl class="el"><dd class="mdescRight">Sets the flag that determines if non-numeric text can be typed into the spin button. <a href="#z827_7"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_8">spin</a> (<a class="el" href="namespaceGFC_1_1Gtk.html#a358">SpinType</a> direction, double increment)
<dl class="el"><dd class="mdescRight">Increment or decrement a spin button's value in a specified direction by a specified amount. <a href="#z827_8"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_9">set_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">Sets the flag that determines if a spin button value wraps around to the opposite limit when the upper or lower limit of the range is exceeded. <a href="#z827_9"></a><br></dl><li>void <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_10">set_snap_to_ticks</a> (bool snap_to_ticks)
<dl class="el"><dd class="mdescRight">Sets the policy as to whether values are corrected to the nearest step increment when a spin button is activated after providing an invalid value. <a href="#z827_10"></a><br></dl><li><a class="anchor" name="z827_11" doxytag="GFC::Gtk::SpinButton::update" ></a>
void <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_11">update</a> ()
<dl class="el"><dd class="mdescRight">Manually force an update of the spin button. <br></dl></ul>
<tr><td colspan="2"><div class="groupHeader">Signal Proxies</div></td></tr>
<ul>
<li><a class="anchor" name="z828_0" doxytag="GFC::Gtk::SpinButton::sig_input" ></a>
const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1SignalProxy.html">InputSignalProxy</a> <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z828_0">sig_input</a> ()
<dl class="el"><dd class="mdescRight">Connect to the input_signal; emitted when a new value is displayed in the spin button. <br></dl><li><a class="anchor" name="z828_1" doxytag="GFC::Gtk::SpinButton::sig_output" ></a>
const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1SignalProxy.html">OutputSignalProxy</a> <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z828_1">sig_output</a> ()
<dl class="el"><dd class="mdescRight">Connect to the output_signal; emitted to display the new value in the spin button. <br></dl><li><a class="anchor" name="z828_2" doxytag="GFC::Gtk::SpinButton::sig_value_changed" ></a>
const <a class="elRef" doxygen="gfccore.tag:" href="classGFC_1_1G_1_1SignalProxy.html">ValueChangedSignalProxy</a> <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z828_2">sig_value_changed</a> ()
<dl class="el"><dd class="mdescRight">Connect to the value_changed_signal; emitted when the value has changed. <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_1SpinButton.html#z823_0">SpinButton</a> (GtkSpinButton *spin_button, 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_1SpinButton.html">SpinButton</a> from an existing GtkSpinButton. <a href="#z823_0"></a><br></dl></ul>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A GtkSpinButton C++ wrapper class.
<p>
A <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html">SpinButton</a> is an ideal way to allow the user to set the value of some attribute. Rather than having to directly type a number into a <a class="el" href="classGFC_1_1Gtk_1_1Entry.html">Entry</a>, <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html">SpinButton</a> allows the user to click on one of two arrows to increment or decrement the displayed value. A value can still be typed in, with the bonus that it can be checked to ensure it is in a given range. The main properties of a <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html">SpinButton</a> are through an <a class="el" href="classGFC_1_1Gtk_1_1Adjustment.html">Adjustment</a>. See the <a class="el" href="classGFC_1_1Gtk_1_1Adjustment.html">Adjustment</a> section for more details about an adjustment's properties.<p>
<b>Example 1:</b> Using a <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html">SpinButton</a> to get an integer. <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/adjustment.h></span>
<span class="preprocessor"> #include <gfc/gtk/spinbutton.h></span>
<span class="keyword">using</span> <span class="keyword">namespace </span>GFC;
<span class="keyword">class </span>Window : <span class="keyword">public</span> Gtk::Window
{
Gtk::SpinButton *spinner;
<span class="keyword">public</span>:
Window();
<span class="keywordtype">int</span> grab_value() const;
};
Window::Window()
{
set_border_width(5);
Gtk::Adjustment *spinner_adj = <span class="keyword">new</span> Gtk::Adjustment(50.0, 0.0, 100.0, 1.0, 5.0, 5.0);
<span class="comment">// Creates the spinner, with no decimal places.</span>
spinner = <span class="keyword">new</span> Gtk::SpinButton(spinner_adj, 1.0, 0);
add(*spinner);
<a class="code" href="classGFC_1_1Gtk_1_1Widget.html#z1053_7">show_all</a>();
}
<span class="keywordtype">int</span>
Window::grab_value()<span class="keyword"> const</span>
<span class="keyword"> </span>{
<span class="keywordflow">return</span> spinner->get_value_as_int();
}
<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);
Window 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>
<b>Example 2:</b> Using a <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html">SpinButton</a> to get a floating point value. <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/adjustment.h></span>
<span class="preprocessor"> #include <gfc/gtk/spinbutton.h></span>
<span class="keyword">using</span> <span class="keyword">namespace </span>GFC;
<span class="keyword">class </span>Window : <span class="keyword">public</span> Gtk::Window
{
Gtk::SpinButton *spinner;
<span class="keyword">public</span>:
Window();
<span class="keywordtype">double</span> grab_value() const;
};
Window::Window()
{
set_border_width(5);
Gtk::Adjustment *spinner_adj = <span class="keyword">new</span> Gtk::Adjustment(2.500, 0.0, 5.0, 0.001, 0.1, 0.1);
<span class="comment">// Creates the spinner, with no decimal places.</span>
spinner = <span class="keyword">new</span> Gtk::SpinButton(spinner_adj, 0.001, 3);
add(*spinner);
<a class="code" href="classGFC_1_1Gtk_1_1Widget.html#z1053_7">show_all</a>();
}
<span class="keywordtype">double</span>
Window::grab_value()<span class="keyword"> const</span>
<span class="keyword"> </span>{
<span class="keywordflow">return</span> spinner->get_value();
}
<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);
Window 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="z823_0" doxytag="GFC::Gtk::SpinButton::SpinButton" ></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::SpinButton::SpinButton </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">GtkSpinButton * </td>
<td class="mdname" nowrap> <em>spin_button</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_1SpinButton.html">SpinButton</a> from an existing GtkSpinButton.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>spin_button</em> </td><td>A pointer to a GtkSpinButton. </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>spin_button</em> can be a newly created GtkSpinButton or an existing GtkSpinButton (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="z825_1" doxytag="GFC::Gtk::SpinButton::SpinButton" ></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::SpinButton::SpinButton </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="classGFC_1_1Gtk_1_1Adjustment.html">Adjustment</a> * </td>
<td class="mdname" nowrap> <em>adjustment</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>double </td>
<td class="mdname" nowrap> <em>climb_rate</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>unsigned int </td>
<td class="mdname" nowrap> <em>digits</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 new spin button with the specified <a class="el" href="classGFC_1_1Gtk_1_1Adjustment.html">Adjustment</a>, climb_rate and digits.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>adjustment</em> </td><td>The <a class="el" href="classGFC_1_1Gtk_1_1Adjustment.html">Adjustment</a> object that this spin button should use. </td></tr>
<tr><td></td><td valign=top><em>climb_rate</em> </td><td>Specifies how much the spin button changes when an arrow is clicked on. </td></tr>
<tr><td></td><td valign=top><em>digits</em> </td><td>The number of decimal places to display. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="z825_2" doxytag="GFC::Gtk::SpinButton::SpinButton" ></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::SpinButton::SpinButton </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">double </td>
<td class="mdname" nowrap> <em>min</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>double </td>
<td class="mdname" nowrap> <em>max</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>double </td>
<td class="mdname" nowrap> <em>step</em> = <code>1.0</code></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 new spin button without specifying an <a class="el" href="classGFC_1_1Gtk_1_1Adjustment.html">Adjustment</a>.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>min</em> </td><td>The minimum allowable value. </td></tr>
<tr><td></td><td valign=top><em>max</em> </td><td>The maximum allowable value. </td></tr>
<tr><td></td><td valign=top><em>step</em> </td><td>The increment added or subtracted by spinning the widget.</td></tr>
</table>
</dl>
<br>
This is a convenience constructor that allows creation of a numeric <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html">SpinButton</a> without manually creating an adjustment. The value is initially set to the minimum value and a page increment of 10 * step is the default. The precision of the spinbutton is equivalent to the precision of step. </td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="z827_0" doxytag="GFC::Gtk::SpinButton::configure" ></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::SpinButton::configure </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="classGFC_1_1Gtk_1_1Adjustment.html">Adjustment</a> * </td>
<td class="mdname" nowrap> <em>adjustment</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>double </td>
<td class="mdname" nowrap> <em>climb_rate</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>unsigned int </td>
<td class="mdname" nowrap> <em>digits</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>
Changes the properties of an existing spin button.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>adjustment</em> </td><td>The new <a class="el" href="classGFC_1_1Gtk_1_1Adjustment.html">Adjustment</a> object this spin button should use. </td></tr>
<tr><td></td><td valign=top><em>climb_rate</em> </td><td>How much the spin button changes when an arrow is clicked on. </td></tr>
<tr><td></td><td valign=top><em>digits</em> </td><td>The number of decimal places to display in the spin button.</td></tr>
</table>
</dl>
<br>
The adjustment, climb rate, and number of decimal places are all changed accordingly, after this function call. </td>
</tr>
</table>
<a class="anchor" name="z826_3" doxytag="GFC::Gtk::SpinButton::get_digits" ></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::SpinButton::get_digits </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 precision of the spin button (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_2">set_digits()</a>).
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The current precision. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="z826_4" doxytag="GFC::Gtk::SpinButton::get_increments" ></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::SpinButton::get_increments </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">double * </td>
<td class="mdname" nowrap> <em>step</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>double * </td>
<td class="mdname" nowrap> <em>page</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 current step and page the increments used by the spin button (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_3">set_increments()</a>).
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>step</em> </td><td>The location to store step increment, or null. </td></tr>
<tr><td></td><td valign=top><em>page</em> </td><td>The location to store page increment, or null. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="z826_9" doxytag="GFC::Gtk::SpinButton::get_numeric" ></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::SpinButton::get_numeric </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>
Returns whether non-numeric text can be typed into the spin button (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_7">set_numeric()</a>).
<p>
<dl compact><dt><b>Returns:</b></dt><dd><em>true</em> if only numeric text can be entered. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="z826_5" doxytag="GFC::Gtk::SpinButton::get_range" ></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::SpinButton::get_range </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">double * </td>
<td class="mdname" nowrap> <em>min</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>double * </td>
<td class="mdname" nowrap> <em>max</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 range allowed for the spin button (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_4">set_range()</a>).
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>min</em> </td><td>The location to store minimum allowed value, or null. </td></tr>
<tr><td></td><td valign=top><em>max</em> </td><td>The location to store maximum allowed value, or null. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="z826_11" doxytag="GFC::Gtk::SpinButton::get_snap_to_ticks" ></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::SpinButton::get_snap_to_ticks </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>
Returns whether the values are corrected to the nearest step (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_10">set_snap_to_ticks()</a>).
<p>
<dl compact><dt><b>Returns:</b></dt><dd><em>true</em> if values are snapped to the nearest step. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="z826_8" doxytag="GFC::Gtk::SpinButton::get_update_policy" ></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="namespaceGFC_1_1Gtk.html#a359">SpinButtonUpdatePolicy</a> GFC::Gtk::SpinButton::get_update_policy </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 update behavior of the spin button (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_6">set_update_policy()</a>).
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The current update policy. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="z826_7" doxytag="GFC::Gtk::SpinButton::get_value_as_int" ></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"> int GFC::Gtk::SpinButton::get_value_as_int </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>
Get the value of the spin button represented as an integer.
<p>
<dl compact><dt><b>Returns:</b></dt><dd>The value of the spin button. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="z826_10" doxytag="GFC::Gtk::SpinButton::get_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"> bool GFC::Gtk::SpinButton::get_wrap </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>
Returns whether the spin button's value wraps around to the opposite limit when the upper or lower limit of the range is exceeded (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z827_9">set_wrap()</a>).
<p>
<dl compact><dt><b>Returns:</b></dt><dd><em>true</em> if the spin button wraps around. </dd></dl>
</td>
</tr>
</table>
<a class="anchor" name="z827_1" doxytag="GFC::Gtk::SpinButton::set_adjustment" ></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::SpinButton::set_adjustment </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="classGFC_1_1Gtk_1_1Adjustment.html">Adjustment</a> * </td>
<td class="mdname1" valign="top" nowrap> <em>adjustment</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>
Replaces the <a class="el" href="classGFC_1_1Gtk_1_1Adjustment.html">Adjustment</a> associated with the spin button.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>adjustment</em> </td><td>An <a class="el" href="classGFC_1_1Gtk_1_1Adjustment.html">Adjustment</a> to replace the existing adjustment. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="z827_2" doxytag="GFC::Gtk::SpinButton::set_digits" ></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::SpinButton::set_digits </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">unsigned int </td>
<td class="mdname1" valign="top" nowrap> <em>digits</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>
Set the precision to be displayed by the spin button.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>digits</em> </td><td>The number of digits to be displayed for the spin button's value.</td></tr>
</table>
</dl>
<br>
Up to 20 digit precision is allowed. </td>
</tr>
</table>
<a class="anchor" name="z827_3" doxytag="GFC::Gtk::SpinButton::set_increments" ></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::SpinButton::set_increments </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">double </td>
<td class="mdname" nowrap> <em>step</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>double </td>
<td class="mdname" nowrap> <em>page</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 step and page increments for the spin button.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>step</em> </td><td>The increment applied for a button 1 press. </td></tr>
<tr><td></td><td valign=top><em>page</em> </td><td>The increment applied for a button 2 press.</td></tr>
</table>
</dl>
<br>
This affects how quickly the value changes when the spin button's arrows are activated. </td>
</tr>
</table>
<a class="anchor" name="z827_7" doxytag="GFC::Gtk::SpinButton::set_numeric" ></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::SpinButton::set_numeric </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">bool </td>
<td class="mdname1" valign="top" nowrap> <em>numeric</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 flag that determines if non-numeric text can be typed into the spin button.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>numeric</em> </td><td><em>true</em> if only numeric entry is allowed. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="z827_4" doxytag="GFC::Gtk::SpinButton::set_range" ></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::SpinButton::set_range </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">double </td>
<td class="mdname" nowrap> <em>min</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>double </td>
<td class="mdname" nowrap> <em>max</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 minimum and maximum allowable values for the spin button.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>min</em> </td><td>The minimum allowable value. </td></tr>
<tr><td></td><td valign=top><em>max</em> </td><td>The maximum allowable value. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="z827_10" doxytag="GFC::Gtk::SpinButton::set_snap_to_ticks" ></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::SpinButton::set_snap_to_ticks </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">bool </td>
<td class="mdname1" valign="top" nowrap> <em>snap_to_ticks</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 policy as to whether values are corrected to the nearest step increment when a spin button is activated after providing an invalid value.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>snap_to_ticks</em> </td><td>A flag indicating if invalid values should be corrected. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="z827_6" doxytag="GFC::Gtk::SpinButton::set_update_policy" ></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::SpinButton::set_update_policy </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="namespaceGFC_1_1Gtk.html#a359">SpinButtonUpdatePolicy</a> </td>
<td class="mdname1" valign="top" nowrap> <em>policy</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 update behavior of the spin button.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>policy</em> </td><td>A SpinButtonUpdatePolicy value.</td></tr>
</table>
</dl>
<br>
This determines whether the spin button is always updated or only when a valid value is set. </td>
</tr>
</table>
<a class="anchor" name="z827_5" doxytag="GFC::Gtk::SpinButton::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::SpinButton::set_value </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top">double </td>
<td class="mdname1" valign="top" nowrap> <em>value</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>
Set the value of the spin button.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>value</em> </td><td>The new value. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="z827_9" doxytag="GFC::Gtk::SpinButton::set_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::SpinButton::set_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>
Sets the flag that determines if a spin button value wraps around to the opposite limit when the upper or lower limit of the range is exceeded.
<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><em>true</em> if wrapping behavior is performed. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<a class="anchor" name="z827_8" doxytag="GFC::Gtk::SpinButton::spin" ></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::SpinButton::spin </td>
<td class="md" valign="top">( </td>
<td class="md" nowrap valign="top"><a class="el" href="namespaceGFC_1_1Gtk.html#a358">SpinType</a> </td>
<td class="mdname" nowrap> <em>direction</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td></td>
<td class="md" nowrap>double </td>
<td class="mdname" nowrap> <em>increment</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>
Increment or decrement a spin button's value in a specified direction by a specified amount.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td></td><td valign=top><em>direction</em> </td><td>A SpinType indicating the direction to spin. </td></tr>
<tr><td></td><td valign=top><em>increment</em> </td><td>The step increment to apply in the specified direction. </td></tr>
</table>
</dl>
</td>
</tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="z824_6" doxytag="GFC::Gtk::SpinButton::input_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">InputSignalType</a> <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z824_6">GFC::Gtk::SpinButton::input_signal</a><code> [static, protected]</code> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Input signal (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z828_0">sig_input()</a>).
<p>
Calls a slot with the signature: <div class="fragment"><pre> <span class="keywordtype">int</span> function(<span class="keywordtype">double</span> *new_value);
<span class="comment">// new_value: The new value of the spin button.</span>
<span class="comment">// return: -1 if an error occurs, otherwise 0.</span>
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="z824_7" doxytag="GFC::Gtk::SpinButton::output_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">OutputSignalType</a> <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z824_7">GFC::Gtk::SpinButton::output_signal</a><code> [static, protected]</code> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Output signal (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z828_1">sig_output()</a>).
<p>
Calls a slot with the signature: <div class="fragment"><pre> <span class="keywordtype">int</span> function();
</pre></div> </td>
</tr>
</table>
<a class="anchor" name="z824_8" doxytag="GFC::Gtk::SpinButton::value_changed_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">ValueChangedSignalType</a> <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z824_8">GFC::Gtk::SpinButton::value_changed_signal</a><code> [static, protected]</code> </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
</td>
<td>
<p>
Value changed signal (see <a class="el" href="classGFC_1_1Gtk_1_1SpinButton.html#z828_2">sig_value_changed()</a>).
<p>
Calls a slot with the signature: <div class="fragment"><pre> <span class="keywordtype">void</span> function();
</pre></div> </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="spinbutton_8hh-source.html">spinbutton.hh</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Aug 24 00:34:42 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>
|