functions
LayoutToWidget| modified | Sunday 25 January 2026 |
|---|
Category: Utilities
File: layouts.go
Package: ui
1func LayoutToWidget(r func(C, W) D, w W) W
LayoutToWidget converts a layout function that takes (C, W) into a standard widget (W).
This bridges the gap between Gio’s layout patterns and this library’s widget system.
Example:
widget := LayoutToWidget(clickable.Layout, Label("Clickable text"))
Commonly used to wrap clickable areas or custom layout functions.
1{
2 btn := &Clickable{}
3 widget := LayoutToWidget(btn.Layout, Label("Clickable"))
4 _ = widget
5}

This documentation is auto-generated. To update, run make docs