Ticket #1: ddoc-gtk.diff
| File ddoc-gtk.diff, 55.1 kB (added by Mike Wey, 1 year ago) |
|---|
-
gtkD/wrap/APILookupGtk.txt
old new 186 186 * interval = the timeout in milieconds 187 187 * delegate() = the delegate to be executed 188 188 * fireNow = When true the delegate will be executed emmidiatly 189 * Returns:190 189 */ 191 190 this(uint interval, bool delegate() dlg, bool fireNow=false) 192 191 { … … 201 200 } 202 201 } 203 202 203 /** */ 204 204 public void stop() 205 205 { 206 206 if ( timeoutID > 0 ) … … 212 212 213 213 /** 214 214 * Removes the timeout from gtk 215 * Returns:216 215 */ 217 216 ~this() 218 217 { … … 222 221 /** 223 222 * Adds a new delegate to this timeout cycle 224 223 * Params: 225 * d elegate()=224 * dlg = 226 225 * fireNow = 227 226 */ 228 227 public void addListener(bool delegate() dlg, bool fireNow=false) … … 287 286 /** 288 287 * Creates a new idle cycle. 289 288 * Params: 290 * interval = the idle in milieconds 291 * delegate() = the delegate to be executed 292 * fireNow = When true the delegate will be executed emmidiatly 293 * Returns: 289 * interval = the idle in milieconds 290 * dlg = the delegate to be executed 291 * fireNow = When true the delegate will be executed emmidiatly 294 292 */ 295 293 this(bool delegate() dlg, bool fireNow=false) 296 294 { … … 305 303 } 306 304 } 307 305 306 /** */ 308 307 public void stop() 309 308 { 310 309 if ( idleID > 0 ) … … 316 315 317 316 /** 318 317 * Removes the idle from gtk 319 * Returns:320 318 */ 321 319 ~this() 322 320 { … … 326 324 /** 327 325 * Adds a new delegate to this idle cycle 328 326 * Params: 329 * d elegate()=327 * dlg = 330 328 * fireNow = 331 329 */ 332 330 public void addListener(bool delegate() dlg, bool fireNow=false) … … 722 720 structWrap: GdkScreen* Screen 723 721 724 722 code: start 725 723 /** */ 726 724 public Widget addButton(StockID stockID, int responseId) 727 725 { 728 726 return addButton(StockDesc[stockID], responseId); 729 727 } 730 728 731 729 /** */ 732 730 public void addButtons(char[][] buttonsText, ResponseType[] responses) 733 731 { 734 732 for ( int i=0 ; i<buttonsText.length && i<responses.length ; i++) … … 737 735 } 738 736 } 739 737 738 /** */ 740 739 public void addButtons(StockID[] stockIDs, ResponseType[] responses) 741 740 { 742 741 for ( int i=0 ; i<stockIDs.length && i<responses.length ; i++) … … 776 775 * user may want to see. When the user clicks a button a "response" 777 776 * signal is emitted with response IDs from GtkResponseType. See 778 777 * GtkDialog for more details. 779 * parent: 780 * transient parent, or NULL for none 781 * flags: 782 * flags 783 * type: 784 * type of message 785 * buttons: 786 * set of buttons to use 787 * message_format: 788 * printf()-style format string, or NULL 789 * message: 790 * the message - should be null, any formatting should be done prior to call this constructor 778 * Params: 779 * parent = transient parent, or NULL for none 780 * flags = flags 781 * type = type of message 782 * buttons= set of buttons to use 783 * messageFormat = printf()-style format string, or NULL 784 * message = the message - should be null, any formatting should be done prior to call this constructor 791 785 * arguments for message_format 792 786 * Returns: 793 787 * a new GtkMessageDialog … … 813 807 * instead, since you can't pass the markup string either 814 808 * as the format (it might contain '%' characters) or as a string 815 809 * argument. 810 * Since 2.4 811 * Examples: 812 * -------------------- 816 813 * GtkWidget *dialog; 817 814 * dialog = gtk_message_dialog_new (main_application_window, 818 815 * GTK_DIALOG_DESTROY_WITH_PARENT, … … 821 818 * NULL); 822 819 * gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog), 823 820 * markup); 824 * parent: 825 * transient parent, or NULL for none 826 * flags: 827 * flags 828 * type: 829 * type of message 830 * buttons: 831 * set of buttons to use 832 * message_format: 833 * printf()-style format string, or NULL 834 * message: 835 * the message - should be null, any formatting should be done prior to call this constructor 836 * ...: 837 * arguments for message_format 838 * Returns: 839 * a new GtkMessageDialog 840 * Since 2.4 821 * -------------------- 822 * Params: 823 * parent = transient parent, or NULL for none 824 * flags = flags 825 * type = type of message 826 * buttons = set of buttons to use 827 * messageFormat = printf()-style format string, or NULL 828 * message = the message - should be null, any formatting should be done prior to call this constructor 841 829 */ 842 830 public this (Window parent, GtkDialogFlags flags, GtkMessageType type, GtkButtonsType buttons, bool markup, char[] messageFormat, char[] message=null ) 843 831 { … … 885 873 code: start 886 874 /** 887 875 * Create an information popup dialog. 888 * @param message The message to show on the dialog 889 * @param title The title of the dialog 876 * Params: 877 * message = The message to show on the dialog 878 * title = The title of the dialog 890 879 */ 891 880 public static void information(char[] message, char[] title) 892 881 { … … 895 884 896 885 /** 897 886 * Create an information popup dialog. 898 * @param parent The parent window of this popup dialog 899 * @param message The message to show on the dialog 900 * @param title The title of the dialog 887 * Params: 888 * parent = The parent window of this popup dialog 889 * message = The message to show on the dialog 890 * title = The title of the dialog 901 891 */ 902 892 public static void information(Window parent, char[] message, char[] title) 903 893 { … … 914 904 915 905 /** 916 906 * Create an error popup dialog. 917 * @param message The message to show on the dialog 918 * @param title The title of the dialog 907 * Params: 908 * message = The message to show on the dialog 909 * title = The title of the dialog 919 910 */ 920 911 public static void error(char[] message, char[] title) 921 912 { … … 924 915 925 916 /** 926 917 * Create an error popup dialog. 927 * @param parent The parent window of this popup dialog 928 * @param message The message to show on the dialog 929 * @param title The title of the dialog 918 * Params: 919 * parent = The parent window of this popup dialog 920 * message = The message to show on the dialog 921 * title = The title of the dialog 930 922 */ 931 923 public static void error(Window parent, char[] message, char[] title) 932 924 { … … 944 936 945 937 /** 946 938 * Create an 'yes' or 'no' popup dialog. 947 * @param message The message to show on the dialog 948 * @param title The title of the dialog 939 * Params: 940 * message = The message to show on the dialog 941 * title = The title of the dialog 949 942 */ 950 943 public static bool yesNo(char[] message, char[] title) 951 944 { … … 954 947 955 948 /** 956 949 * Create an 'yes' or 'no' popup dialog. 957 * @param parent The parent window of this popup dialog 958 * @param message The message to show on the dialog 959 * @param title The title of the dialog 950 * Params: 951 * parent = The parent window of this popup dialog 952 * message = The message to show on the dialog 953 * title = The title of the dialog 960 954 */ 961 955 public static bool yesNo(Window parent, char[] message, char[] title) 962 956 { … … 976 970 977 971 /** 978 972 * Create an 'yes', 'no' or 'cancel' popup dialog. 979 * @param message The message to show on the dialog 980 * @param title The title of the dialog 973 * Params: 974 * message = The message to show on the dialog 975 * title = The title of the dialog 981 976 */ 982 977 public static ResponseType yesNoCancel(char[] message, char[] title) 983 978 { … … 986 981 987 982 /** 988 983 * Create an 'yes', 'no' or 'cancel' popup dialog. 989 * @param parent The parent window of this popup dialog 990 * @param message The message to show on the dialog 991 * @param title The title of the dialog 984 * Params: 985 * parent = The parent window of this popup dialog 986 * message = The message to show on the dialog 987 * title = The title of the dialog 992 988 */ 993 989 public static ResponseType yesNoCancel(Window parent, char[] message, char[] title) 994 990 { … … 1036 1032 /** 1037 1033 * Creates a top level window with a title 1038 1034 * Params: 1039 * title :The Window title1035 * title = The Window title 1040 1036 */ 1041 1037 public this(char[] title) 1042 1038 { … … 1090 1086 1091 1087 /** 1092 1088 * Executed when the user tries to close the window 1093 * @returntrue to refuse to close the window1089 * Returns: true to refuse to close the window 1094 1090 */ 1095 1091 protected int windowDelete(Event event, Widget widget) 1096 1092 { … … 1106 1102 1107 1103 /** 1108 1104 * Allows the application to close and decide if it can exit 1109 * @param code the code reason to exit 1110 * @param force if true the application must expect to be closed even against it's will 1111 * @return false to refuse to exit 1105 * Params: 1106 * code = the code reason to exit 1107 * force = if true the application must expect to be closed even against it's will 1108 * Returns: false to refuse to exit 1112 1109 */ 1113 1110 protected bool exit(int code, bool force) 1114 1111 { … … 1211 1208 * icon name isn't known, the image will be empty. 1212 1209 * You can register your own stock icon names, see 1213 1210 * gtk_icon_factory_add_default() and gtk_icon_factory_add(). 1214 * stock_id: 1215 * a stock icon name 1216 * size: 1217 * a stock icon size 1211 * Params: 1212 * StockID = a stock icon name 1213 * size = a stock icon size 1218 1214 * Returns: 1219 1215 * a new GtkImage displaying the stock icon 1220 1216 */ … … 1228 1224 * Creates a GtkImage displaying an icon from the current icon theme. 1229 1225 * If the icon name isn't known, a "broken image" icon will be 1230 1226 * displayed instead. If the current icon theme is changed, the icon 1231 * will be updated appropriately. 1232 * icon_name: 1233 * an icon name 1234 * size: 1235 * a stock icon size 1227 * will be updated appropriately. Since 2.6 1228 * Params: 1229 * iconName = an icon name 1230 * size = a stock icon size 1236 1231 * Returns: 1237 1232 * a new GtkImage displaying the themed icon 1238 * Since 2.61239 1233 */ 1240 1234 public this (char[] iconName, GtkIconSize size) 1241 1235 { … … 1272 1266 * label is inside a button or menu item, the button or menu item will 1273 1267 * automatically become the mnemonic widget and be activated by 1274 1268 * the mnemonic. 1275 * str:1276 * The text of the label, with an underscore in front of the1269 * Params: 1270 * str = The text of the label, with an underscore in front of the 1277 1271 * mnemonic character 1278 * mnemonic: when false uses the literal text passed in without mnemonic 1279 * Returns: 1280 * the new GtkLabel 1272 * mnemonic = when false uses the literal text passed in without mnemonic 1281 1273 */ 1282 1274 public this (char[] str, bool mnemonic=true) 1283 1275 { … … 1340 1332 /** An arbitrary string to be used by the application */ 1341 1333 private char[] action; 1342 1334 1335 /** */ 1343 1336 public static void setIconSize(IconSize iconSize) 1344 1337 { 1345 1338 currentIconSize = iconSize; 1346 1339 } 1340 1341 /** */ 1347 1342 public static IconSize getIconSize() 1348 1343 { 1349 1344 return currentIconSize; 1350 1345 } 1351 1346 1347 /** */ 1352 1348 public void setActionName(char[] action) 1353 1349 { 1354 1350 this.action = action.dup; 1355 1351 } 1356 1352 1353 /** */ 1357 1354 public char[] getActionName() 1358 1355 { 1359 1356 return action; … … 1366 1363 * underscores). The first underlined character represents a keyboard 1367 1364 * accelerator called a mnemonic. 1368 1365 * Pressing Alt and that key activates the button. 1369 * label:1370 * The text of the button, with an underscore in front of the1366 * Params: 1367 * label = The text of the button, with an underscore in front of the 1371 1368 * mnemonic character 1369 * mnemonic = true if the button has an mnemnonic 1372 1370 * Returns: 1373 1371 * a new GtkButton 1374 1372 */ … … 1392 1390 * GTK_STOCK_APPLY. 1393 1391 * If stock_id is unknown, then it will be treated as a mnemonic 1394 1392 * label (as for gtk_button_new_with_mnemonic()). 1395 * stock_id: 1396 * the name of the stock item 1397 * Returns: 1398 * a new GtkButton 1393 * Params: 1394 * StockID = the name of the stock item 1399 1395 */ 1400 1396 public this (StockID stockID, bool hideLabel=false) 1401 1397 { … … 1413 1409 1414 1410 } 1415 1411 1412 /** */ 1416 1413 public this(StockID stockID, void delegate(Button) dlg, bool hideLabel=false) 1417 1414 { 1418 1415 this(stockID, hideLabel); 1419 1416 addOnClicked(dlg); 1420 1417 } 1421 1418 1422 1419 /** */ 1423 1420 public this(char[] label, void delegate(Button) dlg, bool mnemonic=true) 1424 1421 { 1425 1422 this(label, mnemonic); 1426 1423 addOnClicked(dlg); 1427 1424 } 1428 1425 1426 /** */ 1429 1427 public this(char[] label, void delegate(Button) dlg, char[] action) 1430 1428 { 1431 1429 this(label); … … 1455 1453 * If mnemonic is true the label 1456 1454 * will be created using gtk_label_new_with_mnemonic(), so underscores 1457 1455 * in label indicate the mnemonic for the check button. 1458 * label:1459 * The text of the button, with an underscore in front of the1456 * Params: 1457 * label = The text of the button, with an underscore in front of the 1460 1458 * mnemonic character 1461 * label: 1462 * the text for the check button. 1463 * Returns: 1464 * a GtkWidget. 1459 * mnemonic = true if the button has an mnemnonic 1465 1460 */ 1466 1461 public this (char[] label, bool mnemonic=true) 1467 1462 { … … 1476 1471 this(cast(GtkCheckButton*)gtk_check_button_new_with_label(Str.toStringz(label)) ); 1477 1472 } 1478 1473 } 1479 1474 1475 /** */ 1480 1476 public this(char[] label, void delegate(CheckButton) onClicked, bool mnemonic=true) 1481 1477 { 1482 1478 this(label, mnemonic); … … 1504 1500 code: start 1505 1501 /** 1506 1502 * Creates a new GtkRadioButton with a text label. 1507 * If mnemonic if true the label will be created using 1508 * gtk_label_new_with_mnemonic(), so underscores in label indicate the 1509 * mnemonic for the button. 1510 * an existing radio button group, or NULL if you are creating a new 1511 * group. 1512 * label: 1513 * the text label to display next to the radio button. 1514 * Returns: 1515 * a new radio button. 1503 * Params: 1504 * group = an existing radio button group, or NULL if you are creating a new 1505 * group. 1506 * label = the text label to display next to the radio button. 1507 * mnemonic = if true the label will be created using 1508 * gtk_label_new_with_mnemonic(), so underscores in label indicate the 1509 * mnemonic for the button. 1516 1510 */ 1517 1511 public this (ListSG group, char[] label, bool mnemonic=true) 1518 1512 { … … 1537 1531 /** 1538 1532 * Creates a new GtkRadioButton with a text label, adding it to the same group 1539 1533 * as group. 1540 * It mnemonic it true the label 1541 * will be created using gtk_label_new_with_mnemonic(), so underscores 1542 * in label indicate the mnemonic for the button. 1543 * group: 1544 * an existing GtkRadioButton. 1545 * label: 1546 * a text string to display next to the radio button. 1547 * Returns: 1548 * a new radio button. 1534 * Params: 1535 * group = an existing GtkRadioButton. 1536 * label = a text string to display next to the radio button. 1537 * mnemonic = if true the label 1538 * will be created using gtk_label_new_with_mnemonic(), so underscores 1539 * in label indicate the mnemonic for the button. 1549 1540 */ 1550 1541 public this (RadioButton radioButton, char[] label, bool mnemonic=true) 1551 1542 { … … 1582 1573 code: start 1583 1574 /** 1584 1575 * Creates a new toggle button with a text label. 1585 * If mnemonic is true the label 1586 * will be created using gtk_label_new_with_mnemonic(), so underscores 1587 * in label indicate the mnemonic for the button. 1588 * label: 1589 * a string containing the message to be placed in the toggle button. 1590 * Returns: 1591 * a new toggle button. 1576 * Params: 1577 * label = a string containing the message to be placed in the toggle button. 1578 * mnemonic = if true the label 1579 * will be created using gtk_label_new_with_mnemonic(), so underscores 1580 * in label indicate the mnemonic for the button. 1592 1581 */ 1593 1582 public this (char[] label, bool mnemonic=true) 1594 1583 { … … 1621 1610 structWrap: GtkEntryCompletion* EntryCompletion 1622 1611 1623 1612 code: start 1613 /** */ 1624 1614 public this (char[] text) 1625 1615 { 1626 1616 this(); 1627 1617 setText(text); 1628 1618 } 1629 1619 1620 /** */ 1630 1621 public this (char[] text, int max) 1631 1622 { 1632 1623 this(max); … … 1714 1705 structWrap: GtkTextChildAnchor* TextChildAnchor 1715 1706 1716 1707 code: start 1708 /** */ 1717 1709 public this() 1718 1710 { 1719 1711 this(new GtkTextIter); … … 1782 1774 /** 1783 1775 * Deletes current contents of buffer, and inserts text instead. If 1784 1776 * len is -1, text must be nul-terminated. text must be valid UTF-8. 1785 * buffer: 1786 * a GtkTextBuffer 1787 * text: 1788 * UTF-8 text to insert 1789 * len: 1790 * length of text in bytes 1777 * Params: 1778 * text = UTF-8 text to insert 1791 1779 */ 1792 1780 public void setText(char[] text) 1793 1781 { … … 1795 1783 gtk_text_buffer_set_text(gtkTextBuffer, Str.toStringz(text), text.length); 1796 1784 } 1797 1785 1798 /**1786 /** 1799 1787 * Inserts len bytes of text at position iter. If len is -1, 1800 1788 * text must be nul-terminated and will be inserted in its 1801 1789 * entirety. Emits the "insert_text" signal; insertion actually occurs … … 1803 1791 * insertion occurs (because the buffer contents change), but the 1804 1792 * default signal handler revalidates it to point to the end of the 1805 1793 * inserted text. 1806 * buffer: 1807 * a GtkTextBuffer 1808 * iter: 1809 * a position in the buffer 1810 * text: 1811 * UTF-8 format text to insert 1812 * len: 1813 * length of text in bytes, or -1 1794 * Params: 1795 * iter = a position in the buffer 1796 * text = UTF-8 format text to insert 1814 1797 */ 1815 1798 public void insert(TextIter iter, char[] text) 1816 1799 { … … 1821 1804 /** 1822 1805 * Simply calls gtk_text_buffer_insert(), using the current 1823 1806 * cursor position as the insertion point. 1824 * buffer: 1825 * a GtkTextBuffer 1826 * text: 1827 * some text in UTF-8 format 1828 * len: 1829 * length of text, in bytes 1807 * Params: 1808 * text = some text in UTF-8 format 1830 1809 */ 1831 1810 public void insertAtCursor(char[] text) 1832 1811 { … … 1842 1821 * default_editable indicates the editability of text that doesn't 1843 1822 * have a tag affecting editability applied to it. Typically the 1844 1823 * result of gtk_text_view_get_editable() is appropriate here. 1845 * buffer: 1846 * a GtkTextBuffer 1847 * iter: 1848 * a position in buffer 1849 * text: 1850 * some UTF-8 text 1851 * len: 1852 * length of text in bytes, or -1 1853 * default_editable: 1854 * default editability of buffer 1824 * Params: 1825 * iter = a position in buffer 1826 * text = some UTF-8 text 1827 * defaultEditable = default editability of buffer 1855 1828 * Returns: 1856 1829 * whether text was actually inserted 1857 1830 */ … … 1867 1840 * default_editable indicates the editability of text that doesn't 1868 1841 * have a tag affecting editability applied to it. Typically the 1869 1842 * result of gtk_text_view_get_editable() is appropriate here. 1870 * buffer: 1871 * a GtkTextBuffer 1872 * text: 1873 * text in UTF-8 format 1874 * len: 1875 * length of text in bytes, or -1 1876 * default_editable: 1877 * default editability of buffer 1843 * Params: 1844 * text = text in UTF-8 format 1845 * defaultEditable = default editability of buffer 1878 1846 * Returns: 1879 1847 * whether text was actually inserted 1880 1848 */ … … 1890 1858 * terminate the list. Equivalent to calling gtk_text_buffer_insert(), 1891 1859 * then gtk_text_buffer_apply_tag() on the inserted text; 1892 1860 * gtk_text_buffer_insert_with_tags() is just a convenience function. 1893 * buffer: 1894 * a GtkTextBuffer 1895 * iter: 1896 * an iterator in buffer 1897 * text: 1898 * UTF-8 text 1899 * len: 1900 * length of text, or -1 1901 * first_tag: 1902 * first tag to apply to text 1903 * ...: 1904 * NULL-terminated list of tags to apply 1861 * Params: 1862 * iter = an iterator in buffer 1863 * text = UTF-8 text 1864 * ... = NULL-terminated list of tags to apply 1905 1865 */ 1906 1866 //version(Tango){} else -- still doesn't work on tango, but it compiles now 1907 1867 public void insertWithTags(TextIter iter, char[] text, ... ) … … 1917 1877 /** 1918 1878 * Same as gtk_text_buffer_insert_with_tags(), but allows you 1919 1879 * to pass in tag names instead of tag objects. 1920 * buffer: 1921 * a GtkTextBuffer 1922 * iter: 1923 * position in buffer 1924 * text: 1925 * UTF-8 text 1926 * len: 1927 * length of text, or -1 1928 * first_tag_name: 1929 * name of a tag to apply to text 1930 * ...: 1931 * more tag names 1880 * Params: 1881 * iter = position in buffer 1882 * text = UTF-8 text 1883 * ... = more tag names 1932 1884 */ 1933 1885 // version(Tango){} else -- still doesn't work on tango, but it compiles now 1934 1886 public void insertWithTagsByName(TextIter iter, char[] text, ... ) … … 1943 1895 1944 1896 /** 1945 1897 * Create a new tag for this buffer 1946 * @param tagName can be null for no name 1947 * @param propertyName 1948 * @param propertyValue 1949 */ 1898 * Params: 1899 * tagName= can be null for no name 1900 * propertyName= 1901 * propertyValue= 1902 */ 1950 1903 TextTag createTag(char[] tagName, char[] propertyName, int propertyValue, 1951 1904 char[] propertyName1, char[] propertyValue1) 1952 1905 { … … 1962 1915 } 1963 1916 /** 1964 1917 * Create a new tag for this buffer 1965 * @param tagName can be null for no name 1966 * @param propertyName 1967 * @param propertyValue 1918 * Params: 1919 * tagName= can be null for no name 1920 * propertyName= 1921 * propertyValue= 1968 1922 */ 1969 1923 TextTag createTag(char[] tagName, char[] propertyName, int propertyValue) 1970 1924 { … … 1978 1932 1979 1933 /** 1980 1934 * Create a new tag for this buffer 1981 * @param tagName can be null for no name 1982 * @param propertyName 1983 * @param propertyValue 1935 * Params: 1936 * tagName= can be null for no name 1937 * propertyName= 1938 * propertyValue= 1984 1939 */ 1985 1940 TextTag createTag(char[] tagName, char[] propertyName, double propertyValue) 1986 1941 { … … 1992 1947 1993 1948 /** 1994 1949 * Create a new tag for this buffer 1995 * @param tagName can be null for no name 1996 * @param propertyName 1997 * @param propertyValue 1998 * @param propertyName2 1999 * @param propertyValue2 1950 * Params: 1951 * tagName= can be null for no name 1952 * propertyName= 1953 * propertyValue= 1954 * propertyName2= 1955 * propertyValue2= 2000 1956 */ 2001 1957 TextTag createTag(char[] tagName, char[] propertyName, int propertyValue, char[] propertyName2, int propertyValue2) 2002 1958 { … … 2005 1961 ); 2006 1962 } 2007 1963 1964 /** Create a new tag for this buffer */ 2008 1965 TextTag createTag(char[] tagName, char[] propertyName, int propertyValue, char[] propertyName2, int propertyValue2, char[] propertyName3, int propertyValue3, char[] propertyName4, int propertyValue4, char[] propertyName5, int propertyValue5) 2009 1966 { 2010 1967 return new TextTag( 2011 1968 gtk_text_buffer_create_tag(gtkTextBuffer, Str.toStringz(tagName), Str.toStringz(propertyName), propertyValue, Str.toStringz(propertyName2), propertyValue2, Str.toStringz(propertyName3), propertyValue3, Str.toStringz(propertyName4), propertyValue4, Str.toStringz(propertyName5), propertyValue5, null) 2012 1969 ); 2013 1970 } 1971 2014 1972 /** 2015 1973 * Create a new tag for this buffer 2016 * @param tagName can be null for no name 2017 * @param propertyName 2018 * @param propertyValue 1974 * Params: 1975 * tagName= can be null for no name 1976 * propertyName= 1977 * propertyValue= 2019 1978 */ 2020 1979 TextTag createTag(char[] tagName, char[] propertyName, char[] propertyValue) 2021 1980 { … … 2027 1986 2028 1987 /** 2029 1988 * Create a new tag for this buffer 2030 * @param tagName can be null for no name2031 * @param propertyName2032 * @param propertyValue2033 * @return1989 * Params: 1990 * tagName = can be null for no name 1991 * propertyName= 1992 * propertyValue= 2034 1993 */ 2035 1994 TextTag createTag(char[] tagName, char[] propertyName, Bitmap propertyValue) 2036 1995 { … … 2042 2001 2043 2002 /** 2044 2003 * Obtain the entire text 2045 * @returnThe text char[]2004 * Returns: The text char[] 2046 2005 */ 2047 2006 char[] getText() 2048 2007 { … … 2054 2013 2055 2014 /** 2056 2015 * Create a new tag for this buffer 2057 * @param tagName can be null for no name 2058 * @param propertyName 2059 * @param propertyValue 2060 * @param propertyName2 2061 * @param propertyValue2 2016 * Params: 2017 * tagName= can be null for no name 2018 * propertyName= 2019 * propertyValue= 2020 * propertyName2= 2021 * propertyValue2= 2062 2022 */ 2063 2023 TextTag createTag(char[] tagName, 2064 2024 char[] propertyName, char[] propertyValue, … … 2172 2132 2173 2133 /** 2174 2134 * Simply appends some on the cursor position 2175 * @param text the text to append 2135 * Params: 2136 * text = the text to append 2176 2137 */ 2177 2138 void insertText(char[] text) 2178 2139 { … … 2182 2143 2183 2144 /** 2184 2145 * Simply appends some text to this view 2185 * @param text the text to append 2146 * Params: 2147 * text = the text to append 2186 2148 */ 2187 2149 void appendText(char[] text, bool ensureVisible=true) 2188 2150 body … … 2247 2209 */ 2248 2210 int getValueInt(TreeIter iter, int column); 2249 2211 2212 /** */ 2250 2213 void setValue(TreeIter iter, int column, char[] value); 2251 2214 2215 /** */ 2252 2216 void setValue(TreeIter iter, int column, int value); 2253 2217 2254 2218 interfaceCode: end … … 2278 2242 return value.getInt(); 2279 2243 } 2280 2244 2281 /**2245 /** 2282 2246 * Sets iter to a valid iterator pointing to path. 2283 * tree_model: 2284 * A GtkTreeModel. 2285 * iter: 2286 * The uninitialized GtkTreeIter. 2287 * path: 2288 * The GtkTreePath. 2247 * Params: 2248 * iter = The uninitialized GtkTreeIter. 2249 * path = The GtkTreePath. 2289 2250 * Returns: 2290 2251 * TRUE, if iter was set. 2291 2252 */ … … 2322 2283 */ 2323 2284 GtkTreeModel *gtkTreeModel; 2324 2285 2286 /** */ 2325 2287 public void setModel(GtkTreeModel *gtkTreeModel) 2326 2288 { 2327 2289 this.gtkTreeModel = gtkTreeModel; 2328 2290 } 2329 2291 2292 /** */ 2330 2293 public void setModel(TreeModel treeModel) 2331 2294 { 2332 2295 this.gtkTreeModel = treeModel.getTreeModelStruct(); 2333 2296 } 2334 2297 2298 /** */ 2335 2299 public this(TreeModel treeModel, TreePath treePath) 2336 2300 { 2337 2301 this(); … … 2356 2320 2357 2321 /** 2358 2322 * Get Value 2359 * @param iter2360 * @param column2361 * @param value2323 * Params: 2324 * column = 2325 * value = 2362 2326 */ 2363 2327 void getValue(int column, Value value) 2364 2328 { … … 2371 2335 2372 2336 /** 2373 2337 * Get the value of a column as a string 2374 * @para column the column number 2375 * @return a string representing the value of the column 2338 * Params: 2339 * column = the column number 2340 * Returns: a string representing the value of the column 2376 2341 */ 2377 2342 char[] getValueString(int column) 2378 2343 { … … 2388 2353 2389 2354 /** 2390 2355 * Get the value of a column as an int 2391 * @para column the column number 2392 * @return a string representing the value of the column 2356 * Params: 2357 * column = the column number 2358 * Returns: a string representing the value of the column 2393 2359 */ 2394 2360 int getValueInt(int column) 2395 2361 { … … 2402 2368 return value.getInt(); 2403 2369 } 2404 2370 2371 /** */ 2405 2372 TreePath getTreePath() 2406 2373 { 2407 2374 if ( gtkTreeModel is null ) … … 2411 2378 return new TreePath(gtk_tree_model_get_path(gtkTreeModel, gtkTreeIter)); 2412 2379 } 2413 2380 2414 /**2381 /** 2415 2382 * This return the path visible to the user. 2416 2383 */ 2417 2384 char[] getVisiblePath(char[] separator) … … 2438 2405 2439 2406 /** 2440 2407 * Gets the parent of this iter 2441 * @param child 2442 * @return the parent iter or null if can't get parent or an error occured 2408 * Returns: the parent iter or null if can't get parent or an error occured 2443 2409 */ 2444 2410 TreeIter getParent() 2445 2411 { … … 2457 2423 return parent; 2458 2424 } 2459 2425 2460 2426 /** */ 2461 2427 TreeIter getGrandParent() 2462 2428 { 2463 2429 if ( gtkTreeModel is null ) … … 2501 2467 code: start 2502 2468 /** 2503 2469 * Creates a new GtkTreePath. This structure refers to a row. 2504 * if firstRow is true this is the string representation of this path is "0" 2505 * Returns: 2506 * A newly created GtkTreePath. 2470 * Params: 2471 * firstRow = if true this is the string representation of this path is "0" 2507 2472 */ 2508 2473 public this (bool firstRow=false) 2509 2474 { … … 2544 2509 import(tango): tango.core.Exception 2545 2510 2546 2511 code: start 2547 /**2548 * A TreeIter error.2549 * thrown<br>2550 * - trying to access a method that requires a tree model and the tree model was never set2551 */2512 /** 2513 * A TreeIter error. 2514 * thrown<br> 2515 * - trying to access a method that requires a tree model and the tree model was never set 2516 */ 2552 2517 public this(char[] method, char[] message) 2553 2518 { 2554 2519 super("TreeIter."~method~" : "~message); … … 2586 2551 * just want to test if selection has any selected nodes. model is filled 2587 2552 * with the current model as a convenience. This function will not work if you 2588 2553 * use selection is GTK_SELECTION_MULTIPLE. 2589 * selection: 2590 * A GtkTreeSelection. 2591 * model: 2592 * A pointer to set to the GtkTreeModel, or NULL. 2593 * iter: 2594 * The GtkTreeIter, or NULL. 2554 * Params: 2555 * model = A pointer to set to the GtkTreeModel, or NULL. 2556 * iter = The GtkTreeIter, or NULL. 2595 2557 * Returns: 2596 2558 * TRUE, if there is a selected node. 2597 2559 */ … … 2609 2571 * To free the return value, use: 2610 2572 * g_list_foreach (list, gtk_tree_path_free, NULL); 2611 2573 * g_list_free (list); 2612 * selection: 2613 * A GtkTreeSelection. 2614 * model: 2615 * A pointer to set to the GtkTreeModel, or NULL. 2574 * Since 2.2 2575 * Params: 2576 * model = A pointer to set to the GtkTreeModel, or NULL. 2616 2577 * Returns: 2617 2578 * A GList containing a GtkTreePath for each selected row. 2618 * Since 2.22619 2579 */ 2620 2580 TreePath[] getSelectedRows(TreeModel model) 2621 2581 { … … 2662 2622 code: start 2663 2623 /** 2664 2624 * Creates a new Tree view column 2665 * @param header th column header text 2666 * @param renderer the rederer for the column cells 2667 * @param type the type of data to be displayed (shouldn't this be on the renderer?) 2668 * @param column the column number 2625 * Params: 2626 * header = th column header text 2627 * renderer = the rederer for the column cells 2628 * type = the type of data to be displayed (shouldn't this be on the renderer?) 2629 * column = the column number 2669 2630 */ 2670 2631 this(char [] header, CellRenderer renderer, char [] type, int column) 2671 2632 { … … 2722 2683 code: start 2723 2684 /** 2724 2685 * Expands the row of the iter. 2725 * @param iter 2726 * @param openAll 2727 * @return 2686 * Params: 2687 * iter = 2688 * openAll = 2689 * Returns = 2728 2690 */ 2729 2691 int expandRow(TreeIter iter, TreeModel model, int openAll) 2730 2692 { 2731 2693 return expandRow(model.getPath(iter), openAll); 2732 2694 } 2733 2695 2734 /**2696 /** 2735 2697 * Finds the path at the point (x, y), relative to widget coordinates. That 2736 2698 * is, x and y are relative to an events coordinates. x and y must come 2737 2699 * from an event on the tree_view only where event->window == … … 2742 2704 * cell_x and cell_y return the coordinates relative to the cell background 2743 2705 * (i.e. the background_area passed to gtk_cell_renderer_render()). This 2744 2706 * function is only meaningful if tree_view is realized. 2745 * tree_view: 2746 * A GtkTreeView. 2747 * x: 2748 * The x position to be identified. 2749 * y: 2750 * The y position to be identified. 2751 * path: 2752 &
