scrollview

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package button implements a native scroll view.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Direction

type Direction int

Direction represents the X and Y axis.

const (
	Horizontal Direction = 1 << iota
	Vertical
)

type ScrollPosition

type ScrollPosition struct {
	X animate.Value
	Y animate.Value
	// contains filtered or unexported fields
}

func (*ScrollPosition) Notify

func (p *ScrollPosition) Notify(f func()) comm.Id

func (*ScrollPosition) SetValue

func (p *ScrollPosition) SetValue(val layout.Point)

func (*ScrollPosition) Unnotify

func (p *ScrollPosition) Unnotify(id comm.Id)

func (*ScrollPosition) Value

func (p *ScrollPosition) Value() layout.Point

type View

type View struct {
	view.Embed
	Direction                Direction
	ScrollIndicatorDirection Direction
	ScrollEnabled            bool
	ScrollPosition           *ScrollPosition

	OnScroll func(position layout.Point)

	ContentChildren []view.View
	ContentPainter  paint.Painter
	ContentLayouter layout.Layouter
	PaintStyle      *paint.Style
	// contains filtered or unexported fields
}

func New

func New(ctx *view.Context, key string) *View

New returns either the previous View in ctx with matching key, or a new View if none exists.

func (*View) Build

func (v *View) Build(ctx *view.Context) view.Model

Build implements view.View.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL