handleText creates a new [core.Text] from the given information, setting the text and the text click function so that URLs are opened according to [Context.OpenURL].
(ctx *Context)
| 270 | // handleText creates a new [core.Text] from the given information, setting the text and |
| 271 | // the text click function so that URLs are opened according to [Context.OpenURL]. |
| 272 | func handleText(ctx *Context) *core.Text { |
| 273 | tx := New[core.Text](ctx).SetText(ExtractText(ctx)) |
| 274 | tx.Styler(textStyler) |
| 275 | tx.HandleTextClick(func(tl *paint.TextLink) { |
| 276 | ctx.OpenURL(tl.URL) |
| 277 | }) |
| 278 | return tx |
| 279 | } |
| 280 | |
| 281 | // handleTextTag creates a new [core.Text] from the given information, setting the text and |
| 282 | // the text click function so that URLs are opened according to [Context.OpenURL]. Also, |
no test coverage detected