Add documentation for Slider
This commit is contained in:
11
scrollbar.go
11
scrollbar.go
@@ -33,12 +33,12 @@ func newScrollbar (orient string) *Scrollbar {
|
||||
|
||||
this.Add(this.handle)
|
||||
this.SetFocusable(true)
|
||||
|
||||
|
||||
this.CaptureDND(true)
|
||||
this.CaptureMouse(true)
|
||||
this.CaptureScroll(true)
|
||||
this.CaptureKeyboard(true)
|
||||
|
||||
|
||||
this.OnKeyDown(this.handleKeyDown)
|
||||
this.OnMouseDown(this.handleMouseDown)
|
||||
this.OnMouseUp(this.handleMouseUp)
|
||||
@@ -80,6 +80,13 @@ func (this *Scrollbar) SetValue (value float64) {
|
||||
// right/bottom.
|
||||
func (this *Scrollbar) Value () float64 {
|
||||
// TODO
|
||||
return 0
|
||||
}
|
||||
|
||||
// OnValueChange specifies a function to be called when the position of the
|
||||
// scrollbar changes.
|
||||
func (this *Slider) OnValueChange (callback func ()) event.Cookie {
|
||||
return this.on.valueChange.Connect(callback)
|
||||
}
|
||||
|
||||
func (this *Scrollbar) handleKeyDown (key input.Key, numpad bool) {
|
||||
|
||||
Reference in New Issue
Block a user