tiled

package
v0.0.0-...-db1c41b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL