Documentation ¶
Index ¶
- Variables
- func Attached(layout Layout) *tree.NodeID
- func IsAttached(tree NodeType) bool
- func ValidateTree(tree NodeType) error
- type BarType
- type BorderType
- type Computable
- type Context
- type Contextable
- type Layout
- type Log
- type Loggable
- type MarginsType
- type NodeChangeEvent
- type NodeRemoveEvent
- type NodeType
- type PaneType
- type Reusable
- type SplitType
- type Tab
- type TabsType
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func IsAttached ¶ added in v0.6.0
IsAttached reports whether the node provided leads to a node that is attached.
func ValidateTree ¶ added in v0.6.0
ValidateTree inspects a tree and ensures that it conforms to all relevant constraints, namely there should only be one PaneType with Attached=true.
Types ¶
type BorderType ¶ added in v0.5.0
type Computable ¶ added in v0.8.0
func NewComputable ¶ added in v0.8.0
func NewComputable(ctx context.Context) *Computable
type Context ¶ added in v0.8.0
type Context struct {
// contains filtered or unexported fields
}
func (*Context) SetContext ¶ added in v0.8.0
func (c *Context) SetContext(context interface{})
type Contextable ¶ added in v0.8.0
type Contextable interface {
SetContext(interface{})
}
Contextable is used for passing in an execution context that will be used when running Janet functions.
type Layout ¶
type Layout struct {
Root NodeType
}
func (*Layout) MarshalJanet ¶
func (l *Layout) MarshalJanet() interface{}
type Loggable ¶ added in v0.8.0
Loggable is used for passing a logger to the Screen when appropriate.
type MarginsType ¶
type NodeChangeEvent ¶ added in v0.6.0
type NodeChangeEvent struct {
Config NodeType
}
type NodeRemoveEvent ¶ added in v0.6.0
type NodeRemoveEvent struct{}
type NodeType ¶
type NodeType interface{}
func AttachFirst ¶ added in v0.6.0
AttachFirst attaches to the first node it can find.
func Copy ¶ added in v0.7.0
Copy recursively copies the node. This is so mutations don't affect the original.
func RemoveAttached ¶ added in v0.6.0
RemoveAttached removes the attached node by replacing its nearest parent that has more than one child with a parent with that child removed, or the other child if there are no other children.
type Reusable ¶ added in v0.6.0
Reusable is used to describe a Screen that has a configuration that can change. Often a Screen does not actually need to be created from scratch when the corresponding layout node changes; it can just be updated. The reuse function checks whether the Screen can be updated to match the new configuration and updates it if possible.
type TabsType ¶ added in v0.7.0
type TabsType struct {
ActiveFg, ActiveBg *prop.Color
InactiveFg, InactiveBg *prop.Color
Bg *prop.Color
Bottom bool
Tabs []Tab
}
func (TabsType) ActiveIndex ¶ added in v0.7.0
Active returns the index of the currently active tab.