Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoundSize ¶
BoundSize is a size that optionally has a lower and/or upper bound and consists of one to three Unit Values. Practically it is a minimum/preferred/maximum size combination but none of the sizes are actually mandatory. If a size is missing (e.g. the preferred) it is null and will be replaced by the most appropriate value.
type BubbleLayout ¶
type BubbleLayout interface { MaybeAdd(string) (ID, error) Add(string) ID Cell(Cell) ID Dock(Dock) ID Wrap() Resize(width, height int) BubbleLayoutMsg Validate() error }
func New ¶
func New() BubbleLayout
func NewWithConstraints ¶
func NewWithConstraints(width, height PreferenceGroup) BubbleLayout
NewWithConstraints creates a new BubbleLayout with the given size constraints.
type BubbleLayoutMsg ¶
type BubbleLayoutMsg struct {
// contains filtered or unexported fields
}
type Cell ¶
type Cell struct { // SpanWidth defines the number of columns that the view should span. Defaults to 1. SpanWidth int // SpanHeight defines the number of rows that the view should span. Defaults to 1. SpanHeight int // MinWidth overrides the minimum width that should be allocated for the view. MinWidth int // PreferredWidth overrides the Preferred width that should be allocated for the view. PreferredWidth int // MaxWidth overrides the maximum width that should be allocated for the view. MaxWidth int // MinHeight overrides the minimum height that should be allocated for the view. MinHeight int // PreferredHeight overrides the Preferred height that should be allocated for the view. PreferredHeight int // MaxHeight overrides the maximum height that should be allocated for the view. MaxHeight int // GrowWidth indicates that the horizontal size should be maximized. GrowWidth bool // GrowHeight indicates that the vertical size should be maximized. GrowHeight bool // contains filtered or unexported fields }
Cell defines the size and position that should be allocated for a view.
type Dock ¶
type Dock struct { // Cardinal indicates which side of the layout the view should be docked to. Cardinal Cardinal // Min overrides the minimum width or height that should be allocated for the view. Min int // Preferred overrides the Preferred width or height that should be allocated for the view. Preferred int // Max overrides the maximum width or height that should be allocated for the view. Max int }
Dock defines a component that should span an entire side of the layout.
type ErrStringLayout ¶
type ErrStringLayout struct {
// contains filtered or unexported fields
}
func (ErrStringLayout) Error ¶
func (e ErrStringLayout) Error() string
func (ErrStringLayout) Unwrap ¶
func (e ErrStringLayout) Unwrap() error
type PreferenceGroup ¶
type PreferenceGroup []BoundSize
Click to show internal directories.
Click to hide internal directories.