Documentation ¶
Index ¶
- type BranchTree
- type Interface
- type Object
- func (o *Object) AddChild(model generation.TreeModel) error
- func (o *Object) AddChildAt(i int, model generation.TreeModel) error
- func (o *Object) Children() []generation.TreeModel
- func (o *Object) DisplayIcon() fyne.Resource
- func (o *Object) DisplayString() string
- func (o *Object) RemoveChild() generation.TreeModel
- func (o *Object) RemoveChildAt(i int) generation.TreeModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BranchTree ¶
type BranchTree struct { widget.Tree *generation.TreeModelRegistry OnTapped func(id widget.TreeNodeID, model generation.TreeModel, event *fyne.PointEvent) // OnTapped is called by the branchNode that receives an event from Fyne. }
BranchTree is a widget.Tree implementation that manages IDs through generation.TreeModelRegistry. This is designed to be the gatekeeper for all widget and model mutations.
func NewBranchTree ¶
func NewBranchTree(modelRoots ...generation.TreeModel) *BranchTree
NewBranchTree initializes the tree and adds all modelRoots to the registry.
func (*BranchTree) AddChild ¶
func (t *BranchTree) AddChild(parentID widget.TreeNodeID, data generation.TreeModel) (widget.TreeNodeID, error)
func (*BranchTree) RemoveChild ¶
func (t *BranchTree) RemoveChild(dataID widget.TreeNodeID)
func (*BranchTree) Tapped ¶
func (t *BranchTree) Tapped(id widget.TreeNodeID, event *fyne.PointEvent)
type Interface ¶
type Interface interface { NewTree(modelRoots ...generation.TreeModel) *BranchTree NewRoot(title string) *Object RootAddChild(root *Object, title string) NewBranch(title string) *Object BranchAddChild(branch *Object, title string) NewNode(title string) *Object NodeAddChild(node *Object, title string) }
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
func (*Object) AddChildAt ¶
func (o *Object) AddChildAt(i int, model generation.TreeModel) error
func (*Object) Children ¶
func (o *Object) Children() []generation.TreeModel
func (*Object) DisplayIcon ¶
func (o *Object) DisplayIcon() fyne.Resource
func (*Object) DisplayString ¶
func (*Object) RemoveChild ¶
func (o *Object) RemoveChild() generation.TreeModel
func (*Object) RemoveChildAt ¶
func (o *Object) RemoveChildAt(i int) generation.TreeModel
Click to show internal directories.
Click to hide internal directories.