Documentation ¶
Overview ¶
Package layout provides geometric primitives and interfaces for view layout. See https://gomatcha.io/guide/layout for more details.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context interface { MaxSize() Point MinSize() Point ChildCount() int LayoutChild(idx int, minSize, maxSize Point) Guide }
Context provides properties and hooks for Layouter.Layout().
type Guide ¶
Guide represents the position of a view.
func (Guide) MarshalProtobuf ¶
MarshalProtobuf serializes g into a protobuf object.
type Point ¶
Point represents a point on the XY coordinate system.
func (*Point) MarshalProtobuf ¶
MarshalProtobuf serializes p into a protobuf object.
func (*Point) UnmarshalProtobuf ¶
UnmarshalProtobuf deserializes p from a protobuf object.
type PointNotifier ¶
PointNotifier wraps the comm.Notifier interface with an additional Value() method which returns a Point.
type Rect ¶
type Rect struct {
Min, Max Point
}
Rect represents a 2D rectangle with the top left corner at Min and the bottom right corner at Max.
func (*Rect) MarshalProtobuf ¶
MarshalProtobuf serializes r into a protobuf object.
func (*Rect) UnmarshalProtobuf ¶
UnmarshalProtobuf deserializes r from a protobuf object.
Directories ¶
Path | Synopsis |
---|---|
Package absolute implements a fixed layout system similar to HTML absolute positioning.
|
Package absolute implements a fixed layout system similar to HTML absolute positioning. |
Package constraint implements a constraint-based layout system.
|
Package constraint implements a constraint-based layout system. |
Package full implements a layout system where the view and all direct children are positioned to the maximum size.
|
Package full implements a layout system where the view and all direct children are positioned to the maximum size. |
Package table implements a vertical, single column layout system.
|
Package table implements a vertical, single column layout system. |