Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1cb3be8de8 | |||
| 32e58ce63d | |||
| 4dbd86cec3 | |||
| 573212fe7d |
23
object.go
23
object.go
@@ -155,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.
|
||||
@@ -164,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.
|
||||
@@ -187,6 +188,8 @@ type LayoutHints struct {
|
||||
Bounds image.Rectangle
|
||||
OverflowX bool
|
||||
OverflowY bool
|
||||
AlignX Align
|
||||
AlignY Align
|
||||
Gap image.Point
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user