-
Notifications
You must be signed in to change notification settings - Fork 0
/
typegen.go
30 lines (20 loc) · 1.29 KB
/
typegen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Code generated by "core generate"; DO NOT EDIT.
package main
import (
"cogentcore.org/core/tree"
"cogentcore.org/core/types"
)
var _ = types.AddType(&types.Type{Name: "goapps/cogent_core_widgets.Card", IDName: "card", Embeds: []types.Field{{Name: "Frame"}}, Fields: []types.Field{{Name: "Heading"}, {Name: "SubHeading"}, {Name: "Data"}}})
// NewCard returns a new [Card] with the given optional parent:
func NewCard(parent ...tree.Node) *Card { return tree.New[Card](parent...) }
// SetHeading sets the [Card.Heading]
func (t *Card) SetHeading(v string) *Card { t.Heading = v; return t }
// SetSubHeading sets the [Card.SubHeading]
func (t *Card) SetSubHeading(v string) *Card { t.SubHeading = v; return t }
// SetData sets the [Card.Data]
func (t *Card) SetData(v interface{}) *Card { t.Data = v; return t }
var _ = types.AddType(&types.Type{Name: "goapps/cogent_core_widgets.CardList", IDName: "card-list", Embeds: []types.Field{{Name: "Frame"}}, Fields: []types.Field{{Name: "OnClick"}, {Name: "clDataSlice"}}})
// NewCardList returns a new [CardList] with the given optional parent:
func NewCardList(parent ...tree.Node) *CardList { return tree.New[CardList](parent...) }
// SetOnClick sets the [CardList.OnClick]
func (t *CardList) SetOnClick(v func(v CardData)) *CardList { t.OnClick = v; return t }