Documentation ¶
Index ¶
- Variables
- type Behavior
- type ScrollArea
- func (sa *ScrollArea) Content() ui.Widget
- func (sa *ScrollArea) ContentSize(horizontal bool) float64
- func (sa *ScrollArea) LineScrollAmount(horizontal, towardsStart bool) float64
- func (sa *ScrollArea) PageScrollAmount(horizontal, towardsStart bool) float64
- func (sa *ScrollArea) ScrolledPosition(horizontal bool) float64
- func (sa *ScrollArea) SetContent(content ui.Widget, behavior Behavior)
- func (sa *ScrollArea) SetScrolledPosition(horizontal bool, position float64)
- func (sa *ScrollArea) VisibleSize(horizontal bool) float64
- type Theme
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // StdTheme is the theme all new ScrollAreas get by default. StdTheme = NewTheme() )
Functions ¶
This section is empty.
Types ¶
type Behavior ¶
type Behavior int
Behavior controls how auto-sizing of the scroll content's preferred size is handled.
type ScrollArea ¶
type ScrollArea struct { widget.Block Theme *Theme // The theme the ScrollArea will use to draw itself. // contains filtered or unexported fields }
ScrollArea provides a widget that can hold another widget and show it through a scrollable viewport.
func New ¶
func New(content ui.Widget, behavior Behavior) *ScrollArea
New creates a new ScrollArea with the specified block as its content. The content may be nil.
func (*ScrollArea) Content ¶
func (sa *ScrollArea) Content() ui.Widget
Content returns the content block.
func (*ScrollArea) ContentSize ¶
func (sa *ScrollArea) ContentSize(horizontal bool) float64
ContentSize implements Scrollable.
func (*ScrollArea) LineScrollAmount ¶
func (sa *ScrollArea) LineScrollAmount(horizontal, towardsStart bool) float64
LineScrollAmount implements Pager and Scrollable.
func (*ScrollArea) PageScrollAmount ¶
func (sa *ScrollArea) PageScrollAmount(horizontal, towardsStart bool) float64
PageScrollAmount implements Pager and Scrollable.
func (*ScrollArea) ScrolledPosition ¶
func (sa *ScrollArea) ScrolledPosition(horizontal bool) float64
ScrolledPosition implements Scrollable.
func (*ScrollArea) SetContent ¶
func (sa *ScrollArea) SetContent(content ui.Widget, behavior Behavior)
SetContent sets the content block, replacing any existing one.
func (*ScrollArea) SetScrolledPosition ¶
func (sa *ScrollArea) SetScrolledPosition(horizontal bool, position float64)
SetScrolledPosition implements Scrollable.
func (*ScrollArea) VisibleSize ¶
func (sa *ScrollArea) VisibleSize(horizontal bool) float64
VisibleSize implements Scrollable.
Click to show internal directories.
Click to hide internal directories.