Mercurial > hg > octave-nkf
comparison src/graphics.h.in @ 7386:22815fa9c368
[project @ 2008-01-15 21:28:43 by jwe]
author | jwe |
---|---|
date | Tue, 15 Jan 2008 21:28:43 +0000 |
parents | 47c919254791 |
children | 097a2637ef1b |
comparison
equal
deleted
inserted
replaced
7385:8b7b4f58199f | 7386:22815fa9c368 |
---|---|
1049 | 1049 |
1050 octave_value get_userdata (void) const { return userdata.get (); } | 1050 octave_value get_userdata (void) const { return userdata.get (); } |
1051 | 1051 |
1052 std::string get_visible (void) const { return visible.current_value (); } | 1052 std::string get_visible (void) const { return visible.current_value (); } |
1053 | 1053 |
1054 void remove_child (const graphics_handle& h); | 1054 virtual void remove_child (const graphics_handle& h); |
1055 | 1055 |
1056 void adopt (const graphics_handle& h) | 1056 virtual void adopt (const graphics_handle& h) |
1057 { | 1057 { |
1058 octave_idx_type n = children.numel (); | 1058 octave_idx_type n = children.numel (); |
1059 children.resize (1, n+1); | 1059 children.resize (1, n+1); |
1060 children(n) = h.value (); | 1060 children(n) = h.value (); |
1061 } | 1061 } |
1186 void reparent (const graphics_handle& new_parent) { parent = new_parent; } | 1186 void reparent (const graphics_handle& new_parent) { parent = new_parent; } |
1187 | 1187 |
1188 // Update data limits for AXIS_TYPE (xdata, ydata, etc.) in the parent | 1188 // Update data limits for AXIS_TYPE (xdata, ydata, etc.) in the parent |
1189 // axes object. | 1189 // axes object. |
1190 | 1190 |
1191 void update_axis_limits (const std::string& axis_type) const; | 1191 virtual void update_axis_limits (const std::string& axis_type) const; |
1192 | 1192 |
1193 virtual void delete_children (void); | 1193 virtual void delete_children (void); |
1194 | 1194 |
1195 Matrix get_children (void) const { return children; } | 1195 Matrix get_children (void) const { return children; } |
1196 | 1196 |
1289 | 1289 |
1290 virtual ~base_graphics_object (void) { } | 1290 virtual ~base_graphics_object (void) { } |
1291 | 1291 |
1292 virtual void mark_modified (void) | 1292 virtual void mark_modified (void) |
1293 { | 1293 { |
1294 error ("base_graphics_object::mark_modified: invalid graphics object"); | 1294 if (valid_object ()) |
1295 } | 1295 get_properties ().mark_modified (); |
1296 | 1296 else |
1297 virtual void override_defaults (base_graphics_object&) | 1297 error ("base_graphics_object::mark_modified: invalid graphics object"); |
1298 { | 1298 } |
1299 error ("base_graphics_object::override_defaults: invalid graphics object"); | 1299 |
1300 } | 1300 virtual void override_defaults (base_graphics_object& obj) |
1301 | 1301 { |
1302 virtual void set_from_list (property_list&) | 1302 if (valid_object ()) |
1303 { | 1303 get_properties ().override_defaults (obj); |
1304 error ("base_graphics_object::set_from_list: invalid graphics object"); | 1304 else |
1305 } | 1305 error ("base_graphics_object::override_defaults: invalid graphics object"); |
1306 | 1306 } |
1307 virtual void set (const caseless_str&, const octave_value&) | 1307 |
1308 { | 1308 virtual void set_from_list (property_list& plist) |
1309 error ("base_graphics_object::set: invalid graphics object"); | 1309 { |
1310 if (valid_object ()) | |
1311 get_properties ().set_from_list (*this, plist); | |
1312 else | |
1313 error ("base_graphics_object::set_from_list: invalid graphics object"); | |
1314 } | |
1315 | |
1316 virtual void set (const caseless_str& pname, const octave_value& pval) | |
1317 { | |
1318 if (valid_object ()) | |
1319 get_properties ().set (pname, pval); | |
1320 else | |
1321 error ("base_graphics_object::set: invalid graphics object"); | |
1310 } | 1322 } |
1311 | 1323 |
1312 virtual void set_defaults (const std::string&) | 1324 virtual void set_defaults (const std::string&) |
1313 { | 1325 { |
1314 error ("base_graphics_object::set_defaults: invalid graphics object"); | 1326 error ("base_graphics_object::set_defaults: invalid graphics object"); |
1315 } | 1327 } |
1316 | 1328 |
1317 virtual octave_value get (bool all = false) const | 1329 virtual octave_value get (bool all = false) const |
1318 { | 1330 { |
1319 error ("base_graphics_object::get: invalid graphics object"); | 1331 if (valid_object ()) |
1320 return octave_value (); | 1332 return get_properties ().get (all); |
1321 } | 1333 else |
1322 | 1334 { |
1323 virtual octave_value get (const caseless_str&) const | 1335 error ("base_graphics_object::get: invalid graphics object"); |
1324 { | 1336 return octave_value (); |
1325 error ("base_graphics_object::get: invalid graphics object"); | 1337 } |
1326 return octave_value (); | 1338 } |
1339 | |
1340 virtual octave_value get (const caseless_str& pname) const | |
1341 { | |
1342 if (valid_object ()) | |
1343 return get_properties ().get (pname); | |
1344 else | |
1345 { | |
1346 error ("base_graphics_object::get: invalid graphics object"); | |
1347 return octave_value (); | |
1348 } | |
1327 } | 1349 } |
1328 | 1350 |
1329 virtual octave_value get_default (const caseless_str&) const; | 1351 virtual octave_value get_default (const caseless_str&) const; |
1330 | 1352 |
1331 virtual octave_value get_factory_default (const caseless_str&) const; | 1353 virtual octave_value get_factory_default (const caseless_str&) const; |
1342 return octave_value (); | 1364 return octave_value (); |
1343 } | 1365 } |
1344 | 1366 |
1345 virtual graphics_handle get_parent (void) const | 1367 virtual graphics_handle get_parent (void) const |
1346 { | 1368 { |
1347 error ("base_graphics_object::get_parent: invalid graphics object"); | 1369 if (valid_object ()) |
1348 return graphics_handle (); | 1370 return get_properties ().get_parent (); |
1349 } | 1371 else |
1350 | 1372 { |
1351 virtual void remove_child (const graphics_handle&) | 1373 error ("base_graphics_object::get_parent: invalid graphics object"); |
1352 { | 1374 return graphics_handle (); |
1353 error ("base_graphics_object::remove_child: invalid graphics object"); | 1375 } |
1354 } | 1376 } |
1355 | 1377 |
1356 virtual void adopt (const graphics_handle&) | 1378 virtual void remove_child (const graphics_handle& h) |
1357 { | 1379 { |
1358 error ("base_graphics_object::adopt: invalid graphics object"); | 1380 if (valid_object ()) |
1359 } | 1381 get_properties ().remove_child (h); |
1360 | 1382 else |
1361 virtual void reparent (const graphics_handle&) | 1383 error ("base_graphics_object::remove_child: invalid graphics object"); |
1362 { | 1384 } |
1363 error ("base_graphics_object::reparent: invalid graphics object"); | 1385 |
1386 virtual void adopt (const graphics_handle& h) | |
1387 { | |
1388 if (valid_object ()) | |
1389 get_properties ().adopt (h); | |
1390 else | |
1391 error ("base_graphics_object::adopt: invalid graphics object"); | |
1392 } | |
1393 | |
1394 virtual void reparent (const graphics_handle& np) | |
1395 { | |
1396 if (valid_object ()) | |
1397 get_properties ().reparent (np); | |
1398 else | |
1399 error ("base_graphics_object::reparent: invalid graphics object"); | |
1364 } | 1400 } |
1365 | 1401 |
1366 virtual void defaults (void) const | 1402 virtual void defaults (void) const |
1367 { | 1403 { |
1368 error ("base_graphics_object::default: invalid graphics object"); | 1404 if (valid_object ()) |
1405 { | |
1406 std::string msg = (type () + "::defaults"); | |
1407 gripe_not_implemented (msg.c_str ()); | |
1408 } | |
1409 else | |
1410 error ("base_graphics_object::default: invalid graphics object"); | |
1369 } | 1411 } |
1370 | 1412 |
1371 virtual base_properties& get_properties (void) | 1413 virtual base_properties& get_properties (void) |
1372 { | 1414 { |
1373 static base_properties properties; | 1415 static base_properties properties; |
1387 error ("base_graphics_object::update_axis_limits: invalid graphics object"); | 1429 error ("base_graphics_object::update_axis_limits: invalid graphics object"); |
1388 } | 1430 } |
1389 | 1431 |
1390 virtual bool valid_object (void) const { return false; } | 1432 virtual bool valid_object (void) const { return false; } |
1391 | 1433 |
1392 virtual std::string type (void) const { return "unknown"; } | 1434 virtual std::string type (void) const |
1435 { | |
1436 return (valid_object () ? get_properties ().graphics_object_name () | |
1437 : "unknown"); | |
1438 } | |
1393 | 1439 |
1394 bool isa (const std::string& go_name) const | 1440 bool isa (const std::string& go_name) const |
1395 { | 1441 { |
1396 return type () == go_name; | 1442 return type () == go_name; |
1397 } | 1443 } |
1586 public: | 1632 public: |
1587 | 1633 |
1588 root_figure (void) : xproperties (0, graphics_handle ()), default_properties () { } | 1634 root_figure (void) : xproperties (0, graphics_handle ()), default_properties () { } |
1589 | 1635 |
1590 ~root_figure (void) { xproperties.delete_children (); } | 1636 ~root_figure (void) { xproperties.delete_children (); } |
1591 | |
1592 std::string type (void) const { return xproperties.graphics_object_name (); } | |
1593 | 1637 |
1594 void mark_modified (void) { } | 1638 void mark_modified (void) { } |
1595 | 1639 |
1596 void override_defaults (base_graphics_object& obj) | 1640 void override_defaults (base_graphics_object& obj) |
1597 { | 1641 { |
1599 // list includes the properties for all defaults (line, | 1643 // list includes the properties for all defaults (line, |
1600 // surface, etc.) then we don't have to know the type of OBJ | 1644 // surface, etc.) then we don't have to know the type of OBJ |
1601 // here, we just call its set function and let it decide which | 1645 // here, we just call its set function and let it decide which |
1602 // properties from the list to use. | 1646 // properties from the list to use. |
1603 obj.set_from_list (default_properties); | 1647 obj.set_from_list (default_properties); |
1604 } | |
1605 | |
1606 void set_from_list (property_list& plist) | |
1607 { | |
1608 xproperties.set_from_list (*this, plist); | |
1609 } | 1648 } |
1610 | 1649 |
1611 void set (const caseless_str& name, const octave_value& value) | 1650 void set (const caseless_str& name, const octave_value& value) |
1612 { | 1651 { |
1613 if (name.compare ("default", 7)) | 1652 if (name.compare ("default", 7)) |
1617 default_properties.set (name.substr (7), value); | 1656 default_properties.set (name.substr (7), value); |
1618 else | 1657 else |
1619 xproperties.set (name, value); | 1658 xproperties.set (name, value); |
1620 } | 1659 } |
1621 | 1660 |
1622 octave_value get (bool all = false) const | |
1623 { | |
1624 return xproperties.get (all); | |
1625 } | |
1626 | |
1627 octave_value get (const caseless_str& name) const | 1661 octave_value get (const caseless_str& name) const |
1628 { | 1662 { |
1629 octave_value retval; | 1663 octave_value retval; |
1630 | 1664 |
1631 if (name.compare ("default", 7)) | 1665 if (name.compare ("default", 7)) |
1666 octave_value get_factory_defaults (void) const | 1700 octave_value get_factory_defaults (void) const |
1667 { | 1701 { |
1668 return factory_properties.as_struct ("factory"); | 1702 return factory_properties.as_struct ("factory"); |
1669 } | 1703 } |
1670 | 1704 |
1671 graphics_handle get_parent (void) const { return xproperties.get_parent (); } | |
1672 | |
1673 void remove_child (const graphics_handle& h) { xproperties.remove_child (h); } | |
1674 | |
1675 void adopt (const graphics_handle& h) { xproperties.adopt (h); } | |
1676 | |
1677 void reparent (const graphics_handle& np) { xproperties.reparent (np); } | |
1678 | |
1679 base_properties& get_properties (void) { return xproperties; } | 1705 base_properties& get_properties (void) { return xproperties; } |
1680 | 1706 |
1681 const base_properties& get_properties (void) const { return xproperties; } | 1707 const base_properties& get_properties (void) const { return xproperties; } |
1682 | |
1683 void defaults (void) const | |
1684 { | |
1685 gripe_not_implemented ("root_figure::defaults"); | |
1686 } | |
1687 | 1708 |
1688 bool valid_object (void) const { return true; } | 1709 bool valid_object (void) const { return true; } |
1689 | 1710 |
1690 private: | 1711 private: |
1691 property_list default_properties; | 1712 property_list default_properties; |
1737 xproperties.override_defaults (*this); | 1758 xproperties.override_defaults (*this); |
1738 } | 1759 } |
1739 | 1760 |
1740 ~figure (void) | 1761 ~figure (void) |
1741 { | 1762 { |
1742 xproperties.delete_children (); | 1763 xproperties.delete_children (); |
1743 xproperties.close (); | 1764 xproperties.close (); |
1744 } | 1765 } |
1745 | |
1746 std::string type (void) const { return xproperties.graphics_object_name (); } | |
1747 | |
1748 void mark_modified (void) { xproperties.mark_modified (); } | |
1749 | 1766 |
1750 void override_defaults (base_graphics_object& obj) | 1767 void override_defaults (base_graphics_object& obj) |
1751 { | 1768 { |
1752 // Allow parent (root figure) to override first (properties knows how | 1769 // Allow parent (root figure) to override first (properties knows how |
1753 // to find the parent object). | 1770 // to find the parent object). |
1757 // list includes the properties for all defaults (line, | 1774 // list includes the properties for all defaults (line, |
1758 // surface, etc.) then we don't have to know the type of OBJ | 1775 // surface, etc.) then we don't have to know the type of OBJ |
1759 // here, we just call its set function and let it decide which | 1776 // here, we just call its set function and let it decide which |
1760 // properties from the list to use. | 1777 // properties from the list to use. |
1761 obj.set_from_list (default_properties); | 1778 obj.set_from_list (default_properties); |
1762 } | |
1763 | |
1764 void set_from_list (property_list& plist) | |
1765 { | |
1766 xproperties.set_from_list (*this, plist); | |
1767 } | 1779 } |
1768 | 1780 |
1769 void set (const caseless_str& name, const octave_value& value) | 1781 void set (const caseless_str& name, const octave_value& value) |
1770 { | 1782 { |
1771 if (name.compare ("default", 7)) | 1783 if (name.compare ("default", 7)) |
1775 default_properties.set (name.substr (7), value); | 1787 default_properties.set (name.substr (7), value); |
1776 else | 1788 else |
1777 xproperties.set (name, value); | 1789 xproperties.set (name, value); |
1778 } | 1790 } |
1779 | 1791 |
1780 octave_value get (bool all = false) const | |
1781 { | |
1782 return xproperties.get (all); | |
1783 } | |
1784 | |
1785 octave_value get (const caseless_str& name) const | 1792 octave_value get (const caseless_str& name) const |
1786 { | 1793 { |
1787 octave_value retval; | 1794 octave_value retval; |
1788 | 1795 |
1789 if (name.compare ("default", 7)) | 1796 if (name.compare ("default", 7)) |
1799 octave_value get_defaults (void) const | 1806 octave_value get_defaults (void) const |
1800 { | 1807 { |
1801 return default_properties.as_struct ("default"); | 1808 return default_properties.as_struct ("default"); |
1802 } | 1809 } |
1803 | 1810 |
1804 graphics_handle get_parent (void) const { return xproperties.get_parent (); } | |
1805 | |
1806 void remove_child (const graphics_handle& h) { xproperties.remove_child (h); } | |
1807 | |
1808 void adopt (const graphics_handle& h) { xproperties.adopt (h); } | |
1809 | |
1810 void reparent (const graphics_handle& np) { xproperties.reparent (np); } | |
1811 | |
1812 base_properties& get_properties (void) { return xproperties; } | 1811 base_properties& get_properties (void) { return xproperties; } |
1813 | 1812 |
1814 const base_properties& get_properties (void) const { return xproperties; } | 1813 const base_properties& get_properties (void) const { return xproperties; } |
1815 | |
1816 void defaults (void) const { gripe_not_implemented ("figure::defaults"); } | |
1817 | 1814 |
1818 bool valid_object (void) const { return true; } | 1815 bool valid_object (void) const { return true; } |
1819 | 1816 |
1820 private: | 1817 private: |
1821 property_list default_properties; | 1818 property_list default_properties; |
1929 xproperties.override_defaults (*this); | 1926 xproperties.override_defaults (*this); |
1930 } | 1927 } |
1931 | 1928 |
1932 ~axes (void) { xproperties.delete_children (); } | 1929 ~axes (void) { xproperties.delete_children (); } |
1933 | 1930 |
1934 std::string type (void) const { return xproperties.graphics_object_name (); } | |
1935 | |
1936 void mark_modified (void) { xproperties.mark_modified (); } | |
1937 | |
1938 void override_defaults (base_graphics_object& obj) | 1931 void override_defaults (base_graphics_object& obj) |
1939 { | 1932 { |
1940 // Allow parent (figure) to override first (properties knows how | 1933 // Allow parent (figure) to override first (properties knows how |
1941 // to find the parent object). | 1934 // to find the parent object). |
1942 xproperties.override_defaults (obj); | 1935 xproperties.override_defaults (obj); |
1945 // list includes the properties for all defaults (line, | 1938 // list includes the properties for all defaults (line, |
1946 // surface, etc.) then we don't have to know the type of OBJ | 1939 // surface, etc.) then we don't have to know the type of OBJ |
1947 // here, we just call its set function and let it decide which | 1940 // here, we just call its set function and let it decide which |
1948 // properties from the list to use. | 1941 // properties from the list to use. |
1949 obj.set_from_list (default_properties); | 1942 obj.set_from_list (default_properties); |
1950 } | |
1951 | |
1952 void set_from_list (property_list& plist) | |
1953 { | |
1954 xproperties.set_from_list (*this, plist); | |
1955 } | 1943 } |
1956 | 1944 |
1957 void set (const caseless_str& name, const octave_value& value) | 1945 void set (const caseless_str& name, const octave_value& value) |
1958 { | 1946 { |
1959 if (name.compare ("default", 7)) | 1947 if (name.compare ("default", 7)) |
1968 void set_defaults (const std::string& mode) | 1956 void set_defaults (const std::string& mode) |
1969 { | 1957 { |
1970 xproperties.set_defaults (*this, mode); | 1958 xproperties.set_defaults (*this, mode); |
1971 } | 1959 } |
1972 | 1960 |
1973 octave_value get (bool all = false) const | |
1974 { | |
1975 return xproperties.get (all); | |
1976 } | |
1977 | |
1978 octave_value get (const caseless_str& name) const | 1961 octave_value get (const caseless_str& name) const |
1979 { | 1962 { |
1980 octave_value retval; | 1963 octave_value retval; |
1981 | 1964 |
1982 // FIXME -- finish this. | 1965 // FIXME -- finish this. |
1993 octave_value get_defaults (void) const | 1976 octave_value get_defaults (void) const |
1994 { | 1977 { |
1995 return default_properties.as_struct ("default"); | 1978 return default_properties.as_struct ("default"); |
1996 } | 1979 } |
1997 | 1980 |
1998 graphics_handle get_parent (void) const { return xproperties.get_parent (); } | |
1999 | |
2000 void remove_child (const graphics_handle& h) { xproperties.remove_child (h); } | |
2001 | |
2002 void adopt (const graphics_handle& h) { xproperties.adopt (h); } | |
2003 | |
2004 void reparent (const graphics_handle& np) { xproperties.reparent (np); } | |
2005 | |
2006 base_properties& get_properties (void) { return xproperties; } | 1981 base_properties& get_properties (void) { return xproperties; } |
2007 | 1982 |
2008 const base_properties& get_properties (void) const { return xproperties; } | 1983 const base_properties& get_properties (void) const { return xproperties; } |
2009 | |
2010 void defaults (void) const { gripe_not_implemented ("axes::defaults"); } | |
2011 | 1984 |
2012 void update_axis_limits (const std::string& axis_type); | 1985 void update_axis_limits (const std::string& axis_type); |
2013 | 1986 |
2014 bool valid_object (void) const { return true; } | 1987 bool valid_object (void) const { return true; } |
2015 | 1988 |
2063 xproperties.override_defaults (*this); | 2036 xproperties.override_defaults (*this); |
2064 } | 2037 } |
2065 | 2038 |
2066 ~line (void) { xproperties.delete_children (); } | 2039 ~line (void) { xproperties.delete_children (); } |
2067 | 2040 |
2068 std::string type (void) const { return xproperties.graphics_object_name (); } | |
2069 | |
2070 void mark_modified (void) { xproperties.mark_modified (); } | |
2071 | |
2072 void override_defaults (base_graphics_object& obj) | |
2073 { | |
2074 // Allow parent (figure) to override first (properties knows how | |
2075 // to find the parent object). | |
2076 xproperties.override_defaults (obj); | |
2077 } | |
2078 | |
2079 void set_from_list (property_list& plist) | |
2080 { | |
2081 xproperties.set_from_list (*this, plist); | |
2082 } | |
2083 | |
2084 void set (const caseless_str& name, const octave_value& val) | |
2085 { | |
2086 xproperties.set (name, val); | |
2087 } | |
2088 | |
2089 octave_value get (bool all = false) const | |
2090 { | |
2091 return xproperties.get (all); | |
2092 } | |
2093 | |
2094 octave_value get (const caseless_str& name) const | |
2095 { | |
2096 return xproperties.get (name); | |
2097 } | |
2098 | |
2099 graphics_handle get_parent (void) const { return xproperties.get_parent (); } | |
2100 | |
2101 void remove_child (const graphics_handle& h) { xproperties.remove_child (h); } | |
2102 | |
2103 void adopt (const graphics_handle& h) { xproperties.adopt (h); } | |
2104 | |
2105 void reparent (const graphics_handle& h) { xproperties.reparent (h); } | |
2106 | |
2107 base_properties& get_properties (void) { return xproperties; } | 2041 base_properties& get_properties (void) { return xproperties; } |
2108 | 2042 |
2109 const base_properties& get_properties (void) const { return xproperties; } | 2043 const base_properties& get_properties (void) const { return xproperties; } |
2110 | |
2111 void defaults (void) const { gripe_not_implemented ("line::defaults"); } | |
2112 | 2044 |
2113 bool valid_object (void) const { return true; } | 2045 bool valid_object (void) const { return true; } |
2114 }; | 2046 }; |
2115 | 2047 |
2116 // --------------------------------------------------------------------- | 2048 // --------------------------------------------------------------------- |
2165 xproperties.override_defaults (*this); | 2097 xproperties.override_defaults (*this); |
2166 } | 2098 } |
2167 | 2099 |
2168 ~text (void) { xproperties.delete_children (); } | 2100 ~text (void) { xproperties.delete_children (); } |
2169 | 2101 |
2170 std::string type (void) const { return xproperties.graphics_object_name (); } | |
2171 | |
2172 void mark_modified (void) { xproperties.mark_modified (); } | |
2173 | |
2174 void override_defaults (base_graphics_object& obj) | |
2175 { | |
2176 // Allow parent (figure) to override first (properties knows how | |
2177 // to find the parent object). | |
2178 xproperties.override_defaults (obj); | |
2179 } | |
2180 | |
2181 void set_from_list (property_list& plist) | |
2182 { | |
2183 xproperties.set_from_list (*this, plist); | |
2184 } | |
2185 | |
2186 void set (const caseless_str& name, const octave_value& val) | |
2187 { | |
2188 xproperties.set (name, val); | |
2189 } | |
2190 | |
2191 octave_value get (bool all = false) const | |
2192 { | |
2193 return xproperties.get (all); | |
2194 } | |
2195 | |
2196 octave_value get (const caseless_str& name) const | |
2197 { | |
2198 return xproperties.get (name); | |
2199 } | |
2200 | |
2201 graphics_handle get_parent (void) const { return xproperties.get_parent (); } | |
2202 | |
2203 void remove_child (const graphics_handle& h) { xproperties.remove_child (h); } | |
2204 | |
2205 void adopt (const graphics_handle& h) { xproperties.adopt (h); } | |
2206 | |
2207 void reparent (const graphics_handle& h) { xproperties.reparent (h); } | |
2208 | |
2209 base_properties& get_properties (void) { return xproperties; } | 2102 base_properties& get_properties (void) { return xproperties; } |
2210 | 2103 |
2211 const base_properties& get_properties (void) const { return xproperties; } | 2104 const base_properties& get_properties (void) const { return xproperties; } |
2212 | |
2213 void defaults (void) const { gripe_not_implemented ("text::defaults"); } | |
2214 | 2105 |
2215 bool valid_object (void) const { return true; } | 2106 bool valid_object (void) const { return true; } |
2216 }; | 2107 }; |
2217 | 2108 |
2218 // --------------------------------------------------------------------- | 2109 // --------------------------------------------------------------------- |
2248 xproperties.override_defaults (*this); | 2139 xproperties.override_defaults (*this); |
2249 } | 2140 } |
2250 | 2141 |
2251 ~image (void) { xproperties.delete_children (); } | 2142 ~image (void) { xproperties.delete_children (); } |
2252 | 2143 |
2253 std::string type (void) const { return xproperties.graphics_object_name (); } | |
2254 | |
2255 void mark_modified (void) { xproperties.mark_modified (); } | |
2256 | |
2257 void override_defaults (base_graphics_object& obj) | |
2258 { | |
2259 // Allow parent (figure) to override first (properties knows how | |
2260 // to find the parent object). | |
2261 xproperties.override_defaults (obj); | |
2262 } | |
2263 | |
2264 void set_from_list (property_list& plist) | |
2265 { | |
2266 xproperties.set_from_list (*this, plist); | |
2267 } | |
2268 | |
2269 void set (const caseless_str& name, const octave_value& val) | |
2270 { | |
2271 xproperties.set (name, val); | |
2272 } | |
2273 | |
2274 octave_value get (bool all = false) const | |
2275 { | |
2276 return xproperties.get (all); | |
2277 } | |
2278 | |
2279 octave_value get (const caseless_str& name) const | |
2280 { | |
2281 return xproperties.get (name); | |
2282 } | |
2283 | |
2284 graphics_handle get_parent (void) const { return xproperties.get_parent (); } | |
2285 | |
2286 void remove_child (const graphics_handle& h) { xproperties.remove_child (h); } | |
2287 | |
2288 void adopt (const graphics_handle& h) { xproperties.adopt (h); } | |
2289 | |
2290 void reparent (const graphics_handle& h) { xproperties.reparent (h); } | |
2291 | |
2292 base_properties& get_properties (void) { return xproperties; } | 2144 base_properties& get_properties (void) { return xproperties; } |
2293 | 2145 |
2294 const base_properties& get_properties (void) const { return xproperties; } | 2146 const base_properties& get_properties (void) const { return xproperties; } |
2295 | |
2296 void defaults (void) const { gripe_not_implemented ("image::defaults"); } | |
2297 | 2147 |
2298 bool valid_object (void) const { return true; } | 2148 bool valid_object (void) const { return true; } |
2299 }; | 2149 }; |
2300 | 2150 |
2301 // --------------------------------------------------------------------- | 2151 // --------------------------------------------------------------------- |
2362 xproperties.override_defaults (*this); | 2212 xproperties.override_defaults (*this); |
2363 } | 2213 } |
2364 | 2214 |
2365 ~patch (void) { xproperties.delete_children (); } | 2215 ~patch (void) { xproperties.delete_children (); } |
2366 | 2216 |
2367 std::string type (void) const { return xproperties.graphics_object_name (); } | |
2368 | |
2369 void mark_modified (void) { xproperties.mark_modified (); } | |
2370 | |
2371 void override_defaults (base_graphics_object& obj) | |
2372 { | |
2373 // Allow parent (figure) to override first (properties knows how | |
2374 // to find the parent object). | |
2375 xproperties.override_defaults (obj); | |
2376 } | |
2377 | |
2378 void set_from_list (property_list& plist) | |
2379 { | |
2380 xproperties.set_from_list (*this, plist); | |
2381 } | |
2382 | |
2383 void set (const caseless_str& name, const octave_value& val) | |
2384 { | |
2385 xproperties.set (name, val); | |
2386 } | |
2387 | |
2388 octave_value get (bool all = false) const | |
2389 { | |
2390 return xproperties.get (all); | |
2391 } | |
2392 | |
2393 octave_value get (const caseless_str& name) const | |
2394 { | |
2395 return xproperties.get (name); | |
2396 } | |
2397 | |
2398 graphics_handle get_parent (void) const { return xproperties.get_parent (); } | |
2399 | |
2400 void remove_child (const graphics_handle& h) { xproperties.remove_child (h); } | |
2401 | |
2402 void adopt (const graphics_handle& h) { xproperties.adopt (h); } | |
2403 | |
2404 void reparent (const graphics_handle& h) { xproperties.reparent (h); } | |
2405 | |
2406 base_properties& get_properties (void) { return xproperties; } | 2217 base_properties& get_properties (void) { return xproperties; } |
2407 | 2218 |
2408 const base_properties& get_properties (void) const { return xproperties; } | 2219 const base_properties& get_properties (void) const { return xproperties; } |
2409 | |
2410 void defaults (void) const { gripe_not_implemented ("patch::defaults"); } | |
2411 | 2220 |
2412 bool valid_object (void) const { return true; } | 2221 bool valid_object (void) const { return true; } |
2413 }; | 2222 }; |
2414 | 2223 |
2415 // --------------------------------------------------------------------- | 2224 // --------------------------------------------------------------------- |
2457 xproperties.override_defaults (*this); | 2266 xproperties.override_defaults (*this); |
2458 } | 2267 } |
2459 | 2268 |
2460 ~surface (void) { xproperties.delete_children (); } | 2269 ~surface (void) { xproperties.delete_children (); } |
2461 | 2270 |
2462 std::string type (void) const { return xproperties.graphics_object_name (); } | |
2463 | |
2464 void mark_modified (void) { xproperties.mark_modified (); } | |
2465 | |
2466 void override_defaults (base_graphics_object& obj) | |
2467 { | |
2468 // Allow parent (figure) to override first (properties knows how | |
2469 // to find the parent object). | |
2470 xproperties.override_defaults (obj); | |
2471 } | |
2472 | |
2473 void set_from_list (property_list& plist) | |
2474 { | |
2475 xproperties.set_from_list (*this, plist); | |
2476 } | |
2477 | |
2478 void set (const caseless_str& name, const octave_value& val) | |
2479 { | |
2480 xproperties.set (name, val); | |
2481 } | |
2482 | |
2483 octave_value get (bool all = false) const | |
2484 { | |
2485 return xproperties.get (all); | |
2486 } | |
2487 | |
2488 octave_value get (const caseless_str& name) const | |
2489 { | |
2490 return xproperties.get (name); | |
2491 } | |
2492 | |
2493 graphics_handle get_parent (void) const { return xproperties.get_parent (); } | |
2494 | |
2495 void remove_child (const graphics_handle& h) { xproperties.remove_child (h); } | |
2496 | |
2497 void adopt (const graphics_handle& h) { xproperties.adopt (h); } | |
2498 | |
2499 void reparent (const graphics_handle& h) { xproperties.reparent (h); } | |
2500 | |
2501 base_properties& get_properties (void) { return xproperties; } | 2271 base_properties& get_properties (void) { return xproperties; } |
2502 | 2272 |
2503 const base_properties& get_properties (void) const { return xproperties; } | 2273 const base_properties& get_properties (void) const { return xproperties; } |
2504 | |
2505 void defaults (void) const { gripe_not_implemented ("surface::defaults"); } | |
2506 | 2274 |
2507 bool valid_object (void) const { return true; } | 2275 bool valid_object (void) const { return true; } |
2508 }; | 2276 }; |
2509 | 2277 |
2510 octave_value | 2278 octave_value |