parent
155752ba78
commit
0fe4979483
@ -9,7 +9,7 @@ import "git.tebibyte.media/tomo/tomo/event"
|
|||||||
// overflowing ContainerBox.
|
// overflowing ContainerBox.
|
||||||
type Scrollbar struct {
|
type Scrollbar struct {
|
||||||
tomo.ContainerBox
|
tomo.ContainerBox
|
||||||
handle *SliderHandle
|
handle *sliderHandle
|
||||||
layout scrollbarLayout
|
layout scrollbarLayout
|
||||||
dragging bool
|
dragging bool
|
||||||
dragOffset image.Point
|
dragOffset image.Point
|
||||||
@ -24,7 +24,7 @@ type Scrollbar struct {
|
|||||||
func newScrollbar (orient string) *Scrollbar {
|
func newScrollbar (orient string) *Scrollbar {
|
||||||
this := &Scrollbar {
|
this := &Scrollbar {
|
||||||
ContainerBox: tomo.NewContainerBox(),
|
ContainerBox: tomo.NewContainerBox(),
|
||||||
handle: &SliderHandle {
|
handle: &sliderHandle {
|
||||||
Box: tomo.NewBox(),
|
Box: tomo.NewBox(),
|
||||||
},
|
},
|
||||||
layout: scrollbarLayout {
|
layout: scrollbarLayout {
|
||||||
|
@ -9,7 +9,7 @@ import "git.tebibyte.media/tomo/tomo/event"
|
|||||||
// Slider is a control that selects a numeric value between 0 and 1.
|
// Slider is a control that selects a numeric value between 0 and 1.
|
||||||
type Slider struct {
|
type Slider struct {
|
||||||
tomo.ContainerBox
|
tomo.ContainerBox
|
||||||
handle *SliderHandle
|
handle *sliderHandle
|
||||||
layout sliderLayout
|
layout sliderLayout
|
||||||
dragging bool
|
dragging bool
|
||||||
dragOffset image.Point
|
dragOffset image.Point
|
||||||
@ -21,16 +21,14 @@ type Slider struct {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// SliderHandle is a simple object that serves as a handle for sliders and
|
type sliderHandle struct {
|
||||||
// scrollbars. It is completely inert.
|
|
||||||
type SliderHandle struct {
|
|
||||||
tomo.Box
|
tomo.Box
|
||||||
}
|
}
|
||||||
|
|
||||||
func newSlider (orient string, value float64) *Slider {
|
func newSlider (orient string, value float64) *Slider {
|
||||||
this := &Slider {
|
this := &Slider {
|
||||||
ContainerBox: tomo.NewContainerBox(),
|
ContainerBox: tomo.NewContainerBox(),
|
||||||
handle: &SliderHandle {
|
handle: &sliderHandle {
|
||||||
Box: tomo.NewBox(),
|
Box: tomo.NewBox(),
|
||||||
},
|
},
|
||||||
layout: sliderLayout {
|
layout: sliderLayout {
|
||||||
|
Loading…
Reference in New Issue
Block a user