Documentation ¶
Index ¶
- Constants
- Variables
- func AddUserFont(filename string) error
- func ThemeFontFace(name string) (*fontutil.FontFace, error)
- func ThemeFontFace2(name string, size float64) (*fontutil.FontFace, error)
- func WrapInBottomShadowOrNone(ctx widget.ImageContext, content widget.Node) widget.Node
- func WrapInTopShadowOrSeparator(ctx widget.ImageContext, content widget.Node) widget.Node
- type ColSeparator
- type Column
- func (col *Column) Close()
- func (col *Column) FirstChildRow() *Row
- func (col *Column) LastChildRow() *Row
- func (col *Column) Layout()
- func (col *Column) NewRowBefore(next *Row) *Row
- func (col *Column) PointNextRow(p *image.Point) (*Row, bool)
- func (col *Column) PointNextRowExtra(p *image.Point) (*Row, bool)
- func (col *Column) Rows() []*Row
- type ColumnCloseEvent
- type ColumnSquare
- type Columns
- func (cols *Columns) Columns() []*Column
- func (cols *Columns) FirstChildColumn() *Column
- func (cols *Columns) InsertBefore(col widget.Node, next *widget.EmbedNode)
- func (cols *Columns) InsertColumnBefore(col, next *Column)
- func (cols *Columns) LastChildColumn() *Column
- func (cols *Columns) NewColumn() *Column
- func (cols *Columns) PointColumn(p *image.Point) (*Column, bool)
- func (cols *Columns) PointColumnExtra(p *image.Point) (*Column, bool)
- type ContextFloatBox
- func (cfb *ContextFloatBox) AutoClose(ev interface{}, p image.Point)
- func (cfb *ContextFloatBox) FindTextAreaUnderPointer() (*TextArea, bool)
- func (cfb *ContextFloatBox) Layout()
- func (cfb *ContextFloatBox) OnInputEvent(ev interface{}, p image.Point) event.Handled
- func (cfb *ContextFloatBox) SetRefPointToTextAreaCursor(ta *TextArea)
- func (cfb *ContextFloatBox) SetStrClearHistory(s string)
- func (cfb *ContextFloatBox) Toggle()
- type MainMenuButton
- type Root
- type RootSelectAnnotationEvent
- type RootSelectAnnotationType
- type Row
- func (row *Row) Close()
- func (row *Row) EnsureOneToolbarLineYVisible()
- func (row *Row) EnsureTextAreaMinimumHeight()
- func (row *Row) HasState(s RowState) bool
- func (row *Row) Layout()
- func (row *Row) Maximize()
- func (row *Row) NextRow() *Row
- func (row *Row) OnChildMarked(child widget.Node, newMarks widget.Marks)
- func (row *Row) OnInputEvent(ev0 interface{}, p image.Point) event.Handled
- func (row *Row) PosBelow() *RowPos
- func (row *Row) SetState(s RowState, v bool)
- type RowCloseEvent
- type RowInputEvent
- type RowPos
- type RowSeparator
- type RowSquare
- type RowState
- type RowToolbar
- type TASelAnnType
- type TextArea
- type TextAreaCmdEvent
- type TextAreaInlineCompleteEvent
- type TextAreaInputEvent
- type TextAreaLayoutEvent
- type TextAreaSelectAnnotationEvent
- type Toolbar
- type UI
Constants ¶
View Source
const ( RowInputEventId = iota RowCloseEventId )
View Source
const ( TextAreaCmdEventId = iota TextAreaSelectAnnotationEventId TextAreaInlineCompleteEventId TextAreaInputEventId TextAreaLayoutEventId )
View Source
const (
ColumnCloseEventId = iota
)
View Source
const (
RootSelectAnnotationEventId = iota
)
Variables ¶
View Source
var ( ScrollBarLeft = true ScrollBarWidth int = 0 // 0=based on a portion of the font size TextAreaCommentsColor color.Color TextAreaStringsColor color.Color )
View Source
var ColorThemeCycler cycler = cycler{ // contains filtered or unexported fields }
View Source
var FontThemeCycler cycler = cycler{ // contains filtered or unexported fields }
View Source
var (
ShadowsOn = true
)
View Source
var TTFontOptions truetype.Options
View Source
var UIThemeUtil uiThemeUtil
Functions ¶
func AddUserFont ¶
Types ¶
type ColSeparator ¶
func NewColSeparator ¶
func NewColSeparator(col *Column) *ColSeparator
func (*ColSeparator) OnInputEvent ¶
func (sh *ColSeparator) OnInputEvent(ev0 interface{}, p image.Point) event.Handled
type Column ¶
type Column struct { *widget.BoxLayout RowsLayout *widget.SplBg // exported to access sp values Cols *Columns EvReg evreg.Register // contains filtered or unexported fields }
func (*Column) FirstChildRow ¶
func (*Column) LastChildRow ¶
func (*Column) NewRowBefore ¶
func (*Column) PointNextRowExtra ¶
type ColumnCloseEvent ¶
type ColumnCloseEvent struct {
Col *Column
}
type ColumnSquare ¶
type ColumnSquare struct { widget.ENode Size image.Point // contains filtered or unexported fields }
func NewColumnSquare ¶
func NewColumnSquare(col *Column) *ColumnSquare
func (*ColumnSquare) OnInputEvent ¶
func (sq *ColumnSquare) OnInputEvent(ev interface{}, p image.Point) event.Handled
func (*ColumnSquare) Paint ¶
func (sq *ColumnSquare) Paint()
type Columns ¶
type Columns struct { widget.ENode ColsLayout *widget.SplBg // exported to access sp values Root *Root }
func NewColumns ¶
func (*Columns) FirstChildColumn ¶
func (*Columns) InsertBefore ¶
func (*Columns) InsertColumnBefore ¶
func (*Columns) LastChildColumn ¶
type ContextFloatBox ¶
type ContextFloatBox struct { *widget.FloatBox TextArea *TextArea // contains filtered or unexported fields }
func NewContextFloatBox ¶
func NewContextFloatBox(root *Root) *ContextFloatBox
func (*ContextFloatBox) AutoClose ¶
func (cfb *ContextFloatBox) AutoClose(ev interface{}, p image.Point)
func (*ContextFloatBox) FindTextAreaUnderPointer ¶
func (cfb *ContextFloatBox) FindTextAreaUnderPointer() (*TextArea, bool)
func (*ContextFloatBox) Layout ¶
func (cfb *ContextFloatBox) Layout()
func (*ContextFloatBox) OnInputEvent ¶
func (cfb *ContextFloatBox) OnInputEvent(ev interface{}, p image.Point) event.Handled
func (*ContextFloatBox) SetRefPointToTextAreaCursor ¶
func (cfb *ContextFloatBox) SetRefPointToTextAreaCursor(ta *TextArea)
func (*ContextFloatBox) SetStrClearHistory ¶
func (cfb *ContextFloatBox) SetStrClearHistory(s string)
func (*ContextFloatBox) Toggle ¶
func (cfb *ContextFloatBox) Toggle()
type MainMenuButton ¶
type MainMenuButton struct { *widget.FloatBoxButton Toolbar *Toolbar }
func NewMainMenuButton ¶
func NewMainMenuButton(root *Root) *MainMenuButton
type Root ¶
type Root struct { *widget.MultiLayer UI *UI Toolbar *Toolbar MainMenuButton *MainMenuButton ContextFloatBox *ContextFloatBox Cols *Columns EvReg evreg.Register }
User Interface root (top) node.
type RootSelectAnnotationEvent ¶
type RootSelectAnnotationEvent struct {
Type RootSelectAnnotationType
}
type RootSelectAnnotationType ¶
type RootSelectAnnotationType int
const ( RootSelAnnTypeFirst RootSelectAnnotationType = iota RootSelAnnTypeLast RootSelAnnTypePrev RootSelAnnTypeNext RootSelAnnTypeClear )
type Row ¶
type Row struct { *widget.BoxLayout Toolbar *RowToolbar TextArea *TextArea Col *Column EvReg evreg.Register ScrollArea *widget.ScrollArea // contains filtered or unexported fields }
func (*Row) EnsureOneToolbarLineYVisible ¶
func (row *Row) EnsureOneToolbarLineYVisible()
func (*Row) EnsureTextAreaMinimumHeight ¶
func (row *Row) EnsureTextAreaMinimumHeight()
func (*Row) OnInputEvent ¶
type RowCloseEvent ¶
type RowCloseEvent struct {
Row *Row
}
type RowInputEvent ¶
type RowInputEvent struct { Row *Row Event interface{} }
type RowSeparator ¶
func NewRowSeparator ¶
func NewRowSeparator(row *Row) *RowSeparator
func (*RowSeparator) OnInputEvent ¶
func (sh *RowSeparator) OnInputEvent(ev0 interface{}, p image.Point) event.Handled
type RowToolbar ¶
func NewRowToolbar ¶
func NewRowToolbar(row *Row) *RowToolbar
func (*RowToolbar) Layout ¶
func (tb *RowToolbar) Layout()
func (*RowToolbar) OnThemeChange ¶
func (tb *RowToolbar) OnThemeChange()
type TASelAnnType ¶
type TASelAnnType int
const ( TASelAnnTypeCurrent TASelAnnType = iota // make current TASelAnnTypeCurrentPrev TASelAnnTypeCurrentNext TASelAnnTypePrint TASelAnnTypePrintAllPrevious )
type TextArea ¶
type TextArea struct { *widget.TextEditX EvReg evreg.Register SupportClickInsideSelection bool // contains filtered or unexported fields }
func NewTextArea ¶
func (*TextArea) OnInputEvent ¶
type TextAreaCmdEvent ¶
type TextAreaInputEvent ¶
type TextAreaLayoutEvent ¶
type TextAreaLayoutEvent struct {
TextArea *TextArea
}
type TextAreaSelectAnnotationEvent ¶
type TextAreaSelectAnnotationEvent struct { TextArea *TextArea AnnotationIndex int Offset int // annotation string click offset Type TASelAnnType }
type Toolbar ¶
type Toolbar struct { *TextArea // contains filtered or unexported fields }
func NewToolbar ¶
Click to show internal directories.
Click to hide internal directories.