summaryrefslogtreecommitdiff
path: root/basicctrls.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-10-28 11:01:02 -0400
committerPietro Gagliardi <[email protected]>2014-10-28 11:01:02 -0400
commit649b52b6ef273c2ea5a4cf881835a7fd61bd4df1 (patch)
treed22a9317599e6b03ecd4b1de0d753c71bdfe306b /basicctrls.go
parent61cd7f5b0a70f261f65fc790fadf9d6ea64e8b4f (diff)
Set up the absolute basic Spinbox and implemented it on GTK+. This is easy as it's one control on GTK+; now we have to do it on Windows and Mac OS X. And on those platforms, those are two separate controls (a standard edit control and an up-down/NSSpinner).
Diffstat (limited to 'basicctrls.go')
-rw-r--r--basicctrls.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/basicctrls.go b/basicctrls.go
index 82550b6..8c97860 100644
--- a/basicctrls.go
+++ b/basicctrls.go
@@ -139,3 +139,21 @@ type Textbox interface {
func NewTextbox() Textbox {
return newTextbox()
}
+
+// Spinbox is a Control that provides a text entry field that accepts integers and up and down buttons to increment and decrement those values.
+// This control is in its preliminary state.
+// TODO everything:
+// - TODO set increment
+// - TODO set step
+// - TODO set page step?
+// - TODO wrapping
+// - TODO set/get integer value
+// - TODO negative values
+type Spinbox interface {
+ Control
+}
+
+// NewSpinbox creates a new Spinbox.
+func NewSpinbox() Spinbox {
+ return newSpinbox()
+}