Documentation ¶
Overview ¶
Package vscroll provides a vertical scrollbar widget with mouse support. See the editor demo for more.
Index ¶
- Variables
- func Render(w IWidget, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas
- func RenderSize(w interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox
- func UserInput(w IVerticalScrollbar, ev interface{}, size gowid.IRenderSize, ...) bool
- type ClickAbove
- type ClickBelow
- type ClickDown
- type ClickUp
- type IRightMouseClick
- type IVerticalScrollbar
- type IWidget
- type RightClick
- type VerticalScrollbarRunes
- type Widget
- func (w *Widget) ClickAbove(app gowid.IApp)
- func (w *Widget) ClickBelow(app gowid.IApp)
- func (w *Widget) ClickDown(app gowid.IApp)
- func (w *Widget) ClickUp(app gowid.IApp)
- func (w *Widget) GetBottom() int
- func (w *Widget) GetMiddle() int
- func (w *Widget) GetRunes() VerticalScrollbarRunes
- func (w *Widget) GetTop() int
- func (w *Widget) OnClickAbove(f gowid.IWidgetChangedCallback)
- func (w *Widget) OnClickBelow(f gowid.IWidgetChangedCallback)
- func (w *Widget) OnClickDownArrow(f gowid.IWidgetChangedCallback)
- func (w *Widget) OnClickUpArrow(f gowid.IWidgetChangedCallback)
- func (w *Widget) OnRightClick(f gowid.IWidgetChangedCallback)
- func (w *Widget) RemoveOnClickAbove(f gowid.IIdentity)
- func (w *Widget) RemoveOnClickBelow(f gowid.IIdentity)
- func (w *Widget) RemoveOnClickDownArrow(f gowid.IIdentity)
- func (w *Widget) RemoveOnClickUpArrow(f gowid.IIdentity)
- func (w *Widget) RemoveOnRightClick(f gowid.IIdentity)
- func (w *Widget) Render(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas
- func (w *Widget) RenderSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox
- func (w *Widget) RightClick(frac float32, app gowid.IApp)
- func (w *Widget) String() string
- func (w *Widget) UserInput(ev interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( VerticalScrollbarAsciiRunes = VerticalScrollbarRunes{'^', 'v', ' ', '#'} VerticalScrollbarUnicodeRunes = VerticalScrollbarRunes{'▲', '▼', ' ', '█'} )
Functions ¶
func RenderSize ¶
func RenderSize(w interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox
func UserInput ¶
func UserInput(w IVerticalScrollbar, ev interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) bool
Types ¶
type ClickAbove ¶
type ClickAbove struct{}
type ClickBelow ¶
type ClickBelow struct{}
type IRightMouseClick ¶ added in v1.2.0
type IVerticalScrollbar ¶
type IWidget ¶
type IWidget interface { gowid.IWidget IVerticalScrollbar }
type RightClick ¶ added in v1.2.0
type RightClick struct{}
type VerticalScrollbarRunes ¶
type VerticalScrollbarRunes struct {
Up, Down, Space, Handle rune
}
type Widget ¶
type Widget struct { Top int Middle int Bottom int Runes VerticalScrollbarRunes Callbacks *gowid.Callbacks gowid.IsSelectable }
func NewExt ¶
func NewExt(runes VerticalScrollbarRunes) *Widget
func NewUnicode ¶
func NewUnicode() *Widget
func NewWithChars ¶
func NewWithChars(runes VerticalScrollbarRunes) *Widget
func (*Widget) ClickAbove ¶
func (*Widget) ClickBelow ¶
func (*Widget) GetRunes ¶
func (w *Widget) GetRunes() VerticalScrollbarRunes
func (*Widget) OnClickAbove ¶
func (w *Widget) OnClickAbove(f gowid.IWidgetChangedCallback)
func (*Widget) OnClickBelow ¶
func (w *Widget) OnClickBelow(f gowid.IWidgetChangedCallback)
func (*Widget) OnClickDownArrow ¶
func (w *Widget) OnClickDownArrow(f gowid.IWidgetChangedCallback)
func (*Widget) OnClickUpArrow ¶
func (w *Widget) OnClickUpArrow(f gowid.IWidgetChangedCallback)
func (*Widget) OnRightClick ¶ added in v1.2.0
func (w *Widget) OnRightClick(f gowid.IWidgetChangedCallback)
func (*Widget) RemoveOnClickAbove ¶
func (*Widget) RemoveOnClickBelow ¶
func (*Widget) RemoveOnClickDownArrow ¶
func (*Widget) RemoveOnClickUpArrow ¶
func (*Widget) RemoveOnRightClick ¶ added in v1.2.0
func (*Widget) RenderSize ¶
func (w *Widget) RenderSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox
func (*Widget) RightClick ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.