(builder *Builder)
| 58 | } |
| 59 | |
| 60 | func (tb ToolButton) Create(builder *Builder) error { |
| 61 | w, err := walk.NewToolButton(builder.Parent()) |
| 62 | if err != nil { |
| 63 | return err |
| 64 | } |
| 65 | |
| 66 | if tb.AssignTo != nil { |
| 67 | *tb.AssignTo = w |
| 68 | } |
| 69 | |
| 70 | return builder.InitWidget(tb, w, func() error { |
| 71 | if tb.OnClicked != nil { |
| 72 | w.Clicked().Attach(tb.OnClicked) |
| 73 | } |
| 74 | |
| 75 | return nil |
| 76 | }) |
| 77 | } |
nothing calls this directly
no test coverage detected