Documentation ¶
Index ¶
- Variables
- type HorizontalTile
- func (ht *HorizontalTile) CanGrow() bool
- func (ht *HorizontalTile) GetHeight() int
- func (ht *HorizontalTile) GetWidth() int
- func (ht *HorizontalTile) SetHeight(height int)
- func (ht *HorizontalTile) SetSize(width int, height int)
- func (ht *HorizontalTile) SetWidth(width int)
- func (ht *HorizontalTile) View() string
Constants ¶
This section is empty.
Variables ¶
var ( DefaultWidth = 80 DefaultHeight = 25 )
DefaultWidth and DefaultHeight define the default dimensions for a horizontal tiled layout.
Functions ¶
This section is empty.
Types ¶
type HorizontalTile ¶
type HorizontalTile struct {
// contains filtered or unexported fields
}
HorizontalTile represents a container for horizontally aligned placeable items.
func New ¶
func New(items ...layout.Placeable) *HorizontalTile
New creates a new HorizontalTile with the specified items, using the default dimensions defined by DefaultWidth and DefaultHeight.
func (*HorizontalTile) CanGrow ¶
func (ht *HorizontalTile) CanGrow() bool
func (*HorizontalTile) GetHeight ¶
func (ht *HorizontalTile) GetHeight() int
GetHeight returns the current height of the horizontal tile.
func (*HorizontalTile) GetWidth ¶
func (ht *HorizontalTile) GetWidth() int
GetWidth returns the current width of the horizontal tile.
func (*HorizontalTile) SetHeight ¶
func (ht *HorizontalTile) SetHeight(height int)
func (*HorizontalTile) SetSize ¶
func (ht *HorizontalTile) SetSize(width int, height int)
SetSize sets the dimensions of the horizontal tile.
func (*HorizontalTile) SetWidth ¶
func (ht *HorizontalTile) SetWidth(width int)
func (*HorizontalTile) View ¶
func (ht *HorizontalTile) View() string
View returns the string representation of the horizontal tile, with all its items rendered horizontally. The width of each item is evenly distributed, with the last item potentially taking up the remaining space if the total width is not evenly divisible by the number of items.