Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BorderDrawers = []BorderDrawer{ BorderHidden: borderDrawer{ // contains filtered or unexported fields }, } )
Functions ¶
func LayoutContentBoxOrigin ¶
func LayoutContentBoxOrigin(s ComputedStyle) geometry.Vec2D
Types ¶
type BorderDrawer ¶
type BorderDrawer interface { Left(BordersStyle, draw.Surface) Top(BordersStyle, draw.Surface) Right(BordersStyle, draw.Surface) Bottom(BordersStyle, draw.Surface) }
type BorderSide ¶
type BorderSide struct { Size int Style BorderStyle draw.CellStyle }
Border define style properties of a single border side.
type BorderStyle ¶
type BorderStyle int8
BorderStyle enumerates border styles.
const (
BorderHidden BorderStyle = iota
)
type BordersStyle ¶
type BordersStyle struct { Top BorderSide Bottom BorderSide Left BorderSide Right BorderSide }
BordersStyle define borders style properties.
type ComputedStyle ¶
type ComputedStyle struct { MarginStyle MarginPaddingStyle BordersStyle BordersStyle PaddingStyle MarginPaddingStyle draw.CellStyle ExtrasStyle any }
ComputedStyle contains styling properties used for rendering.
func (ComputedStyle) Compute ¶
func (cs ComputedStyle) Compute() ComputedStyle
Compute implements Style.
type MarginPaddingStyle ¶
type MarginPaddingStyle struct {
Left, Top, Right, Bottom int
}
MarginPaddingStyle define margin and padding style properties.
type Renderable ¶
type Renderable[R render.Renderable] struct { Renderable R Styled Styled }
func (Renderable[R]) Draw ¶
func (r Renderable[R]) Draw(surface draw.Surface)
Draw implements draw.Drawer.
func (Renderable[R]) IsDirty ¶
func (r Renderable[R]) IsDirty() bool
IsDirty implements render.Renderable.
func (Renderable[R]) Layout ¶
func (r Renderable[R]) Layout(co layout.Constraint) geometry.Size
Layout implements layout.Layout.
func (Renderable[R]) MarkDirty ¶
func (r Renderable[R]) MarkDirty()
MarkDirty implements render.Renderable.
type Style ¶
type Style interface { // Compute styling properties and returns it. This enable Style object // to compute dynamically their properties and, therefore, support style inheritance, // relative units (percentage, viewport), etc. Compute() ComputedStyle }
Style is a generic interface for widget styling.
Click to show internal directories.
Click to hide internal directories.