Documentation
¶
Index ¶
- Variables
- func DebugLayoutNode(node LayoutNode) string
- func NewLayoutNodeWidgetConstructor(makeFunc func(node LayoutNode) GioLayoutWidget) layoutNodeWidgetConstructor
- type ChainNode
- type DrawModifierNode
- type DrawOp
- type Element
- type ElementStore
- type GioLayoutWidget
- type Identifier
- type IdentityManager
- type InspectableModifier
- type LayoutConstraints
- type LayoutContext
- type LayoutContextReceiver
- type LayoutDimensions
- type LayoutDirection
- type LayoutModifierNode
- type LayoutNode
- type LayoutNodeWidgetConstructor
- type LayoutResult
- type LayoutWidget
- type Memo
- type ModifierElement
- type MutableValue
- type NodeCoordinator
- type NodeID
- type ParentDataModifierNode
- type PersistentState
- type PointerInputModifierNode
- type PointerWidget
- type Slots
- type SupportState
- type TreeNode
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyElementStore = modifier.EmptyElementStore
View Source
var EmptyWidgetConstructor = NewLayoutNodeWidgetConstructor(func(node LayoutNode) GioLayoutWidget { return ZeroGioLayoutWidget })
View Source
var GetScopedIdentityManager = identity.GetScopedIdentityManager
View Source
var ZeroGioLayoutWidget = func(gtx LayoutContext) LayoutDimensions { return LayoutDimensions{ Size: image.Pt(0, 0), } }
View Source
var ZeroLayoutWidget = NewLayoutWidget(ZeroGioLayoutWidget)
Functions ¶
func DebugLayoutNode ¶
func DebugLayoutNode(node LayoutNode) string
DebugLayoutNode returns a formatted string representation of the layout node and its children for debugging purposes.
func NewLayoutNodeWidgetConstructor ¶
func NewLayoutNodeWidgetConstructor(makeFunc func(node LayoutNode) GioLayoutWidget) layoutNodeWidgetConstructor
Types ¶
type DrawModifierNode ¶
type DrawModifierNode interface {
LayoutNode
AttachDrawModifier(attach func(widget LayoutWidget) LayoutWidget)
}
type ElementStore ¶
type ElementStore = modifier.ElementStore
type GioLayoutWidget ¶
type Identifier ¶
type Identifier = identity.Identifier
type IdentityManager ¶
type IdentityManager = identity.IdentityManager
type InspectableModifier ¶
type InspectableModifier = modifier.InspectableModifier
type LayoutConstraints ¶
type LayoutConstraints = layout.Constraints
type LayoutContext ¶
type LayoutContextReceiver ¶
type LayoutContextReceiver = func(gtx LayoutContext)
func NewLayoutContextReceiver ¶
func NewLayoutContextReceiver(widget GioLayoutWidget) LayoutContextReceiver
type LayoutDimensions ¶
type LayoutDimensions = layout.Dimensions
type LayoutDirection ¶
type LayoutDirection int
LayoutDirection represents the layout direction
const ( LayoutDirectionLTR LayoutDirection = iota LayoutDirectionRTL )
type LayoutModifierNode ¶
type LayoutModifierNode interface {
LayoutNode
AttachLayoutModifier(attach func(widget LayoutWidget) LayoutWidget)
}
type LayoutNode ¶
type LayoutNode interface {
TreeNode
LayoutNodeChildren() []LayoutNode
WithChildren(children []LayoutNode) LayoutNode
Modifier(func(modifier ui.Modifier) ui.Modifier)
UnwrapModifier() ui.Modifier
WithSlotsAssoc(k string, v any) LayoutNode // this can be better
FindSlot(k string) maybe.Maybe[any]
GenerateID() Identifier
ResetIdentifierKeyCounter()
SupportState
GetWidget() GioLayoutWidget
SetWidgetConstructor(constructor LayoutNodeWidgetConstructor)
GetWidgetConstructor() LayoutNodeWidgetConstructor
IsEmpty() bool
SetLayoutResult(LayoutResult)
GetLayoutResult() maybe.Maybe[LayoutResult]
Layout(gtx LayoutContext) LayoutDimensions
Draw(gtx LayoutContext) DrawOp
}
func NewLayoutNode ¶
func NewLayoutNode(id NodeID, key string, slotStore immap.ImmutableMap[any], memo Memo, persistentState PersistentState) LayoutNode
type LayoutNodeWidgetConstructor ¶
type LayoutNodeWidgetConstructor interface {
Make(node LayoutNode) GioLayoutWidget
}
type LayoutResult ¶
type LayoutResult struct {
Dimensions LayoutDimensions
DrawOp op.CallOp
}
type LayoutWidget ¶
type LayoutWidget interface {
Map(mapFun func(LayoutWidget) LayoutWidget) LayoutWidget
Layout(gtx LayoutContext) LayoutDimensions
}
func NewLayoutWidget ¶
func NewLayoutWidget(innerWidget GioLayoutWidget) LayoutWidget
type ModifierElement ¶
type ModifierElement = modifier.ModifierElement
type MutableValue ¶
type MutableValue = state.MutableValue
type NodeCoordinator ¶
type NodeCoordinator interface {
LayoutNode
DrawModifierNode
LayoutModifierNode
PointerInputModifierNode
ParentDataModifierNode
PointerPhase(gtx LayoutContext)
Elements() ElementStore
Expand()
}
Wrapper to allow for inner node expansion
func NewNodeCoordinator ¶
func NewNodeCoordinator(node LayoutNode) NodeCoordinator
type ParentDataModifierNode ¶
type ParentDataModifierNode interface {
LayoutNode
AttachParentDataModifier(attach func(elements ElementStore) ElementStore)
}
type PersistentState ¶
type PersistentState = state.PersistentState
type PointerInputModifierNode ¶
type PointerInputModifierNode interface {
LayoutNode
AttachPointerInputModifier(attach func(widget LayoutWidget) LayoutWidget)
}
type PointerWidget ¶
type PointerWidget interface {
Map(mapFun func(PointerWidget) PointerWidget) PointerWidget
Update(gtx LayoutContext)
}
type Slots ¶
type Slots = immap.ImmutableMap[any]
type SupportState ¶
type SupportState = state.SupportState
Click to show internal directories.
Click to hide internal directories.