cell

package
v0.0.0-...-54b116d Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2020 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CellTypeNames = []string{"Input", "Output", "H1", "H2", "H3", "H4", "H5", "H6", "Paragraph", "Code"}

Functions

This section is empty.

Types

type Cell

type Cell interface {
	Layout(selected bool, gtx *layout.Context)
	Event(gtx *layout.Context) interface{}

	Type() Type
	Text() string
	Focus()

	SetText(s string)
	SetType(s Type)
	SetLabel(s string)
	SetErr(err error)
	SetOut(ex expreduceapi.Ex)

	ToEx() *atoms.Expression
}

func NewCell

func NewCell(typ Type, label string, styles *theme.Styles) Cell

func Read

func Read(r io.RuneReader, interactive bool) (Cell, error)

type Cells

type Cells []Cell

func (Cells) Add

func (cells Cells) Add(c Cell) Cells

func (Cells) Delete

func (cells Cells) Delete(i int) Cells

func (Cells) Get

func (cells Cells) Get(i int) Cell

func (Cells) Insert

func (cells Cells) Insert(i int, c Cell) Cells

func (Cells) Length

func (cells Cells) Length() int

type EvalEvent

type EvalEvent struct{}

type FocusPlaceholder

type FocusPlaceholder struct{ Offset int }

type Margin

type Margin struct {
	// contains filtered or unexported fields
}

func (*Margin) Event

func (m *Margin) Event(gtx *layout.Context) interface{}

func (*Margin) Layout

func (m *Margin) Layout(gtx *layout.Context, checked bool, widget layout.Widget)

type SelectFirstCellEvent

type SelectFirstCellEvent struct{}

type SelectLastCellEvent

type SelectLastCellEvent struct{}

type Type

type Type int
const (
	Empty Type = iota
	Input
	Output
	H1
	H2
	H3
	H4
	H5
	H6
	Paragraph
	Code
	Inline
)

func ParseType

func ParseType(s string) Type

func (Type) String

func (d Type) String() string

Jump to

Keyboard shortcuts

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