list

package
v0.0.0-...-955f326 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2020 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List struct {
	ux.Panel

	DoubleClickCallback  func()
	NewSelectionCallback func()

	Selection *xmath.BitSet
	// contains filtered or unexported fields
}

List provides a control that allows the user to select from a list of items, represented by cells.

func New

func New() *List

New creates a new List control.

func (*List) AlternateBackgroundInk

func (l *List) AlternateBackgroundInk() draw.Ink

AlternateBackgroundInk returns the ink that will be used for the background on odd rows when not selected.

func (*List) Append

func (l *List) Append(values ...interface{})

Append values to the list of items.

func (*List) BackgroundInk

func (l *List) BackgroundInk() draw.Ink

BackgroundInk returns the ink that will be used for the background on even rows when not selected.

func (*List) DefaultCanPerformCmd

func (l *List) DefaultCanPerformCmd(source interface{}, id int) bool

DefaultCanPerformCmd provides the default can perform cmd handling.

func (*List) DefaultDraw

func (l *List) DefaultDraw(gc draw.Context, dirty geom.Rect, inLiveResize bool)

DefaultDraw provides the default drawing.

func (*List) DefaultKeyDown

func (l *List) DefaultKeyDown(keyCode int, ch rune, mod keys.Modifiers, repeat bool) bool

DefaultKeyDown provides the default key down handling.

func (*List) DefaultMouseDown

func (l *List) DefaultMouseDown(where geom.Point, button, clickCount int, mod keys.Modifiers) bool

DefaultMouseDown provides the default mouse down handling.

func (*List) DefaultMouseDrag

func (l *List) DefaultMouseDrag(where geom.Point, button int, mod keys.Modifiers)

DefaultMouseDrag provides the default mouse drag handling.

func (*List) DefaultMouseUp

func (l *List) DefaultMouseUp(where geom.Point, button int, mod keys.Modifiers)

DefaultMouseUp provides the default mouse up handling.

func (*List) DefaultPerformCmd

func (l *List) DefaultPerformCmd(source interface{}, id int)

DefaultPerformCmd provides the default perform cmd handling.

func (*List) DefaultSizes

func (l *List) DefaultSizes(hint geom.Size) (min, pref, max geom.Size)

DefaultSizes provides the default sizing.

func (*List) Factory

func (l *List) Factory() widget.CellFactory

Factory returns the cell factory.

func (*List) Insert

func (l *List) Insert(index int, values ...interface{})

Insert values at the specified index.

func (*List) Remove

func (l *List) Remove(index int)

Remove the item at the specified index.

func (*List) Select

func (l *List) Select(add bool, index ...int)

Select items at the specified indexes. If 'add' is true, then any existing selection is added to rather than replaced.

func (*List) SelectRange

func (l *List) SelectRange(start, end int, add bool)

SelectRange selects items from 'start' to 'end', inclusive. If 'add' is true, then any existing selection is added to rather than replaced.

func (*List) SelectedBackgroundInk

func (l *List) SelectedBackgroundInk() draw.Ink

SelectedBackgroundInk returns the ink that will be used for the background when selected.

func (*List) SetAlternateBackgroundInk

func (l *List) SetAlternateBackgroundInk(value draw.Ink) *List

SetAlternateBackgroundInk sets the ink that will be used for the background on odd rows when not selected. Pass in nil to use the default.

func (*List) SetBackgroundInk

func (l *List) SetBackgroundInk(value draw.Ink) *List

SetBackgroundInk sets the ink that will be used for the background on even rows when not selected. Pass in nil to use the default.

func (*List) SetBorder

func (l *List) SetBorder(value border.Border) *List

SetBorder sets the border. May be nil.

func (*List) SetEnabled

func (l *List) SetEnabled(enabled bool) *List

SetEnabled sets enabled state.

func (*List) SetFactory

func (l *List) SetFactory(value widget.CellFactory) *List

SetFactory sets the cell factory. Pass in nil to use the default.

func (*List) SetFocusable

func (l *List) SetFocusable(focusable bool) *List

SetFocusable whether it can have the keyboard focus.

func (*List) SetSelectedBackgroundInk

func (l *List) SetSelectedBackgroundInk(value draw.Ink) *List

SetSelectedBackgroundInk sets the ink that will be used for the background when selected. Pass in nil to use the default.

Jump to

Keyboard shortcuts

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