BeginCollapsible#
func BeginCollapsible(canvas *ui.Canvas, theme ui.Theme, id ui.ID, bounds ui.Rect) CollapsibleBeginCollapsible starts a disclosure container declaration.
API 文档由 Go 源码生成,内容为英文。
type Collapsible struct {
// contains filtered or unexported fields
}Collapsible paints one unstyled disclosure trigger. The official primitive intentionally adds no surface or icon; callers compose those explicitly. The application owns open state and paints content into the returned bounds.
BeginCollapsible#func BeginCollapsible(canvas *ui.Canvas, theme ui.Theme, id ui.ID, bounds ui.Rect) CollapsibleBeginCollapsible starts a disclosure container declaration.
Bare#func (collapsible Collapsible) Bare(label string, open bool, contentHeight float32) (header, content ui.Rect)Bare is CollapsibleTrigger without a look of its own (asChild): it reserves the trigger row, declares its hit with label and the expanded state, and paints nothing, so the caller draws any trigger it likes (a ghost icon button beside a heading, say) into the returned header. contentHeight is reserved only while open; content is empty while closed.
Disabled#func (collapsible Collapsible) Disabled() CollapsibleDisabled renders and routes the trigger as inert.
Paint#func (collapsible Collapsible) Paint(title string, open bool, contentHeight float32) ui.RectPaint draws the trigger label. contentHeight is reserved only while open; the returned rectangle is empty while closed.