/usr/include/gtkmm-2.4/gtkmm/window.h is in libgtkmm-2.4-dev 1:2.24.4-1.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 | // -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _GTKMM_WINDOW_H
#define _GTKMM_WINDOW_H
#include <glibmm.h>
/* $Id: window.hg,v 1.20 2006/05/10 20:59:28 murrayc Exp $ */
/* window.h
*
* Copyright (C) 1998-2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <glibmm/object.h>
#include <glibmm/listhandle.h>
#include <gtkmm/bin.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GtkWindowGroup GtkWindowGroup;
typedef struct _GtkWindowGroupClass GtkWindowGroupClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gtk
{ class WindowGroup_Class; } // namespace Gtk
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GtkWindow GtkWindow;
typedef struct _GtkWindowClass GtkWindowClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gtk
{ class Window_Class; } // namespace Gtk
namespace Gtk
{
class AccelGroup;
class WindowGroup;
/** Limit the effect of grabs
*/
class WindowGroup : public Glib::Object
{
#ifndef DOXYGEN_SHOULD_SKIP_THIS
public:
typedef WindowGroup CppObjectType;
typedef WindowGroup_Class CppClassType;
typedef GtkWindowGroup BaseObjectType;
typedef GtkWindowGroupClass BaseClassType;
private: friend class WindowGroup_Class;
static CppClassType windowgroup_class_;
private:
// noncopyable
WindowGroup(const WindowGroup&);
WindowGroup& operator=(const WindowGroup&);
protected:
explicit WindowGroup(const Glib::ConstructParams& construct_params);
explicit WindowGroup(GtkWindowGroup* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
virtual ~WindowGroup();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GObject.
GtkWindowGroup* gobj() { return reinterpret_cast<GtkWindowGroup*>(gobject_); }
///Provides access to the underlying C GObject.
const GtkWindowGroup* gobj() const { return reinterpret_cast<GtkWindowGroup*>(gobject_); }
///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
GtkWindowGroup* gobj_copy();
private:
protected:
WindowGroup();
public:
static Glib::RefPtr<WindowGroup> create();
/** Adds a window to a Gtk::WindowGroup.
* @param window The Gtk::Window to add.
*/
void add_window(Window& window);
/** Removes a window from a Gtk::WindowGroup.
* @param window The Gtk::Window to remove.
*/
void remove_window(Window& window);
public:
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
};
/** Toplevel Window
* This represents all widgets which are physical windows controlled
* by the window manager.
*
* The window will be hidden when the window manager's close button is clicked. Override on_delete_event() to stop this.
*
* Gtk::manage() has no effect on Windows because they have no parent Containers.
* @ingroup Widgets
*/
class Window : public Bin
{
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef Window CppObjectType;
typedef Window_Class CppClassType;
typedef GtkWindow BaseObjectType;
typedef GtkWindowClass BaseClassType;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
virtual ~Window();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
private:
friend class Window_Class;
static CppClassType window_class_;
// noncopyable
Window(const Window&);
Window& operator=(const Window&);
protected:
explicit Window(const Glib::ConstructParams& construct_params);
explicit Window(GtkWindow* castitem);
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GtkObject.
GtkWindow* gobj() { return reinterpret_cast<GtkWindow*>(gobject_); }
///Provides access to the underlying C GtkObject.
const GtkWindow* gobj() const { return reinterpret_cast<GtkWindow*>(gobject_); }
public:
//C++ methods used to invoke GTK+ virtual functions:
protected:
//GTK+ Virtual Functions (override these to change behaviour):
//Default Signal Handlers::
virtual void on_set_focus(Widget* focus);
virtual bool on_frame_event(GdkEvent* event);
private:
public:
explicit Window(WindowType type = WINDOW_TOPLEVEL);
#ifdef GLIBMM_PROPERTIES_ENABLED
/** The type of the window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<WindowType> property_type() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** The title of the window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Glib::ustring> property_title() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** The title of the window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Glib::ustring> property_title() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Unique startup identifier for the window used by startup-notification.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_WriteOnly<Glib::ustring> property_startup_id() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** If TRUE, the window has no mimimum size. Setting this to TRUE is 99% of the time a bad idea.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_allow_shrink() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** If TRUE, the window has no mimimum size. Setting this to TRUE is 99% of the time a bad idea.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_allow_shrink() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** If TRUE, users can expand the window beyond its minimum size.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_allow_grow() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** If TRUE, users can expand the window beyond its minimum size.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_allow_grow() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** If TRUE, users can resize the window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_resizable() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** If TRUE, users can resize the window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_resizable() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** If TRUE, the window is modal (other windows are not usable while this one is up).
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_modal() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** If TRUE, the window is modal (other windows are not usable while this one is up).
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_modal() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** The initial position of the window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<WindowPosition> property_window_position() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** The initial position of the window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<WindowPosition> property_window_position() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** The default width of the window, used when initially showing the window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<int> property_default_width() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** The default width of the window, used when initially showing the window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<int> property_default_width() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** The default height of the window, used when initially showing the window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<int> property_default_height() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** The default height of the window, used when initially showing the window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<int> property_default_height() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** If this window should be destroyed when the parent is destroyed.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_destroy_with_parent() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** If this window should be destroyed when the parent is destroyed.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_destroy_with_parent() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Icon for this window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_icon() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Icon for this window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > property_icon() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Whether mnemonics are currently visible in this window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_mnemonics_visible() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Whether mnemonics are currently visible in this window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_mnemonics_visible() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Name of the themed icon for this window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Glib::ustring> property_icon_name() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Name of the themed icon for this window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Glib::ustring> property_icon_name() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** The screen where this window will be displayed.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy< Glib::RefPtr<Gdk::Screen> > property_screen() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** The screen where this window will be displayed.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Screen> > property_screen() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Whether the toplevel is the current active window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_is_active() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Whether the input focus is within this GtkWindow.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_has_toplevel_focus() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Hint to help the desktop environment understand what kind of window this is and how to treat it.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<GdkWindowTypeHint> property_type_hint() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Hint to help the desktop environment understand what kind of window this is and how to treat it.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<GdkWindowTypeHint> property_type_hint() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** TRUE if the window should not be in the task bar.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_skip_taskbar_hint() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** TRUE if the window should not be in the task bar.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_skip_taskbar_hint() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** TRUE if the window should not be in the pager.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_skip_pager_hint() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** TRUE if the window should not be in the pager.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_skip_pager_hint() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Unique identifier for the window to be used when restoring a session.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Glib::ustring> property_role() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Unique identifier for the window to be used when restoring a session.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Glib::ustring> property_role() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Whether the window should be decorated by the window manager.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_decorated() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Whether the window should be decorated by the window manager.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_decorated() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** The window gravity of the window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Gdk::Gravity> property_gravity() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** The window gravity of the window.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Gdk::Gravity> property_gravity() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** The transient parent of the dialog.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<Window*> property_transient_for() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** The transient parent of the dialog.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<Window*> property_transient_for() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** The opacity of the window, from 0 to 1.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<double> property_opacity() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** The opacity of the window, from 0 to 1.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<double> property_opacity() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** TRUE if the window should be brought to the user's attention.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_urgency_hint() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** TRUE if the window should be brought to the user's attention.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_urgency_hint() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** TRUE if the window should receive the input focus.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_accept_focus() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** TRUE if the window should receive the input focus.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_accept_focus() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** TRUE if the window should receive the input focus when mapped.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_focus_on_map() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** TRUE if the window should receive the input focus when mapped.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_focus_on_map() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Whether the window frame should have a close button.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy<bool> property_deletable() ;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifdef GLIBMM_PROPERTIES_ENABLED
/** Whether the window frame should have a close button.
*
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
* the value of the property changes.
*/
Glib::PropertyProxy_ReadOnly<bool> property_deletable() const;
#endif //#GLIBMM_PROPERTIES_ENABLED
#ifndef GTKMM_DISABLE_DEPRECATED
/** @deprecated Use Gtk::Widget::is_toplevel().
*/
bool is_toplevel() const;
/** @deprecated Use get_window_type().
*/
bool is_popup() const;
// This is special to the GTK+ linux-fb port.
/** @deprecated You should not need to call this method.
*/
Glib::RefPtr<Gdk::Window> get_frame();
Glib::RefPtr<const Gdk::Window> get_frame() const;
#endif // GTKMM_DISABLE_DEPRECATED
/**
* @par Prototype:
* <tt>void on_my_%set_focus(Widget* focus)</tt>
*/
Glib::SignalProxy1< void,Widget* > signal_set_focus();
/**
* @par Prototype:
* <tt>bool on_my_%frame_event(GdkEvent* event)</tt>
*/
Glib::SignalProxy1< bool,GdkEvent* > signal_frame_event();
//Keybinding signals:
/** Sets the title of the Gtk::Window. The title of a window will be
* displayed in its title bar; on the X %Window System, the title bar
* is rendered by the , so exactly how the title appears to users may vary
* according to a user's exact configuration. The title should help a
* user distinguish this window from other windows they may have
* open. A good title might include the application name and current
* document filename, for example.
* @param title Title of the window.
*/
void set_title(const Glib::ustring& title);
/** Retrieves the title of the window. See set_title().
* @return The title of the window, or <tt>0</tt> if none has
* been set explicitely. The returned string is owned by the widget
* and must not be modified or freed.
*/
Glib::ustring get_title() const;
/** Don't use this function. It sets the X %Window System "class" and
* "name" hints for a window. According to the ICCCM, you should
* always set these to the same value for all windows in an
* application, and GTK+ sets them to that value by default, so calling
* this function is sort of pointless. However, you may want to call
* set_role() on each window in your application, for the
* benefit of the session manager. Setting the role allows the window
* manager to restore window positions when loading a saved session.
* @param wmclass_name Window name hint.
* @param wmclass_class Window class hint.
*/
void set_wmclass(const Glib::ustring& wmclass_name, const Glib::ustring& wmclass_class);
/** This function is only useful on X11, not with other GTK+ targets.
*
* In combination with the window title, the window role allows a
* to identify "the
* same" window when an application is restarted. So for example you
* might set the "toolbox" role on your app's toolbox window, so that
* when the user restarts their session, the window manager can put
* the toolbox back in the same place.
*
* If a window already has a unique title, you don't need to set the
* role, since the WM can use the title to identify the window when
* restoring the session.
* @param role Unique identifier for the window to be used when restoring a session.
*/
void set_role(const Glib::ustring& role);
/** Returns the role of the window. See set_role() for
* further explanation.
* @return The role of the window if set, or <tt>0</tt>. The
* returned is owned by the widget and must not be modified
* or freed.
*/
Glib::ustring get_role() const;
/** Associate @a accel_group with @a window, such that calling
* gtk_accel_groups_activate() on @a window will activate accelerators
* in @a accel_group.
* @param accel_group A Gtk::AccelGroup.
*/
void add_accel_group(const Glib::RefPtr<AccelGroup>& accel_group);
/** Reverses the effects of add_accel_group().
* @param accel_group A Gtk::AccelGroup.
*/
void remove_accel_group(const Glib::RefPtr<AccelGroup>& accel_group);
/** Sets a position constraint for this window. If the old or new
* constraint is Gtk::WIN_POS_CENTER_ALWAYS, this will also cause
* the window to be repositioned to satisfy the new constraint.
* @param position A position constraint.
*/
void set_position(WindowPosition position);
/** Activates the current focused widget within the window.
* @return <tt>true</tt> if a widget got activated.
*/
bool activate_focus();
/** If @a focus is not the current focus widget, and is focusable, sets
* it as the focus widget for the window. To set the focus to a particular
* widget in the toplevel, it is usually more convenient to use
* Gtk::Widget::grab_focus() instead of this function.
* @param focus Widget to be the new focus widget.
*/
void set_focus(Gtk::Widget& focus);
void unset_focus();
/** Retrieves the current focused widget within the window.
* Note that this is the widget that would have the focus
* if the toplevel window focused; if the toplevel window
* is not focused then <tt>gtk_widget_has_focus (widget)</tt> will
* not be <tt>true</tt> for the widget.
* @return The currently focused widget, or <tt>0</tt> if there is none.
*/
Widget* get_focus();
/** Retrieves the current focused widget within the window.
* Note that this is the widget that would have the focus
* if the toplevel window focused; if the toplevel window
* is not focused then <tt>gtk_widget_has_focus (widget)</tt> will
* not be <tt>true</tt> for the widget.
* @return The currently focused widget, or <tt>0</tt> if there is none.
*/
const Widget* get_focus() const;
/** The default widget is the widget that's activated when the user
* presses Enter in a dialog (for example). This function sets the default widget for a Gtk::Window. When setting
* (rather than unsetting) the default widget it's generally easier to
* call Gtk::Widget::grab_focus() on the widget. Before making a widget
* the default widget, you must set the Gtk::CAN_DEFAULT flag on the
* widget you'd like to make the default using GTK_WIDGET_SET_FLAGS().
* @param default_widget Widget to be the default.
*/
void set_default(Gtk::Widget& default_widget);
void unset_default();
/** Activates the default widget for the window, unless the current
* focused widget has been configured to receive the default action
* (see Gtk::Widget::set_receives_default()), in which case the
* focused widget is activated.
* @return <tt>true</tt> if a widget got activated.
*/
bool activate_default();
/** Dialog windows should be set transient for the main application
* window they were spawned from. This allows to e.g. keep the
* dialog on top of the main window, or center the dialog over the
* main window. Gtk::Dialog::new_with_buttons() and other convenience
* functions in GTK+ will sometimes call
* set_transient_for() on your behalf.
*
* Passing <tt>0</tt> for @a parent unsets the current transient window.
*
* On Windows, this function puts the child window on top of the parent,
* much as the window manager would have done on X.
* @param parent Parent window, or <tt>0</tt>.
*/
void set_transient_for(Window& parent);
/** Unsets the current transient window.
* @see set_transient_for().
* @newin{2,20}
*/
void unset_transient_for();
/** Fetches the transient parent for this window. See
* set_transient_for().
* @return The transient parent for this window, or <tt>0</tt>
* if no transient parent has been set.
*/
Window* get_transient_for();
/** Fetches the transient parent for this window. See
* set_transient_for().
* @return The transient parent for this window, or <tt>0</tt>
* if no transient parent has been set.
*/
const Window* get_transient_for() const;
/** Request the windowing system to make @a window partially transparent,
* with opacity 0 being fully transparent and 1 fully opaque. (Values
* of the opacity parameter are clamped to the [0,1] range.) On X11
* this has any effect only on X screens with a compositing manager
* running. See Gtk::Widget::is_composited(). On Windows it should work
* always.
*
* Note that setting a window's opacity after the window has been
* shown causes it to flicker once on Windows.
*
* @newin{2,12}
* @param opacity Desired opacity, between 0 and 1.
*/
void set_opacity(double opacity);
/** Fetches the requested opacity for this window. See
* set_opacity().
*
* @newin{2,12}
* @return The requested opacity for this window.
*/
double get_opacity() const;
/** By setting the type hint for the window, you allow the window
* manager to decorate and handle the window in a way which is
* suitable to the function of the window in your application.
*
* This function should be called before the window becomes visible.
*
* Gtk::Dialog::new_with_buttons() and other convenience functions in GTK+
* will sometimes call set_type_hint() on your behalf.
* @param hint The window type.
*/
void set_type_hint(Gdk::WindowTypeHint hint);
/** Gets the type hint for this window. See set_type_hint().
* @return The type hint for @a window.
*/
Gdk::WindowTypeHint get_type_hint() const;
/** Windows may set a hint asking the desktop environment not to display
* the window in the task bar. This function sets this hint.
*
* @newin{2,2}
* @param setting <tt>true</tt> to keep this window from appearing in the task bar.
*/
void set_skip_taskbar_hint(bool setting = true);
/** Gets the value set by set_skip_taskbar_hint()
*
* @newin{2,2}
* @return <tt>true</tt> if window shouldn't be in taskbar.
*/
bool get_skip_taskbar_hint() const;
/** Windows may set a hint asking the desktop environment not to display
* the window in the pager. This function sets this hint.
* (A "pager" is any desktop navigation tool such as a workspace
* switcher that displays a thumbnail representation of the windows
* on the screen.)
*
* @newin{2,2}
* @param setting <tt>true</tt> to keep this window from appearing in the pager.
*/
void set_skip_pager_hint(bool setting = true);
/** Gets the value set by set_skip_pager_hint().
*
* @newin{2,2}
* @return <tt>true</tt> if window shouldn't be in pager.
*/
bool get_skip_pager_hint() const;
/** Windows may set a hint asking the desktop environment to draw
* the users attention to the window. This function sets this hint.
*
* @newin{2,8}
* @param setting <tt>true</tt> to mark this window as urgent.
*/
void set_urgency_hint(bool setting = true);
/** Gets the value set by set_urgency_hint()
*
* @newin{2,8}
* @return <tt>true</tt> if window is urgent.
*/
bool get_urgency_hint() const;
/** Windows may set a hint asking the desktop environment not to receive
* the input focus. This function sets this hint.
*
* @newin{2,4}
* @param setting <tt>true</tt> to let this window receive input focus.
*/
void set_accept_focus(bool setting = true);
/** Gets the value set by set_accept_focus().
*
* @newin{2,4}
* @return <tt>true</tt> if window should receive the input focus.
*/
bool get_accept_focus() const;
/** Windows may set a hint asking the desktop environment not to receive
* the input focus when the window is mapped. This function sets this
* hint.
*
* @newin{2,6}
* @param setting <tt>true</tt> to let this window receive input focus on map.
*/
void set_focus_on_map(bool setting = true);
/** Gets the value set by set_focus_on_map().
*
* @newin{2,6}
* @return <tt>true</tt> if window should receive the input focus when
* mapped.
*/
bool get_focus_on_map() const;
//_WRAP_METHOD(void set_destroy_with_parent(bool setting = true), gtk_window_set_destroy_with_parent)
// I don't that that this is ever a good thing for C++.murrayc.
//TODO: Remove?
/** Returns whether the window will be destroyed with its transient parent. See
* set_destroy_with_parent().
* @return <tt>true</tt> if the window will be destroyed with its transient parent.
*/
bool get_destroy_with_parent() const;
// I don't that that this is ever a good thing for C++.murrayc.
/** Sets the Gtk::Window:mnemonics-visible property.
*
* @newin{2,20}
* @param setting The new value.
*/
void set_mnemonics_visible(bool setting = true);
bool get_mnemonics_visible() const;
/** Sets whether the user can resize a window. Windows are user resizable
* by default.
* @param resizable <tt>true</tt> if the user can resize this window.
*/
void set_resizable(bool resizable = true);
/** Gets the value set by set_resizable().
* @return <tt>true</tt> if the user can resize the window.
*/
bool get_resizable() const;
/** Window gravity defines the meaning of coordinates passed to
* move(). See move() and Gdk::Gravity for
* more details.
*
* The default window gravity is Gdk::GRAVITY_NORTH_WEST which will
* typically "do what you mean."
* @param gravity Window gravity.
*/
void set_gravity(Gdk::Gravity gravity);
/** Gets the value set by set_gravity().
* @return Window gravity.
*/
Gdk::Gravity get_gravity() const;
/** This function sets up hints about how a window can be resized by
* the user. You can set a minimum and maximum size; allowed resize
* increments (e.g. for xterm, you can only resize by the size of a
* character); aspect ratios; and more. See the Gdk::Geometry struct.
* @param geometry_widget Widget the geometry hints will be applied to.
* @param geometry Struct containing geometry information.
* @param geom_mask Mask indicating which struct fields should be paid attention to.
*/
void set_geometry_hints(Widget& geometry_widget, const Gdk::Geometry& geometry, Gdk::WindowHints geom_mask);
/** Sets the Gdk::Screen where the @a window is displayed; if
* the window is already mapped, it will be unmapped, and
* then remapped on the new screen.
*
* @newin{2,2}
* @param screen A Gdk::Screen.
*/
void set_screen(const Glib::RefPtr<Gdk::Screen>& screen);
/** Returns the Gdk::Screen associated with @a window.
*
* @newin{2,2}
* @return A Gdk::Screen.
*/
Glib::RefPtr<Gdk::Screen> get_screen();
/** Returns the Gdk::Screen associated with @a window.
*
* @newin{2,2}
* @return A Gdk::Screen.
*/
Glib::RefPtr<const Gdk::Screen> get_screen() const;
#ifndef GTKMM_DISABLE_DEPRECATED
/** (Note: this is a special-purpose function for the framebuffer port,
* that causes GTK+ to draw its own window border. For most applications,
* you want set_decorated() instead, which tells the window
* manager whether to draw the window border.)
*
* If this function is called on a window with setting of <tt>true</tt>, before
* it is realized or showed, it will have a "frame" window around
* @a window->window, accessible in @a window->frame. Using the signal
* frame_event you can receive all events targeted at the frame.
*
* This function is used by the linux-fb port to implement managed
* windows, but it could conceivably be used by X-programs that
* want to do their own window decorations.
*
* Deprecated: 2.24: This function will be removed in GTK+ 3
* @param setting A boolean.
*/
void set_has_frame(bool setting = true);
#endif // GTKMM_DISABLE_DEPRECATED
#ifndef GTKMM_DISABLE_DEPRECATED
/** Accessor for whether the window has a frame window exterior to
* @a window->window. Gets the value set by set_has_frame().
*
* Deprecated: 2.24: This function will be removed in GTK+ 3
* @return <tt>true</tt> if a frame has been added to the window
* via set_has_frame().
*/
bool get_has_frame() const;
#endif // GTKMM_DISABLE_DEPRECATED
#ifndef GTKMM_DISABLE_DEPRECATED
/** (Note: this is a special-purpose function intended for the framebuffer
* port; see set_has_frame(). It will have no effect on the
* window border drawn by the window manager, which is the normal
* case when using the X %Window system.)
*
* For windows with frames (see set_has_frame()) this function
* can be used to change the size of the frame border.
*
* Deprecated: 2.24: This function will be removed in GTK+ 3
* @param left The width of the left border.
* @param top The height of the top border.
* @param right The width of the right border.
* @param bottom The height of the bottom border.
*/
void set_frame_dimensions(int left, int top, int right, int bottom);
#endif // GTKMM_DISABLE_DEPRECATED
#ifndef GTKMM_DISABLE_DEPRECATED
/** (Note: this is a special-purpose function intended for the
* framebuffer port; see set_has_frame(). It will not
* return the size of the window border drawn by the , which is the normal
* case when using a windowing system. See
* gdk_window_get_frame_extents() to get the standard window border
* extents.)
*
* Retrieves the dimensions of the frame window for this toplevel.
* See set_has_frame(), set_frame_dimensions().
*
* Deprecated: 2.24: This function will be removed in GTK+ 3
* @param left Location to store the width of the frame at the left.
* @param top Location to store the height of the frame at the top.
* @param right Location to store the width of the frame at the returns.
* @param bottom Location to store the height of the frame at the bottom.
*/
void get_frame_dimensions(int& left, int& top, int& right, int& bottom) const;
#endif // GTKMM_DISABLE_DEPRECATED
/** By default, windows are decorated with a title bar, resize
* controls, etc. Some allow GTK+ to disable these decorations, creating a
* borderless window. If you set the decorated property to <tt>false</tt>
* using this function, GTK+ will do its best to convince the window
* manager not to decorate the window. Depending on the system, this
* function may not have any effect when called on a window that is
* already visible, so you should call it before calling gtk_window_show().
*
* On Windows, this function always works, since there's no window manager
* policy involved.
* @param setting <tt>true</tt> to decorate the window.
*/
void set_decorated(bool setting = true);
/** Returns whether the window has been set to have decorations
* such as a title bar via set_decorated().
* @return <tt>true</tt> if the window has been set to have decorations.
*/
bool get_decorated() const;
/** By default, windows have a close button in the window frame. Some
* allow GTK+ to
* disable this button. If you set the deletable property to <tt>false</tt>
* using this function, GTK+ will do its best to convince the window
* manager not to show a close button. Depending on the system, this
* function may not have any effect when called on a window that is
* already visible, so you should call it before calling gtk_window_show().
*
* On Windows, this function always works, since there's no window manager
* policy involved.
*
* @newin{2,10}
* @param setting <tt>true</tt> to decorate the window as deletable.
*/
void set_deletable(bool setting = true);
/** Returns whether the window has been set to have a close button
* via set_deletable().
*
* @newin{2,10}
* @return <tt>true</tt> if the window has been set to have a close button.
*/
bool get_deletable() const;
/** Retrieves the list of icons set by set_icon_list().
* The list is copied, but the reference count on each
* member won't be incremented.
* @return Copy of window's icon list.
*/
Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> > get_icon_list();
/** Retrieves the list of icons set by set_icon_list().
* The list is copied, but the reference count on each
* member won't be incremented.
* @return Copy of window's icon list.
*/
Glib::ListHandle< Glib::RefPtr<const Gdk::Pixbuf> > get_icon_list() const;
/** Sets up the icon representing a Gtk::Window. The icon is used when
* the window is minimized (also known as iconified). Some window
* managers or desktop environments may also place it in the window
* frame, or display it in other contexts.
*
* set_icon_list() allows you to pass in the same icon in
* several hand-drawn sizes. The list should contain the natural sizes
* your icon is available in; that is, don't scale the image before
* passing it to GTK+. Scaling is postponed until the last minute,
* when the desired final size is known, to allow best quality.
*
* By passing several sizes, you may improve the final image quality
* of the icon, by reducing or eliminating automatic image scaling.
*
* Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and
* larger images (64x64, 128x128) if you have them.
*
* See also set_default_icon_list() to set the icon
* for all windows in your application in one go.
*
* Note that transient windows (those who have been set transient for another
* window using set_transient_for()) will inherit their
* icon from their transient parent. So there's no need to explicitly
* set the icon on transient windows.
* @param list List of Gdk::Pixbuf.
*/
void set_icon_list(const Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> >& list);
/** Sets up the icon representing a Gtk::Window. This icon is used when
* the window is minimized (also known as iconified). Some window
* managers or desktop environments may also place it in the window
* frame, or display it in other contexts.
*
* The icon should be provided in whatever size it was naturally
* drawn; that is, don't scale the image before passing it to
* GTK+. Scaling is postponed until the last minute, when the desired
* final size is known, to allow best quality.
*
* If you have your icon hand-drawn in multiple sizes, use
* set_icon_list(). Then the best size will be used.
*
* This function is equivalent to calling set_icon_list()
* with a 1-element list.
*
* See also set_default_icon_list() to set the icon
* for all windows in your application in one go.
* @param icon Icon image, or <tt>0</tt>.
*/
void set_icon(const Glib::RefPtr<Gdk::Pixbuf>& icon);
//TODO: Correct the since tag.
/** Sets the icon for the window from a named themed icon. See
* the docs for Gtk::IconTheme for more details.
*
* Note that this has nothing to do with the WM_ICON_NAME
* property which is mentioned in the ICCCM.
*
* @newin{2,6}
* @param name The name of the themed icon.
*/
void set_icon_name(const Glib::ustring& name);
/** Sets the icon for the window.
*
* This function is equivalent to calling set_icon()
* with a pixbuf created by loading the image from @a filename.
* @param filename Location of icon file.
* @return <tt>true</tt> if setting the icon succeeded.
*/
bool set_icon_from_file(const std::string& filename);
/** Gets the value set by set_icon() (or if you've
* called set_icon_list(), gets the first icon in
* the icon list).
* @return Icon for window.
*/
Glib::RefPtr<Gdk::Pixbuf> get_icon();
/** Gets the value set by set_icon() (or if you've
* called set_icon_list(), gets the first icon in
* the icon list).
* @return Icon for window.
*/
Glib::RefPtr<const Gdk::Pixbuf> get_icon() const;
/** Returns the name of the themed icon for the window,
* see set_icon_name().
*
* @newin{2,6}
* @return The icon name or <tt>0</tt> if the window has
* no themed icon.
*/
Glib::ustring get_icon_name() const;
/** Sets an icon list to be used as fallback for windows that haven't
* had set_icon_list() called on them to set up a
* window-specific icon list. This function allows you to set up the
* icon for all windows in your app at once.
*
* See set_icon_list() for more details.
* @param list A list of Gdk::Pixbuf.
*/
static void set_default_icon_list(const Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> >& list);
/** Gets the value set by Gtk::Window::set_default_icon_list().
* @return Copy of default icon list.
*/
static Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> > get_default_icon_list();
/** Sets an icon to be used as fallback for windows that haven't
* had set_icon() called on them from a pixbuf.
*
* @newin{2,4}
* @param icon The icon.
*/
static void set_default_icon(const Glib::RefPtr<Gdk::Pixbuf>& icon);
/** Sets an icon to be used as fallback for windows that haven't
* had set_icon_list() called on them from a named
* themed icon, see set_icon_name().
*
* @newin{2,6}
* @param name The name of the themed icon.
*/
static void set_default_icon_name(const Glib::ustring& name);
/** Sets an icon to be used as fallback for windows that haven't
* had set_icon_list() called on them from a file
* on disk. Warns on failure if @a err is <tt>0</tt>.
*
* @newin{2,2}
* @param filename Location of icon file.
* @return <tt>true</tt> if setting the icon succeeded.
*/
static bool set_default_icon_from_file(const std::string& filename);
/** By default, after showing the first Gtk::Window, GTK+ calls
* gdk_notify_startup_complete(). Call this function to disable
* the automatic startup notification. You might do this if your
* first window is a splash screen, and you want to delay notification
* until after your real main window has been shown, for example.
*
* In that example, you would disable startup notification
* temporarily, show your splash screen, then re-enable it so that
* showing the main window would automatically result in notification.
*
* @newin{2,2}
* @param setting <tt>true</tt> to automatically do startup notification.
*/
static void set_auto_startup_notification(bool setting = true);
/** Sets a window modal or non-modal. Modal windows prevent interaction
* with other windows in the same application. To keep modal dialogs
* on top of main application windows, use
* set_transient_for() to make the dialog transient for the
* parent; most
* will then disallow lowering the dialog below the parent.
* @param modal Whether the window is modal.
*/
void set_modal(bool modal = true);
/** Returns whether the window is modal. See set_modal().
* @return <tt>true</tt> if the window is set to be modal and
* establishes a grab when shown.
*/
bool get_modal() const;
/** Returns a list of all existing toplevel windows. The widgets
* in the list are not individually referenced. If you want
* to iterate through the list and perform actions involving
* callbacks that might destroy the widgets, you <em>must</em> call
* <tt>g_list_foreach (result, (GFunc)g_object_ref, <tt>0</tt>)</tt> first, and
* then unref all the widgets afterwards.
* @return List of toplevel widgets.
*/
static Glib::ListHandle<Window*> list_toplevels();
/** Adds a mnemonic to this window.
* @param keyval The mnemonic.
* @param target The widget that gets activated by the mnemonic.
*/
void add_mnemonic(guint keyval, Widget& target);
/** Removes a mnemonic from this window.
* @param keyval The mnemonic.
* @param target The widget that gets activated by the mnemonic.
*/
void remove_mnemonic(guint keyval, Widget& target);
/** Activates the targets associated with the mnemonic.
* @param keyval The mnemonic.
* @param modifier The modifiers.
* @return <tt>true</tt> if the activation is done.
*/
bool mnemonic_activate(guint keyval, Gdk::ModifierType modifier);
/** Sets the mnemonic modifier for this window.
* @param modifier The modifier mask used to activate
* mnemonics on this window.
*/
void set_mnemonic_modifier(Gdk::ModifierType modifier);
/** Returns the mnemonic modifier for this window. See
* set_mnemonic_modifier().
* @return The modifier mask used to activate
* mnemonics on this window.
*/
Gdk::ModifierType get_mnemonic_modifier();
/** Presents a window to the user. This may mean raising the window
* in the stacking order, deiconifying it, moving it to the current
* desktop, and/or giving it the keyboard focus, possibly dependent
* on the user's platform, window manager, and preferences.
*
* If @a window is hidden, this function calls Gtk::Widget::show()
* as well.
*
* This function should be used when the user tries to open a window
* that's already open. Say for example the preferences dialog is
* currently open, and the user chooses Preferences from the menu
* a second time; use present() to move the already-open dialog
* where the user can see it.
*
* If you are calling this function in response to a user interaction,
* it is preferable to use present_with_time().
*/
void present();
/** Presents a window to the user in response to a user interaction.
* If you need to present a window without a timestamp, use
* present(). See present() for details.
*
* @newin{2,8}
* @param timestamp The timestamp of the user interaction (typically a
* button or key press event) which triggered this call.
*/
void present(guint32 timestamp);
/** Asks to iconify (i.e.\ minimize) the specified @a window. Note that
* you shouldn't assume the window is definitely iconified afterward,
* because other entities (e.g. the user or ) could deiconify it
* again, or there may not be a window manager in which case
* iconification isn't possible, etc. But normally the window will end
* up iconified. Just don't write code that crashes if not.
*
* It's permitted to call this function before showing a window,
* in which case the window will be iconified before it ever appears
* onscreen.
*
* You can track iconification via the "window-state-event" signal
* on Gtk::Widget.
*/
void iconify();
/** Asks to deiconify (i.e.\ unminimize) the specified @a window. Note
* that you shouldn't assume the window is definitely deiconified
* afterward, because other entities (e.g. the user or ) could iconify it
* again before your code which assumes deiconification gets to run.
*
* You can track iconification via the "window-state-event" signal
* on Gtk::Widget.
*/
void deiconify();
/** Asks to stick @a window, which means that it will appear on all user
* desktops. Note that you shouldn't assume the window is definitely
* stuck afterward, because other entities (e.g. the user or ) could unstick it
* again, and some window managers do not support sticking
* windows. But normally the window will end up stuck. Just don't
* write code that crashes if not.
*
* It's permitted to call this function before showing a window.
*
* You can track stickiness via the "window-state-event" signal
* on Gtk::Widget.
*/
void stick();
/** Asks to unstick @a window, which means that it will appear on only
* one of the user's desktops. Note that you shouldn't assume the
* window is definitely unstuck afterward, because other entities
* (e.g. the user or ) could stick it again. But normally the window will
* end up stuck. Just don't write code that crashes if not.
*
* You can track stickiness via the "window-state-event" signal
* on Gtk::Widget.
*/
void unstick();
/** Asks to maximize @a window, so that it becomes full-screen. Note that
* you shouldn't assume the window is definitely maximized afterward,
* because other entities (e.g. the user or ) could unmaximize it
* again, and not all window managers support maximization. But
* normally the window will end up maximized. Just don't write code
* that crashes if not.
*
* It's permitted to call this function before showing a window,
* in which case the window will be maximized when it appears onscreen
* initially.
*
* You can track maximization via the "window-state-event" signal
* on Gtk::Widget.
*/
void maximize();
/** Asks to unmaximize @a window. Note that you shouldn't assume the
* window is definitely unmaximized afterward, because other entities
* (e.g. the user or ) could maximize it again, and not all window
* managers honor requests to unmaximize. But normally the window will
* end up unmaximized. Just don't write code that crashes if not.
*
* You can track maximization via the "window-state-event" signal
* on Gtk::Widget.
*/
void unmaximize();
/** Asks to place @a window in the fullscreen state. Note that you
* shouldn't assume the window is definitely full screen afterward,
* because other entities (e.g. the user or ) could unfullscreen it
* again, and not all window managers honor requests to fullscreen
* windows. But normally the window will end up fullscreen. Just
* don't write code that crashes if not.
*
* You can track the fullscreen state via the "window-state-event" signal
* on Gtk::Widget.
*
* @newin{2,2}
*/
void fullscreen();
/** Asks to toggle off the fullscreen state for @a window. Note that you
* shouldn't assume the window is definitely not full screen
* afterward, because other entities (e.g. the user or ) could fullscreen it
* again, and not all window managers honor requests to unfullscreen
* windows. But normally the window will end up restored to its normal
* state. Just don't write code that crashes if not.
*
* You can track the fullscreen state via the "window-state-event" signal
* on Gtk::Widget.
*
* @newin{2,2}
*/
void unfullscreen();
/** Starts resizing a window. This function is used if an application
* has window resizing controls. When GDK can support it, the resize
* will be done using the standard mechanism for the or windowing
* system. Otherwise, GDK will try to emulate window resizing,
* potentially not all that well, depending on the windowing system.
* @param button Mouse button that initiated the drag.
* @param edge Position of the resize control.
* @param root_x X position where the user clicked to initiate the drag, in root window coordinates.
* @param root_y Y position where the user clicked to initiate the drag.
* @param timestamp Timestamp from the click event that initiated the drag.
*/
void begin_resize_drag(Gdk::WindowEdge edge, int button, int root_x, int root_y, guint32 timestamp);
/** Starts moving a window. This function is used if an application has
* window movement grips. When GDK can support it, the window movement
* will be done using the standard mechanism for the or windowing
* system. Otherwise, GDK will try to emulate window movement,
* potentially not all that well, depending on the windowing system.
* @param button Mouse button that initiated the drag.
* @param root_x X position where the user clicked to initiate the drag, in root window coordinates.
* @param root_y Y position where the user clicked to initiate the drag.
* @param timestamp Timestamp from the click event that initiated the drag.
*/
void begin_move_drag(int button, int root_x, int root_y, guint32 timestamp);
/** Sets the default size of a window. If the window's "natural" size
* (its size request) is larger than the default, the default will be
* ignored. More generally, if the default size does not obey the
* geometry hints for the window (set_geometry_hints() can
* be used to set these explicitly), the default size will be clamped
* to the nearest permitted size.
*
* Unlike Gtk::Widget::set_size_request(), which sets a size request for
* a widget and thus would keep users from shrinking the window, this
* function only sets the initial size, just as if the user had
* resized the window themselves. Users can still shrink the window
* again as they normally would. Setting a default size of -1 means to
* use the "natural" default size (the size request of the window).
*
* For more control over a window's initial size and how resizing works,
* investigate set_geometry_hints().
*
* For some uses, resize() is a more appropriate function.
* resize() changes the current size of the window, rather
* than the size to be used on initial display. resize() always
* affects the window itself, not the geometry widget.
*
* The default size of a window only affects the first time a window is
* shown; if a window is hidden and re-shown, it will remember the size
* it had prior to hiding, rather than using the default size.
*
* Windows can't actually be 0x0 in size, they must be at least 1x1, but
* passing 0 for @a width and @a height is OK, resulting in a 1x1 default size.
* @param width Width in pixels, or -1 to unset the default width.
* @param height Height in pixels, or -1 to unset the default height.
*/
void set_default_size(int width, int height);
/** Gets the default size of the window. A value of -1 for the width or
* height indicates that a default size has not been explicitly set
* for that dimension, so the "natural" size of the window will be
* used.
* @param width Location to store the default width.
* @param height Location to store the default height.
*/
void get_default_size(int& width, int& height) const;
/** Resizes the window as if the user had done so, obeying geometry
* constraints. The default geometry constraint is that windows may
* not be smaller than their size request; to override this
* constraint, call Gtk::Widget::set_size_request() to set the window's
* request to a smaller value.
*
* If resize() is called before showing a window for the
* first time, it overrides any default size set with
* set_default_size().
*
* Windows may not be resized smaller than 1 by 1 pixels.
* @param width Width in pixels to resize the window to.
* @param height Height in pixels to resize the window to.
*/
void resize(int width, int height);
/** Obtains the current size of @a window. If @a window is not onscreen,
* it returns the size GTK+ will suggest to the a better way than
* doing it yourself - set_position() will frequently
* handle the details for you.
* @param width Return location for width.
* @param height Return location for height.
*/
void get_size(int& width, int& height) const;
/** Asks the has a
* nice table of gravities in the "implementation notes" section.
*
* The get_position() documentation may also be relevant.
* @param x X coordinate to move window to.
* @param y Y coordinate to move window to.
*/
void move(int x, int y);
/** This function returns the position you need to pass to
* move() to keep @a window in its current position. This
* means that the meaning of the returned value varies with window
* gravity. See move() for more details.
*
* If you haven't changed the window gravity, its gravity will be
* Gdk::GRAVITY_NORTH_WEST. This means that get_position()
* gets the position of the top-left corner of the window manager
* frame for the window. move() sets the position of this
* same top-left corner.
*
* get_position() is not 100% reliable because the X %Window System
* does not specify a way to obtain the geometry of the
* decorations placed on a window by the window manager.
* Thus GTK+ is using a "best guess" that works with most
* window managers.
*
* Moreover, nearly all window managers are historically broken with
* respect to their handling of window gravity. So moving a window to
* its current position as returned by get_position() tends
* to result in moving the window slightly. %Window managers are
* slowly getting better over time.
*
* If a window has gravity Gdk::GRAVITY_STATIC the window manager
* frame is not relevant, and thus get_position() will
* always produce accurate results. However you can't use static
* gravity to do things like place a window in a corner of the screen,
* because static gravity ignores the window manager decorations.
*
* If you are saving and restoring your application's window
* positions, you should know that it's impossible for applications to
* do this without getting it somewhat wrong because applications do
* not have sufficient knowledge of window manager state. The Correct
* Mechanism is to support the session management protocol (see the
* "GnomeClient" object in the GNOME libraries for example) and allow
* the window manager to save your window sizes and positions.
* @param root_x Return location for X coordinate of gravity-determined reference point.
* @param root_y Return location for Y coordinate of gravity-determined reference point.
*/
void get_position(int& root_x, int& root_y) const;
/** Parses a standard X %Window System geometry string - see the
* manual page for X (type 'man X') for details on this.
* parse_geometry() does work on all GTK+ ports
* including Win32 but is primarily intended for an X environment.
*
* If either a size or a position can be extracted from the
* geometry string, parse_geometry() returns <tt>true</tt>
* and calls set_default_size() and/or move()
* to resize/move the window.
*
* If parse_geometry() returns <tt>true</tt>, it will also
* set the Gdk::HINT_USER_POS and/or Gdk::HINT_USER_SIZE hints
* indicating to the window manager that the size/position of
* the window was user-specified. This causes most window
* managers to honor the geometry.
*
* Note that for parse_geometry() to work as expected, it has
* to be called when the window has its "final" size, i.e. after calling
* Gtk::Widget::show_all() on the contents and set_geometry_hints()
* on the window.
* |[
* #include <gtk/gtk.h>
*
* static void
* fill_with_content (GtkWidget *vbox)
* {
* / * fill with content... * /
* }
*
* int
* main (int argc, char *argv[])
* {
* GtkWidget *window, *vbox;
* GdkGeometry size_hints = {
* 100, 50, 0, 0, 100, 50, 10, 10, 0.0, 0.0, GDK_GRAVITY_NORTH_WEST
* };
*
* gtk_init (&argc, &argv);
*
* window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
* vbox = gtk_vbox_new (<tt>false</tt>, 0);
*
* gtk_container_add (GTK_CONTAINER (window), vbox);
* fill_with_content (vbox);
* gtk_widget_show_all (vbox);
*
* gtk_window_set_geometry_hints (GTK_WINDOW (window),
* window,
* &size_hints,
* GDK_HINT_MIN_SIZE |
* GDK_HINT_BASE_SIZE |
* GDK_HINT_RESIZE_INC);
*
* if (argc > 1)
* {
* if (!gtk_window_parse_geometry (GTK_WINDOW (window), argv[1]))
* fprintf (stderr, "Failed to parse '%s'<tt>\\n</tt>", argv[1]);
* }
*
* gtk_widget_show_all (window);
* gtk_main();
*
* return 0;
* }
* ]|
* @param geometry Geometry string.
* @return <tt>true</tt> if string was parsed successfully.
*/
bool parse_geometry(const Glib::ustring& geometry);
/** Returns the group for @a window or the default group, if
* @a window is <tt>0</tt> or if @a window does not have an explicit
* window group.
*
* @newin{2,10}
* @return The Gtk::WindowGroup for a window or the default group.
*/
Glib::RefPtr<WindowGroup> get_group();
/** Returns the group for @a window or the default group, if
* @a window is <tt>0</tt> or if @a window does not have an explicit
* window group.
*
* @newin{2,10}
* @return The Gtk::WindowGroup for a window or the default group.
*/
Glib::RefPtr<const WindowGroup> get_group() const;
/** Gets the type of the window. See Gtk::WindowType.
*
* @newin{2,20}
* @return The type of the window.
*/
WindowType get_window_type() const;
/** Hides @a window, then reshows it, resetting the
* default size and position of the window. Used
* by GUI builders only.
*/
void reshow_with_initial_size();
/** Asks to keep @a window above, so that it stays on top. Note that
* you shouldn't assume the window is definitely above afterward,
* because other entities (e.g. the user or specification, the above state is mainly meant
* for user preferences and should not be used by applications e.g. for
* drawing attention to their dialogs.
*
* @newin{2,4}
* @param setting Whether to keep @a window above other windows.
*/
void set_keep_above(bool setting = true);
/** Asks to keep @a window below, so that it stays in bottom. Note that
* you shouldn't assume the window is definitely below afterward,
* because other entities (e.g. the user or specification, the above state is mainly meant
* for user preferences and should not be used by applications e.g. for
* drawing attention to their dialogs.
*
* @newin{2,4}
* @param setting Whether to keep @a window below other windows.
*/
void set_keep_below(bool setting = true);
/** Returns a default accel group for this window
* This is a gtkmm-specific function. This accel group can not
* be removed.
*/
Glib::RefPtr<AccelGroup> get_accel_group();
/** Brings the window to the front.
* This is just a more obvious convenience wrapper for get_window()->raise().
*/
virtual void raise();
///Overriden to warn that it doesn't make sense to use Gtk::manage() on this class because it has no parent container.
virtual void set_manage();
protected:
//See comments in the implementations:
void destroy_();
void _destroy_c_instance();
private:
//We'll create an accel_group if it's requested, and remember it.
//Otherwise, you'd have to create it, add it to the window, then remember it somewhere else while you add it to other widgets.
Glib::RefPtr<AccelGroup> accel_group_;
};
} // namespace Gtk
namespace Glib
{
/** A Glib::wrap() method for this object.
*
* @param object The C instance.
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*
* @relates Gtk::WindowGroup
*/
Glib::RefPtr<Gtk::WindowGroup> wrap(GtkWindowGroup* object, bool take_copy = false);
}
namespace Glib
{
/** A Glib::wrap() method for this object.
*
* @param object The C instance.
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*
* @relates Gtk::Window
*/
Gtk::Window* wrap(GtkWindow* object, bool take_copy = false);
} //namespace Glib
#endif /* _GTKMM_WINDOW_H */
|