Compare commits

..

4 Commits

View File

@@ -109,10 +109,11 @@ type Box interface {
Window () Window
Bounds () image.Rectangle
InnerBounds () image.Rectangle
MinimumSize () image.Point
SetBounds (image.Rectangle)
SetColor (color.Color)
SetBorder (...Border)
SetMinimumSize (int, int)
SetMinimumSize (image.Point)
SetPadding (Inset)
SetDNDData (data.Data)
@@ -154,6 +155,7 @@ type ContentBox interface {
ContentBounds () image.Rectangle
ScrollTo (image.Point)
OnContentBoundsChange (func ()) event.Cookie
SetAlign (x, y Align)
}
// TextBox is a box that contains text content.
@@ -163,22 +165,22 @@ type TextBox interface {
SetText (string)
SetTextColor (color.Color)
SetFace (font.Face)
SetHAlign (Align)
SetVAlign (Align)
SetWrap (bool)
}
// ContentBox is a box that can contain child objects. It arranges them
// according to a layout rule.
type ContainerBox interface {
ContentBox
SetGap (image.Point)
Add (Object)
Delete (Object)
Insert (child Object, before Object)
Clear ()
Length () int
At (int) Object
SetLayout (Layout)
PropagateEvents (bool)
SetGap (image.Point)
Add (Object)
Delete (Object)
Insert (child Object, before Object)
Clear ()
Length () int
At (int) Object
SetLayout (Layout)
}
// LayoutHints are passed to a layout to tell it how to arrange child boxes.
@@ -186,6 +188,8 @@ type LayoutHints struct {
Bounds image.Rectangle
OverflowX bool
OverflowY bool
AlignX Align
AlignY Align
Gap image.Point
}