summaryrefslogtreecommitdiff
path: root/redo/table_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-08-18 02:22:27 -0400
committerPietro Gagliardi <[email protected]>2014-08-18 02:22:27 -0400
commit58e95f239940c646dce75c2b978d077884b7d215 (patch)
treed97819143dd15c8ca25213e79e54fa1bf9fe514b /redo/table_windows.go
parent3cad9aac25515dd3e6d526142db3e90c98d125d7 (diff)
Added Table.Selected()/Table.Select() and implemented them on Windows.
Diffstat (limited to 'redo/table_windows.go')
-rw-r--r--redo/table_windows.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/redo/table_windows.go b/redo/table_windows.go
index 71049b5..41aa363 100644
--- a/redo/table_windows.go
+++ b/redo/table_windows.go
@@ -62,6 +62,18 @@ func (t *table) LoadImageList(il ImageList) {
il.apply(t._hwnd, C.LVM_SETIMAGELIST, C.LVSIL_SMALL)
}
+func (t *table) Selected() int {
+ t.RLock()
+ defer t.RUnlock()
+ return int(C.tableSelectedItem(t._hwnd))
+}
+
+func (t *table) Select(index int) {
+ t.RLock()
+ defer t.RUnlock()
+ C.tableSelectItem(t._hwnd, C.intptr_t(index))
+}
+
//export tableGetCell
func tableGetCell(data unsafe.Pointer, item *C.LVITEMW) {
t := (*table)(data)