about summary refs log tree commit diff stats
path: root/wiki/lib/scripts/textselection.js
Commit message (Expand)AuthorAgeFilesLines
* installed dokuwiki, added to navbar, updated newsahriman2018-12-031-0/+152
ter Drew DeVault <sir@cmpwn.com> 2019-03-17 14:02:33 -0400 Add basic terminal widget' href='/akspecs/aerc/commit/lib/ui/interfaces.go?h=0.1.0&id=1170893e395ff5e3e7bee7ff51224b4a572f01cf'>1170893 ^
87fa305 ^














a0c2b1c ^

87fa305 ^
87fa305 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

















                                                                          

                                                                          














                                                          

                                                                             
                             
 
package ui

import (
	"github.com/gdamore/tcell"
)

type Drawable interface {
	// Called when this renderable should draw itself
	Draw(ctx *Context)
	// Specifies a function to call when this cell needs to be redrawn
	OnInvalidate(callback func(d Drawable))
	// Invalidates the drawable
	Invalidate()
}

type Interactive interface {
	// Returns true if the event was handled by this component
	Event(event tcell.Event) bool
	// Indicates whether or not this control will receive input events
	Focus(focus bool)
}

type Simulator interface {
	// Queues up the given input events for simulation
	Simulate(events []tcell.Event)
}

type DrawableInteractive interface {
	Drawable
	Interactive
}

// A drawable which contains other drawables
type Container interface {
	Drawable
	// Return all of the drawables which are children of this one (do not
	// recurse into your grandchildren).
	Children() []Drawable
}