summaryrefslogtreecommitdiff
path: root/basicctrls.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-10-31 19:57:48 -0400
committerPietro Gagliardi <[email protected]>2014-10-31 19:57:48 -0400
commit7c96841392d64e611d1d99f1c5a241b92e95f4d3 (patch)
tree485118c7fb8c6300deed6fe7660ca04993916614 /basicctrls.go
parent68af61435e793337276119f4795fd4c3e537d691 (diff)
Added Spinbox.OnChanged() and implemented it on GTK+ and Mac OS X. Implementing it on Windows is going to be a pain...
Diffstat (limited to 'basicctrls.go')
-rw-r--r--basicctrls.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/basicctrls.go b/basicctrls.go
index 8e4e926..82caada 100644
--- a/basicctrls.go
+++ b/basicctrls.go
@@ -146,7 +146,6 @@ func NewTextbox() Textbox {
// - TODO set increment? (work on windows)
// - TODO set page step?
// - TODO wrapping
-// - TODO set/get integer value
// - TODO negative values
// - TODO ensuring values entered in text box stay within bounds
type Spinbox interface {
@@ -156,6 +155,10 @@ type Spinbox interface {
// For SetValue, if the new value is outside the current range of the Spinbox, it is set to the nearest extremity.
Value() int
SetValue(value int)
+
+ // OnChanged sets the event handler for when the Spinbox's value is changed.
+ // Under what conditions this event is raised when the user types into the Spinbox's edit field is platform-defined.
+ OnChanged(func())
}
// NewSpinbox creates a new Spinbox with the given minimum and maximum.