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 any, p image.Point)
- func (cfb *ContextFloatBox) FindTextAreaUnderPointer() (*TextArea, bool)
- func (cfb *ContextFloatBox) Layout()
- func (cfb *ContextFloatBox) OnInputEvent(ev any, 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 any, 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 ColorThemeCycler cycler = cycler{ // contains filtered or unexported fields }
View Source
var FontThemeCycler cycler = cycler{ // contains filtered or unexported fields }
View Source
var ScrollBarLeft = true
View Source
var ScrollBarWidth int = 0 // 0=based on a portion of the font size
View Source
var (
ShadowsOn = true
)
View Source
var TTFontOptions truetype.Options
View Source
var TextAreaCommentsColor color.Color
View Source
var TextAreaStringsColor color.Color
View Source
var UIThemeUtil uiThemeUtil
Functions ¶
func AddUserFont ¶
func ThemeFontFace2 ¶ added in v1.3.0
Types ¶
type ColSeparator ¶
func NewColSeparator ¶
func NewColSeparator(col *Column) *ColSeparator
func (*ColSeparator) OnInputEvent ¶
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 (*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) FindTextAreaUnderPointer ¶
func (cfb *ContextFloatBox) FindTextAreaUnderPointer() (*TextArea, bool)
func (*ContextFloatBox) Layout ¶
func (cfb *ContextFloatBox) Layout()
func (*ContextFloatBox) OnInputEvent ¶
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
// contains filtered or unexported fields
}
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 ¶ added in v1.1.0
type RootSelectAnnotationEvent struct {
Type RootSelectAnnotationType
}
type RootSelectAnnotationType ¶ added in v1.1.0
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 ¶ added in v1.1.0
func (row *Row) EnsureOneToolbarLineYVisible()
func (*Row) EnsureTextAreaMinimumHeight ¶
func (row *Row) EnsureTextAreaMinimumHeight()
type RowCloseEvent ¶
type RowCloseEvent struct {
Row *Row
}
type RowInputEvent ¶
type RowSeparator ¶
func NewRowSeparator ¶
func NewRowSeparator(row *Row) *RowSeparator
func (*RowSeparator) OnInputEvent ¶
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 ( TasatPrev TASelAnnType = iota TasatNext TasatMsg TasatMsgPrev TasatMsgNext TasatPrint TasatPrintPreviousAll )
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 TextAreaInlineCompleteEvent ¶
type TextAreaInlineCompleteEvent struct {
TextArea *TextArea
Offset int
ReplyHandled event.Handled // allow callbacks to set value // ex: Allow input event (`tab` key press) to function normally if the inlinecomplete is not being handled (ex: no lsproto server is registered for a filename extension)
}
type TextAreaInputEvent ¶ added in v1.3.0
type TextAreaLayoutEvent ¶ added in v1.3.0
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.