targetdate

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package targetdate is targetlist's sibling for rows that need a prominent leading badge — an hour, a day, anything view.Item.LeadTop/Main/Bottom carries — instead of a plain label. Same multi-selection mechanics as targetlist.

Index

Constants

View Source
const (
	PartRow        = widget.Part("row")
	PartContent    = widget.Part("content")
	PartCheck      = widget.Part("check")
	PartBadge      = widget.Part("badge")
	PartLabel      = widget.Part("label")
	PartList       = widget.Part("list")
	PartLead       = widget.Part("lead")
	PartLeadStack  = widget.Part("lead-stack")
	PartLeadTop    = widget.Part("lead-top")
	PartLeadMain   = widget.Part("lead-main")
	PartLeadBottom = widget.Part("lead-bottom")
)
View Source
const NameTargetDate = widget.Name("targetdate")

NameTargetDate is the widget identity.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item = view.Item

Item is view.Item — see targetlist.Item's comment for why this is an alias, not a copy. TargetDate is the one row that actually reads LeadTop/Main/Bottom.

type TargetDate

type TargetDate struct {
	Element

	Selected *SignalString

	OnSelect func(it Item)
	// contains filtered or unexported fields
}

TargetDate is a selectable list of records with a prominent leading badge (LeadTop/Main/Bottom) instead of a plain label lead-in.

func (*TargetDate) CheckedIDs added in v0.6.0

func (t *TargetDate) CheckedIDs() []string

func (*TargetDate) Count

func (t *TargetDate) Count() int

func (*TargetDate) IconSvg

func (t *TargetDate) IconSvg() *sprite.Sprite

IconSvg registers the checkmark glyph.

func (*TargetDate) Init

func (t *TargetDate) Init(_ Ctx)

func (*TargetDate) Items

func (t *TargetDate) Items() []Item

func (*TargetDate) OnCheckedChange added in v0.6.0

func (t *TargetDate) OnCheckedChange(fn func(int))

func (*TargetDate) Render

func (t *TargetDate) Render() *Element

func (*TargetDate) RenderCSS

func (t *TargetDate) RenderCSS() *css.Stylesheet

RenderCSS defines the targetdate visual contract using the style DSL.

func (*TargetDate) SetItems

func (t *TargetDate) SetItems(items []Item)

func (*TargetDate) SetSelectMode added in v0.6.0

func (t *TargetDate) SetSelectMode(on bool)

func (*TargetDate) WidgetKind

func (t *TargetDate) WidgetKind() widget.Kind

func (*TargetDate) WidgetName

func (t *TargetDate) WidgetName() widget.Name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL