Documentation
¶
Index ¶
- func ActiveTreeSet(tr *Tree)
- func SetRootTree(tr *Tree)
- type Leaf
- type OpMode
- type Tree
- func (tr *Tree) Draw()
- func (tr *Tree) Event(ev *tcell.Event)
- func (tr *Tree) GetLeaf() *Leaf
- func (tr *Tree) InsertBottom()
- func (tr *Tree) InsertLeft()
- func (tr *Tree) InsertRight()
- func (tr *Tree) InsertTop()
- func (tr *Tree) Kill(leaf *Leaf, isActive bool)
- func (tr *Tree) NearestHSplit() *Tree
- func (tr *Tree) NearestVSplit() *Tree
- func (tr *Tree) NextInCycle()
- func (tr *Tree) Redraw()
- func (tr *Tree) Remove()
- func (tr *Tree) Resize(rect utils.Rect)
- func (tr *Tree) SetLeaf(leaf *Leaf)
- func (tr *Tree) Sibling() *Tree
- func (tr *Tree) SplitHorizontally()
- func (tr *Tree) SplitVertically()
- func (tr *Tree) StepResize(n int)
- func (tr *Tree) SwitchSplitDirection()
- func (tr *Tree) Traverse(cb func(*Tree))
- type View
- type ViewsStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActiveTreeSet ¶
func ActiveTreeSet(tr *Tree)
func SetRootTree ¶
func SetRootTree(tr *Tree)
Types ¶
type Leaf ¶
type Leaf interface { View() *View Resize(int, int, utils.Rect) Draw() Redraw() Kill(*Leaf, bool) *Leaf // ForceDraw() // Stat(Stat) ViewActive(bool) Event(*tcell.Event) *tcell.Event Resume() Init() WillClose() // }
var ActiveLeaf *Leaf
func GetLeavesByViewName ¶
type OpMode ¶
func (OpMode) SelectName ¶
type Tree ¶
func ActiveTreeGet ¶
func ActiveTreeGet() *Tree
func GetRootTree ¶
func GetRootTree() *Tree
func (*Tree) InsertBottom ¶
func (tr *Tree) InsertBottom()
func (*Tree) InsertLeft ¶
func (tr *Tree) InsertLeft()
func (*Tree) InsertRight ¶
func (tr *Tree) InsertRight()
func (*Tree) NearestHSplit ¶
func (*Tree) NearestVSplit ¶
func (*Tree) NextInCycle ¶
func (tr *Tree) NextInCycle()
func (*Tree) SplitHorizontally ¶
func (tr *Tree) SplitHorizontally()
Split Tree. Set new Active Tree to active.
func (*Tree) SplitVertically ¶
func (tr *Tree) SplitVertically()
Split Tree. Set new Active Tree to active.
func (*Tree) StepResize ¶
func (*Tree) SwitchSplitDirection ¶
func (tr *Tree) SwitchSplitDirection()
type View ¶
type View interface { NewLeaf() *Leaf // Mainly used for splitting the screen. // In the new window created by splitting the screen, // a new tree.Leaf of the same type as the parent tree.Leaf before splitting is cloned. // // For te.Editor: // Create a new tree.Leaf (Editor) and make it the same as leaf *tree.Leaf // direction: "right", "bottom" are not referenced NewSiblingLeaf(direction string, leaf *Leaf) *Leaf Name() string // this view name }
type ViewsStruct ¶
type ViewsStruct struct {
// contains filtered or unexported fields
}
var Views *ViewsStruct // User Views
func NewViews ¶
func NewViews() *ViewsStruct
func (*ViewsStruct) GetDefaultView ¶
func (vs *ViewsStruct) GetDefaultView() *View
Return the first registered *View as default view
func (*ViewsStruct) GetViewByName ¶
func (vs *ViewsStruct) GetViewByName(name string) *View
Return *View by View Name
func (ViewsStruct) GetViews ¶
func (vs ViewsStruct) GetViews() []View
Click to show internal directories.
Click to hide internal directories.