Documentation
¶
Overview ¶
Package widget provides Risor bindings for Fyne GUI widgets.
This package wraps Fyne v2 widgets for use in Risor v2 scripts, enabling cross-platform desktop GUI development with a simple scripting interface.
Available Widgets ¶
Input Widgets:
- Button: Clickable button with callback
- Entry: Single-line text input with optional submit callback
- MultiLineEntry: Multi-line text input
- Check: Checkbox with changed callback
- CheckGroup: Multiple checkboxes with changed callback
- Select: Dropdown selection with changed callback
- RadioGroup: Radio button group with changed callback
- SelectEntry: Searchable dropdown with changed callback
- Slider: Numeric value slider with changed callback
Display Widgets:
- Label: Text display with writable Text property
- Icon: Icon display from theme resources
- Hyperlink: Clickable link with URL
- ProgressBar: Value-based progress indicator
- ProgressBarInfinite: Indeterminate progress spinner
- Activity: Simple activity indicator
- Separator: Visual separator line
- Markdown: Markdown content renderer
Data Widgets:
- Table: Paginated table with callbacks for data fetching
- Tree: Hierarchical data display with callbacks
- List: Scrolling list with item callbacks
- Log: Read-only scrollable log display
Composite Widgets:
- Form: Form with items and optional submit button
- FormItem: Label + widget pair for forms
- Card: Title, subtitle, and content card
- Accordion: Collapsible sections with items
- AccordionItem: Individual accordion section
- Toolbar: Action toolbar with items
Risor v2 Syntax ¶
All callbacks must use arrow function syntax:
let btn = widget.NewButton("Click", () => {
window.SetStatus("Clicked!")
})
Thread Safety ¶
All widget callbacks execute synchronously in the UI thread. The Risor VM is single-threaded and not thread-safe. Never spawn goroutines or use async patterns inside callbacks.
See CONCURRENCY.md for detailed information about thread safety.
Index ¶
- Constants
- func GetThemeResource(name string) fyne.Resource
- func NewFileIcon(ctx context.Context, args ...object.Object) (object.Object, error)
- func NewMenuItem(w WindowInterface) func(ctx context.Context, args ...object.Object) (object.Object, error)
- func NewMenuItemSeparator(ctx context.Context, args ...object.Object) (object.Object, error)
- func NewModalPopUp(ctx context.Context, args ...object.Object) (object.Object, error)
- func NewPopUp(ctx context.Context, args ...object.Object) (object.Object, error)
- func NewPopUpMenu(ctx context.Context, args ...object.Object) (object.Object, error)
- func NewRichText(ctx context.Context, args ...object.Object) (object.Object, error)
- func NewTextGrid(ctx context.Context, args ...object.Object) (object.Object, error)
- type Accordion
- func (obj *Accordion) Attrs() []object.AttrSpec
- func (obj *Accordion) CanvasObject() fyne.CanvasObject
- func (obj *Accordion) Equals(other object.Object) bool
- func (obj *Accordion) GetAttr(name string) (object.Object, bool)
- func (obj *Accordion) Inspect() string
- func (obj *Accordion) Interface() interface{}
- func (obj *Accordion) IsTruthy() bool
- func (obj *Accordion) MarshalJSON() ([]byte, error)
- func (obj *Accordion) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *Accordion) SetAttr(name string, value object.Object) error
- func (obj *Accordion) Type() object.Type
- type AccordionItem
- func (obj *AccordionItem) Attrs() []object.AttrSpec
- func (obj *AccordionItem) Equals(other object.Object) bool
- func (obj *AccordionItem) GetAttr(name string) (object.Object, bool)
- func (obj *AccordionItem) Inspect() string
- func (obj *AccordionItem) Interface() interface{}
- func (obj *AccordionItem) IsTruthy() bool
- func (obj *AccordionItem) MarshalJSON() ([]byte, error)
- func (obj *AccordionItem) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *AccordionItem) SetAttr(name string, value object.Object) error
- func (obj *AccordionItem) Type() object.Type
- type Activity
- func (obj *Activity) Attrs() []object.AttrSpec
- func (obj *Activity) CanvasObject() fyne.CanvasObject
- func (obj *Activity) Cost() int
- func (obj *Activity) Equals(other object.Object) bool
- func (obj *Activity) GetAttr(name string) (object.Object, bool)
- func (obj *Activity) Inspect() string
- func (obj *Activity) Interface() interface{}
- func (obj *Activity) IsTruthy() bool
- func (obj *Activity) MarshalJSON() ([]byte, error)
- func (obj *Activity) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *Activity) SetAttr(name string, value object.Object) error
- func (obj *Activity) Type() object.Type
- type Button
- func (obj *Button) Attrs() []object.AttrSpec
- func (obj *Button) CanvasObject() fyne.CanvasObject
- func (obj *Button) Equals(other object.Object) bool
- func (obj *Button) GetAttr(name string) (object.Object, bool)
- func (obj *Button) Inspect() string
- func (obj *Button) Interface() interface{}
- func (obj *Button) IsTruthy() bool
- func (obj *Button) MarshalJSON() ([]byte, error)
- func (obj *Button) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *Button) SetAttr(name string, value object.Object) error
- func (obj *Button) Type() object.Type
- type Calendar
- func (obj *Calendar) Attrs() []object.AttrSpec
- func (obj *Calendar) CanvasObject() fyne.CanvasObject
- func (obj *Calendar) Cost() int
- func (obj *Calendar) Equals(other object.Object) bool
- func (obj *Calendar) GetAttr(name string) (object.Object, bool)
- func (obj *Calendar) Inspect() string
- func (obj *Calendar) Interface() interface{}
- func (obj *Calendar) IsTruthy() bool
- func (obj *Calendar) MarshalJSON() ([]byte, error)
- func (obj *Calendar) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *Calendar) SetAttr(name string, value object.Object) error
- func (obj *Calendar) Type() object.Type
- type Card
- func (obj *Card) Attrs() []object.AttrSpec
- func (obj *Card) CanvasObject() fyne.CanvasObject
- func (obj *Card) Cost() int
- func (obj *Card) Equals(other object.Object) bool
- func (obj *Card) GetAttr(name string) (object.Object, bool)
- func (obj *Card) Inspect() string
- func (obj *Card) Interface() interface{}
- func (obj *Card) IsTruthy() bool
- func (obj *Card) MarshalJSON() ([]byte, error)
- func (obj *Card) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *Card) SetAttr(name string, value object.Object) error
- func (obj *Card) Type() object.Type
- type Check
- func (obj *Check) Attrs() []object.AttrSpec
- func (obj *Check) CanvasObject() fyne.CanvasObject
- func (obj *Check) Equals(other object.Object) bool
- func (obj *Check) GetAttr(name string) (object.Object, bool)
- func (obj *Check) Inspect() string
- func (obj *Check) Interface() interface{}
- func (obj *Check) IsTruthy() bool
- func (obj *Check) MarshalJSON() ([]byte, error)
- func (obj *Check) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *Check) SetAttr(name string, value object.Object) error
- func (obj *Check) Type() object.Type
- type CheckGroup
- func (obj *CheckGroup) Attrs() []object.AttrSpec
- func (obj *CheckGroup) CanvasObject() fyne.CanvasObject
- func (obj *CheckGroup) Equals(other object.Object) bool
- func (obj *CheckGroup) GetAttr(name string) (object.Object, bool)
- func (obj *CheckGroup) Inspect() string
- func (obj *CheckGroup) Interface() interface{}
- func (obj *CheckGroup) IsTruthy() bool
- func (obj *CheckGroup) MarshalJSON() ([]byte, error)
- func (obj *CheckGroup) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *CheckGroup) SetAttr(name string, value object.Object) error
- func (obj *CheckGroup) Type() object.Type
- type DateEntry
- func (obj *DateEntry) Attrs() []object.AttrSpec
- func (obj *DateEntry) CanvasObject() fyne.CanvasObject
- func (obj *DateEntry) Cost() int
- func (obj *DateEntry) Equals(other object.Object) bool
- func (obj *DateEntry) GetAttr(name string) (object.Object, bool)
- func (obj *DateEntry) Inspect() string
- func (obj *DateEntry) Interface() interface{}
- func (obj *DateEntry) IsTruthy() bool
- func (obj *DateEntry) MarshalJSON() ([]byte, error)
- func (obj *DateEntry) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *DateEntry) SetAttr(name string, value object.Object) error
- func (obj *DateEntry) Type() object.Type
- type Entry
- func (obj *Entry) Attrs() []object.AttrSpec
- func (obj *Entry) CanvasObject() fyne.CanvasObject
- func (obj *Entry) Equals(other object.Object) bool
- func (obj *Entry) GetAttr(name string) (object.Object, bool)
- func (obj *Entry) Inspect() string
- func (obj *Entry) Interface() interface{}
- func (obj *Entry) IsTruthy() bool
- func (obj *Entry) MarshalJSON() ([]byte, error)
- func (obj *Entry) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *Entry) SetAttr(name string, value object.Object) error
- func (obj *Entry) Type() object.Type
- type FileIcon
- func (obj *FileIcon) Attrs() []object.AttrSpec
- func (obj *FileIcon) CanvasObject() fyne.CanvasObject
- func (obj *FileIcon) Cost() int
- func (obj *FileIcon) Equals(other object.Object) bool
- func (obj *FileIcon) GetAttr(name string) (object.Object, bool)
- func (obj *FileIcon) Inspect() string
- func (obj *FileIcon) Interface() interface{}
- func (obj *FileIcon) IsTruthy() bool
- func (obj *FileIcon) MarshalJSON() ([]byte, error)
- func (obj *FileIcon) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *FileIcon) SetAttr(name string, value object.Object) error
- func (obj *FileIcon) Type() object.Type
- type Form
- func (obj *Form) Attrs() []object.AttrSpec
- func (obj *Form) CanvasObject() fyne.CanvasObject
- func (obj *Form) Equals(other object.Object) bool
- func (obj *Form) GetAttr(name string) (object.Object, bool)
- func (obj *Form) Inspect() string
- func (obj *Form) Interface() interface{}
- func (obj *Form) IsTruthy() bool
- func (obj *Form) MarshalJSON() ([]byte, error)
- func (obj *Form) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *Form) SetAttr(name string, value object.Object) error
- func (obj *Form) Type() object.Type
- type FormItem
- func (obj *FormItem) Attrs() []object.AttrSpec
- func (obj *FormItem) Equals(other object.Object) bool
- func (obj *FormItem) GetAttr(name string) (object.Object, bool)
- func (obj *FormItem) Inspect() string
- func (obj *FormItem) Interface() interface{}
- func (obj *FormItem) IsTruthy() bool
- func (obj *FormItem) MarshalJSON() ([]byte, error)
- func (obj *FormItem) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *FormItem) SetAttr(name string, value object.Object) error
- func (obj *FormItem) Type() object.Type
- type GenericCanvasObject
- func (g *GenericCanvasObject) Attrs() []object.AttrSpec
- func (g *GenericCanvasObject) Cost() int
- func (g *GenericCanvasObject) Equals(other object.Object) bool
- func (g *GenericCanvasObject) GetAttr(name string) (object.Object, bool)
- func (g *GenericCanvasObject) Inspect() string
- func (g *GenericCanvasObject) Interface() interface{}
- func (g *GenericCanvasObject) IsTruthy() bool
- func (g *GenericCanvasObject) MarshalJSON() ([]byte, error)
- func (g *GenericCanvasObject) RunOperation(op.BinaryOpType, object.Object) (object.Object, error)
- func (g *GenericCanvasObject) SetAttr(name string, value object.Object) error
- func (g *GenericCanvasObject) Type() object.Type
- type GridWrap
- func (obj *GridWrap) Attrs() []object.AttrSpec
- func (obj *GridWrap) CanvasObject() fyne.CanvasObject
- func (obj *GridWrap) Cost() int
- func (obj *GridWrap) Equals(other object.Object) bool
- func (obj *GridWrap) GetAttr(name string) (object.Object, bool)
- func (obj *GridWrap) Inspect() string
- func (obj *GridWrap) Interface() interface{}
- func (obj *GridWrap) IsTruthy() bool
- func (obj *GridWrap) MarshalJSON() ([]byte, error)
- func (obj *GridWrap) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *GridWrap) SetAttr(name string, value object.Object) error
- func (obj *GridWrap) Type() object.Type
- type Hyperlink
- func (obj *Hyperlink) Attrs() []object.AttrSpec
- func (obj *Hyperlink) CanvasObject() fyne.CanvasObject
- func (obj *Hyperlink) Cost() int
- func (obj *Hyperlink) Equals(other object.Object) bool
- func (obj *Hyperlink) GetAttr(name string) (object.Object, bool)
- func (obj *Hyperlink) Inspect() string
- func (obj *Hyperlink) Interface() interface{}
- func (obj *Hyperlink) IsTruthy() bool
- func (obj *Hyperlink) MarshalJSON() ([]byte, error)
- func (obj *Hyperlink) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *Hyperlink) SetAttr(name string, value object.Object) error
- func (obj *Hyperlink) Type() object.Type
- type Icon
- func (obj *Icon) Attrs() []object.AttrSpec
- func (obj *Icon) CanvasObject() fyne.CanvasObject
- func (obj *Icon) Cost() int
- func (obj *Icon) Equals(other object.Object) bool
- func (obj *Icon) GetAttr(name string) (object.Object, bool)
- func (obj *Icon) Inspect() string
- func (obj *Icon) Interface() interface{}
- func (obj *Icon) IsTruthy() bool
- func (obj *Icon) MarshalJSON() ([]byte, error)
- func (obj *Icon) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *Icon) SetAttr(name string, value object.Object) error
- func (obj *Icon) Type() object.Type
- type IsCanvasObject
- type Label
- func (obj *Label) Attrs() []object.AttrSpec
- func (obj *Label) CanvasObject() fyne.CanvasObject
- func (obj *Label) Equals(other object.Object) bool
- func (obj *Label) GetAttr(name string) (object.Object, bool)
- func (obj *Label) Inspect() string
- func (obj *Label) Interface() interface{}
- func (obj *Label) IsTruthy() bool
- func (obj *Label) MarshalJSON() ([]byte, error)
- func (obj *Label) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *Label) SetAttr(name string, value object.Object) error
- func (obj *Label) Type() object.Type
- type List
- func (obj *List) Attrs() []object.AttrSpec
- func (obj *List) CanvasObject() fyne.CanvasObject
- func (obj *List) Cost() int
- func (obj *List) Equals(other object.Object) bool
- func (obj *List) GetAttr(name string) (object.Object, bool)
- func (obj *List) Inspect() string
- func (obj *List) Interface() interface{}
- func (obj *List) IsTruthy() bool
- func (obj *List) MarshalJSON() ([]byte, error)
- func (obj *List) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *List) SetAttr(name string, value object.Object) error
- func (obj *List) Type() object.Type
- type Log
- func (obj *Log) Attrs() []object.AttrSpec
- func (obj *Log) CanvasObject() fyne.CanvasObject
- func (obj *Log) Equals(other object.Object) bool
- func (obj *Log) GetAttr(name string) (object.Object, bool)
- func (obj *Log) Inspect() string
- func (obj *Log) Interface() interface{}
- func (obj *Log) IsTruthy() bool
- func (obj *Log) MarshalJSON() ([]byte, error)
- func (obj *Log) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *Log) SetAttr(name string, value object.Object) error
- func (obj *Log) Type() object.Type
- type Markdown
- func (obj *Markdown) Attrs() []object.AttrSpec
- func (obj *Markdown) CanvasObject() fyne.CanvasObject
- func (obj *Markdown) Equals(other object.Object) bool
- func (obj *Markdown) GetAttr(name string) (object.Object, bool)
- func (obj *Markdown) Inspect() string
- func (obj *Markdown) Interface() interface{}
- func (obj *Markdown) IsTruthy() bool
- func (obj *Markdown) MarshalJSON() ([]byte, error)
- func (obj *Markdown) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *Markdown) SetAttr(name string, value object.Object) error
- func (obj *Markdown) Type() object.Type
- type MenuItem
- func (obj *MenuItem) Attrs() []object.AttrSpec
- func (obj *MenuItem) Cost() int
- func (obj *MenuItem) Equals(other object.Object) bool
- func (obj *MenuItem) GetAttr(name string) (object.Object, bool)
- func (obj *MenuItem) Inspect() string
- func (obj *MenuItem) Instance() *fyne.MenuItem
- func (obj *MenuItem) Interface() interface{}
- func (obj *MenuItem) IsTruthy() bool
- func (obj *MenuItem) MarshalJSON() ([]byte, error)
- func (obj *MenuItem) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *MenuItem) SetAttr(name string, value object.Object) error
- func (obj *MenuItem) Type() object.Type
- type PopUp
- func (obj *PopUp) Attrs() []object.AttrSpec
- func (obj *PopUp) CanvasObject() fyne.CanvasObject
- func (obj *PopUp) Cost() int
- func (obj *PopUp) Equals(other object.Object) bool
- func (obj *PopUp) GetAttr(name string) (object.Object, bool)
- func (obj *PopUp) Inspect() string
- func (obj *PopUp) Interface() interface{}
- func (obj *PopUp) IsTruthy() bool
- func (obj *PopUp) MarshalJSON() ([]byte, error)
- func (obj *PopUp) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *PopUp) SetAttr(name string, value object.Object) error
- func (obj *PopUp) Type() object.Type
- type PopUpMenu
- func (obj *PopUpMenu) Attrs() []object.AttrSpec
- func (obj *PopUpMenu) CanvasObject() fyne.CanvasObject
- func (obj *PopUpMenu) Cost() int
- func (obj *PopUpMenu) Equals(other object.Object) bool
- func (obj *PopUpMenu) GetAttr(name string) (object.Object, bool)
- func (obj *PopUpMenu) Inspect() string
- func (obj *PopUpMenu) Interface() interface{}
- func (obj *PopUpMenu) IsTruthy() bool
- func (obj *PopUpMenu) MarshalJSON() ([]byte, error)
- func (obj *PopUpMenu) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *PopUpMenu) SetAttr(name string, value object.Object) error
- func (obj *PopUpMenu) Type() object.Type
- type ProgressBar
- func (obj *ProgressBar) Attrs() []object.AttrSpec
- func (obj *ProgressBar) CanvasObject() fyne.CanvasObject
- func (obj *ProgressBar) Cost() int
- func (obj *ProgressBar) Equals(other object.Object) bool
- func (obj *ProgressBar) GetAttr(name string) (object.Object, bool)
- func (obj *ProgressBar) Inspect() string
- func (obj *ProgressBar) Interface() interface{}
- func (obj *ProgressBar) IsTruthy() bool
- func (obj *ProgressBar) MarshalJSON() ([]byte, error)
- func (obj *ProgressBar) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *ProgressBar) SetAttr(name string, value object.Object) error
- func (obj *ProgressBar) Type() object.Type
- type ProgressBarInfinite
- func (obj *ProgressBarInfinite) Attrs() []object.AttrSpec
- func (obj *ProgressBarInfinite) CanvasObject() fyne.CanvasObject
- func (obj *ProgressBarInfinite) Cost() int
- func (obj *ProgressBarInfinite) Equals(other object.Object) bool
- func (obj *ProgressBarInfinite) GetAttr(name string) (object.Object, bool)
- func (obj *ProgressBarInfinite) Inspect() string
- func (obj *ProgressBarInfinite) Interface() interface{}
- func (obj *ProgressBarInfinite) IsTruthy() bool
- func (obj *ProgressBarInfinite) MarshalJSON() ([]byte, error)
- func (obj *ProgressBarInfinite) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *ProgressBarInfinite) SetAttr(name string, value object.Object) error
- func (obj *ProgressBarInfinite) Type() object.Type
- type RadioGroup
- func (obj *RadioGroup) Attrs() []object.AttrSpec
- func (obj *RadioGroup) CanvasObject() fyne.CanvasObject
- func (obj *RadioGroup) Equals(other object.Object) bool
- func (obj *RadioGroup) GetAttr(name string) (object.Object, bool)
- func (obj *RadioGroup) Inspect() string
- func (obj *RadioGroup) Interface() interface{}
- func (obj *RadioGroup) IsTruthy() bool
- func (obj *RadioGroup) MarshalJSON() ([]byte, error)
- func (obj *RadioGroup) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *RadioGroup) SetAttr(name string, value object.Object) error
- func (obj *RadioGroup) Type() object.Type
- type RichText
- func (obj *RichText) Attrs() []object.AttrSpec
- func (obj *RichText) CanvasObject() fyne.CanvasObject
- func (obj *RichText) Cost() int
- func (obj *RichText) Equals(other object.Object) bool
- func (obj *RichText) GetAttr(name string) (object.Object, bool)
- func (obj *RichText) Inspect() string
- func (obj *RichText) Interface() interface{}
- func (obj *RichText) IsTruthy() bool
- func (obj *RichText) MarshalJSON() ([]byte, error)
- func (obj *RichText) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *RichText) SetAttr(name string, value object.Object) error
- func (obj *RichText) Type() object.Type
- type Select
- func (obj *Select) Attrs() []object.AttrSpec
- func (obj *Select) CanvasObject() fyne.CanvasObject
- func (obj *Select) Equals(other object.Object) bool
- func (obj *Select) GetAttr(name string) (object.Object, bool)
- func (obj *Select) Inspect() string
- func (obj *Select) Interface() interface{}
- func (obj *Select) IsTruthy() bool
- func (obj *Select) MarshalJSON() ([]byte, error)
- func (obj *Select) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *Select) SetAttr(name string, value object.Object) error
- func (obj *Select) Type() object.Type
- type SelectEntry
- func (obj *SelectEntry) Attrs() []object.AttrSpec
- func (obj *SelectEntry) CanvasObject() fyne.CanvasObject
- func (obj *SelectEntry) Cost() int
- func (obj *SelectEntry) Equals(other object.Object) bool
- func (obj *SelectEntry) GetAttr(name string) (object.Object, bool)
- func (obj *SelectEntry) Inspect() string
- func (obj *SelectEntry) Interface() interface{}
- func (obj *SelectEntry) IsTruthy() bool
- func (obj *SelectEntry) MarshalJSON() ([]byte, error)
- func (obj *SelectEntry) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *SelectEntry) SetAttr(name string, value object.Object) error
- func (obj *SelectEntry) Type() object.Type
- type Separator
- func (obj *Separator) Attrs() []object.AttrSpec
- func (obj *Separator) CanvasObject() fyne.CanvasObject
- func (obj *Separator) Cost() int
- func (obj *Separator) Equals(other object.Object) bool
- func (obj *Separator) GetAttr(name string) (object.Object, bool)
- func (obj *Separator) Inspect() string
- func (obj *Separator) Interface() interface{}
- func (obj *Separator) IsTruthy() bool
- func (obj *Separator) MarshalJSON() ([]byte, error)
- func (obj *Separator) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *Separator) SetAttr(name string, value object.Object) error
- func (obj *Separator) Type() object.Type
- type Slider
- func (obj *Slider) Attrs() []object.AttrSpec
- func (obj *Slider) CanvasObject() fyne.CanvasObject
- func (obj *Slider) Cost() int
- func (obj *Slider) Equals(other object.Object) bool
- func (obj *Slider) GetAttr(name string) (object.Object, bool)
- func (obj *Slider) Inspect() string
- func (obj *Slider) Interface() interface{}
- func (obj *Slider) IsTruthy() bool
- func (obj *Slider) MarshalJSON() ([]byte, error)
- func (obj *Slider) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *Slider) SetAttr(name string, value object.Object) error
- func (obj *Slider) Type() object.Type
- type Table
- func (obj *Table) Attrs() []object.AttrSpec
- func (obj *Table) CanvasObject() fyne.CanvasObject
- func (obj *Table) Equals(other object.Object) bool
- func (obj *Table) GetAttr(name string) (object.Object, bool)
- func (obj *Table) Inspect() string
- func (obj *Table) Interface() interface{}
- func (obj *Table) IsTruthy() bool
- func (obj *Table) MarshalJSON() ([]byte, error)
- func (obj *Table) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *Table) SetAttr(name string, value object.Object) error
- func (obj *Table) Type() object.Type
- type TextGrid
- func (obj *TextGrid) Attrs() []object.AttrSpec
- func (obj *TextGrid) CanvasObject() fyne.CanvasObject
- func (obj *TextGrid) Cost() int
- func (obj *TextGrid) Equals(other object.Object) bool
- func (obj *TextGrid) GetAttr(name string) (object.Object, bool)
- func (obj *TextGrid) Inspect() string
- func (obj *TextGrid) Interface() interface{}
- func (obj *TextGrid) IsTruthy() bool
- func (obj *TextGrid) MarshalJSON() ([]byte, error)
- func (obj *TextGrid) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *TextGrid) SetAttr(name string, value object.Object) error
- func (obj *TextGrid) Type() object.Type
- type TextStyle
- func (obj *TextStyle) Attrs() []object.AttrSpec
- func (obj *TextStyle) Equals(other object.Object) bool
- func (obj *TextStyle) GetAttr(name string) (object.Object, bool)
- func (obj *TextStyle) Inspect() string
- func (obj *TextStyle) Interface() interface{}
- func (obj *TextStyle) IsTruthy() bool
- func (obj *TextStyle) MarshalJSON() ([]byte, error)
- func (obj *TextStyle) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *TextStyle) SetAttr(name string, value object.Object) error
- func (obj *TextStyle) Type() object.Type
- type Toolbar
- func (obj *Toolbar) Attrs() []object.AttrSpec
- func (obj *Toolbar) CanvasObject() fyne.CanvasObject
- func (obj *Toolbar) Equals(other object.Object) bool
- func (obj *Toolbar) GetAttr(name string) (object.Object, bool)
- func (obj *Toolbar) Inspect() string
- func (obj *Toolbar) Interface() interface{}
- func (obj *Toolbar) IsTruthy() bool
- func (obj *Toolbar) MarshalJSON() ([]byte, error)
- func (obj *Toolbar) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *Toolbar) SetAttr(name string, value object.Object) error
- func (obj *Toolbar) Type() object.Type
- type ToolbarAction
- func (obj *ToolbarAction) Attrs() []object.AttrSpec
- func (obj *ToolbarAction) Equals(other object.Object) bool
- func (obj *ToolbarAction) GetAttr(name string) (object.Object, bool)
- func (obj *ToolbarAction) Inspect() string
- func (obj *ToolbarAction) Interface() interface{}
- func (obj *ToolbarAction) IsTruthy() bool
- func (obj *ToolbarAction) MarshalJSON() ([]byte, error)
- func (obj *ToolbarAction) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *ToolbarAction) SetAttr(name string, value object.Object) error
- func (obj *ToolbarAction) Type() object.Type
- type ToolbarSeparator
- func (obj *ToolbarSeparator) Attrs() []object.AttrSpec
- func (obj *ToolbarSeparator) Equals(other object.Object) bool
- func (obj *ToolbarSeparator) GetAttr(name string) (object.Object, bool)
- func (obj *ToolbarSeparator) Inspect() string
- func (obj *ToolbarSeparator) Interface() interface{}
- func (obj *ToolbarSeparator) IsTruthy() bool
- func (obj *ToolbarSeparator) MarshalJSON() ([]byte, error)
- func (obj *ToolbarSeparator) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *ToolbarSeparator) SetAttr(name string, value object.Object) error
- func (obj *ToolbarSeparator) Type() object.Type
- type ToolbarSpacer
- func (obj *ToolbarSpacer) Attrs() []object.AttrSpec
- func (obj *ToolbarSpacer) Equals(other object.Object) bool
- func (obj *ToolbarSpacer) GetAttr(name string) (object.Object, bool)
- func (obj *ToolbarSpacer) Inspect() string
- func (obj *ToolbarSpacer) Interface() interface{}
- func (obj *ToolbarSpacer) IsTruthy() bool
- func (obj *ToolbarSpacer) MarshalJSON() ([]byte, error)
- func (obj *ToolbarSpacer) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (obj *ToolbarSpacer) SetAttr(name string, value object.Object) error
- func (obj *ToolbarSpacer) Type() object.Type
- type Tree
- func (t *Tree) Attrs() []object.AttrSpec
- func (t *Tree) CanvasObject() fyne.CanvasObject
- func (t *Tree) Cost() int
- func (t *Tree) Equals(other object.Object) bool
- func (t *Tree) GetAttr(name string) (object.Object, bool)
- func (t *Tree) Inspect() string
- func (t *Tree) Interface() interface{}
- func (t *Tree) IsTruthy() bool
- func (t *Tree) MarshalJSON() ([]byte, error)
- func (t *Tree) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
- func (t *Tree) SetAttr(name string, value object.Object) error
- func (t *Tree) Type() object.Type
- type WindowInterface
Constants ¶
const AccordionItemType object.Type = "widget.AccordionItem"
const AccordionType object.Type = "widget.Accordion"
const ActivityType object.Type = "widget.Activity"
const ButtonType object.Type = "widget.Button"
const CalendarType object.Type = "widget.Calendar"
const CardType object.Type = "widget.Card"
const CheckGroupType object.Type = "widget.CheckGroup"
const CheckType object.Type = "widget.Check"
const DateEntryType object.Type = "widget.DateEntry"
const EntryType object.Type = "widget.Entry"
const FileIconType object.Type = "widget.FileIcon"
const FormItemType object.Type = "widget.FormItem"
const FormType object.Type = "widget.Form"
const GridWrapType object.Type = "widget.GridWrap"
const HyperlinkType object.Type = "widget.Hyperlink"
const IconType object.Type = "widget.Icon"
const LabelType object.Type = "widget.Label"
const ListType object.Type = "widget.List"
const LogType object.Type = "widget.Log"
const MarkdownType object.Type = "widget.Markdown"
const MenuItemType object.Type = "fyne.MenuItem"
const PopUpMenuType object.Type = "widget.PopUpMenu"
const PopUpType object.Type = "widget.PopUp"
const ProgressBarInfiniteType object.Type = "widget.ProgressBarInfinite"
const ProgressBarType object.Type = "widget.ProgressBar"
const RadioGroupType object.Type = "widget.RadioGroup"
const RichTextType object.Type = "widget.RichText"
const SelectEntryType object.Type = "widget.SelectEntry"
const SelectType object.Type = "widget.Select"
const SeparatorType object.Type = "widget.Separator"
const SliderType object.Type = "widget.Slider"
const TableType object.Type = "widget.Table"
const TextGridType object.Type = "widget.TextGrid"
const TextStyleType object.Type = "widget.TextStyle"
const ToolbarActionType object.Type = "widget.ToolbarAction"
ToolbarAction wraps a toolbar action button
const ToolbarSeparatorType object.Type = "widget.ToolbarSeparator"
ToolbarSeparator wraps a toolbar separator
const ToolbarSpacerType object.Type = "widget.ToolbarSpacer"
ToolbarSpacer wraps a toolbar spacer
const ToolbarType object.Type = "widget.Toolbar"
const TreeType object.Type = "widget.Tree"
Variables ¶
This section is empty.
Functions ¶
func GetThemeResource ¶
GetThemeResource maps string names to theme icon resources
func NewFileIcon ¶
func NewMenuItem ¶
func NewMenuItemSeparator ¶
func NewModalPopUp ¶
func NewPopUpMenu ¶
func NewRichText ¶
Types ¶
type Accordion ¶
type Accordion struct {
// contains filtered or unexported fields
}
func NewAccordion ¶
func NewAccordion(items ...*widget.AccordionItem) *Accordion
func (*Accordion) CanvasObject ¶
func (obj *Accordion) CanvasObject() fyne.CanvasObject
func (*Accordion) MarshalJSON ¶
func (*Accordion) RunOperation ¶
type AccordionItem ¶
type AccordionItem struct {
// contains filtered or unexported fields
}
AccordionItem wraps a Fyne AccordionItem
func NewAccordionItem ¶
func NewAccordionItem(title string, detail string, content fyne.CanvasObject) *AccordionItem
func (*AccordionItem) Attrs ¶
func (obj *AccordionItem) Attrs() []object.AttrSpec
func (*AccordionItem) GetAttr ¶
func (obj *AccordionItem) GetAttr(name string) (object.Object, bool)
func (*AccordionItem) Inspect ¶
func (obj *AccordionItem) Inspect() string
func (*AccordionItem) Interface ¶
func (obj *AccordionItem) Interface() interface{}
func (*AccordionItem) IsTruthy ¶
func (obj *AccordionItem) IsTruthy() bool
func (*AccordionItem) MarshalJSON ¶
func (obj *AccordionItem) MarshalJSON() ([]byte, error)
func (*AccordionItem) RunOperation ¶
func (obj *AccordionItem) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
func (*AccordionItem) SetAttr ¶
func (obj *AccordionItem) SetAttr(name string, value object.Object) error
func (*AccordionItem) Type ¶
func (obj *AccordionItem) Type() object.Type
type Activity ¶
type Activity struct {
// contains filtered or unexported fields
}
Activity wraps widget.Activity for Risor scripting
func (*Activity) CanvasObject ¶
func (obj *Activity) CanvasObject() fyne.CanvasObject
func (*Activity) MarshalJSON ¶
func (*Activity) RunOperation ¶
type Button ¶
type Button struct {
// contains filtered or unexported fields
}
func (*Button) CanvasObject ¶
func (obj *Button) CanvasObject() fyne.CanvasObject
func (*Button) MarshalJSON ¶
func (*Button) RunOperation ¶
type Calendar ¶
type Calendar struct {
// contains filtered or unexported fields
}
Calendar wraps fyne's Calendar widget
func NewCalendar ¶
func (*Calendar) CanvasObject ¶
func (obj *Calendar) CanvasObject() fyne.CanvasObject
func (*Calendar) MarshalJSON ¶
func (*Calendar) RunOperation ¶
type Card ¶
type Card struct {
// contains filtered or unexported fields
}
Card wraps widget.Card for Risor scripting
func NewCard ¶
func NewCard(title, subtitle string, content fyne.CanvasObject) *Card
NewCard creates a new card widget
func (*Card) CanvasObject ¶
func (obj *Card) CanvasObject() fyne.CanvasObject
func (*Card) MarshalJSON ¶
func (*Card) RunOperation ¶
type Check ¶
type Check struct {
// contains filtered or unexported fields
}
func NewCheckWithData ¶
func (*Check) CanvasObject ¶
func (obj *Check) CanvasObject() fyne.CanvasObject
func (*Check) MarshalJSON ¶
func (*Check) RunOperation ¶
type CheckGroup ¶
type CheckGroup struct {
// contains filtered or unexported fields
}
func NewCheckGroup ¶
func NewCheckGroup(options []string, checked func([]string)) *CheckGroup
func (*CheckGroup) Attrs ¶
func (obj *CheckGroup) Attrs() []object.AttrSpec
func (*CheckGroup) CanvasObject ¶
func (obj *CheckGroup) CanvasObject() fyne.CanvasObject
func (*CheckGroup) Inspect ¶
func (obj *CheckGroup) Inspect() string
func (*CheckGroup) Interface ¶
func (obj *CheckGroup) Interface() interface{}
func (*CheckGroup) IsTruthy ¶
func (obj *CheckGroup) IsTruthy() bool
func (*CheckGroup) MarshalJSON ¶
func (obj *CheckGroup) MarshalJSON() ([]byte, error)
func (*CheckGroup) RunOperation ¶
func (obj *CheckGroup) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
func (*CheckGroup) Type ¶
func (obj *CheckGroup) Type() object.Type
type DateEntry ¶
type DateEntry struct {
// contains filtered or unexported fields
}
DateEntry wraps fyne's Entry widget with date picker (Fyne v2.6+)
func NewDateEntry ¶
func NewDateEntry(w WindowInterface) *DateEntry
func (*DateEntry) CanvasObject ¶
func (obj *DateEntry) CanvasObject() fyne.CanvasObject
func (*DateEntry) MarshalJSON ¶
func (*DateEntry) RunOperation ¶
type Entry ¶
type Entry struct {
// contains filtered or unexported fields
}
func NewEntry ¶
func NewEntry(w WindowInterface) *Entry
func NewEntryWithData ¶
func NewEntryWithData(data interface{ Get() (string, error) }, w WindowInterface) *Entry
NewEntryWithData creates a new entry bound to a string data binding (bi-directional)
func NewMultiLineEntry ¶
func NewMultiLineEntry() *Entry
func (*Entry) CanvasObject ¶
func (obj *Entry) CanvasObject() fyne.CanvasObject
func (*Entry) MarshalJSON ¶
func (*Entry) RunOperation ¶
type FileIcon ¶
type FileIcon struct {
// contains filtered or unexported fields
}
FileIcon wraps fyne's FileIcon widget - displays an icon for files and folders.
FileIcon shows a visual representation of a file or folder with an appropriate icon based on the file type or path.
Example usage in Risor:
let icon = widget.NewFileIcon("file:///home/user/document.pdf")
window.SetContent(icon)
// Update to different file
icon.SetURI("file:///home/user/image.png")
The icon automatically selects the appropriate visual based on file extension.
func (*FileIcon) CanvasObject ¶
func (obj *FileIcon) CanvasObject() fyne.CanvasObject
func (*FileIcon) MarshalJSON ¶
func (*FileIcon) RunOperation ¶
type Form ¶
type Form struct {
// contains filtered or unexported fields
}
func (*Form) CanvasObject ¶
func (obj *Form) CanvasObject() fyne.CanvasObject
func (*Form) MarshalJSON ¶
func (*Form) RunOperation ¶
type FormItem ¶
type FormItem struct {
// contains filtered or unexported fields
}
func NewFormItem ¶
func NewFormItem(label string, item fyne.CanvasObject) *FormItem
func (*FormItem) MarshalJSON ¶
func (*FormItem) RunOperation ¶
type GenericCanvasObject ¶
type GenericCanvasObject struct {
// contains filtered or unexported fields
}
GenericCanvasObject is a minimal wrapper for canvas objects we don't have full bindings for
func (*GenericCanvasObject) Attrs ¶
func (g *GenericCanvasObject) Attrs() []object.AttrSpec
func (*GenericCanvasObject) Cost ¶
func (g *GenericCanvasObject) Cost() int
func (*GenericCanvasObject) GetAttr ¶
func (g *GenericCanvasObject) GetAttr(name string) (object.Object, bool)
func (*GenericCanvasObject) Inspect ¶
func (g *GenericCanvasObject) Inspect() string
func (*GenericCanvasObject) Interface ¶
func (g *GenericCanvasObject) Interface() interface{}
func (*GenericCanvasObject) IsTruthy ¶
func (g *GenericCanvasObject) IsTruthy() bool
func (*GenericCanvasObject) MarshalJSON ¶
func (g *GenericCanvasObject) MarshalJSON() ([]byte, error)
func (*GenericCanvasObject) RunOperation ¶
func (g *GenericCanvasObject) RunOperation(op.BinaryOpType, object.Object) (object.Object, error)
func (*GenericCanvasObject) SetAttr ¶
func (g *GenericCanvasObject) SetAttr(name string, value object.Object) error
func (*GenericCanvasObject) Type ¶
func (g *GenericCanvasObject) Type() object.Type
type GridWrap ¶
type GridWrap struct {
// contains filtered or unexported fields
}
GridWrap wraps fyne's GridWrap widget - a grid layout with virtualized rendering.
GridWrap efficiently displays many items in a grid by only rendering visible items. It requires three callback functions to provide data:
- Length(): Returns total item count
- CreateItem(): Creates a template widget
- UpdateItem(id, item): Populates a specific item
Example usage in Risor:
let grid = widget.NewGridWrap()
grid.Length(() => 100)
grid.CreateItem(() => widget.NewLabel(""))
grid.UpdateItem((id, item) => {
item.SetText(sprintf("Item %d", id))
})
grid.Refresh()
Supports selection with OnSelected/OnUnselected callbacks.
func NewGridWrap ¶
func NewGridWrap(w WindowInterface) *GridWrap
func (*GridWrap) CanvasObject ¶
func (obj *GridWrap) CanvasObject() fyne.CanvasObject
func (*GridWrap) MarshalJSON ¶
func (*GridWrap) RunOperation ¶
type Hyperlink ¶
type Hyperlink struct {
// contains filtered or unexported fields
}
Hyperlink wraps widget.Hyperlink for Risor scripting
func NewHyperlink ¶
func NewHyperlink(text, urlStr string, w WindowInterface) (*Hyperlink, error)
NewHyperlink creates a new hyperlink widget
func (*Hyperlink) CanvasObject ¶
func (obj *Hyperlink) CanvasObject() fyne.CanvasObject
func (*Hyperlink) MarshalJSON ¶
func (*Hyperlink) RunOperation ¶
type Icon ¶
type Icon struct {
// contains filtered or unexported fields
}
Icon wraps widget.Icon for Risor scripting
func (*Icon) CanvasObject ¶
func (obj *Icon) CanvasObject() fyne.CanvasObject
func (*Icon) MarshalJSON ¶
func (*Icon) RunOperation ¶
type IsCanvasObject ¶
type IsCanvasObject interface {
CanvasObject() fyne.CanvasObject
}
IsCanvasObject interface for objects that can be converted to fyne.CanvasObject
type Label ¶
type Label struct {
// contains filtered or unexported fields
}
func NewLabelWithData ¶
func (*Label) CanvasObject ¶
func (obj *Label) CanvasObject() fyne.CanvasObject
func (*Label) MarshalJSON ¶
func (*Label) RunOperation ¶
type List ¶
type List struct {
// contains filtered or unexported fields
}
List wraps fyne's List widget - a scrolling list with virtualized rendering
func NewList ¶
func NewList(w WindowInterface) *List
func (*List) CanvasObject ¶
func (obj *List) CanvasObject() fyne.CanvasObject
func (*List) MarshalJSON ¶
func (*List) RunOperation ¶
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
func (*Log) CanvasObject ¶
func (obj *Log) CanvasObject() fyne.CanvasObject
func (*Log) MarshalJSON ¶
func (*Log) RunOperation ¶
type Markdown ¶
type Markdown struct {
// contains filtered or unexported fields
}
func NewMarkdown ¶
func (*Markdown) CanvasObject ¶
func (obj *Markdown) CanvasObject() fyne.CanvasObject
func (*Markdown) MarshalJSON ¶
func (*Markdown) RunOperation ¶
type MenuItem ¶
type MenuItem struct {
// contains filtered or unexported fields
}
MenuItem wraps fyne's MenuItem - a single item in a menu.
MenuItem represents one entry in a menu with a label and optional action callback.
Example usage in Risor:
let item1 = fyne.NewMenuItem("Open", () => { print("Open clicked") })
let item2 = fyne.NewMenuItem("Save", () => { print("Save clicked") })
let separator = fyne.NewMenuItemSeparator()
Properties:
- Label: Item text
- Disabled: Whether item is disabled
- Checked: Whether item shows checkmark
func (*MenuItem) MarshalJSON ¶
func (*MenuItem) RunOperation ¶
type PopUp ¶
type PopUp struct {
// contains filtered or unexported fields
}
PopUp wraps fyne's PopUp widget - a floating overlay above the UI.
PopUp displays content in a floating window above other widgets with a shadow. Can be modal (blocks interaction) or non-modal.
Example usage in Risor:
let content = container.NewVBox(
widget.NewLabel("This is a popup!"),
widget.NewButton("Close", () => popup.Hide())
)
let popup = widget.NewPopUp(content, window.Canvas)
popup.Show()
// Modal popup (blocks interaction with background)
let modal = widget.NewModalPopUp(content, window.Canvas)
modal.Show()
Methods:
- Show(): Display the popup
- Hide(): Hide the popup
- ShowAtPosition(x, y): Show at specific screen coordinates
func (*PopUp) CanvasObject ¶
func (obj *PopUp) CanvasObject() fyne.CanvasObject
func (*PopUp) MarshalJSON ¶
func (*PopUp) RunOperation ¶
type PopUpMenu ¶
type PopUpMenu struct {
// contains filtered or unexported fields
}
PopUpMenu wraps fyne's PopUpMenu widget - a menu displayed in an overlay.
PopUpMenu displays a menu in a floating overlay, commonly used for context menus.
Example usage in Risor:
let item1 = fyne.NewMenuItem("Copy", () => { print("Copy") })
let item2 = fyne.NewMenuItem("Paste", () => { print("Paste") })
let menu = fyne.NewMenu("Edit", item1, item2)
let popupMenu = widget.NewPopUpMenu(menu, window.Canvas)
popupMenu.ShowAtPosition(100, 100)
Methods:
- Show(): Display the menu
- Hide(): Hide the menu
- ShowAtPosition(x, y): Show at specific coordinates
func (*PopUpMenu) CanvasObject ¶
func (obj *PopUpMenu) CanvasObject() fyne.CanvasObject
func (*PopUpMenu) MarshalJSON ¶
func (*PopUpMenu) RunOperation ¶
type ProgressBar ¶
type ProgressBar struct {
// contains filtered or unexported fields
}
ProgressBar wraps widget.ProgressBar for Risor scripting
func NewProgressBar ¶
func NewProgressBar() *ProgressBar
NewProgressBar creates a new progress bar (default Min=0, Max=1)
func NewProgressBarWithData ¶
func NewProgressBarWithData(data interface{ Get() (float64, error) }) *ProgressBar
NewProgressBarWithData creates a new progress bar bound to a float data binding
func (*ProgressBar) Attrs ¶
func (obj *ProgressBar) Attrs() []object.AttrSpec
func (*ProgressBar) CanvasObject ¶
func (obj *ProgressBar) CanvasObject() fyne.CanvasObject
func (*ProgressBar) Cost ¶
func (obj *ProgressBar) Cost() int
func (*ProgressBar) Inspect ¶
func (obj *ProgressBar) Inspect() string
func (*ProgressBar) Interface ¶
func (obj *ProgressBar) Interface() interface{}
func (*ProgressBar) IsTruthy ¶
func (obj *ProgressBar) IsTruthy() bool
func (*ProgressBar) MarshalJSON ¶
func (obj *ProgressBar) MarshalJSON() ([]byte, error)
func (*ProgressBar) RunOperation ¶
func (obj *ProgressBar) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
func (*ProgressBar) SetAttr ¶
func (obj *ProgressBar) SetAttr(name string, value object.Object) error
func (*ProgressBar) Type ¶
func (obj *ProgressBar) Type() object.Type
type ProgressBarInfinite ¶
type ProgressBarInfinite struct {
// contains filtered or unexported fields
}
ProgressBarInfinite wraps widget.ProgressBarInfinite for Risor scripting
func NewProgressBarInfinite ¶
func NewProgressBarInfinite() *ProgressBarInfinite
NewProgressBarInfinite creates a new infinite progress bar
func (*ProgressBarInfinite) Attrs ¶
func (obj *ProgressBarInfinite) Attrs() []object.AttrSpec
func (*ProgressBarInfinite) CanvasObject ¶
func (obj *ProgressBarInfinite) CanvasObject() fyne.CanvasObject
func (*ProgressBarInfinite) Cost ¶
func (obj *ProgressBarInfinite) Cost() int
func (*ProgressBarInfinite) Equals ¶
func (obj *ProgressBarInfinite) Equals(other object.Object) bool
func (*ProgressBarInfinite) GetAttr ¶
func (obj *ProgressBarInfinite) GetAttr(name string) (object.Object, bool)
func (*ProgressBarInfinite) Inspect ¶
func (obj *ProgressBarInfinite) Inspect() string
func (*ProgressBarInfinite) Interface ¶
func (obj *ProgressBarInfinite) Interface() interface{}
func (*ProgressBarInfinite) IsTruthy ¶
func (obj *ProgressBarInfinite) IsTruthy() bool
func (*ProgressBarInfinite) MarshalJSON ¶
func (obj *ProgressBarInfinite) MarshalJSON() ([]byte, error)
func (*ProgressBarInfinite) RunOperation ¶
func (obj *ProgressBarInfinite) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
func (*ProgressBarInfinite) SetAttr ¶
func (obj *ProgressBarInfinite) SetAttr(name string, value object.Object) error
func (*ProgressBarInfinite) Type ¶
func (obj *ProgressBarInfinite) Type() object.Type
type RadioGroup ¶
type RadioGroup struct {
// contains filtered or unexported fields
}
func NewRadioGroup ¶
func NewRadioGroup(options []string, onChange func(string)) *RadioGroup
func (*RadioGroup) Attrs ¶
func (obj *RadioGroup) Attrs() []object.AttrSpec
func (*RadioGroup) CanvasObject ¶
func (obj *RadioGroup) CanvasObject() fyne.CanvasObject
func (*RadioGroup) Inspect ¶
func (obj *RadioGroup) Inspect() string
func (*RadioGroup) Interface ¶
func (obj *RadioGroup) Interface() interface{}
func (*RadioGroup) IsTruthy ¶
func (obj *RadioGroup) IsTruthy() bool
func (*RadioGroup) MarshalJSON ¶
func (obj *RadioGroup) MarshalJSON() ([]byte, error)
func (*RadioGroup) RunOperation ¶
func (obj *RadioGroup) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
func (*RadioGroup) Type ¶
func (obj *RadioGroup) Type() object.Type
type RichText ¶
type RichText struct {
// contains filtered or unexported fields
}
RichText wraps fyne's RichText widget - formatted text with markdown support.
RichText displays formatted text with support for bold, italic, headers, links, lists, and more through markdown parsing. Direct segment manipulation is not exposed in Risor bindings - use ParseMarkdown() instead.
Example usage in Risor:
let text = widget.NewRichText(`# Welcome
This supports **bold** and *italic* text, as well as [links](https://example.com).
`)
// Update content dynamically
text.ParseMarkdown("## New Content\n\nWith different **formatting**.")
// Control wrapping
text.Wrapping = 2 // 0=off, 1=break, 2=word
Properties:
- Wrapping: Text wrap mode (0=off, 1=break, 2=word)
- Truncation: Truncation mode (0=off, 1=clip, 2=ellipsis)
- Scroll: Scroll direction (0=none, 1=horizontal, 2=vertical, 3=both)
Note: Complex segment types (Image, List, Paragraph) not fully supported. Use ParseMarkdown() for rich formatting.
func (*RichText) CanvasObject ¶
func (obj *RichText) CanvasObject() fyne.CanvasObject
func (*RichText) MarshalJSON ¶
func (*RichText) RunOperation ¶
type Select ¶
type Select struct {
// contains filtered or unexported fields
}
func (*Select) CanvasObject ¶
func (obj *Select) CanvasObject() fyne.CanvasObject
func (*Select) MarshalJSON ¶
func (*Select) RunOperation ¶
type SelectEntry ¶
type SelectEntry struct {
// contains filtered or unexported fields
}
SelectEntry wraps fyne's SelectEntry widget - a searchable dropdown entry
func NewSelectEntry ¶
func NewSelectEntry(w WindowInterface, options []string, onChanged func(string)) *SelectEntry
func (*SelectEntry) Attrs ¶
func (obj *SelectEntry) Attrs() []object.AttrSpec
func (*SelectEntry) CanvasObject ¶
func (obj *SelectEntry) CanvasObject() fyne.CanvasObject
func (*SelectEntry) Cost ¶
func (obj *SelectEntry) Cost() int
func (*SelectEntry) Inspect ¶
func (obj *SelectEntry) Inspect() string
func (*SelectEntry) Interface ¶
func (obj *SelectEntry) Interface() interface{}
func (*SelectEntry) IsTruthy ¶
func (obj *SelectEntry) IsTruthy() bool
func (*SelectEntry) MarshalJSON ¶
func (obj *SelectEntry) MarshalJSON() ([]byte, error)
func (*SelectEntry) RunOperation ¶
func (obj *SelectEntry) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
func (*SelectEntry) SetAttr ¶
func (obj *SelectEntry) SetAttr(name string, value object.Object) error
func (*SelectEntry) Type ¶
func (obj *SelectEntry) Type() object.Type
type Separator ¶
type Separator struct {
// contains filtered or unexported fields
}
Separator wraps widget.Separator for Risor scripting
func (*Separator) CanvasObject ¶
func (obj *Separator) CanvasObject() fyne.CanvasObject
func (*Separator) MarshalJSON ¶
func (*Separator) RunOperation ¶
type Slider ¶
type Slider struct {
// contains filtered or unexported fields
}
Slider wraps widget.Slider for Risor scripting
func NewSlider ¶
func NewSlider(min, max float64, w WindowInterface) *Slider
NewSlider creates a new slider with min and max values
func NewSliderWithData ¶
func NewSliderWithData(min, max float64, data interface{ Get() (float64, error) }, w WindowInterface) *Slider
func (*Slider) CanvasObject ¶
func (obj *Slider) CanvasObject() fyne.CanvasObject
func (*Slider) MarshalJSON ¶
func (*Slider) RunOperation ¶
type Table ¶
type Table struct {
Columns func() []string
// contains filtered or unexported fields
}
func (*Table) CanvasObject ¶
func (obj *Table) CanvasObject() fyne.CanvasObject
func (*Table) MarshalJSON ¶
func (*Table) RunOperation ¶
type TextGrid ¶
type TextGrid struct {
// contains filtered or unexported fields
}
TextGrid wraps fyne's TextGrid widget - a monospace text grid for displaying code or tabular data.
TextGrid displays text in a fixed-width font with optional line numbers and whitespace indicators. Perfect for code editors, terminals, and tabular data.
Example usage in Risor:
let grid = widget.NewTextGrid()
grid.ShowLineNumbers = true
grid.TabWidth = 4
grid.SetText("function hello() {\n return 42\n}")
// Modify individual rows
grid.SetRow(0, "// Modified first line")
let text = grid.Row(0)
let count = grid.RowCount()
Properties:
- Text: Full text content
- TabWidth: Number of spaces per tab (default: 4)
- ShowLineNumbers: Display line numbers
- ShowWhitespace: Display tabs and spaces
func (*TextGrid) CanvasObject ¶
func (obj *TextGrid) CanvasObject() fyne.CanvasObject
func (*TextGrid) MarshalJSON ¶
func (*TextGrid) RunOperation ¶
type TextStyle ¶
type TextStyle struct {
// contains filtered or unexported fields
}
TextStyle wraps fyne.TextStyle and provides access to Bold, Italic, Monospace, etc.
func (*TextStyle) MarshalJSON ¶
func (*TextStyle) RunOperation ¶
type Toolbar ¶
type Toolbar struct {
// contains filtered or unexported fields
}
func NewToolbar ¶
func NewToolbar(items ...widget.ToolbarItem) *Toolbar
func (*Toolbar) CanvasObject ¶
func (obj *Toolbar) CanvasObject() fyne.CanvasObject
func (*Toolbar) MarshalJSON ¶
func (*Toolbar) RunOperation ¶
type ToolbarAction ¶
type ToolbarAction struct {
// contains filtered or unexported fields
}
func NewToolbarAction ¶
func NewToolbarAction(icon fyne.Resource, onActivated func()) *ToolbarAction
func (*ToolbarAction) Attrs ¶
func (obj *ToolbarAction) Attrs() []object.AttrSpec
func (*ToolbarAction) GetAttr ¶
func (obj *ToolbarAction) GetAttr(name string) (object.Object, bool)
func (*ToolbarAction) Inspect ¶
func (obj *ToolbarAction) Inspect() string
func (*ToolbarAction) Interface ¶
func (obj *ToolbarAction) Interface() interface{}
func (*ToolbarAction) IsTruthy ¶
func (obj *ToolbarAction) IsTruthy() bool
func (*ToolbarAction) MarshalJSON ¶
func (obj *ToolbarAction) MarshalJSON() ([]byte, error)
func (*ToolbarAction) RunOperation ¶
func (obj *ToolbarAction) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
func (*ToolbarAction) SetAttr ¶
func (obj *ToolbarAction) SetAttr(name string, value object.Object) error
func (*ToolbarAction) Type ¶
func (obj *ToolbarAction) Type() object.Type
type ToolbarSeparator ¶
type ToolbarSeparator struct {
// contains filtered or unexported fields
}
func NewToolbarSeparator ¶
func NewToolbarSeparator() *ToolbarSeparator
func (*ToolbarSeparator) Attrs ¶
func (obj *ToolbarSeparator) Attrs() []object.AttrSpec
func (*ToolbarSeparator) GetAttr ¶
func (obj *ToolbarSeparator) GetAttr(name string) (object.Object, bool)
func (*ToolbarSeparator) Inspect ¶
func (obj *ToolbarSeparator) Inspect() string
func (*ToolbarSeparator) Interface ¶
func (obj *ToolbarSeparator) Interface() interface{}
func (*ToolbarSeparator) IsTruthy ¶
func (obj *ToolbarSeparator) IsTruthy() bool
func (*ToolbarSeparator) MarshalJSON ¶
func (obj *ToolbarSeparator) MarshalJSON() ([]byte, error)
func (*ToolbarSeparator) RunOperation ¶
func (obj *ToolbarSeparator) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
func (*ToolbarSeparator) SetAttr ¶
func (obj *ToolbarSeparator) SetAttr(name string, value object.Object) error
func (*ToolbarSeparator) Type ¶
func (obj *ToolbarSeparator) Type() object.Type
type ToolbarSpacer ¶
type ToolbarSpacer struct {
// contains filtered or unexported fields
}
func NewToolbarSpacer ¶
func NewToolbarSpacer() *ToolbarSpacer
func (*ToolbarSpacer) Attrs ¶
func (obj *ToolbarSpacer) Attrs() []object.AttrSpec
func (*ToolbarSpacer) GetAttr ¶
func (obj *ToolbarSpacer) GetAttr(name string) (object.Object, bool)
func (*ToolbarSpacer) Inspect ¶
func (obj *ToolbarSpacer) Inspect() string
func (*ToolbarSpacer) Interface ¶
func (obj *ToolbarSpacer) Interface() interface{}
func (*ToolbarSpacer) IsTruthy ¶
func (obj *ToolbarSpacer) IsTruthy() bool
func (*ToolbarSpacer) MarshalJSON ¶
func (obj *ToolbarSpacer) MarshalJSON() ([]byte, error)
func (*ToolbarSpacer) RunOperation ¶
func (obj *ToolbarSpacer) RunOperation(opType op.BinaryOpType, right object.Object) (object.Object, error)
func (*ToolbarSpacer) SetAttr ¶
func (obj *ToolbarSpacer) SetAttr(name string, value object.Object) error
func (*ToolbarSpacer) Type ¶
func (obj *ToolbarSpacer) Type() object.Type
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
func NewTree ¶
func NewTree(w WindowInterface) *Tree
func (*Tree) CanvasObject ¶
func (t *Tree) CanvasObject() fyne.CanvasObject
func (*Tree) MarshalJSON ¶
func (*Tree) RunOperation ¶
type WindowInterface ¶
type WindowInterface interface {
Do(fn func())
}
WindowInterface defines the interface that widgets need from the Window type to dispatch callbacks to the main goroutine
Source Files
¶
- accordion.go
- activity.go
- button.go
- calendar.go
- card.go
- check.go
- checkgroup.go
- dateentry.go
- doc.go
- entry.go
- fileicon.go
- form.go
- formitem.go
- gridwrap.go
- hyperlink.go
- icon.go
- interfaces.go
- label.go
- list.go
- log.go
- markdown.go
- menuitem.go
- popup.go
- popupmenu.go
- progressbar.go
- progressbarinfinite.go
- radiogroup.go
- richtext.go
- select.go
- selectentry.go
- separator.go
- slider.go
- table.go
- textgrid.go
- textstyle.go
- toolbar.go
- tree.go