Module: TkProperties
- Defined in:
- ext/ae-rad/lib/tk/al-tk.rb
Class Method Summary collapse
- .activebackground(_obj) ⇒ Object
- .activeforeground(_obj) ⇒ Object
- .anchor(_obj) ⇒ Object
- .background(_obj) ⇒ Object
- .bitmap(_obj) ⇒ Object
- .border(_obj) ⇒ Object
- .borderwidth(_obj) ⇒ Object
- .class(_obj) ⇒ Object
- .colormap(_obj) ⇒ Object
- .command(_obj) ⇒ Object
- .compound(_obj) ⇒ Object
- .container(_obj) ⇒ Object
- .cursor(_obj) ⇒ Object
- .disabledforeground(_obj) ⇒ Object
- .font(_obj) ⇒ Object
- .foreground(_obj) ⇒ Object
- .generic_color(_name, _obj) ⇒ Object
- .height(_obj) ⇒ Object
- .highlightbackground(_obj) ⇒ Object
- .highlightcolor(_obj) ⇒ Object
- .highlightthickness(_obj) ⇒ Object
- .image(_obj) ⇒ Object
- .justify(_obj) ⇒ Object
- .labelanchor(_obj) ⇒ Object
- .labelwidget(_obj) ⇒ Object
- .orient(_obj) ⇒ Object
- .overrelief(_obj) ⇒ Object
- .padx(_obj) ⇒ Object
- .pady(_obj) ⇒ Object
- .property(_name, _obj) ⇒ Object
- .relief(_obj) ⇒ Object
- .state(_obj) ⇒ Object
- .takefocus(_obj) ⇒ Object
- .text(_obj) ⇒ Object
- .width(_obj) ⇒ Object
- .wraplength(_obj) ⇒ Object
- .xscrollcommand(_obj) ⇒ Object
- .yscrollcommand(_obj) ⇒ Object
Class Method Details
.activebackground(_obj) ⇒ Object
1746 1747 1748 1749 1750 1751 1752 1753 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1746 def TkProperties.activebackground(_obj) {'name'=>'activebackground', 'get'=> proc{_obj.cget('activebackground')}, 'set'=> proc{|activebackground| _obj.configure('activebackground'=>activebackground)}, 'def'=> '', 'type'=> TkType::TkagColor } end |
.activeforeground(_obj) ⇒ Object
1755 1756 1757 1758 1759 1760 1761 1762 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1755 def TkProperties.activeforeground(_obj) {'name'=>'activeforeground', 'get'=> proc{_obj.cget('activeforeground')}, 'set'=> proc{|activeforeground| _obj.configure('activeforeground'=>activeforeground)}, 'def'=> '', 'type'=> TkType::TkagColor } end |
.anchor(_obj) ⇒ Object
1945 1946 1947 1948 1949 1950 1951 1952 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1945 def TkProperties.anchor(_obj) {'name'=>'anchor', 'get'=> proc{_obj.cget('anchor')}, 'set'=> proc{|a| _obj.configure('anchor'=>a)}, 'def'=> "", 'type'=> TkType::TkagAnchor } end |
.background(_obj) ⇒ Object
1676 1677 1678 1679 1680 1681 1682 1683 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1676 def TkProperties.background(_obj) {'name'=>'background', 'get'=> proc{_obj.cget('background')}, 'set'=> proc{|background| _obj.configure('background'=>background)}, 'def'=> '', 'type'=> TkType::TkagColor } end |
.bitmap(_obj) ⇒ Object
1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1882 def TkProperties.bitmap(_obj) {'name'=>'bitmap', 'get'=> proc{_obj.cget('bitmap')}, 'set'=> proc{|j| _obj.configure('bitmap'=>TkAllPhotoImage.new('file' => j))}, 'def'=> proc{|x| if x.to_s.length > 2 "bitmap TkAllPhotoImage.new('file' => #{x})" else "" end }, 'type'=> TkType::TkagFile } end |
.border(_obj) ⇒ Object
1907 1908 1909 1910 1911 1912 1913 1914 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1907 def TkProperties.border(_obj) {'name'=>'border', 'default'=> 0, 'get'=> proc{_obj.cget('border')}, 'set'=> proc{|b| _obj.configure('border'=>b)}, 'def'=> "" } end |
.borderwidth(_obj) ⇒ Object
1898 1899 1900 1901 1902 1903 1904 1905 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1898 def TkProperties.borderwidth(_obj) {'name'=>'borderwidth', #'default'=> 2, 'get'=> proc{_obj.cget('borderwidth')}, 'set'=> proc{|b| _obj.configure('borderwidth'=>b)}, 'def'=> "" } end |
.class(_obj) ⇒ Object
1990 1991 1992 1993 1994 1995 1996 1997 1998 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1990 def TkProperties.class(_obj) {'name'=>'class', 'default'=> AG.near_class_wrapped(_obj).to_s, 'get'=> proc{_obj.cget('class')}, 'set'=> proc{|r| _obj.configure('class'=>r)}, 'def'=> "", 'kind'=>'on-create' } end |
.colormap(_obj) ⇒ Object
2000 2001 2002 2003 2004 2005 2006 2007 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 2000 def TkProperties.colormap(_obj) {'name'=>'colormap', 'get'=> proc{_obj.cget('colormap')}, 'set'=> proc{|r| _obj.configure('colormap'=>r)}, 'def'=> "", 'type'=> EnumType.new('new','') } end |
.command(_obj) ⇒ Object
1793 1794 1795 1796 1797 1798 1799 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1793 def TkProperties.command(_obj) {'name'=>'command', 'get'=> proc{eval('@c = _obj.command_script'); @c}, 'set'=> proc{|r| _obj.configure('command'=>r)}, 'def'=> "" } end |
.compound(_obj) ⇒ Object
1819 1820 1821 1822 1823 1824 1825 1826 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1819 def TkProperties.compound(_obj) {'name'=>'compound', 'get'=> proc{_obj.cget('compound')}, 'set'=> proc{|compound| _obj.configure('compound'=>compound)}, 'def'=> '', 'type'=> TkType::TkagCompound } end |
.container(_obj) ⇒ Object
2009 2010 2011 2012 2013 2014 2015 2016 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 2009 def TkProperties.container(_obj) {'name'=>'container', 'get'=> proc{_obj.cget('container')}, 'set'=> proc{|r| _obj.configure('container'=>r)}, 'def'=> "", 'type'=> TkType::TkagBool } end |
.cursor(_obj) ⇒ Object
1963 1964 1965 1966 1967 1968 1969 1970 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1963 def TkProperties.cursor(_obj) {'name'=>'cursor', 'get'=> proc{_obj.cget('cursor')}, 'set'=> proc{|o| _obj.configure('cursor'=>o)}, 'def'=> "", 'type'=> TkType::TkagCursor } end |
.disabledforeground(_obj) ⇒ Object
1737 1738 1739 1740 1741 1742 1743 1744 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1737 def TkProperties.disabledforeground(_obj) {'name'=>'disabledforeground', 'get'=> proc{_obj.cget('disabledforeground')}, 'set'=> proc{|foreground| _obj.configure('disabledforeground'=>foreground)}, 'def'=> '', 'type'=> TkType::TkagColor } end |
.font(_obj) ⇒ Object
1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1828 def TkProperties.font(_obj) {'name'=>'font', 'get'=> proc{font = _obj.cget('font') if font.kind_of?(TkFont) keys = Hash.new font.configinfo.each{|key,value| keys[key]=value } keys['family']+"\s"+keys['size'].to_s+"\s"+keys['weight'].to_s else nil end }, 'set'=> proc{|f| _obj.configure('font'=>f)}, 'def'=> "", 'type'=> TkType::TkagFont } end |
.foreground(_obj) ⇒ Object
1728 1729 1730 1731 1732 1733 1734 1735 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1728 def TkProperties.foreground(_obj) {'name'=>'foreground', 'get'=> proc{_obj.cget('foreground')}, 'set'=> proc{|foreground| _obj.configure('foreground'=>foreground)}, 'def'=> '', 'type'=> TkType::TkagColor } end |
.generic_color(_name, _obj) ⇒ Object
1666 1667 1668 1669 1670 1671 1672 1673 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1666 def TkProperties.generic_color(_name, _obj) {'name'=>_name, 'get'=> proc{_obj.cget(_name)}, 'set'=> proc{|value| _obj.configure(_name=>value)}, 'def'=> '', 'type'=> TkType::TkagColor } end |
.height(_obj) ⇒ Object
1702 1703 1704 1705 1706 1707 1708 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1702 def TkProperties.height(_obj) {'name'=>'height', 'get'=> proc{_obj.cget('height')}, 'set'=> proc{|t| _obj.configure('height'=>t)}, 'def'=> "" } end |
.highlightbackground(_obj) ⇒ Object
1685 1686 1687 1688 1689 1690 1691 1692 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1685 def TkProperties.highlightbackground(_obj) {'name'=>'highlightbackground', 'get'=> proc{_obj.cget('highlightbackground')}, 'set'=> proc{|background| _obj.configure('highlightbackground'=>background)}, 'def'=> '', 'type'=> TkType::TkagColor } end |
.highlightcolor(_obj) ⇒ Object
1711 1712 1713 1714 1715 1716 1717 1718 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1711 def TkProperties.highlightcolor(_obj) {'name'=>'highlightcolor', 'get'=> proc{_obj.cget('highlightcolor')}, 'set'=> proc{|background| _obj.configure('highlightcolor'=>background)}, 'def'=> '', 'type'=> TkType::TkagColor } end |
.highlightthickness(_obj) ⇒ Object
1720 1721 1722 1723 1724 1725 1726 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1720 def TkProperties.highlightthickness(_obj) {'name'=>'highlightthickness', 'get'=> proc{_obj.cget('highlightthickness')}, 'set'=> proc{|x| _obj.configure('highlightthickness'=>x)}, 'def'=> '' } end |
.image(_obj) ⇒ Object
1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1862 def TkProperties.image(_obj) {'name'=>'image', 'get'=> proc{_ret = _obj.cget('image') if ! _ret.kind_of?(String) _ret = _ret.cget('file') end _ret }, 'set'=> proc{|j| _obj.configure('image'=>TkAllPhotoImage.new('file' => j))}, 'def'=> proc{|x| if x.to_s.length > 2 "image TkPhotoImage.new('file' => #{x})" else "" end }, 'type'=> TkType::TkagFile } end |
.justify(_obj) ⇒ Object
1972 1973 1974 1975 1976 1977 1978 1979 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1972 def TkProperties.justify(_obj) {'name'=>'justify', 'get'=> proc{_obj.cget('justify')}, 'set'=> proc{|j| _obj.configure('justify'=>j)}, 'def'=> "", 'type'=> TkType::TkagJustify } end |
.labelanchor(_obj) ⇒ Object
1954 1955 1956 1957 1958 1959 1960 1961 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1954 def TkProperties.labelanchor(_obj) {'name'=>'labelanchor', 'get'=> proc{_obj.cget('labelanchor')}, 'set'=> proc{|a| _obj.configure('labelanchor'=>a)}, 'def'=> "", 'type'=> TkType::TkagAnchor } end |
.labelwidget(_obj) ⇒ Object
2026 2027 2028 2029 2030 2031 2032 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 2026 def TkProperties.(_obj) {'name'=>'labelwidget', 'get'=> proc{_obj.cget('labelwidget')}, 'set'=> proc{|t| _obj.configure('labelwidget'=>t)}, 'def'=> "" } end |
.orient(_obj) ⇒ Object
1936 1937 1938 1939 1940 1941 1942 1943 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1936 def TkProperties.orient(_obj) {'name'=>'orient', 'get'=> proc{_obj.cget('orient')}, 'set'=> proc{|o| _obj.configure('orient'=>o)}, 'def'=> "", 'type'=> TkType::TkagOrient } end |
.overrelief(_obj) ⇒ Object
1783 1784 1785 1786 1787 1788 1789 1790 1791 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1783 def TkProperties.overrelief(_obj) {'name'=>'overrelief', #'default'=> 'ridge', 'get'=> proc{_obj.cget('overrelief')}, 'set'=> proc{|r| _obj.configure('overrelief'=>r)}, 'def'=> "", 'type'=> TkType::TkagRelief } end |
.padx(_obj) ⇒ Object
1917 1918 1919 1920 1921 1922 1923 1924 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1917 def TkProperties.padx(_obj) {'name'=>'padx', #'default'=> 0, 'get'=> proc{_obj.cget('padx')}, 'set'=> proc{|b| _obj.configure('padx'=>b)}, 'def'=> "" } end |
.pady(_obj) ⇒ Object
1926 1927 1928 1929 1930 1931 1932 1933 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1926 def TkProperties.pady(_obj) {'name'=>'pady', #'default'=> 0, 'get'=> proc{_obj.cget('pady')}, 'set'=> proc{|b| _obj.configure('pady'=>b)}, 'def'=> "" } end |
.property(_name, _obj) ⇒ Object
1659 1660 1661 1662 1663 1664 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1659 def TkProperties.property(_name, _obj) {'name'=>_name, 'get'=> proc{_obj.cget(_name)}, 'set'=> proc{|value| _obj.configure(_name=>value)} } end |
.relief(_obj) ⇒ Object
1773 1774 1775 1776 1777 1778 1779 1780 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1773 def TkProperties.relief(_obj) {'name'=>'relief', 'get'=> proc{_obj.cget('relief')}, 'set'=> proc{|r| _obj.configure('relief'=>r)}, 'def'=> "", 'type'=> TkType::TkagRelief } end |
.state(_obj) ⇒ Object
1845 1846 1847 1848 1849 1850 1851 1852 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1845 def TkProperties.state(_obj) {'name'=>'state', 'get'=> proc{_obj.cget('state')}, 'set'=> proc{|s| _obj.configure('state'=>s)}, 'def'=> "", 'type'=> TkType::TkagState } end |
.takefocus(_obj) ⇒ Object
1981 1982 1983 1984 1985 1986 1987 1988 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1981 def TkProperties.takefocus(_obj) {'name'=>'takefocus', 'get'=> proc{_obj.cget('takefocus')}, 'set'=> proc{|j| _obj.configure('takefocus'=>j)}, 'def'=> "", 'type'=> EnumType.new(0,1) } end |
.text(_obj) ⇒ Object
2018 2019 2020 2021 2022 2023 2024 2025 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 2018 def TkProperties.text(_obj) {'name'=>'text', 'start'=> '<...>', 'get'=> proc{_obj.cget('text')}, 'set'=> proc{|t| _obj.configure('text'=>t)}, 'def'=> "" } end |
.width(_obj) ⇒ Object
1694 1695 1696 1697 1698 1699 1700 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1694 def TkProperties.width(_obj) {'name'=>'width', 'get'=> proc{_obj.cget('width')}, 'set'=> proc{|t| _obj.configure('width'=>t)}, 'def'=> "" } end |
.wraplength(_obj) ⇒ Object
1854 1855 1856 1857 1858 1859 1860 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1854 def TkProperties.wraplength(_obj) {'name'=>'wraplength', 'get'=> proc{_obj.cget('wraplength')}, 'set'=> proc{|w| _obj.configure('wraplength'=>w)}, 'def'=> "" } end |
.xscrollcommand(_obj) ⇒ Object
1801 1802 1803 1804 1805 1806 1807 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1801 def TkProperties.xscrollcommand(_obj) {'name'=>'xscrollcommand', 'get'=> proc{_obj.cget('xscrollcommand')}, 'set'=> proc{|r| _obj.configure('xscrollcommand'=>r)}, 'def'=> "" } end |
.yscrollcommand(_obj) ⇒ Object
1809 1810 1811 1812 1813 1814 1815 |
# File 'ext/ae-rad/lib/tk/al-tk.rb', line 1809 def TkProperties.yscrollcommand(_obj) {'name'=>'yscrollcommand', 'get'=> proc{_obj.cget('yscrollcommand')}, 'set'=> proc{|r| _obj.configure('yscrollcommand'=>r)}, 'def'=> "" } end |