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 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkDialog: GTK+ 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
<link rel="up" href="WindowWidgets.html" title="Windows">
<link rel="prev" href="GtkWindow.html" title="GtkWindow">
<link rel="next" href="GtkMessageDialog.html" title="GtkMessageDialog">
<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#GtkDialog.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#GtkDialog.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span>
<a href="#GtkDialog.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties"> <span class="dim">|</span>
<a href="#GtkDialog.properties" class="shortcut">Properties</a></span><span id="nav_style_properties"> <span class="dim">|</span>
<a href="#GtkDialog.style-properties" class="shortcut">Style Properties</a></span><span id="nav_signals"> <span class="dim">|</span>
<a href="#GtkDialog.signals" class="shortcut">Signals</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="WindowWidgets.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GtkWindow.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GtkMessageDialog.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GtkDialog"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkDialog.top_of_page"></a>GtkDialog</span></h2>
<p>GtkDialog — Create popup windows</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GtkDialog.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-new" title="gtk_dialog_new ()">gtk_dialog_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-new-with-buttons" title="gtk_dialog_new_with_buttons ()">gtk_dialog_new_with_buttons</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()">gtk_dialog_run</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-response" title="gtk_dialog_response ()">gtk_dialog_response</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-add-button" title="gtk_dialog_add_button ()">gtk_dialog_add_button</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-add-buttons" title="gtk_dialog_add_buttons ()">gtk_dialog_add_buttons</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-add-action-widget" title="gtk_dialog_add_action_widget ()">gtk_dialog_add_action_widget</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-set-default-response" title="gtk_dialog_set_default_response ()">gtk_dialog_set_default_response</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-set-response-sensitive" title="gtk_dialog_set_response_sensitive ()">gtk_dialog_set_response_sensitive</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-get-response-for-widget" title="gtk_dialog_get_response_for_widget ()">gtk_dialog_get_response_for_widget</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-get-widget-for-response" title="gtk_dialog_get_widget_for_response ()">gtk_dialog_get_widget_for_response</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-get-action-area" title="gtk_dialog_get_action_area ()">gtk_dialog_get_action_area</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-get-content-area" title="gtk_dialog_get_content_area ()">gtk_dialog_get_content_area</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-get-header-bar" title="gtk_dialog_get_header_bar ()">gtk_dialog_get_header_bar</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-alternative-dialog-button-order" title="gtk_alternative_dialog_button_order ()">gtk_alternative_dialog_button_order</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-set-alternative-button-order" title="gtk_dialog_set_alternative_button_order ()">gtk_dialog_set_alternative_button_order</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkDialog.html#gtk-dialog-set-alternative-button-order-from-array" title="gtk_dialog_set_alternative_button_order_from_array ()">gtk_dialog_set_alternative_button_order_from_array</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkDialog.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody><tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="GtkDialog.html#GtkDialog--use-header-bar" title="The “use-header-bar” property">use-header-bar</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkDialog.style-properties"></a><h2>Style Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="style_properties_type">
<col width="300px" class="style_properties_name">
<col width="200px" class="style_properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="GtkDialog.html#GtkDialog--s-action-area-border" title="The “action-area-border” style property">action-area-border</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="GtkDialog.html#GtkDialog--s-button-spacing" title="The “button-spacing” style property">button-spacing</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="GtkDialog.html#GtkDialog--s-content-area-border" title="The “content-area-border” style property">content-area-border</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></td>
<td class="property_name"><a class="link" href="GtkDialog.html#GtkDialog--s-content-area-spacing" title="The “content-area-spacing” style property">content-area-spacing</a></td>
<td class="property_flags">Read</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkDialog.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signals_return">
<col width="300px" class="signals_name">
<col width="200px" class="signals_flags">
</colgroup>
<tbody>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkDialog.html#GtkDialog-close" title="The “close” signal">close</a></td>
<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkDialog.html#GtkDialog-response" title="The “response” signal">response</a></td>
<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkDialog.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GtkDialog.html#GtkDialog-struct" title="struct GtkDialog">GtkDialog</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GtkDialog.html#GtkDialogClass" title="struct GtkDialogClass">GtkDialogClass</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GtkDialog.html#GtkDialogFlags" title="enum GtkDialogFlags">GtkDialogFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="GtkDialog.html#GtkResponseType" title="enum GtkResponseType">GtkResponseType</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkDialog.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
<span class="lineart">╰──</span> <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
<span class="lineart">╰──</span> <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
<span class="lineart">╰──</span> <a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
<span class="lineart">╰──</span> <a class="link" href="GtkBin.html" title="GtkBin">GtkBin</a>
<span class="lineart">╰──</span> <a class="link" href="GtkWindow.html" title="GtkWindow">GtkWindow</a>
<span class="lineart">╰──</span> GtkDialog
<span class="lineart">├──</span> <a class="link" href="GtkAboutDialog.html" title="GtkAboutDialog">GtkAboutDialog</a>
<span class="lineart">├──</span> <a class="link" href="GtkAppChooserDialog.html" title="GtkAppChooserDialog">GtkAppChooserDialog</a>
<span class="lineart">├──</span> <a class="link" href="GtkColorChooserDialog.html" title="GtkColorChooserDialog">GtkColorChooserDialog</a>
<span class="lineart">├──</span> <a class="link" href="GtkColorSelectionDialog.html" title="GtkColorSelectionDialog">GtkColorSelectionDialog</a>
<span class="lineart">├──</span> <a class="link" href="GtkFileChooserDialog.html" title="GtkFileChooserDialog">GtkFileChooserDialog</a>
<span class="lineart">├──</span> <a class="link" href="GtkFontChooserDialog.html" title="GtkFontChooserDialog">GtkFontChooserDialog</a>
<span class="lineart">├──</span> <a class="link" href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog">GtkFontSelectionDialog</a>
<span class="lineart">├──</span> <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog">GtkMessageDialog</a>
<span class="lineart">├──</span> <a class="link" href="GtkPageSetupUnixDialog.html" title="GtkPageSetupUnixDialog">GtkPageSetupUnixDialog</a>
<span class="lineart">├──</span> <a class="link" href="GtkPrintUnixDialog.html" title="GtkPrintUnixDialog">GtkPrintUnixDialog</a>
<span class="lineart">╰──</span> <a class="link" href="GtkRecentChooserDialog.html" title="GtkRecentChooserDialog">GtkRecentChooserDialog</a>
</pre>
</div>
<div class="refsect1">
<a name="GtkDialog.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GtkDialog implements
AtkImplementorIface and <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>.</p>
</div>
<div class="refsect1">
<a name="GtkDialog.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <gtk/gtk.h>
</pre>
</div>
<div class="refsect1">
<a name="GtkDialog.description"></a><h2>Description</h2>
<p>Dialog boxes are a convenient way to prompt the user for a small amount
of input, e.g. to display a message, ask a question, or anything else
that does not require extensive effort on the user’s part.</p>
<p>GTK+ treats a dialog as a window split vertically. The top section is a
<a class="link" href="GtkVBox.html" title="GtkVBox"><span class="type">GtkVBox</span></a>, and is where widgets such as a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> or a <a class="link" href="GtkEntry.html" title="GtkEntry"><span class="type">GtkEntry</span></a> should
be packed. The bottom area is known as the
“action area”. This is generally used for
packing buttons into the dialog which may perform functions such as
cancel, ok, or apply.</p>
<p><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> boxes are created with a call to <a class="link" href="GtkDialog.html#gtk-dialog-new" title="gtk_dialog_new ()"><code class="function">gtk_dialog_new()</code></a> or
<a class="link" href="GtkDialog.html#gtk-dialog-new-with-buttons" title="gtk_dialog_new_with_buttons ()"><code class="function">gtk_dialog_new_with_buttons()</code></a>. <a class="link" href="GtkDialog.html#gtk-dialog-new-with-buttons" title="gtk_dialog_new_with_buttons ()"><code class="function">gtk_dialog_new_with_buttons()</code></a> is
recommended; it allows you to set the dialog title, some convenient
flags, and add simple buttons.</p>
<p>If “dialog” is a newly created dialog, the two primary areas of the
window can be accessed through <a class="link" href="GtkDialog.html#gtk-dialog-get-content-area" title="gtk_dialog_get_content_area ()"><code class="function">gtk_dialog_get_content_area()</code></a> and
<a class="link" href="GtkDialog.html#gtk-dialog-get-action-area" title="gtk_dialog_get_action_area ()"><code class="function">gtk_dialog_get_action_area()</code></a>, as can be seen from the example below.</p>
<p>A “modal” dialog (that is, one which freezes the rest of the application
from user input), can be created by calling <a class="link" href="GtkWindow.html#gtk-window-set-modal" title="gtk_window_set_modal ()"><code class="function">gtk_window_set_modal()</code></a> on the
dialog. Use the <code class="function">GTK_WINDOW()</code> macro to cast the widget returned from
<a class="link" href="GtkDialog.html#gtk-dialog-new" title="gtk_dialog_new ()"><code class="function">gtk_dialog_new()</code></a> into a <a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a>. When using <a class="link" href="GtkDialog.html#gtk-dialog-new-with-buttons" title="gtk_dialog_new_with_buttons ()"><code class="function">gtk_dialog_new_with_buttons()</code></a>
you can also pass the <a class="link" href="GtkDialog.html#GTK-DIALOG-MODAL:CAPS"><span class="type">GTK_DIALOG_MODAL</span></a> flag to make a dialog modal.</p>
<p>If you add buttons to <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> using <a class="link" href="GtkDialog.html#gtk-dialog-new-with-buttons" title="gtk_dialog_new_with_buttons ()"><code class="function">gtk_dialog_new_with_buttons()</code></a>,
<a class="link" href="GtkDialog.html#gtk-dialog-add-button" title="gtk_dialog_add_button ()"><code class="function">gtk_dialog_add_button()</code></a>, <a class="link" href="GtkDialog.html#gtk-dialog-add-buttons" title="gtk_dialog_add_buttons ()"><code class="function">gtk_dialog_add_buttons()</code></a>, or
<a class="link" href="GtkDialog.html#gtk-dialog-add-action-widget" title="gtk_dialog_add_action_widget ()"><code class="function">gtk_dialog_add_action_widget()</code></a>, clicking the button will emit a signal
called <a class="link" href="GtkDialog.html#GtkDialog-response" title="The “response” signal"><span class="type">“response”</span></a> with a response ID that you specified. GTK+
will never assign a meaning to positive response IDs; these are entirely
user-defined. But for convenience, you can use the response IDs in the
<a class="link" href="GtkDialog.html#GtkResponseType" title="enum GtkResponseType"><span class="type">GtkResponseType</span></a> enumeration (these all have values less than zero). If
a dialog receives a delete event, the <a class="link" href="GtkDialog.html#GtkDialog-response" title="The “response” signal"><span class="type">“response”</span></a> signal will
be emitted with a response ID of <a class="link" href="GtkDialog.html#GTK-RESPONSE-DELETE-EVENT:CAPS"><span class="type">GTK_RESPONSE_DELETE_EVENT</span></a>.</p>
<p>If you want to block waiting for a dialog to return before returning
control flow to your code, you can call <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a>. This function
enters a recursive main loop and waits for the user to respond to the
dialog, returning the response ID corresponding to the button the user
clicked.</p>
<p>For the simple dialog in the following example, in reality you’d probably
use <a class="link" href="GtkMessageDialog.html" title="GtkMessageDialog"><span class="type">GtkMessageDialog</span></a> to save yourself some effort. But you’d need to
create the dialog contents manually if you had more than a simple message
in the dialog.</p>
<p>An example for simple GtkDialog usage:</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="gtkdoc slc">// Function to open a dialog box with a message</span>
<span class="gtkdoc kwb">void</span>
<span class="function">quick_message</span> <span class="gtkdoc opt">(</span>GtkWindow <span class="gtkdoc opt">*</span>parent<span class="gtkdoc opt">,</span> gchar <span class="gtkdoc opt">*</span>message<span class="gtkdoc opt">)</span>
<span class="gtkdoc opt">{</span>
GtkWidget <span class="gtkdoc opt">*</span>dialog<span class="gtkdoc opt">, *</span>label<span class="gtkdoc opt">, *</span>content_area<span class="gtkdoc opt">;</span>
GtkDialogFlags flags<span class="gtkdoc opt">;</span>
<span class="gtkdoc slc">// Create the widgets</span>
flags <span class="gtkdoc opt">=</span> GTK_DIALOG_DESTROY_WITH_PARENT<span class="gtkdoc opt">;</span>
dialog <span class="gtkdoc opt">=</span> <span class="function"><a href="GtkDialog.html#gtk-dialog-new-with-buttons">gtk_dialog_new_with_buttons</a></span> <span class="gtkdoc opt">(</span><span class="string">"Message"</span><span class="gtkdoc opt">,</span>
parent<span class="gtkdoc opt">,</span>
flags<span class="gtkdoc opt">,</span>
<span class="function">_</span><span class="gtkdoc opt">(</span><span class="string">"_OK"</span><span class="gtkdoc opt">),</span>
GTK_RESPONSE_NONE<span class="gtkdoc opt">,</span>
NULL<span class="gtkdoc opt">);</span>
content_area <span class="gtkdoc opt">=</span> <span class="function"><a href="GtkDialog.html#gtk-dialog-get-content-area">gtk_dialog_get_content_area</a></span> <span class="gtkdoc opt">(</span><span class="function">GTK_DIALOG</span> <span class="gtkdoc opt">(</span>dialog<span class="gtkdoc opt">));</span>
label <span class="gtkdoc opt">=</span> <span class="function"><a href="GtkLabel.html#gtk-label-new">gtk_label_new</a></span> <span class="gtkdoc opt">(</span>message<span class="gtkdoc opt">);</span>
<span class="gtkdoc slc">// Ensure that the dialog box is destroyed when the user responds</span>
<span class="function"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#g-signal-connect-swapped">g_signal_connect_swapped</a></span> <span class="gtkdoc opt">(</span>dialog<span class="gtkdoc opt">,</span>
<span class="string">"response"</span><span class="gtkdoc opt">,</span>
<span class="function"><a href="https://developer.gnome.org/gobject/unstable/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span> <span class="gtkdoc opt">(</span>gtk_widget_destroy<span class="gtkdoc opt">),</span>
dialog<span class="gtkdoc opt">);</span>
<span class="gtkdoc slc">// Add the label, and show everything we’ve added</span>
<span class="function"><a href="GtkContainer.html#gtk-container-add">gtk_container_add</a></span> <span class="gtkdoc opt">(</span><span class="function">GTK_CONTAINER</span> <span class="gtkdoc opt">(</span>content_area<span class="gtkdoc opt">),</span> label<span class="gtkdoc opt">);</span>
<span class="function"><a href="GtkWidget.html#gtk-widget-show-all">gtk_widget_show_all</a></span> <span class="gtkdoc opt">(</span>dialog<span class="gtkdoc opt">);</span>
<span class="gtkdoc opt">}</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<div class="refsect2">
<a name="id-1.3.6.3.11.13"></a><h3>GtkDialog as GtkBuildable</h3>
<p>The GtkDialog implementation of the <a class="link" href="GtkBuildable.html" title="GtkBuildable"><span class="type">GtkBuildable</span></a> interface exposes the
<em class="parameter"><code>vbox</code></em>
and <em class="parameter"><code>action_area</code></em>
as internal children with the names “vbox” and
“action_area”.</p>
<p>GtkDialog supports a custom <action-widgets> element, which can contain
multiple <action-widget> elements. The “response” attribute specifies a
numeric response, and the content of the element is the id of widget
(which should be a child of the dialogs <em class="parameter"><code>action_area</code></em>
). To mark a response
as default, set the “default“ attribute of the <action-widget> element
to true.</p>
<p>GtkDialog supports adding action widgets by specifying “action“ as
the “type“ attribute of a <child> element. The widget will be added
either to the action area or the headerbar of the dialog, depending
on the “use-header-bar“ property. The response id has to be associated
with the action widget using the <action-widgets> element.</p>
<p>An example of a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> UI definition fragment:</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="gtkdoc opt"><</span>object <span class="gtkdoc kwc">class</span><span class="gtkdoc opt">=</span><span class="string">"GtkDialog"</span> id<span class="gtkdoc opt">=</span><span class="string">"dialog1"</span><span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>child type<span class="gtkdoc opt">=</span><span class="string">"action"</span><span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>object <span class="gtkdoc kwc">class</span><span class="gtkdoc opt">=</span><span class="string">"GtkButton"</span> id<span class="gtkdoc opt">=</span><span class="string">"button_cancel"</span><span class="gtkdoc opt">/></span>
<span class="gtkdoc opt"></</span>child<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>child type<span class="gtkdoc opt">=</span><span class="string">"action"</span><span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>object <span class="gtkdoc kwc">class</span><span class="gtkdoc opt">=</span><span class="string">"GtkButton"</span> id<span class="gtkdoc opt">=</span><span class="string">"button_ok"</span><span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>property name<span class="gtkdoc opt">=</span><span class="string">"can-default"</span><span class="gtkdoc opt">></span>True<span class="gtkdoc opt"></</span>property<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"></</span>object<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"></</span>child<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>action<span class="gtkdoc opt">-</span>widgets<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>action<span class="gtkdoc opt">-</span>widget response<span class="gtkdoc opt">=</span><span class="string">"cancel"</span><span class="gtkdoc opt">></span>button_cancel<span class="gtkdoc opt"></</span>action<span class="gtkdoc opt">-</span>widget<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"><</span>action<span class="gtkdoc opt">-</span>widget response<span class="gtkdoc opt">=</span><span class="string">"ok"</span> <span class="keyword">default</span><span class="gtkdoc opt">=</span><span class="string">"true"</span><span class="gtkdoc opt">></span>button_ok<span class="gtkdoc opt"></</span>action<span class="gtkdoc opt">-</span>widget<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"></</span>action<span class="gtkdoc opt">-</span>widgets<span class="gtkdoc opt">></span>
<span class="gtkdoc opt"></</span>object<span class="gtkdoc opt">></span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
</div>
</div>
<div class="refsect1">
<a name="GtkDialog.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gtk-dialog-new"></a><h3>gtk_dialog_new ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_dialog_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Creates a new dialog box.</p>
<p>Widgets should not be packed into this <a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a>
directly, but into the <em class="parameter"><code>vbox</code></em>
and <em class="parameter"><code>action_area</code></em>
, as described above.</p>
<div class="refsect3">
<a name="gtk-dialog-new.returns"></a><h4>Returns</h4>
<p> the new dialog as a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-new-with-buttons"></a><h3>gtk_dialog_new_with_buttons ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_dialog_new_with_buttons (<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *title</code></em>,
<em class="parameter"><code><a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a> *parent</code></em>,
<em class="parameter"><code><a class="link" href="GtkDialog.html#GtkDialogFlags" title="enum GtkDialogFlags"><span class="type">GtkDialogFlags</span></a> flags</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_button_text</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>Creates a new <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> with title <em class="parameter"><code>title</code></em>
(or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for the default
title; see <a class="link" href="GtkWindow.html#gtk-window-set-title" title="gtk_window_set_title ()"><code class="function">gtk_window_set_title()</code></a>) and transient parent <em class="parameter"><code>parent</code></em>
(or
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for none; see <a class="link" href="GtkWindow.html#gtk-window-set-transient-for" title="gtk_window_set_transient_for ()"><code class="function">gtk_window_set_transient_for()</code></a>). The <em class="parameter"><code>flags</code></em>
argument can be used to make the dialog modal (<a class="link" href="GtkDialog.html#GTK-DIALOG-MODAL:CAPS"><span class="type">GTK_DIALOG_MODAL</span></a>)
and/or to have it destroyed along with its transient parent
(<a class="link" href="GtkDialog.html#GTK-DIALOG-DESTROY-WITH-PARENT:CAPS"><span class="type">GTK_DIALOG_DESTROY_WITH_PARENT</span></a>). After <em class="parameter"><code>flags</code></em>
, button
text/response ID pairs should be listed, with a <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> pointer ending
the list. Button text can be arbitrary text. A response ID can be
any positive number, or one of the values in the <a class="link" href="GtkDialog.html#GtkResponseType" title="enum GtkResponseType"><span class="type">GtkResponseType</span></a>
enumeration. If the user clicks one of these dialog buttons,
<a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> will emit the <a class="link" href="GtkDialog.html#GtkDialog-response" title="The “response” signal"><span class="type">“response”</span></a> signal with the corresponding
response ID. If a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> receives the <a class="link" href="GtkWidget.html#GtkWidget-delete-event" title="The “delete-event” signal"><span class="type">“delete-event”</span></a> signal,
it will emit ::response with a response ID of <a class="link" href="GtkDialog.html#GTK-RESPONSE-DELETE-EVENT:CAPS"><span class="type">GTK_RESPONSE_DELETE_EVENT</span></a>.
However, destroying a dialog does not emit the ::response signal;
so be careful relying on ::response when using the
<a class="link" href="GtkDialog.html#GTK-DIALOG-DESTROY-WITH-PARENT:CAPS"><span class="type">GTK_DIALOG_DESTROY_WITH_PARENT</span></a> flag. Buttons are from left to right,
so the first button in the list will be the leftmost button in the dialog.</p>
<p>Here’s a simple example:</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10</pre></td>
<td class="listing_code"><pre class="programlisting">GtkWidget <span class="gtkdoc opt">*</span>dialog<span class="gtkdoc opt">;</span>
GtkDialogFlags flags <span class="gtkdoc opt">=</span> GTK_DIALOG_MODAL <span class="gtkdoc opt">|</span> GTK_DIALOG_DESTROY_WITH_PARENT<span class="gtkdoc opt">;</span>
dialog <span class="gtkdoc opt">=</span> <span class="function"><a href="GtkDialog.html#gtk-dialog-new-with-buttons">gtk_dialog_new_with_buttons</a></span> <span class="gtkdoc opt">(</span><span class="string">"My dialog"</span><span class="gtkdoc opt">,</span>
main_app_window<span class="gtkdoc opt">,</span>
flags<span class="gtkdoc opt">,</span>
<span class="function">_</span><span class="gtkdoc opt">(</span><span class="string">"_OK"</span><span class="gtkdoc opt">),</span>
GTK_RESPONSE_ACCEPT<span class="gtkdoc opt">,</span>
<span class="function">_</span><span class="gtkdoc opt">(</span><span class="string">"_Cancel"</span><span class="gtkdoc opt">),</span>
GTK_RESPONSE_REJECT<span class="gtkdoc opt">,</span>
NULL<span class="gtkdoc opt">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<div class="refsect3">
<a name="gtk-dialog-new-with-buttons.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>title</p></td>
<td class="parameter_description"><p> Title of the dialog, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>parent</p></td>
<td class="parameter_description"><p> Transient parent of the dialog, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>from <a class="link" href="GtkDialog.html#GtkDialogFlags" title="enum GtkDialogFlags"><span class="type">GtkDialogFlags</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>first_button_text</p></td>
<td class="parameter_description"><p> text to go in first button, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>response ID for first button, then additional buttons, ending with <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-dialog-new-with-buttons.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-run"></a><h3>gtk_dialog_run ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
gtk_dialog_run (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>);</pre>
<p>Blocks in a recursive main loop until the <em class="parameter"><code>dialog</code></em>
either emits the
<a class="link" href="GtkDialog.html#GtkDialog-response" title="The “response” signal"><span class="type">“response”</span></a> signal, or is destroyed. If the dialog is
destroyed during the call to <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a>, <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> returns
<a class="link" href="GtkDialog.html#GTK-RESPONSE-NONE:CAPS"><span class="type">GTK_RESPONSE_NONE</span></a>. Otherwise, it returns the response ID from the
::response signal emission.</p>
<p>Before entering the recursive main loop, <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> calls
<a class="link" href="GtkWidget.html#gtk-widget-show" title="gtk_widget_show ()"><code class="function">gtk_widget_show()</code></a> on the dialog for you. Note that you still
need to show any children of the dialog yourself.</p>
<p>During <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a>, the default behavior of <a class="link" href="GtkWidget.html#GtkWidget-delete-event" title="The “delete-event” signal"><span class="type">“delete-event”</span></a>
is disabled; if the dialog receives ::delete_event, it will not be
destroyed as windows usually are, and <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> will return
<a class="link" href="GtkDialog.html#GTK-RESPONSE-DELETE-EVENT:CAPS"><span class="type">GTK_RESPONSE_DELETE_EVENT</span></a>. Also, during <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> the dialog
will be modal. You can force <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> to return at any time by
calling <a class="link" href="GtkDialog.html#gtk-dialog-response" title="gtk_dialog_response ()"><code class="function">gtk_dialog_response()</code></a> to emit the ::response signal. Destroying
the dialog during <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> is a very bad idea, because your
post-run code won’t know whether the dialog was destroyed or not.</p>
<p>After <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> returns, you are responsible for hiding or
destroying the dialog if you wish to do so.</p>
<p>Typical usage of this function might be:</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11</pre></td>
<td class="listing_code"><pre class="programlisting">gint result <span class="gtkdoc opt">=</span> <span class="function"><a href="GtkDialog.html#gtk-dialog-run">gtk_dialog_run</a></span> <span class="gtkdoc opt">(</span><span class="function">GTK_DIALOG</span> <span class="gtkdoc opt">(</span>dialog<span class="gtkdoc opt">));</span>
<span class="keyword">switch</span> <span class="gtkdoc opt">(</span>result<span class="gtkdoc opt">)</span>
<span class="gtkdoc opt">{</span>
<span class="keyword">case</span> GTK_RESPONSE_ACCEPT<span class="gtkdoc opt">:</span>
<span class="function">do_application_specific_something</span> <span class="gtkdoc opt">();</span>
<span class="keyword">break</span><span class="gtkdoc opt">;</span>
<span class="keyword">default</span><span class="gtkdoc opt">:</span>
<span class="function">do_nothing_since_dialog_was_cancelled</span> <span class="gtkdoc opt">();</span>
<span class="keyword">break</span><span class="gtkdoc opt">;</span>
<span class="gtkdoc opt">}</span>
<span class="function"><a href="GtkWidget.html#gtk-widget-destroy">gtk_widget_destroy</a></span> <span class="gtkdoc opt">(</span>dialog<span class="gtkdoc opt">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<p>Note that even though the recursive main loop gives the effect of a
modal dialog (it prevents the user from interacting with other
windows in the same window group while the dialog is run), callbacks
such as timeouts, IO channel watches, DND drops, etc, will
be triggered during a <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> call.</p>
<div class="refsect3">
<a name="gtk-dialog-run.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-dialog-run.returns"></a><h4>Returns</h4>
<p> response ID</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-response"></a><h3>gtk_dialog_response ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_dialog_response (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> response_id</code></em>);</pre>
<p>Emits the <a class="link" href="GtkDialog.html#GtkDialog-response" title="The “response” signal"><span class="type">“response”</span></a> signal with the given response ID.
Used to indicate that the user has responded to the dialog in some way;
typically either you or <a class="link" href="GtkDialog.html#gtk-dialog-run" title="gtk_dialog_run ()"><code class="function">gtk_dialog_run()</code></a> will be monitoring the
::response signal and take appropriate action.</p>
<div class="refsect3">
<a name="gtk-dialog-response.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>response_id</p></td>
<td class="parameter_description"><p>response ID</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-add-button"></a><h3>gtk_dialog_add_button ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_dialog_add_button (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *button_text</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> response_id</code></em>);</pre>
<p>Adds a button with the given text and sets things up so that
clicking the button will emit the <a class="link" href="GtkDialog.html#GtkDialog-response" title="The “response” signal"><span class="type">“response”</span></a> signal with
the given <em class="parameter"><code>response_id</code></em>
. The button is appended to the end of the
dialog’s action area. The button widget is returned, but usually
you don’t need it.</p>
<div class="refsect3">
<a name="gtk-dialog-add-button.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>button_text</p></td>
<td class="parameter_description"><p>text of button</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>response_id</p></td>
<td class="parameter_description"><p>response ID for the button</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-dialog-add-button.returns"></a><h4>Returns</h4>
<p> the <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> widget that was added. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-add-buttons"></a><h3>gtk_dialog_add_buttons ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_dialog_add_buttons (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_button_text</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>Adds more buttons, same as calling <a class="link" href="GtkDialog.html#gtk-dialog-add-button" title="gtk_dialog_add_button ()"><code class="function">gtk_dialog_add_button()</code></a>
repeatedly. The variable argument list should be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated
as with <a class="link" href="GtkDialog.html#gtk-dialog-new-with-buttons" title="gtk_dialog_new_with_buttons ()"><code class="function">gtk_dialog_new_with_buttons()</code></a>. Each button must have both
text and response ID.</p>
<div class="refsect3">
<a name="gtk-dialog-add-buttons.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>first_button_text</p></td>
<td class="parameter_description"><p>button text</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>response ID for first button, then more text-response_id pairs</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-add-action-widget"></a><h3>gtk_dialog_add_action_widget ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_dialog_add_action_widget (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> response_id</code></em>);</pre>
<p>Adds an activatable widget to the action area of a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a>,
connecting a signal handler that will emit the <a class="link" href="GtkDialog.html#GtkDialog-response" title="The “response” signal"><span class="type">“response”</span></a>
signal on the dialog when the widget is activated. The widget is
appended to the end of the dialog’s action area. If you want to add a
non-activatable widget, simply pack it into the <em class="parameter"><code>action_area</code></em>
field
of the <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> struct.</p>
<div class="refsect3">
<a name="gtk-dialog-add-action-widget.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>child</p></td>
<td class="parameter_description"><p>an activatable widget</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>response_id</p></td>
<td class="parameter_description"><p>response ID for <em class="parameter"><code>child</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-set-default-response"></a><h3>gtk_dialog_set_default_response ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_dialog_set_default_response (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> response_id</code></em>);</pre>
<p>Sets the last widget in the dialog’s action area with the given <em class="parameter"><code>response_id</code></em>
as the default widget for the dialog. Pressing “Enter” normally activates
the default widget.</p>
<div class="refsect3">
<a name="gtk-dialog-set-default-response.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>response_id</p></td>
<td class="parameter_description"><p>a response ID</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-set-response-sensitive"></a><h3>gtk_dialog_set_response_sensitive ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_dialog_set_response_sensitive (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> response_id</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> setting</code></em>);</pre>
<p>Calls <code class="literal">gtk_widget_set_sensitive (widget, @setting)</code>
for each widget in the dialog’s action area with the given <em class="parameter"><code>response_id</code></em>
.
A convenient way to sensitize/desensitize dialog buttons.</p>
<div class="refsect3">
<a name="gtk-dialog-set-response-sensitive.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>response_id</p></td>
<td class="parameter_description"><p>a response ID</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>setting</p></td>
<td class="parameter_description"><p><a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for sensitive</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-get-response-for-widget"></a><h3>gtk_dialog_get_response_for_widget ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
gtk_dialog_get_response_for_widget (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>Gets the response id of a widget in the action area
of a dialog.</p>
<div class="refsect3">
<a name="gtk-dialog-get-response-for-widget.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>widget</p></td>
<td class="parameter_description"><p>a widget in the action area of <em class="parameter"><code>dialog</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-dialog-get-response-for-widget.returns"></a><h4>Returns</h4>
<p> the response id of <em class="parameter"><code>widget</code></em>
, or <a class="link" href="GtkDialog.html#GTK-RESPONSE-NONE:CAPS"><code class="literal">GTK_RESPONSE_NONE</code></a>
if <em class="parameter"><code>widget</code></em>
doesn’t have a response id set.</p>
</div>
<p class="since">Since: 2.8</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-get-widget-for-response"></a><h3>gtk_dialog_get_widget_for_response ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_dialog_get_widget_for_response (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> response_id</code></em>);</pre>
<p>Gets the widget button that uses the given response ID in the action area
of a dialog.</p>
<div class="refsect3">
<a name="gtk-dialog-get-widget-for-response.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>response_id</p></td>
<td class="parameter_description"><p>the response ID used by the <em class="parameter"><code>dialog</code></em>
widget</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-dialog-get-widget-for-response.returns"></a><h4>Returns</h4>
<p> the <em class="parameter"><code>widget</code></em>
button that uses the given
<em class="parameter"><code>response_id</code></em>
, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.20</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-get-action-area"></a><h3>gtk_dialog_get_action_area ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_dialog_get_action_area (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>);</pre>
<div class="warning">
<p><code class="literal">gtk_dialog_get_action_area</code> has been deprecated since version 3.12 and should not be used in newly-written code.</p>
<p>Direct access to the action area
is discouraged; use <a class="link" href="GtkDialog.html#gtk-dialog-add-button" title="gtk_dialog_add_button ()"><code class="function">gtk_dialog_add_button()</code></a>, etc.</p>
</div>
<p>Returns the action area of <em class="parameter"><code>dialog</code></em>
.</p>
<div class="refsect3">
<a name="gtk-dialog-get-action-area.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-dialog-get-action-area.returns"></a><h4>Returns</h4>
<p> the action area. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-get-content-area"></a><h3>gtk_dialog_get_content_area ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_dialog_get_content_area (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>);</pre>
<p>Returns the content area of <em class="parameter"><code>dialog</code></em>
.</p>
<div class="refsect3">
<a name="gtk-dialog-get-content-area.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-dialog-get-content-area.returns"></a><h4>Returns</h4>
<p> the content area <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>. </p>
<p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> Gtk.Box][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.14</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-get-header-bar"></a><h3>gtk_dialog_get_header_bar ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_dialog_get_header_bar (<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>);</pre>
<p>Returns the header bar of <em class="parameter"><code>dialog</code></em>
. Note that the
headerbar is only used by the dialog if the
<a class="link" href="GtkDialog.html#GtkDialog--use-header-bar" title="The “use-header-bar” property"><span class="type">“use-header-bar”</span></a> property is <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.</p>
<div class="refsect3">
<a name="gtk-dialog-get-header-bar.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-dialog-get-header-bar.returns"></a><h4>Returns</h4>
<p> the header bar. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-12.html#api-index-3.12">3.12</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-alternative-dialog-button-order"></a><h3>gtk_alternative_dialog_button_order ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gtk_alternative_dialog_button_order (<em class="parameter"><code><a href="http://developer.gnome.org/gdk3/GdkScreen.html#GdkScreen-struct"><span class="type">GdkScreen</span></a> *screen</code></em>);</pre>
<div class="warning">
<p><code class="literal">gtk_alternative_dialog_button_order</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p>
<p>Deprecated</p>
</div>
<p>Returns <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if dialogs are expected to use an alternative
button order on the screen <em class="parameter"><code>screen</code></em>
. See
<a class="link" href="GtkDialog.html#gtk-dialog-set-alternative-button-order" title="gtk_dialog_set_alternative_button_order ()"><code class="function">gtk_dialog_set_alternative_button_order()</code></a> for more details
about alternative button order.</p>
<p>If you need to use this function, you should probably connect
to the ::notify:gtk-alternative-button-order signal on the
<a class="link" href="GtkSettings.html" title="Settings"><span class="type">GtkSettings</span></a> object associated to <em class="parameter"><code>screen</code></em>
, in order to be
notified if the button order setting changes.</p>
<div class="refsect3">
<a name="gtk-alternative-dialog-button-order.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>screen</p></td>
<td class="parameter_description"><p> a <a href="http://developer.gnome.org/gdk3/GdkScreen.html#GdkScreen-struct"><span class="type">GdkScreen</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to use the default screen. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-alternative-dialog-button-order.returns"></a><h4>Returns</h4>
<p> Whether the alternative button order should be used</p>
</div>
<p class="since">Since: 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-set-alternative-button-order"></a><h3>gtk_dialog_set_alternative_button_order ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_dialog_set_alternative_button_order
(<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> first_response_id</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<div class="warning">
<p><code class="literal">gtk_dialog_set_alternative_button_order</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p>
<p>Deprecated</p>
</div>
<p>Sets an alternative button order. If the
<a class="link" href="GtkSettings.html#GtkSettings--gtk-alternative-button-order" title="The “gtk-alternative-button-order” property"><span class="type">“gtk-alternative-button-order”</span></a> setting is set to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>,
the dialog buttons are reordered according to the order of the
response ids passed to this function.</p>
<p>By default, GTK+ dialogs use the button order advocated by the
<a class="ulink" href="http://library.gnome.org/devel/hig-book/stable/" target="_top">GNOME Human Interface Guidelines</a>
with the affirmative button at the far
right, and the cancel button left of it. But the builtin GTK+ dialogs
and <a href="GtkMessageDialog.html#GtkMessageDialog-struct"><span class="type">GtkMessageDialogs</span></a> do provide an alternative button order,
which is more suitable on some platforms, e.g. Windows.</p>
<p>Use this function after adding all the buttons to your dialog, as the
following example shows:</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19</pre></td>
<td class="listing_code"><pre class="programlisting">cancel_button <span class="gtkdoc opt">=</span> <span class="function"><a href="GtkDialog.html#gtk-dialog-add-button">gtk_dialog_add_button</a></span> <span class="gtkdoc opt">(</span><span class="function">GTK_DIALOG</span> <span class="gtkdoc opt">(</span>dialog<span class="gtkdoc opt">),</span>
<span class="function">_</span><span class="gtkdoc opt">(</span><span class="string">"_Cancel"</span><span class="gtkdoc opt">),</span>
GTK_RESPONSE_CANCEL<span class="gtkdoc opt">);</span>
ok_button <span class="gtkdoc opt">=</span> <span class="function"><a href="GtkDialog.html#gtk-dialog-add-button">gtk_dialog_add_button</a></span> <span class="gtkdoc opt">(</span><span class="function">GTK_DIALOG</span> <span class="gtkdoc opt">(</span>dialog<span class="gtkdoc opt">),</span>
<span class="function">_</span><span class="gtkdoc opt">(</span><span class="string">"_OK"</span><span class="gtkdoc opt">),</span>
GTK_RESPONSE_OK<span class="gtkdoc opt">);</span>
<span class="function"><a href="GtkWidget.html#gtk-widget-grab-default">gtk_widget_grab_default</a></span> <span class="gtkdoc opt">(</span>ok_button<span class="gtkdoc opt">);</span>
help_button <span class="gtkdoc opt">=</span> <span class="function"><a href="GtkDialog.html#gtk-dialog-add-button">gtk_dialog_add_button</a></span> <span class="gtkdoc opt">(</span><span class="function">GTK_DIALOG</span> <span class="gtkdoc opt">(</span>dialog<span class="gtkdoc opt">),</span>
<span class="function">_</span><span class="gtkdoc opt">(</span><span class="string">"_Help"</span><span class="gtkdoc opt">),</span>
GTK_RESPONSE_HELP<span class="gtkdoc opt">);</span>
<span class="function"><a href="GtkDialog.html#gtk-dialog-set-alternative-button-order">gtk_dialog_set_alternative_button_order</a></span> <span class="gtkdoc opt">(</span><span class="function">GTK_DIALOG</span> <span class="gtkdoc opt">(</span>dialog<span class="gtkdoc opt">),</span>
GTK_RESPONSE_OK<span class="gtkdoc opt">,</span>
GTK_RESPONSE_CANCEL<span class="gtkdoc opt">,</span>
GTK_RESPONSE_HELP<span class="gtkdoc opt">,</span>
<span class="gtkdoc opt">-</span><span class="number">1</span><span class="gtkdoc opt">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<div class="refsect3">
<a name="gtk-dialog-set-alternative-button-order.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>first_response_id</p></td>
<td class="parameter_description"><p>a response id used by one <em class="parameter"><code>dialog</code></em>
’s buttons</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a list of more response ids of <em class="parameter"><code>dialog</code></em>
’s buttons, terminated by -1</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-dialog-set-alternative-button-order-from-array"></a><h3>gtk_dialog_set_alternative_button_order_from_array ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_dialog_set_alternative_button_order_from_array
(<em class="parameter"><code><a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_params</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *new_order</code></em>);</pre>
<div class="warning">
<p><code class="literal">gtk_dialog_set_alternative_button_order_from_array</code> has been deprecated since version 3.10 and should not be used in newly-written code.</p>
<p>Deprecated</p>
</div>
<p>Sets an alternative button order. If the
<a class="link" href="GtkSettings.html#GtkSettings--gtk-alternative-button-order" title="The “gtk-alternative-button-order” property"><span class="type">“gtk-alternative-button-order”</span></a> setting is set to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>,
the dialog buttons are reordered according to the order of the
response ids in <em class="parameter"><code>new_order</code></em>
.</p>
<p>See <a class="link" href="GtkDialog.html#gtk-dialog-set-alternative-button-order" title="gtk_dialog_set_alternative_button_order ()"><code class="function">gtk_dialog_set_alternative_button_order()</code></a> for more information.</p>
<p>This function is for use by language bindings.</p>
<div class="refsect3">
<a name="gtk-dialog-set-alternative-button-order-from-array.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_params</p></td>
<td class="parameter_description"><p>the number of response ids in <em class="parameter"><code>new_order</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>new_order</p></td>
<td class="parameter_description"><p> an array of response ids of
<em class="parameter"><code>dialog</code></em>
’s buttons. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_params]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.6</p>
</div>
</div>
<div class="refsect1">
<a name="GtkDialog.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkDialog-struct"></a><h3>struct GtkDialog</h3>
<pre class="programlisting">struct GtkDialog;</pre>
<p>The <a class="link" href="GtkDialog.html#GtkDialog-struct" title="struct GtkDialog"><span class="type">GtkDialog</span></a> contains only private fields
and should not be directly accessed.</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkDialogClass"></a><h3>struct GtkDialogClass</h3>
<pre class="programlisting">struct GtkDialogClass {
GtkWindowClass parent_class;
void (* response) (GtkDialog *dialog, gint response_id);
/* Keybinding signals */
void (* close) (GtkDialog *dialog);
};
</pre>
<div class="refsect3">
<a name="GtkDialogClass.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkDialogClass.response"></a>response</code></em> ()</p></td>
<td class="struct_member_description"><p>Signal emitted when an action widget is activated.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GtkDialogClass.close"></a>close</code></em> ()</p></td>
<td class="struct_member_description"><p>Signal emitted when the user uses a keybinding to close the dialog.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GtkDialogFlags"></a><h3>enum GtkDialogFlags</h3>
<p>Flags used to influence dialog construction.</p>
<div class="refsect3">
<a name="GtkDialogFlags.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GTK-DIALOG-MODAL:CAPS"></a>GTK_DIALOG_MODAL</p></td>
<td class="enum_member_description">
<p>Make the constructed dialog modal,
see <a class="link" href="GtkWindow.html#gtk-window-set-modal" title="gtk_window_set_modal ()"><code class="function">gtk_window_set_modal()</code></a></p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-DIALOG-DESTROY-WITH-PARENT:CAPS"></a>GTK_DIALOG_DESTROY_WITH_PARENT</p></td>
<td class="enum_member_description">
<p>Destroy the dialog when its
parent is destroyed, see <a class="link" href="GtkWindow.html#gtk-window-set-destroy-with-parent" title="gtk_window_set_destroy_with_parent ()"><code class="function">gtk_window_set_destroy_with_parent()</code></a></p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-DIALOG-USE-HEADER-BAR:CAPS"></a>GTK_DIALOG_USE_HEADER_BAR</p></td>
<td class="enum_member_description">
<p>Create dialog with actions in header
bar instead of action area. Since 3.12.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GtkResponseType"></a><h3>enum GtkResponseType</h3>
<p>Predefined values for use as response ids in <a class="link" href="GtkDialog.html#gtk-dialog-add-button" title="gtk_dialog_add_button ()"><code class="function">gtk_dialog_add_button()</code></a>.
All predefined values are negative, GTK+ leaves positive values for
application-defined response ids.</p>
<div class="refsect3">
<a name="GtkResponseType.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-NONE:CAPS"></a>GTK_RESPONSE_NONE</p></td>
<td class="enum_member_description">
<p>Returned if an action widget has no response id,
or if the dialog gets programmatically hidden or destroyed</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-REJECT:CAPS"></a>GTK_RESPONSE_REJECT</p></td>
<td class="enum_member_description">
<p>Generic response id, not used by GTK+ dialogs</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-ACCEPT:CAPS"></a>GTK_RESPONSE_ACCEPT</p></td>
<td class="enum_member_description">
<p>Generic response id, not used by GTK+ dialogs</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-DELETE-EVENT:CAPS"></a>GTK_RESPONSE_DELETE_EVENT</p></td>
<td class="enum_member_description">
<p>Returned if the dialog is deleted</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-OK:CAPS"></a>GTK_RESPONSE_OK</p></td>
<td class="enum_member_description">
<p>Returned by OK buttons in GTK+ dialogs</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-CANCEL:CAPS"></a>GTK_RESPONSE_CANCEL</p></td>
<td class="enum_member_description">
<p>Returned by Cancel buttons in GTK+ dialogs</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-CLOSE:CAPS"></a>GTK_RESPONSE_CLOSE</p></td>
<td class="enum_member_description">
<p>Returned by Close buttons in GTK+ dialogs</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-YES:CAPS"></a>GTK_RESPONSE_YES</p></td>
<td class="enum_member_description">
<p>Returned by Yes buttons in GTK+ dialogs</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-NO:CAPS"></a>GTK_RESPONSE_NO</p></td>
<td class="enum_member_description">
<p>Returned by No buttons in GTK+ dialogs</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-APPLY:CAPS"></a>GTK_RESPONSE_APPLY</p></td>
<td class="enum_member_description">
<p>Returned by Apply buttons in GTK+ dialogs</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GTK-RESPONSE-HELP:CAPS"></a>GTK_RESPONSE_HELP</p></td>
<td class="enum_member_description">
<p>Returned by Help buttons in GTK+ dialogs</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="GtkDialog.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkDialog--use-header-bar"></a><h3>The <code class="literal">“use-header-bar”</code> property</h3>
<pre class="programlisting"> “use-header-bar” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p><a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the dialog uses a <a class="link" href="GtkHeaderBar.html" title="GtkHeaderBar"><span class="type">GtkHeaderBar</span></a> for action buttons
instead of the action-area.</p>
<p>For technical reasons, this property is declared as an integer
property, but you should only set it to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
<p>Flags: Read / Write / Construct Only</p>
<p>Allowed values: [-1,1]</p>
<p>Default value: -1</p>
<p class="since">Since: <a class="link" href="api-index-3-12.html#api-index-3.12">3.12</a></p>
</div>
</div>
<div class="refsect1">
<a name="GtkDialog.style-property-details"></a><h2>Style Property Details</h2>
<div class="refsect2">
<a name="GtkDialog--s-action-area-border"></a><h3>The <code class="literal">“action-area-border”</code> style property</h3>
<pre class="programlisting"> “action-area-border” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>The default border width used around the
action area of the dialog, as returned by
<a class="link" href="GtkDialog.html#gtk-dialog-get-action-area" title="gtk_dialog_get_action_area ()"><code class="function">gtk_dialog_get_action_area()</code></a>, unless <a class="link" href="GtkContainer.html#gtk-container-set-border-width" title="gtk_container_set_border_width ()"><code class="function">gtk_container_set_border_width()</code></a>
was called on that widget directly.</p>
<p>Flags: Read</p>
<p>Allowed values: >= 0</p>
<p>Default value: 5</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkDialog--s-button-spacing"></a><h3>The <code class="literal">“button-spacing”</code> style property</h3>
<pre class="programlisting"> “button-spacing” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>Spacing between buttons.</p>
<p>Flags: Read</p>
<p>Allowed values: >= 0</p>
<p>Default value: 6</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkDialog--s-content-area-border"></a><h3>The <code class="literal">“content-area-border”</code> style property</h3>
<pre class="programlisting"> “content-area-border” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>The default border width used around the
content area of the dialog, as returned by
<a class="link" href="GtkDialog.html#gtk-dialog-get-content-area" title="gtk_dialog_get_content_area ()"><code class="function">gtk_dialog_get_content_area()</code></a>, unless <a class="link" href="GtkContainer.html#gtk-container-set-border-width" title="gtk_container_set_border_width ()"><code class="function">gtk_container_set_border_width()</code></a>
was called on that widget directly.</p>
<p>Flags: Read</p>
<p>Allowed values: >= 0</p>
<p>Default value: 2</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkDialog--s-content-area-spacing"></a><h3>The <code class="literal">“content-area-spacing”</code> style property</h3>
<pre class="programlisting"> “content-area-spacing” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a></pre>
<p>The default spacing used between elements of the
content area of the dialog, as returned by
<a class="link" href="GtkDialog.html#gtk-dialog-get-content-area" title="gtk_dialog_get_content_area ()"><code class="function">gtk_dialog_get_content_area()</code></a>, unless <a class="link" href="GtkBox.html#gtk-box-set-spacing" title="gtk_box_set_spacing ()"><code class="function">gtk_box_set_spacing()</code></a>
was called on that widget directly.</p>
<p>Flags: Read</p>
<p>Allowed values: >= 0</p>
<p>Default value: 0</p>
<p class="since">Since: 2.16</p>
</div>
</div>
<div class="refsect1">
<a name="GtkDialog.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GtkDialog-close"></a><h3>The <code class="literal">“close”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *arg0,
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
<p>The ::close signal is a
<a class="link" href="gtk3-Bindings.html#GtkBindingSignal" title="struct GtkBindingSignal">keybinding signal</a>
which gets emitted when the user uses a keybinding to close
the dialog.</p>
<p>The default binding for this signal is the Escape key.</p>
<div class="refsect3">
<a name="GtkDialog-close.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkDialog-response"></a><h3>The <code class="literal">“response”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkDialog.html" title="GtkDialog"><span class="type">GtkDialog</span></a> *dialog,
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> response_id,
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
<p>Emitted when an action widget is clicked, the dialog receives a
delete event, or the application programmer calls <a class="link" href="GtkDialog.html#gtk-dialog-response" title="gtk_dialog_response ()"><code class="function">gtk_dialog_response()</code></a>.
On a delete event, the response ID is <a class="link" href="GtkDialog.html#GTK-RESPONSE-DELETE-EVENT:CAPS"><span class="type">GTK_RESPONSE_DELETE_EVENT</span></a>.
Otherwise, it depends on which action widget was clicked.</p>
<div class="refsect3">
<a name="GtkDialog-response.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dialog</p></td>
<td class="parameter_description"><p>the object on which the signal is emitted</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>response_id</p></td>
<td class="parameter_description"><p>the response ID</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
</div>
</div>
<div class="refsect1">
<a name="GtkDialog.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GtkVBox.html" title="GtkVBox"><span class="type">GtkVBox</span></a>, <a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a>, <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25.1</div>
</body>
</html>
|