frame

package
v0.0.0-...-cb2e4be Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2015 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NumColours
)

Variables

View Source
var (
	DELTA   = 25
	TMPSIZE = 256
)

Functions

func Rpt

func Rpt(min, max image.Point) image.Rectangle

Types

type Frame

type Frame struct {
	Font       *draw.Font
	Display    *draw.Display           // on which the frame is displayed
	Background *draw.Image             // on which the frame appears
	Cols       [NumColours]*draw.Image // background and text colours
	Rect       image.Rectangle         // in which the text appears
	Entire     image.Rectangle         // size of full frame
	Scroll     func(*Frame, int)       // function provided by application
	// contains filtered or unexported fields
}

func NewFrame

func NewFrame(r image.Rectangle, ft *draw.Font, b *draw.Image, cols [NumColours]*draw.Image) *Frame

NewFrame creates a new Frame with Font ft, background image b, colours cols, and of the size r

func (*Frame) Charofpt

func (f *Frame) Charofpt(pt image.Point) uint64

func (*Frame) Clear

func (f *Frame) Clear(freeall bool)

Clear

func (*Frame) Delete

func (f *Frame) Delete(p0, p1 uint64) int

func (*Frame) DrawSel

func (f *Frame) DrawSel(pt image.Point, p0, p1 uint64, issel bool)

func (*Frame) DrawText

func (f *Frame) DrawText(pt image.Point, text *draw.Image, back *draw.Image)

func (*Frame) InitTick

func (f *Frame) InitTick()

InitTick

func (*Frame) Insert

func (f *Frame) Insert(r []rune, p0 uint64)

func (*Frame) Insure

func (f *Frame) Insure(bn int, n uint)

func (*Frame) Ptofchar

func (f *Frame) Ptofchar(p uint64) image.Point

func (*Frame) Redraw

func (f *Frame) Redraw()

func (*Frame) Select

func (f *Frame) Select(mc draw.Mousectl)

called when mouse 1 is down

func (*Frame) SelectPaint

func (f *Frame) SelectPaint(p0, p1 image.Point, col *draw.Image)

func (*Frame) SetRects

func (f *Frame) SetRects(r image.Rectangle, b *draw.Image)

SetRects

func (*Frame) Tick

func (f *Frame) Tick(pt image.Point, ticked bool)

Jump to

Keyboard shortcuts

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