summaryrefslogtreecommitdiff
path: root/listbox_darwin.go
diff options
context:
space:
mode:
Diffstat (limited to 'listbox_darwin.go')
-rw-r--r--listbox_darwin.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/listbox_darwin.go b/listbox_darwin.go
index e6804e7..b5f26a8 100644
--- a/listbox_darwin.go
+++ b/listbox_darwin.go
@@ -241,6 +241,7 @@ var (
_selectedRowIndexes = sel_getUid("selectedRowIndexes")
_count = sel_getUid("count")
_numberOfRows = sel_getUid("numberOfRows")
+ _deselectAll = sel_getUid("deselectAll:")
)
func makeListbox(parentWindow C.id, alternate bool) C.id {
@@ -315,3 +316,12 @@ func deleteListbox(listbox C.id, index int) {
func listboxLen(listbox C.id) int {
return int(C.objc_msgSend_intret_noargs(listboxInScrollView(listbox), _numberOfRows))
}
+
+func selectListboxIndices(id C.id, indices []int) {
+ listbox := listboxInScrollView(id)
+ if len(indices) == 0 {
+ C.objc_msgSend_id(listbox, _deselectAll, listbox)
+ return
+ }
+ panic("selectListboxIndices() > 0 not yet implemented (TODO)")
+}