Documentation
¶
Overview ¶
dashline
package liteview is a fyne widget for reading text
Index ¶
- Constants
- type DashedLine
- type LiteView
- func (lv *LiteView) CreateRenderer() fyne.WidgetRenderer
- func (lv *LiteView) FocusGained()
- func (lv *LiteView) FocusLost()
- func (lv *LiteView) Focused() bool
- func (lv *LiteView) GetPos() (int, int)
- func (lv *LiteView) GetUnderLine() UnderLineMode
- func (lv *LiteView) GetVal() [][]byte
- func (lv *LiteView) JumpTo(lineid, linepos int, centralview bool)
- func (lv *LiteView) MouseIn(evt *desktop.MouseEvent)
- func (lv *LiteView) MouseMoved(evt *desktop.MouseEvent)
- func (lv *LiteView) MouseOut()
- func (lv *LiteView) Scrolled(evt *fyne.ScrollEvent)
- func (lv *LiteView) SetBytes(val [][]byte)
- func (lv *LiteView) SetKeyEvtHandler(f func(*fyne.KeyEvent))
- func (lv *LiteView) SetPosEvtHandler(f func(int, int))
- func (lv *LiteView) SetStr(val string)
- func (lv *LiteView) SetUnderLine(underline UnderLineMode)
- func (lv *LiteView) TypedKey(evt *fyne.KeyEvent)
- func (lv *LiteView) TypedRune(c rune)
- func (lv *LiteView) Val() [][]byte
- type Option
- type UnderLineMode
Constants ¶
View Source
const ( DefaultDashlineHeight = 1 DefaultDashlineWidth = 5 DefaultDashlineInterval = 2 )
View Source
const ( DefaultSidePadding = 50 DefaultVerticalPadding = 20 DefaultLineVerticalPadding = 5 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DashedLine ¶
func NewDashedLine ¶
func NewDashedLine(w, h float32, dashW, dashInt float32, c color.Color) (line *DashedLine)
type LiteView ¶
type LiteView struct { widget.DisableableWidget StartLine, StartLinePos int // contains filtered or unexported fields }
func NewLiteViewCustom ¶
func (*LiteView) CreateRenderer ¶
func (lv *LiteView) CreateRenderer() fyne.WidgetRenderer
func (*LiteView) FocusGained ¶
func (lv *LiteView) FocusGained()
func (*LiteView) GetUnderLine ¶
func (lv *LiteView) GetUnderLine() UnderLineMode
func (*LiteView) JumpTo ¶
JumpTo display the text starting from line lineid and postion within line specified by linepos; if certralview is true, the specified postion is postioned verifically centrally, otherwise the specified postion starts from top of viewarea; if the specified postion is invalid, do nothing
func (*LiteView) MouseIn ¶
func (lv *LiteView) MouseIn(evt *desktop.MouseEvent)
func (*LiteView) MouseMoved ¶
func (lv *LiteView) MouseMoved(evt *desktop.MouseEvent)
func (*LiteView) SetKeyEvtHandler ¶
func (lv *LiteView) SetKeyEvtHandler(f func(*fyne.KeyEvent))
func (*LiteView) SetPosEvtHandler ¶
func (*LiteView) SetUnderLine ¶
func (lv *LiteView) SetUnderLine(underline UnderLineMode)
type Option ¶
type Option func(lv *LiteView)
func WithLeadingSpaces ¶
func WithStartingPos ¶
func WithUnderline ¶
func WithUnderline(u UnderLineMode) Option
func WithValBytes ¶
type UnderLineMode ¶
type UnderLineMode uint32
const ( UnderLineNone UnderLineMode = iota UnderLineSolid UnderLineDash )
Click to show internal directories.
Click to hide internal directories.