nasin/internal/theme/attribute.go

35 lines
1.2 KiB
Go

package theme
import "image"
import "image/color"
import "golang.org/x/image/font"
import "git.tebibyte.media/tomo/tomo"
// Attr modifies one thing about an Objects's style.
type Attr interface { attr () }
// AttrColor sets the background color of an Objects.
type AttrColor struct { color.Color }
func (AttrColor) attr () { }
// AttrTexture sets the texture of an Objects to a named texture.
type AttrTexture string
func (AttrTexture) attr () { }
// AttrBorder sets the border of an Objects.
type AttrBorder []tomo.Border
func (AttrBorder) attr () { }
// AttrMinimumSize sets the minimum size of an Objects.
type AttrMinimumSize image.Point
func (AttrMinimumSize) attr () { }
// AttrPadding sets the inner padding of an Objects.
type AttrPadding tomo.Inset
func (AttrPadding) attr () { }
// AttrGap sets the gap between child Objects, if the Object is a ContainerBox.
type AttrGap image.Point
func (AttrGap) attr () { }
// AttrTextColor sets the text color, if the Object is a TextBox.
type AttrTextColor struct { color.Color }
func (AttrTextColor) attr () { }
// AttrFace sets the font face, if the Object is a TextBox.
type AttrFace struct { font.Face }
func (AttrFace) attr () { }