Documentation ¶
Overview ¶
Package edit provides an editable text field widget with support for password hiding.
Index ¶
- Variables
- func CalculateTopMiddleBottom(w IWidget, size gowid.IRenderSize) (int, int, int)
- func DownLines(w IWidget, size gowid.IRenderSize, doPage bool, app gowid.IApp) bool
- func MakeText(w IWidget) text.IWidget
- func Render(w IWidget, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas
- func UpLines(w IWidget, size gowid.IRenderSize, doPage bool, app gowid.IApp) bool
- func UserInput(w IWidget, ev interface{}, size gowid.IRenderSize, focus gowid.Selector, ...) bool
- type Caption
- type Cursor
- type IEdit
- type IMask
- type IWidget
- type Mask
- type Options
- type Text
- type Widget
- func (w *Widget) CalculateTopMiddleBottom(size gowid.IRenderSize) (int, int, int)
- func (w *Widget) Caption() string
- func (w *Widget) ChrAt(i int) rune
- func (w *Widget) CursorEnabled() bool
- func (w *Widget) CursorPos() int
- func (w *Widget) DownLines(size gowid.IRenderSize, doPage bool, app gowid.IApp) bool
- func (w *Widget) LinesFromTop() int
- func (w *Widget) MakeText() text.IWidget
- func (w *Widget) OnCaptionSet(cb gowid.IWidgetChangedCallback)
- func (w *Widget) OnCursorPosSet(cb gowid.IWidgetChangedCallback)
- func (w *Widget) OnTextSet(cb gowid.IWidgetChangedCallback)
- func (w *Widget) Read(p []byte) (n int, err error)
- func (w *Widget) RemoveOnCaptionSet(cb gowid.IIdentity)
- func (w *Widget) RemoveOnCursorPosSet(cb gowid.IIdentity)
- func (w *Widget) RemoveOnTextSet(cb gowid.IIdentity)
- func (w *Widget) Render(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.ICanvas
- func (w *Widget) RenderSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox
- func (w *Widget) SetCaption(text string, app gowid.IApp)
- func (w *Widget) SetCursorDisabled()
- func (w *Widget) SetCursorPos(pos int, app gowid.IApp)
- func (w *Widget) SetLinesFromTop(l int, app gowid.IApp)
- func (w *Widget) SetText(text string, app gowid.IApp)
- func (w *Widget) String() string
- func (w *Widget) Text() string
- func (w *Widget) UpLines(size gowid.IRenderSize, doPage bool, app gowid.IApp) bool
- func (w *Widget) UserInput(ev interface{}, size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) bool
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var InvalidRuneIndex error = errors.New("Invalid rune index for string")
Functions ¶
Types ¶
type IEdit ¶
IEdit is an interface to be implemented by a text editing widget. A suitable implementation will be able to defer to RenderEdit() in its Render() function.
type Mask ¶
func DisabledMask ¶
func DisabledMask() Mask
type Widget ¶
type Widget struct { IMask Callbacks *gowid.Callbacks gowid.IsSelectable // contains filtered or unexported fields }
func (*Widget) CalculateTopMiddleBottom ¶
func (*Widget) ChrAt ¶ added in v1.1.0
TODO - this isn't ideal- if called in a loop, it would be quadratic.
func (*Widget) CursorEnabled ¶
func (*Widget) CursorPos ¶
TODO - weird that you could call set to 0, then get and it would be > 0...
func (*Widget) LinesFromTop ¶
func (*Widget) OnCaptionSet ¶
func (w *Widget) OnCaptionSet(cb gowid.IWidgetChangedCallback)
func (*Widget) OnCursorPosSet ¶
func (w *Widget) OnCursorPosSet(cb gowid.IWidgetChangedCallback)
func (*Widget) OnTextSet ¶
func (w *Widget) OnTextSet(cb gowid.IWidgetChangedCallback)
func (*Widget) RemoveOnCaptionSet ¶
func (*Widget) RemoveOnCursorPosSet ¶
func (*Widget) RemoveOnTextSet ¶
func (*Widget) RenderSize ¶
func (w *Widget) RenderSize(size gowid.IRenderSize, focus gowid.Selector, app gowid.IApp) gowid.IRenderBox
func (*Widget) SetCursorDisabled ¶
func (w *Widget) SetCursorDisabled()
Click to show internal directories.
Click to hide internal directories.