onRicon receives subscribed events for column header right icon
(evname string, c *tableColHeader)
| 910 | |
| 911 | // onRicon receives subscribed events for column header right icon |
| 912 | func (t *Table) onRicon(evname string, c *tableColHeader) { |
| 913 | |
| 914 | ico := tableSortedNoneIcon |
| 915 | var asc bool |
| 916 | if c.sorted == tableSortedNone || c.sorted == tableSortedDesc { |
| 917 | c.sorted = tableSortedAsc |
| 918 | ico = tableSortedAscIcon |
| 919 | asc = false |
| 920 | } else { |
| 921 | c.sorted = tableSortedDesc |
| 922 | ico = tableSortedDescIcon |
| 923 | asc = true |
| 924 | } |
| 925 | |
| 926 | var asString bool |
| 927 | if c.sort == TableSortString { |
| 928 | asString = true |
| 929 | } else { |
| 930 | asString = false |
| 931 | } |
| 932 | t.SortColumn(c.id, asString, asc) |
| 933 | c.ricon.SetText(string(ico)) |
| 934 | } |
| 935 | |
| 936 | // findClick finds where in the table the specified mouse click event |
| 937 | // occurred updating the specified TableClickEvent with the click coordinates. |
no test coverage detected