Documentation ¶
Overview ¶
Package sbar is a fyne widget for scroll bar;
Index ¶
Constants ¶
View Source
const ( BarWidth = 10 BarHeight = 30 )
scroll bar size
View Source
const OffsetResolution = 100
OffsetResolution indicate max value of the scroll offset
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OffsetChangeHandler ¶
type OffsetChangeHandler func(newoffset uint32)
OffsetChangeHandler is the type handler function get called whenever scroller offset changes
type SBar ¶
type SBar struct { widget.BaseWidget // contains filtered or unexported fields }
SBar is the fyne widget for scroll bar
func NewSBar ¶
func NewSBar(handler OffsetChangeHandler, h bool) *SBar
NewSBar returns a new scrollbar instance, with the specified handler function handler, could be nil; horizontal scrollbar if h is true, vertical otherwise;
func (*SBar) CreateRenderer ¶
func (sbar *SBar) CreateRenderer() fyne.WidgetRenderer
CreateRenderer implments fyne.Widget interface
func (*SBar) Dragged ¶
func (sbar *SBar) Dragged(evt *fyne.DragEvent)
Dragged implements fyne.Draggable interface
func (*SBar) IsHorizontal ¶
IsHorizontal returns true if it is horizontal scroll bar
Click to show internal directories.
Click to hide internal directories.