Documentation
¶
Index ¶
- Constants
- Variables
- func New(key string, props Props) node.T
- type ChangeCallback
- type Hover
- type Props
- type Style
- type T
- type Text
- func (t *Text) Blink() bool
- func (t *Text) Clear() bool
- func (t *Text) CursorLeft()
- func (t *Text) CursorRight()
- func (t *Text) DeleteBackward() bool
- func (t *Text) DeleteForward() bool
- func (t *Text) DeleteSelection() bool
- func (t *Text) Deselect()
- func (t *Text) HasSelection() bool
- func (t *Text) Insert(text string)
- func (t *Text) ResetBlink()
- func (t *Text) SelectLeft()
- func (t *Text) SelectRight()
- func (t *Text) SelectedRange() (start, end int)
- func (t *Text) Selection() string
- func (t *Text) SetCursor(cursor int)
- func (t *Text) SetText(text string)
- func (t *Text) Slice(i, j int) string
- func (t *Text) String() string
- func (t *Text) UpdateBlink(delta float32)
Constants ¶
View Source
const CursorBlinkInterval = float32(0.5)
Variables ¶
View Source
var DefaultColor = color.White
View Source
var DefaultFont = Font{
Name: "fonts/SourceSansPro-Regular.ttf",
Size: 16,
}
View Source
var DefaultLineHeight = Pct(100)
View Source
var DefaultStyle = &Style{ Font: DefaultFont, LineHeight: DefaultLineHeight, Color: DefaultColor, }
Functions ¶
Types ¶
type ChangeCallback ¶
type ChangeCallback func(string)
type Style ¶
type Text ¶
type Text struct {
// contains filtered or unexported fields
}
func (*Text) CursorLeft ¶
func (t *Text) CursorLeft()
func (*Text) CursorRight ¶
func (t *Text) CursorRight()
func (*Text) DeleteBackward ¶
func (*Text) DeleteForward ¶
func (*Text) DeleteSelection ¶
func (*Text) HasSelection ¶
func (*Text) ResetBlink ¶
func (t *Text) ResetBlink()
func (*Text) SelectLeft ¶
func (t *Text) SelectLeft()
func (*Text) SelectRight ¶
func (t *Text) SelectRight()
func (*Text) SelectedRange ¶
func (*Text) UpdateBlink ¶
Click to show internal directories.
Click to hide internal directories.