// SetText sets the Text field's value.
768956
func (s *SyntaxToken) SetText(v string) *SyntaxToken {
	s.Text = &v
	return s
}
1049269
func (s *SimpleEmail) SetTextPart(v *SimpleEmailPart) *SimpleEmail {
	s.TextPart = v
	return s
}
838382
func SetField(c context.Context, key string, value interface{}) context.Context {
	return SetFields(c, Fields{key: value})
}
683600
func (n *TreeNode) SetText(text string) *TreeNode {
	n.text = text
	return n
}
425554
func (s *Comment) SetText(v string) *Comment {
	s.Text = &v
	return s
}
1351853
func (s *PostTextInput) SetInputText(v string) *PostTextInput {
	s.InputText = &v
	return s
}
1011827
func (s *NotifyEmailType) SetTextBody(v string) *NotifyEmailType {
	s.TextBody = &v
	return s
}
1101492
func (s *SqlInjectionMatchTuple) SetTextTransformation(v string) *SqlInjectionMatchTuple {
	s.TextTransformation = &v
	return s
}
1847
func (e *Entry) SetText(text string) {
	e.text.Set([]rune(text))
	// TODO: Enable when RuneBuf supports cursor movement for CJK.
	// e.ensureCursorIsVisible()
	e.offset = 0
}
142342
func (s *Attribute) SetText(v string) *Attribute {
	s.Text = &v
	return s
}
1263177
func (t *Text) SetText(s string) {
	t.width = 0
	t.text = []rune(s)
	if len(t.widths) < len(t.text) {
		t.widths = make([]int, len(t.text))
	} else {
		t.widths = t.widths[0:len(t.text)]
	}
	if len(t.styles) < len(t.text) {
		t.styles = make([]tcell.Style, len(t.text))
	} else {
		t.styles = t.styles[0:len(t.text)]
	}
	t.lengths = []int{}
	length := 0
	for i, r := range t.text {
		t.widths[i] = runewidth.RuneWidth(r)
		t.styles[i] = t.style
		if r == '\n' {
			t.lengths = append(t.lengths, length)
			if length > t.width {
				t.width = length
				length = 0
			}

		} else if t.widths[i] == 0 && length == 0 {
			// If first character on line is combining, inject
			// a leading space.  (Shame on the caller!)
			t.widths = append(t.widths, 0)
			copy(t.widths[i+1:], t.widths[i:])
			t.widths[i] = 1

			t.text = append(t.text, ' ')
			copy(t.text[i+1:], t.text[i:])
			t.text[i] = ' '

			t.styles = append(t.styles, t.style)
			copy(t.styles[i+1:], t.styles[i:])
			t.styles[i] = t.style
			length++
		} else {
			length += t.widths[i]
		}
	}
	if length > 0 {
		t.lengths = append(t.lengths, length)
		if length > t.width {
			t.width = length
		}
	}
	t.height = len(t.lengths)
	t.PostEventWidgetContent(t)
}
1305675
func (s *ByteMatchTuple) SetTextTransformation(v string) *ByteMatchTuple {
	s.TextTransformation = &v
	return s
}
702166
func (s *SynthesizeSpeechInput) SetTextType(v string) *SynthesizeSpeechInput {
	s.TextType = &v
	return s
}
606045
func (a *HandleJavaScriptDialogArgs) SetPromptText(promptText string) *HandleJavaScriptDialogArgs {
	a.PromptText = &promptText
	return a
}
645591
func (s *BatchDetectEntitiesInput) SetTextList(v []*string) *BatchDetectEntitiesInput {
	s.TextList = v
	return s
}
773341
func (s *TextInput) SetText(v string) *TextInput {
	s.Text = &v
	return s
}
113734
func (c *CSS) SetStyleTexts(edits []*CSSStyleDeclarationEdit) ([]*CSSCSSStyle, error) {
	var v CSSSetStyleTextsParams
	v.Edits = edits
	return c.SetStyleTextsWithParams(&v)
}