summaryrefslogtreecommitdiff
path: root/spinbox_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-11-02 20:49:39 -0500
committerPietro Gagliardi <[email protected]>2014-11-02 20:49:39 -0500
commit8f04623115832d2e3b64acb10011a638514135f9 (patch)
treeb4b034f4914fdca68e6fd808bab56a4ae94fc685 /spinbox_windows.go
parent280723763c985497cc5d87bfd0d3cbe3c020b0ab (diff)
Started the work for Spinbox.OnChanged() on Windows with the edit control.
Diffstat (limited to 'spinbox_windows.go')
-rw-r--r--spinbox_windows.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/spinbox_windows.go b/spinbox_windows.go
index b42c75d..7f92cb7 100644
--- a/spinbox_windows.go
+++ b/spinbox_windows.go
@@ -35,6 +35,7 @@ func newSpinbox(min int, max int) Spinbox {
s.max = max
s.value = s.min
s.remakeUpDown()
+ C.setSpinboxEditSubclass(s.hwndEdit, unsafe.Pointer(s))
return s
}
@@ -73,6 +74,13 @@ func spinboxUpDownClicked(data unsafe.Pointer, nud *C.NMUPDOWN) {
s.changed.fire()
}
+//export spinboxEditChanged
+func spinboxEditChanged(data unsafe.Pointer) {
+ s := (*spinbox)(unsafe.Pointer(data))
+ // TODO
+ s.changed.fire()
+}
+
func (s *spinbox) setParent(p *controlParent) {
C.controlSetParent(s.hwndEdit, p.hwnd)
C.controlSetParent(s.hwndUpDown, p.hwnd)