widget

package
v0.0.0-...-af996ba Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2019 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	object.Base
	Describer func() string
	// contains filtered or unexported fields
}

Block is the basic graphical block in a window.

func NewBlock

func NewBlock() *Block

NewBlock creates a new, empty block.

func (*Block) AddChild

func (b *Block) AddChild(child ui.Widget)

AddChild implements the Widget interface.

func (*Block) AddChildAtIndex

func (b *Block) AddChildAtIndex(child ui.Widget, index int)

AddChildAtIndex implements the Widget interface.

func (*Block) Background

func (b *Block) Background() color.Color

Background implements the Widget interface.

func (*Block) Border

func (b *Block) Border() border.Border

Border implements the Widget interface.

func (*Block) Bounds

func (b *Block) Bounds() geom.Rect

Bounds implements the Widget interface.

func (*Block) Children

func (b *Block) Children() []ui.Widget

Children implements the Widget interface.

func (*Block) Enabled

func (b *Block) Enabled() bool

Enabled implements the Widget interface.

func (*Block) EventHandlers

func (b *Block) EventHandlers() *event.Handlers

EventHandlers implements the event.Target interface.

func (*Block) Focusable

func (b *Block) Focusable() bool

Focusable implements the Widget interface.

func (*Block) Focused

func (b *Block) Focused() bool

Focused implements the Widget interface.

func (*Block) FromWindow

func (b *Block) FromWindow(pt geom.Point) geom.Point

FromWindow implements the Widget interface.

func (*Block) GrabFocusWhenClickedOn

func (b *Block) GrabFocusWhenClickedOn() bool

GrabFocusWhenClickedOn implements the Widget interface.

func (*Block) IndexOfChild

func (b *Block) IndexOfChild(child ui.Widget) int

IndexOfChild implements the Widget interface.

func (*Block) Layout

func (b *Block) Layout() layout.Layout

Layout implements the Widget interface.

func (*Block) LayoutData

func (b *Block) LayoutData() interface{}

LayoutData implements the Widget interface.

func (*Block) LocalBounds

func (b *Block) LocalBounds() geom.Rect

LocalBounds implements the Widget interface.

func (*Block) LocalInsetBounds

func (b *Block) LocalInsetBounds() geom.Rect

LocalInsetBounds implements the Widget interface.

func (*Block) Location

func (b *Block) Location() geom.Point

Location implements the Widget interface.

func (*Block) NeedLayout

func (b *Block) NeedLayout() bool

NeedLayout implements the Widget interface.

func (*Block) Paint

func (b *Block) Paint(gc *draw.Graphics, dirty geom.Rect)

Paint implements the Widget interface.

func (*Block) Parent

func (b *Block) Parent() ui.Widget

Parent implements the Widget interface.

func (*Block) ParentTarget

func (b *Block) ParentTarget() event.Target

ParentTarget implements the event.Target interface.

func (*Block) RemoveChild

func (b *Block) RemoveChild(child ui.Widget)

RemoveChild implements the Widget interface.

func (*Block) RemoveChildAtIndex

func (b *Block) RemoveChildAtIndex(index int)

RemoveChildAtIndex implements the Widget interface.

func (*Block) RemoveFromParent

func (b *Block) RemoveFromParent()

RemoveFromParent implements the Widget interface.

func (*Block) Repaint

func (b *Block) Repaint()

Repaint implements the Widget interface.

func (*Block) RepaintBounds

func (b *Block) RepaintBounds(bounds geom.Rect)

RepaintBounds implements the Widget interface.

func (*Block) RootOfWindow

func (b *Block) RootOfWindow() bool

RootOfWindow implements the Widget interface.

func (*Block) ScrollIntoView

func (b *Block) ScrollIntoView()

ScrollIntoView attempts to scroll the block into view.

func (*Block) SetBackground

func (b *Block) SetBackground(color color.Color)

SetBackground implements the Widget interface.

func (*Block) SetBorder

func (b *Block) SetBorder(border border.Border)

SetBorder implements the Widget interface.

func (*Block) SetBounds

func (b *Block) SetBounds(bounds geom.Rect)

SetBounds implements the Widget interface.

func (*Block) SetEnabled

func (b *Block) SetEnabled(enabled bool)

SetEnabled implements the Widget interface.

func (*Block) SetFocusable

func (b *Block) SetFocusable(focusable bool)

SetFocusable implements the Widget interface.

func (*Block) SetGrabFocusWhenClickedOn

func (b *Block) SetGrabFocusWhenClickedOn(grabsFocus bool)

SetGrabFocusWhenClickedOn implements the Widget interface.

func (*Block) SetLayout

func (b *Block) SetLayout(layout layout.Layout)

SetLayout implements the Widget interface.

func (*Block) SetLayoutData

func (b *Block) SetLayoutData(data interface{})

SetLayoutData implements the Widget interface.

func (*Block) SetLocation

func (b *Block) SetLocation(pt geom.Point)

SetLocation implements the Widget interface.

func (*Block) SetNeedLayout

func (b *Block) SetNeedLayout(needLayout bool)

SetNeedLayout implements the Widget interface.

func (*Block) SetParent

func (b *Block) SetParent(parent ui.Widget)

SetParent implements the Widget interface.

func (*Block) SetSize

func (b *Block) SetSize(size geom.Size)

SetSize implements the Widget interface.

func (*Block) SetSizer

func (b *Block) SetSizer(sizer layout.Sizer)

SetSizer implements the Widget interface.

func (*Block) SetWindow

func (b *Block) SetWindow(wnd ui.Window)

SetWindow sets the window of this Block and the Block's bounds to the window's ContentLocalFrame().

func (*Block) Size

func (b *Block) Size() geom.Size

Size implements the Widget interface.

func (*Block) Sizer

func (b *Block) Sizer() layout.Sizer

Sizer implements the Widget interface.

func (*Block) String

func (b *Block) String() string

func (*Block) ToWindow

func (b *Block) ToWindow(pt geom.Point) geom.Point

ToWindow implements the Widget interface.

func (*Block) ValidateLayout

func (b *Block) ValidateLayout()

ValidateLayout implements the Widget interface.

func (*Block) WidgetAt

func (b *Block) WidgetAt(pt geom.Point) ui.Widget

WidgetAt implements the Widget interface.

func (*Block) Window

func (b *Block) Window() ui.Window

Window implements the Widget interface.

type CellFactory

type CellFactory interface {
	// CellHeight returns the height to use for the cells. A value less than 1 indicates that each
	// cell's height may be different.
	CellHeight() float64

	// CreateCell creates a new cell for 'owner' using 'element' as the content. 'index' indicates
	// which row the element came from. 'selected' indicates the cell should be created in its
	// selected state. 'focused' indicates the cell should be created in its focused state.
	CreateCell(owner ui.Widget, element interface{}, index int, selected, focused bool) ui.Widget
}

CellFactory defines methods all cell factories must implement.

Jump to

Keyboard shortcuts

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