summaryrefslogtreecommitdiff
path: root/listbox_darwin.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-04-12 22:05:34 -0400
committerPietro Gagliardi <[email protected]>2014-04-12 22:05:34 -0400
commitd4c79539af8b33f41c070773c6bc5e5cbf867543 (patch)
tree43a7eb1de1892a58774752bc56cd10b63050b405 /listbox_darwin.go
parent274fa0c2928e3d1573a83d2f68048963df5e16e4 (diff)
Fixed Listboxes on Mac OS X having an initial selection.
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)")
+}