Documentation ¶
Index ¶
- Variables
- func AddMargins(ctx context.Context, screen mux.Screen) mux.Screen
- func Attached(layout Layout) *tree.NodeID
- func NewStatic(ctx context.Context, shouldAnimate bool, message string) *taro.Program
- type BorderType
- type Borders
- type Layout
- type LayoutEngine
- type Margins
- type MarginsType
- type NodeType
- type Pane
- type PaneType
- type Setting
- type Split
- type SplitType
- type Static
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type BorderType ¶ added in v0.5.0
type Borders ¶ added in v0.5.0
type Borders struct { deadlock.RWMutex *mux.UpdatePublisher // contains filtered or unexported fields }
type Layout ¶
type Layout struct {
// contains filtered or unexported fields
}
func (*Layout) MarshalJanet ¶
func (l *Layout) MarshalJanet() interface{}
type LayoutEngine ¶
type LayoutEngine struct { util.Lifetime deadlock.RWMutex *mux.UpdatePublisher // contains filtered or unexported fields }
LayoutEngine is a Screen that renders a declarative layout that consists of other Screens. When the layout changes, LayoutEngine detects which Screens in the layout can be reused and which must be created from scratch.
func NewLayoutEngine ¶
func (*LayoutEngine) Get ¶
func (l *LayoutEngine) Get() Layout
Get gets the Layout this LayoutEngine is rendering.
func (*LayoutEngine) Kill ¶
func (l *LayoutEngine) Kill()
func (*LayoutEngine) Send ¶
func (l *LayoutEngine) Send(msg mux.Msg)
func (*LayoutEngine) Set ¶
func (l *LayoutEngine) Set(layout Layout) error
Set changes the Layout rendered by this LayoutEngine by reusing as many existing Screens as it can.
func (*LayoutEngine) State ¶
func (l *LayoutEngine) State() *tty.State
type Margins ¶
type Margins struct { deadlock.RWMutex *mux.UpdatePublisher // contains filtered or unexported fields }
Margins puts empty space around a Screen and centers it. In size mode, Margins attempts to keep the Screen at a fixed size (one or both dimensions fixed). In margin mode, the Screen is surrounded by fixed-size margins that do not change with the screen size.
type MarginsType ¶
type Pane ¶
type Pane struct { util.Lifetime deadlock.RWMutex *mux.UpdatePublisher // contains filtered or unexported fields }
type Setting ¶
type Setting func(*LayoutEngine)
func WithParams ¶
func WithParams(params *params.Parameters) Setting
type Split ¶
type Split struct { deadlock.RWMutex *mux.UpdatePublisher // contains filtered or unexported fields }
Split renders two screens side by side (or one above the other) at a fixed proportion of its full width or height (respectively.)