类型 Questionnaire

API 文档由 Go 源码生成,内容为英文。

type Questionnaire struct {
	// contains filtered or unexported fields
}

Questionnaire incrementally paints one item without owning navigation, validation, checked values, or input text.

构造函数

BeginQuestionnaire#

func BeginQuestionnaire(canvas *ui.Canvas, theme ui.Theme, bounds ui.Rect, data QuestionnaireData) Questionnaire

BeginQuestionnaire paints progress, title, and description slots.

方法

AddChoice#

func (questionnaire *Questionnaire) AddChoice(choice QuestionnaireChoice)

AddChoice paints one selectable answer and its full-surface hit region.

Error#

func (questionnaire *Questionnaire) Error(text string)

Error paints the official destructive error slot.

Input#

func (questionnaire *Questionnaire) Input(id ui.ID, value, placeholder string, disabled bool)

Input paints the questionnaire free-text slot. It exposes a hit only; text editing remains in the platform text subsystem rather than hidden here.

PaintActions#

func (questionnaire *Questionnaire) PaintActions(actions QuestionnaireActions)

PaintActions paints previous at start and skip/next at end, matching the official three-column action arrangement.