Documentation ¶
Index ¶
- Variables
- func EachDepth(t Trie, proc func(Node) bool)
- func EachWidth(t Trie, proc func(Node) bool)
- type Key
- type KeyList
- type Keyseq
- type Match
- type Matcher
- type ModifierKey
- type Node
- type TernaryNode
- func (n *TernaryNode) Balance()
- func (n *TernaryNode) Dig(k Key) (node Node, isnew bool)
- func (n *TernaryNode) Each(proc func(Node) bool)
- func (n *TernaryNode) FirstChild() *TernaryNode
- func (n *TernaryNode) Get(k Key) Node
- func (n *TernaryNode) GetList(k KeyList) Node
- func (n *TernaryNode) HasChildren() bool
- func (n *TernaryNode) Label() Key
- func (n *TernaryNode) RemoveAll()
- func (n *TernaryNode) SetValue(v interface{})
- func (n *TernaryNode) Size() int
- func (n *TernaryNode) Value() interface{}
- type TernaryTrie
- type Trie
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInSequence = fmt.Errorf("Currently expecting a key sequence")
View Source
var ErrNoMatch = fmt.Errorf("Could not match key to any action")
Functions ¶
Types ¶
type Key ¶
type Key struct { Modifier ModifierKey // Alt, etc Key termbox.Key Ch rune }
Key is data in one trie node in the KeySequence
func NewKeyFromKey ¶
func NewKeyFromKey(k termbox.Key) Key
type Keyseq ¶
type Keyseq struct { *Matcher // contains filtered or unexported fields }
func (*Keyseq) CancelChain ¶
func (k *Keyseq) CancelChain()
func (*Keyseq) InMiddleOfChain ¶
type ModifierKey ¶
type ModifierKey int
const ( ModNone ModifierKey = iota ModAlt ModMax )
func (ModifierKey) String ¶
func (m ModifierKey) String() string
type Node ¶
type TernaryNode ¶
type TernaryNode struct {
// contains filtered or unexported fields
}
func NewTernaryNode ¶
func NewTernaryNode(l Key) *TernaryNode
func (*TernaryNode) Balance ¶
func (n *TernaryNode) Balance()
func (*TernaryNode) Each ¶
func (n *TernaryNode) Each(proc func(Node) bool)
func (*TernaryNode) FirstChild ¶
func (n *TernaryNode) FirstChild() *TernaryNode
func (*TernaryNode) Get ¶
func (n *TernaryNode) Get(k Key) Node
func (*TernaryNode) GetList ¶
func (n *TernaryNode) GetList(k KeyList) Node
func (*TernaryNode) HasChildren ¶
func (n *TernaryNode) HasChildren() bool
func (*TernaryNode) Label ¶
func (n *TernaryNode) Label() Key
func (*TernaryNode) RemoveAll ¶
func (n *TernaryNode) RemoveAll()
func (*TernaryNode) SetValue ¶
func (n *TernaryNode) SetValue(v interface{})
func (*TernaryNode) Size ¶
func (n *TernaryNode) Size() int
func (*TernaryNode) Value ¶
func (n *TernaryNode) Value() interface{}
type TernaryTrie ¶
type TernaryTrie struct {
// contains filtered or unexported fields
}
func NewTernaryTrie ¶
func NewTernaryTrie() *TernaryTrie
func (*TernaryTrie) Balance ¶
func (t *TernaryTrie) Balance()
func (*TernaryTrie) Get ¶
func (t *TernaryTrie) Get(k Key) Node
func (*TernaryTrie) GetList ¶
func (t *TernaryTrie) GetList(k KeyList) Node
func (*TernaryTrie) Put ¶
func (t *TernaryTrie) Put(k KeyList, v interface{}) Node
func (*TernaryTrie) Root ¶
func (t *TernaryTrie) Root() Node
func (*TernaryTrie) Size ¶
func (t *TernaryTrie) Size() int
Click to show internal directories.
Click to hide internal directories.