Documentation
¶
Overview ¶
Package toolkit provides a pure-Go widget set for wasmdesk native apps. Widgets render per-pixel into an RGBA byte buffer (the SAB backed framebuffer wasmbox clients write to) and dispatch input events received from the wasmbox compositor.
Design notes:
- Every widget exposes the same three-method interface, so a container (HBox, VBox, ScrollView, ...) can hold any leaf.
- Drawing is allocation-free in the steady state: the widget writes into a caller-owned RGBA slice + reads its theme by reference. Per-frame work is bounded by the widget's bbox.
- Coordinates are integer pixels in the caller's surface space; the widget's Rect is its placement within that surface.
- Events are pre-translated into widget-local (X, Y) before dispatch by the parent container (HBox/VBox/ScrollView do the hit-testing + offset adjustment).
Index ¶
- Constants
- func DaysInMonth(year, month int) int
- func DeleteSelection(lines []string, sel Selection) []string
- func DrawIconCopy(p painter.Painter, r Rect, ink RGBA)
- func DrawIconCut(p painter.Painter, r Rect, ink RGBA)
- func DrawIconNew(p painter.Painter, r Rect, ink RGBA)
- func DrawIconOpen(p painter.Painter, r Rect, ink RGBA)
- func DrawIconPaste(p painter.Painter, r Rect, ink RGBA)
- func DrawIconRedo(p painter.Painter, r Rect, ink RGBA)
- func DrawIconSave(p painter.Painter, r Rect, ink RGBA)
- func DrawIconSearch(p painter.Painter, r Rect, ink RGBA)
- func DrawIconSettings(p painter.Painter, r Rect, ink RGBA)
- func DrawIconUndo(p painter.Painter, r Rect, ink RGBA)
- func DrawText(p painter.Painter, x, y int, text string, ink RGBA)
- func SelectionText(lines []string, sel Selection) string
- func TextWidth(text string) int
- func WeekdayOfFirst(year, month int) int
- type Base
- type Button
- type Calendar
- type CheckButton
- type ColorChooser
- type Dialog
- type DropDown
- type Entry
- type Event
- type EventKind
- type Expander
- type FileChooser
- type Frame
- type Grid
- type HBox
- type Image
- type Label
- type LevelBar
- type ListBox
- type Menu
- type MenuBar
- func (b *MenuBar) AddMenu(name string, m *Menu)
- func (b *MenuBar) Draw(p painter.Painter, theme *Theme)
- func (b *MenuBar) HandleShortcut(code string) bool
- func (b *MenuBar) Mnemonic(i int) byte
- func (b *MenuBar) NameOriginX(i int) int
- func (b *MenuBar) NameWidth(i int) int
- func (b *MenuBar) OnEvent(ev Event)
- type MenuItem
- type Notebook
- type NotebookTab
- type Notification
- type Paned
- type ProgressBar
- type RGBA
- type RadioButton
- type RadioGroup
- type Rect
- type Scale
- type ScrollView
- type Selection
- type SpinButton
- type Spinner
- type Stack
- type Statusbar
- type TextView
- func (t *TextView) ClearSelection()
- func (t *TextView) CopySelection() string
- func (t *TextView) CutSelection() string
- func (t *TextView) DeleteSelection()
- func (t *TextView) Draw(p painter.Painter, theme *Theme)
- func (t *TextView) HasSelection() bool
- func (t *TextView) OnEvent(ev Event)
- func (t *TextView) Paste(text string)
- func (t *TextView) SelectAll()
- func (t *TextView) SelectionText() string
- func (t *TextView) SetSelection(sel Selection)
- func (t *TextView) SetText(s string)
- func (t *TextView) Text() string
- type Theme
- type ToggleButton
- type Toolbar
- type ToolbarItem
- type Tooltip
- type TreeNode
- type TreeView
- type VBox
- type Widget
Constants ¶
const ( CalendarHeaderH = 22 CalendarCellW = 24 CalendarCellH = 18 )
Sizing.
const ( ColorChooserChannelH = 22 ColorChooserPreviewH = 36 ColorChooserPadX = 8 ColorChooserChannelPadY = 4 )
Sizing.
const ( FileChooserTreeRatio = 35 // % of width for the tree pane FileChooserButtonStripH = 32 FileChooserPathH = 24 )
Sizing constants.
const ( NotebookTabStripH = 24 NotebookTabWidth = 80 )
Geometry constants for the tab strip.
const ( NotificationPadX = 12 NotificationPadY = 8 NotificationLife = 180 )
NotificationPadX / NotificationPadY / NotificationLife are the visual + timing defaults; a caller wanting shorter or louder toasts overrides them per-instance (via SetBounds + direct Life assignment).
const ( PanedHorizontal = 0 // First left, Second right PanedVertical = 1 // First top, Second bottom )
Paned orientations.
const ( StatusbarH = 18 StatusbarSegmentMinW = 80 StatusbarPadX = 6 )
Sizing constants.
const ( ToolbarButtonW = 24 ToolbarButtonH = 24 ToolbarSepW = 8 )
Sizing constants. Square buttons read as a true icon-toolbar (vs the MenuBar's wider text cells).
const ( TooltipPadX = 8 TooltipPadY = 4 )
TooltipPadX / TooltipPadY are the inner text-padding constants.
const DialogButtonStripH = 32
DialogButtonStripH is the pixel height of the bottom action strip.
const DialogButtonW = 90
DialogButtonW is the width allocated per action button.
const DialogTitleH = 28
DialogTitleH is the pixel height of the title bar.
const ExpanderHeaderH = 24
ExpanderHeaderH is the pixel height of the clickable header row.
const GlyphAdvance = 6
GlyphAdvance is the horizontal step from one glyph's origin to the next (5px glyph body + 1px inter-glyph spacing). All glyphs share the same advance so layout stays grid-aligned even with proportional shapes.
const GlyphHeight = 7
GlyphHeight is the per-glyph vertical extent in pixels.
const MenuBarH = 22
MenuBarH is the pixel height of the bar strip.
const MenuBarItemPadX = 8
MenuBarItemPadX is the horizontal padding around a top-level name when its natural width exceeds MenuBarItemW — i.e. the extra breathing room beyond the raw glyph run.
const MenuBarItemW = 60
MenuBarItemW is the DEFAULT (minimum) pixel width allocated per top-level name. Names whose TextWidth exceeds this bound scale up (with 2×MenuBarItemPadX horizontal padding on each side); shorter names take exactly this width so the bar looks stable across varying label lengths.
const MenuRowH = 22
MenuRowH is the pixel height of a menu row.
const MenuSeparatorH = 6
MenuSeparatorH is the height of a separator row.
const PanedHandleW = 6
PanedHandleW is the pixel thickness of the splitter handle.
const PopoverMaxRows = 12
PopoverMaxRows caps the dropdown popover height; longer option lists can wrap in a ScrollView the caller supplies.
const TreeChevronW = 14
TreeChevronW is the pixel column the chevron lives in.
const TreeIndentW = 16
TreeIndentW is the per-depth pixel indent.
Variables ¶
This section is empty.
Functions ¶
func DaysInMonth ¶
DaysInMonth returns the day count for (year, month).
func DeleteSelection ¶
DeleteSelection removes the selected range from lines + returns the new lines slice. The result always has at least one line (an empty line at minimum).
func DrawIconCopy ¶
DrawIconCopy paints two overlapping document outlines.
func DrawIconCut ¶
DrawIconCut paints a pair-of-scissors icon (two open-circle handles + crossed blades).
func DrawIconNew ¶
DrawIconNew paints a document-outline icon (rectangle with a folded top-right corner).
func DrawIconOpen ¶
DrawIconOpen paints a folder-outline icon (rectangle with a small tab on the top-left).
func DrawIconPaste ¶
DrawIconPaste paints a clipboard outline with a clip on top.
func DrawIconRedo ¶
DrawIconRedo paints a curved arrow pointing right (mirror of Undo).
func DrawIconSave ¶
DrawIconSave paints a floppy-disk-outline icon (outer square with a small label rectangle on top).
func DrawIconSearch ¶
DrawIconSearch paints a magnifying-glass icon (a circle + a diagonal handle).
func DrawIconSettings ¶
DrawIconSettings paints a gear-outline icon (approximated as a square with corner "teeth").
func DrawIconUndo ¶
DrawIconUndo paints a curved arrow pointing left (approximated as a horizontal stroke + a triangular head).
func DrawText ¶
DrawText paints text left-to-right starting at (x, y) in widget- local coordinates. Each glyph is rendered into a 5x7 cell whose origin is (x + k*GlyphAdvance, y) for the k-th rune. Unknown characters render as a blank but still advance the cursor so column alignment is preserved.
On a *painter.PixelPainter (the WUI + GUI back-end path) DrawText uses toolkit's own 60+ glyph 5x7 bitmap font by writing one pixel per lit bit. On any other painter (a *painter.CellPainter for a TUI, an SvgPainter for vector output) DrawText delegates to the painter's own Text primitive — a CellPainter maps one rune per cell + gets terminal-native text, an SvgPainter emits <text>.
Pixels are written as opaque ink (alpha forced to 0xFF unless the caller's ink already carries an alpha) with per-pixel clipping so glyphs that overflow the painter degrade gracefully.
func SelectionText ¶
SelectionText returns the substring covered by sel in lines (a TextView's Lines slice). Empty selection returns "".
func TextWidth ¶
TextWidth returns the pixel width that DrawText would occupy if it rendered text. Every character (known or unknown) consumes one GlyphAdvance slot so callers can pre-size text containers from len(text) alone -- this matches the dock's textWidth helper.
func WeekdayOfFirst ¶
WeekdayOfFirst returns the weekday-index (0=Mon..6=Sun) of the first day of (year, month). Uses Zeller-ish congruence so we don't depend on time.Time.
Types ¶
type Base ¶
type Base struct {
// contains filtered or unexported fields
}
Base provides default Bounds/SetBounds/HitTest impls so a widget embedding it only has to implement Draw + OnEvent. Embedding is optional but convenient.
type Button ¶
Button is a clickable rectangle with a centred label. Paints a 1-pixel border in Theme.Border on a Theme.Surface body; hovered / pressed states cycle through SurfaceAlt + Accent so the user sees click feedback before the callback fires.
Wire a handler via OnClick; the button calls it from OnEvent when it receives an EventClick. Callers re-paint via Draw after any state mutation (the toolkit doesn't drive its own frame loop -- the wasmbox compositor's tick is the redraw trigger).
func NewButton ¶
NewButton constructs a Button with the given label + click handler. Handler may be nil (a no-op button is still rendered).
func (*Button) Draw ¶
Draw paints the button through p using theme's palette. Face cycles through Surface / SurfaceAlt (hovered) / Accent (pressed); the Label is centred in the body using the toolkit's 5x7 bitmap font. When the button is pressed the ink swaps to the theme's Background so the label stays legible against the Accent face.
func (*Button) OnEvent ¶
OnEvent dispatches click events to the OnClick callback. Other event kinds are ignored at this level (the parent container may have already pre-filtered).
func (*Button) SetHovered ¶
SetHovered/SetPressed are wired by the parent container's mouse dispatcher so the button can render its hover/press visual states. Direct setters (vs deducing from OnEvent kinds) keep the parent in control of state propagation -- enter/leave events would duplicate the same logic in every leaf widget.
func (*Button) SetPressed ¶
type Calendar ¶
type Calendar struct {
Base
Year int
Month int // 1..12
Day int // selected day in [1, daysInMonth]
TodayY int
TodayM int
TodayD int
OnSelect func(y, m, d int)
}
Calendar renders a month grid (Mon..Sun columns, up to 6 rows) for a given (Year, Month). The currently-selected day is highlighted; click on a day-cell selects it + fires OnSelect with the absolute (Y, M, D) triple.
Calendar takes no time-source dep; the host must pass it the current year/month/day. A "today" pill can be drawn by setting Today (year/month/day); set to (0, 0, 0) to disable it.
func NewCalendar ¶
NewCalendar builds a Calendar for the given (year, month, day).
type CheckButton ¶
CheckButton is a square checkbox + a label. Click toggles Checked + fires OnToggle. Visual: 12 x 12 px box (left-aligned), Theme.Border outline, Theme.Surface fill, Theme.Accent fill + two diagonal "checkmark" strokes in Theme.Background when Checked. Label rendered in Theme.OnBackground to the right of the box.
func NewCheckButton ¶
func NewCheckButton(label string, checked bool) *CheckButton
NewCheckButton constructs a CheckButton with the given label + initial Checked state.
func (*CheckButton) Draw ¶
func (c *CheckButton) Draw(p painter.Painter, theme *Theme)
Draw paints the box + checkmark + label.
func (*CheckButton) OnEvent ¶
func (c *CheckButton) OnEvent(ev Event)
OnEvent flips Checked + fires OnToggle on click.
type ColorChooser ¶
ColorChooser is a 3-channel R/G/B picker with a live preview. Each channel is rendered as a horizontal track with a 1-pixel knob the user drags to change the value. The OnChange callback fires with the new RGBA whenever any channel moves.
The widget owns the RGBA value; the host reads .Color() to get the current pick + may also stash a hex string via SetHex if there is a sibling Entry the user can type into.
func NewColorChooser ¶
func NewColorChooser(initial RGBA) *ColorChooser
NewColorChooser builds a chooser starting at initial. Alpha is forced to 0xFF so a freshly-constructed chooser always reads as fully-opaque.
func (*ColorChooser) Draw ¶
func (c *ColorChooser) Draw(p painter.Painter, theme *Theme)
Draw paints the 3 sliders + preview swatch + hex label.
func (*ColorChooser) OnEvent ¶
func (c *ColorChooser) OnEvent(ev Event)
OnEvent handles clicks on the 3 tracks to move the channel knob.
func (*ColorChooser) SetHex ¶
func (c *ColorChooser) SetHex(s string)
SetHex parses "#RRGGBB" or "RRGGBB" into the chooser's color. Bad input is silently ignored so a malformed Entry payload can't break the picker state.
type Dialog ¶
Dialog is a modal overlay: a centred Surface card with an optional Title bar, a Content widget filling the body, and an action-button strip at the bottom. The compositor draws a semi-darkened backdrop over the rest of the surface so the user's attention focuses on the dialog.
v0.3 ships the structure; the host app is responsible for routing input events only to the dialog while it's open (existing wasmbox modal-grab behaviour).
func NewDialog ¶
NewDialog builds a Dialog with the given title, content + action buttons. Buttons are laid out right-aligned in the bottom strip.
func NewMessageDialog ¶
NewMessageDialog is a convenience constructor for the most common dialog: a title, a Label as content, and an OK button that calls onOK + closes the dialog via the caller's OnClose hook.
type DropDown ¶
DropDown is a one-of-N selector that shows the current choice in a button-like rectangle. Clicking opens a popover ListBox of all Options just below the widget; selecting one closes the popover + fires OnSelect.
Like Dialog, the popover's rendering surface is owned by the host app; the toolkit exposes Open + Selected so the host knows what to draw. This keeps DropDown independent of how the compositor handles overlay surfaces (some apps use a separate canvas, some draw the popover directly into the same buffer).
func NewDropDown ¶
NewDropDown builds a DropDown with the given options + an initial selection (clamped to a valid index, or 0 when options is empty).
func (*DropDown) Current ¶
Current returns the currently-selected option's string, or "" when Options is empty.
func (*DropDown) Draw ¶
Draw paints the closed widget. The popover, when Open, is the host app's responsibility (host can render a ListBox on top using PopoverBounds).
func (*DropDown) OnEvent ¶
OnEvent toggles Open on click. Selection happens via Select() which the host wires to its popover ListBox's OnActivate.
func (*DropDown) PopoverBounds ¶
PopoverBounds returns the Rect the host should give to its popover ListBox: same X+W as the widget, positioned just below, height proportional to the option count (clamped to PopoverMaxRows rows).
type Entry ¶
type Entry struct {
Base
Text string
Cursor int // rune index in [0, len(runes)]
Focused bool
OnChange func(text string)
OnSubmit func(text string)
}
Entry is a single-line text input. Receives focus on click, edits Text via EventKeyDown (Backspace, ArrowLeft/Right, Home, End, Enter) + EventChar (printable runes). A 1-pixel vertical cursor renders at the cursor offset when Focused.
The widget treats Text as a rune index space so multi-byte UTF-8 characters move the cursor by one position even when they take several bytes on the wire.
type Event ¶
Event is one input event delivered to a widget. The parent container translated mouse coordinates into widget-local pixels; Code is the key/char text for keyboard events.
type EventKind ¶
type EventKind int
EventKind enumerates the input event types a widget can receive. The wasmbox compositor routes DOM events through this enum so widgets don't depend on the browser's exact event names.
const ( // EventClick fires on a mousedown+mouseup pair inside the widget. // X/Y carry widget-local coordinates. EventClick EventKind = iota // EventKeyDown fires when a key is pressed while the widget has // focus. Code carries the key name (e.g. "Enter", "ArrowLeft"). EventKeyDown // EventKeyUp is the symmetric release event. EventKeyUp // EventChar fires for printable character input (post-IME). // Code carries the character as a one-rune string. EventChar // EventCompositionStart fires when an IME composition begins // (typically a dead-key press or a CJK IME popup opening). Widgets // that echo text (Entry / TextView) should render Code as the // "in-progress" preview string, underlined or ghosted, WITHOUT // committing it to their buffer. The host is responsible for // resolving the composition via EventCompositionUpdate ticks and // finally an EventChar (post-commit). EventCompositionStart // EventCompositionUpdate refreshes the preview string mid-flow. // Code carries the current, un-committed composed text. EventCompositionUpdate // EventCompositionEnd fires when the composition is either // committed (host follows up with EventChar carrying the same // text) or cancelled (host does NOT send an EventChar and the // widget discards the preview). EventCompositionEnd )
type Expander ¶
type Expander struct {
Base
Label string
Expanded bool
Content Widget
OnExpand func(expanded bool)
}
Expander is a header row that toggles a content area's visibility. The header is ExpanderHeaderH px tall, shows a chevron + label; clicking the header flips Expanded + fires OnExpand.
When Expanded, Content occupies the remaining bounds below the header. When collapsed, only the header is drawn.
func NewExpander ¶
NewExpander builds an Expander with a label + initial content widget (may be nil to render header-only).
type FileChooser ¶
type FileChooser struct {
Base
Root *TreeNode
ListFiles func(dir *TreeNode) []string
OnAccept func(path string)
OnCancel func()
// contains filtered or unexported fields
}
FileChooser is a directory-tree + file-list + path-entry composite. It does NO I/O — the host hands it a virtual root (a TreeNode tree representing directories) + a func that lists files in a given directory. Selection is reported via OnAccept.
FileChooser is the canonical use-case for TreeView + ListBox + Entry composed together. It is what an "Open File…" dialog renders inside a wasmbox app that has no JS file picker access.
func NewFileChooser ¶
func NewFileChooser(root *TreeNode, listFiles func(dir *TreeNode) []string) *FileChooser
NewFileChooser builds a FileChooser rooted at root with the given directory-listing func.
func (*FileChooser) Draw ¶
func (f *FileChooser) Draw(p painter.Painter, theme *Theme)
Draw paints the composite.
func (*FileChooser) OnEvent ¶
func (f *FileChooser) OnEvent(ev Event)
OnEvent dispatches to the child widgets based on which one the event falls inside.
func (*FileChooser) Path ¶
func (f *FileChooser) Path() string
Path returns the entry text — the current effective selection.
func (*FileChooser) SetBounds ¶
func (f *FileChooser) SetBounds(r Rect)
SetBounds positions the child widgets at the chosen split.
type Frame ¶
type Frame struct {
Base
// Padding is the inset (in pixels) between Frame's border + its
// child. Defaults to 4 when left at zero; negative values are
// clamped to zero at layout time.
Padding int
// contains filtered or unexported fields
}
Frame draws a 1-pixel border around a single child widget + inset the child by Padding pixels inside that border. Useful as a group- box / panel separator when an app wants to visually fence off a region of widgets.
Frame is a Widget: Draw paints the border + delegates to the child; OnEvent forwards to the child with translated coordinates.
func NewFrame ¶
NewFrame wraps child in a Frame. child may be nil (the Frame then just draws its border + accepts no events).
type Grid ¶
type Grid struct {
Base
// contains filtered or unexported fields
}
Grid lays children out in a fixed cols x rows table. Each cell is the same size (container W/cols, H/rows). Children are placed via Attach(child, col, row); a cell with no attached child stays empty.
Grid is a Widget: Draw fans out to every attached child + OnEvent hit-tests then forwards.
func NewGrid ¶
NewGrid constructs an empty cols x rows grid. cols + rows must be positive; the constructor clamps non-positive inputs to 1 to keep the divide-by-zero out of SetBounds.
func (*Grid) Attach ¶
Attach places w at (col, row). Out-of-range coordinates are clamped into the grid so a typo doesn't silently vanish + the child still ends up somewhere visible. Re-runs layout immediately.
type HBox ¶
type HBox struct {
Base
// Spacing is the gap in pixels between adjacent children. Defaults
// to 4 when left at zero (set to a negative value to truly disable
// the gap; negative values are clamped to zero at layout time).
Spacing int
// contains filtered or unexported fields
}
HBox is a horizontal flow container. Children are laid out left-to- right + share the container's width equally (minus Spacing gaps between adjacent children). Children's Y + height fill the box's vertical extent.
HBox is a Widget itself: Draw fans out to every child + OnEvent hit-tests by child Bounds, translating coordinates into the matched child's local space before forwarding.
func NewHBox ¶
func NewHBox() *HBox
NewHBox constructs an empty HBox. Callers add children via Append + then call SetBounds to trigger layout.
func (*HBox) Append ¶
Append adds w to the right of any existing children. Re-runs layout so the new child is positioned immediately + the caller doesn't have to remember to re-call SetBounds.
func (*HBox) Draw ¶
Draw paints every child in append order. Children render directly into the surface using their own Bounds; the HBox itself draws no background or border (it's a pure layout container).
type Image ¶
type Image struct {
Base
Pixels []byte // RGBA bytes, W*H*4 in length
W, H int // source dimensions
}
Image paints a caller-supplied RGBA byte buffer into its bounds. If source dims == bounds, the blit is 1:1; otherwise the image is nearest-neighbour scaled to fit the bounds (no aspect-ratio preservation in v0.2).
type Label ¶
Label is a passive widget that displays Text in the theme's OnSurface colour, drawn with the toolkit's 5x7 bitmap font. Left- aligned inside Bounds, vertically centred if Bounds.H exceeds GlyphHeight.
Label is non-interactive: HitTest returns false so clicks pass through to the widget beneath. Apps that want a clickable label should compose a Button with the text instead.
type LevelBar ¶
LevelBar is the discrete cousin of ProgressBar: Max equal cells, the first Value cells filled in Accent + the rest in SurfaceAlt. Useful for battery / signal-strength style indicators.
func NewLevelBar ¶
NewLevelBar builds a LevelBar with the given Max (Value defaults to 0).
type ListBox ¶
type ListBox struct {
Base
Items []string
Selected int // -1 = no selection
RowHeight int // pixels per row; default 18 via NewListBox
OnActivate func(idx int)
}
ListBox is a vertical list of selectable string rows. Click on a row selects it + fires OnActivate.
Visual: each row is RowHeight pixels tall. The selected row uses Theme.Accent as background + Theme.Background as ink; unselected rows use Theme.Surface + Theme.OnSurface. Rows are rendered via font.DrawText with a 4 px left margin.
func NewListBox ¶
NewListBox builds a ListBox containing items. Selected starts at -1 (no row selected) and RowHeight defaults to 18 (a comfortable 7-px font + 11 px vertical padding).
type Menu ¶
type Menu struct {
Base
Items []MenuItem
Hover int // index of hovered row, -1 if none
OnClose func()
}
Menu is a vertical popover-style list of MenuItems. Used by the compositor's right-click root menu, by MenuBar drop-downs and by any widget that needs an Openbox-style picker.
func (*Menu) Draw ¶
Draw paints the menu's body + every row + a hover highlight on the currently-hovered row.
type MenuBar ¶
MenuBar is a horizontal strip of top-level menu names (File, Edit, View, ...). Clicking a name opens its associated Menu as a popover just below the strip.
The MenuBar itself doesn't own the open Menu's drawing (the containing app composes it with whatever overlay surface it has); MenuBar just exposes Active so the app knows which menu to render.
func (*MenuBar) HandleShortcut ¶
HandleShortcut walks every menu's items and fires the Action of the first item whose Shortcut equals code (case-sensitive; the host is expected to normalise Ctrl+N vs Cmd+N before calling). Returns true if an item fired, false if no match. Menu ordering + item ordering give a deterministic priority — first match wins.
Skipped: separators, disabled items (nil Action). A matching item with a submenu still fires its Action (if any); the submenu is not opened by a shortcut.
Typical usage from a wasmbox client's Go main:
case "keydown":
code := formatShortcut(ev) // host builds "Ctrl+N" etc.
if state.menuBar.HandleShortcut(code) { render(); return }
state.editor.OnEvent(...) // fallthrough: forward to focus
func (*MenuBar) Mnemonic ¶
Mnemonic returns the first letter of the i-th menu name (upper-case, or 0 if the index is out of range / the name is empty). Useful for a host that wants to draw "_F_ile"-style underlines under the mnemonic character.
func (*MenuBar) NameOriginX ¶
NameOriginX returns the X offset of the i-th top-level name within the bar (cumulative sum of NameWidth up to i, exclusive). Same motivation as NameWidth: a host that positions a popover under a clicked name reads this to align on the correct column.
func (*MenuBar) NameWidth ¶
NameWidth returns the pixel width of the i-th top-level name after the auto-size rule: max(MenuBarItemW, TextWidth(name) + 2*pad). Exposed so hosts that render their own popover under a clicked name know how wide the "click zone" was.
func (*MenuBar) OnEvent ¶
OnEvent: a click on a name toggles its menu (Active = idx or -1). Also honours mnemonic keyboard shortcuts on EventKeyDown when the Code carries an "Alt+X" hint (X = one of the top-level names' first letter, case-insensitive) — matches the GNOME/Windows menu-bar Alt+letter convention. The host is responsible for formatting the key event's Code as "Alt+F" etc. before forwarding.
type MenuItem ¶
MenuItem is one row in a Menu. Label is the human text; Action is the callback fired on click. A nil Action turns the row into a disabled (greyed-out) entry; a non-empty Submenu lets it open a nested Menu (popover) on hover or click.
Separator items render as a thin SurfaceAlt line + are not clickable. They have empty Label + nil Action.
Shortcut is a hint string ("Ctrl+N", "Cmd+O", …) drawn right-aligned on the row in the muted SurfaceAlt tone. Purely visual: the host app is responsible for actually wiring the key combo to the item's Action (there is no cross-platform "Ctrl vs Cmd" logic in the toolkit — different apps route keys through different SDKs).
type Notebook ¶
type Notebook struct {
Base
Tabs []NotebookTab
Active int
OnTabChanged func(idx int)
}
Notebook is a tabbed container. The top NotebookTabStripH pixels host the tab strip; the rest is the active page's body. Clicking a tab swaps Active + fires OnTabChanged.
func NewNotebook ¶
func NewNotebook() *Notebook
NewNotebook returns an empty Notebook with no tabs + Active = 0.
func (*Notebook) AddTab ¶
AddTab appends a tab to the strip with label + the page widget shown when that tab is active.
type NotebookTab ¶
NotebookTab is one entry in a Notebook. Label is the human title painted on the tab; Page is the widget shown when the tab is active.
type Notification ¶
type Notification struct {
Base
Text string
Visible bool
// Life is the number of Tick() calls remaining before the
// notification auto-hides. NotificationLife (~180 ≈ 3 s at 60 Hz)
// is a reasonable default; Show() re-arms it. Set directly for
// long-lived notifications (e.g. Life = 3600 for a persistent
// "network offline" banner the host manually Hide()s later).
Life int
}
Notification is a transient toast — an auto-dismissing banner that slides in over the app's normal frame, holds for a few ticks, then hides itself. Cousin of Tooltip (both are informational overlays) but with three key differences:
- Notification is time-bounded (Tick decrements Life; hides at 0).
- Notification is positioned by the host (typically top-right or bottom-centre), NOT anchored to a source widget.
- Notification stays up while the user is doing something else — Tooltip requires the mouse to hover over its anchor.
The host drives Life via Tick() from its own animation loop (typically a rAF tick). One Notification instance can be reused — call Show(text) to re-arm it with a fresh Life budget.
func NewNotification ¶
func NewNotification(text string) *Notification
NewNotification builds a hidden notification with the given text + the default Life budget pre-armed (so a caller who forgets to call Show still gets a sensible time-out on the first Tick loop).
func (*Notification) Draw ¶
func (n *Notification) Draw(p painter.Painter, theme *Theme)
Draw paints the toast when Visible. Filled Accent panel with a 1-px Border stroke, Text in the Background ink (inverted for contrast). Nothing drawn when hidden.
func (*Notification) Hide ¶
func (n *Notification) Hide()
Hide dismisses the notification immediately (independent of Life).
func (*Notification) Show ¶
func (n *Notification) Show(text string)
Show makes the notification visible + resets Life to NotificationLife. Bounds are auto-sized to the text width + the standard padding; the host is responsible for positioning (SetBounds) BEFORE calling Show — Show only refreshes the width to match the current Text.
func (*Notification) Tick ¶
func (n *Notification) Tick()
Tick decrements Life by 1. When Life reaches 0, the notification auto-hides. The host calls this from its animation loop; a rAF-driven caller ticks 60 Hz so NotificationLife = 180 ≈ 3 s. Callers wanting a paused notification (freeze on user hover) just skip the Tick during the pause.
type Paned ¶
type Paned struct {
Base
First, Second Widget
Orientation int
Position int
OnPositionChanged func(pos int)
}
Paned splits its bounds into two child regions separated by a PanedHandleW-px draggable handle. Position is the handle's offset (in pixels) from the leading edge of First; orientation chooses whether that's measured along X (PanedHorizontal) or Y (PanedVertical).
The toolkit's full event model is click-only in v0.2, so drag is exposed via direct OnDragHandle helpers callers wire to their own mouse-tracking state.
func NewHPaned ¶
NewHPaned builds a horizontal Paned with a sensible default Position (mid-bounds, applied at first SetBounds).
func (*Paned) MoveHandle ¶
MoveHandle slides the splitter to pos (clamped) and re-lays out children. Fires OnPositionChanged with the new value.
type ProgressBar ¶
ProgressBar is a horizontal bar with a filled portion proportional to Fraction in [0,1]. An optional Label is centred over the bar in Theme.OnSurface ink.
func NewProgressBar ¶
func NewProgressBar() *ProgressBar
NewProgressBar builds an empty (Fraction=0) ProgressBar with no label.
func (*ProgressBar) Draw ¶
func (pb *ProgressBar) Draw(p painter.Painter, theme *Theme)
Draw paints border + track + fill + optional centered label.
func (*ProgressBar) SetFraction ¶
func (p *ProgressBar) SetFraction(f float64)
SetFraction clamps + assigns Fraction. 0 = empty, 1 = full.
type RGBA ¶
RGBA is a 32-bit colour value packed as bytes (Red, Green, Blue, Alpha). Alias of painter.RGBA so widgets emit values that flow unchanged through any Painter back-end (pixel buffer, cell grid, SVG stream). Alpha is honoured by the pixel rasteriser; the stock widgets all paint opaque pixels (A=0xFF).
type RadioButton ¶
type RadioButton struct {
Base
Label string
Checked bool
OnToggle func(checked bool)
// contains filtered or unexported fields
}
RadioButton is a circular toggle paired with a label. RadioButtons are typically grouped via RadioGroup so exactly one in the group is Checked at any time. A standalone RadioButton (not added to a group) behaves like a CheckButton (toggleable on click).
func NewRadioButton ¶
func NewRadioButton(label string) *RadioButton
NewRadioButton constructs a standalone RadioButton with the given label. Add it to a RadioGroup with group.Add(r) for mutual-exclusion behaviour.
func (*RadioButton) Draw ¶
func (r *RadioButton) Draw(p painter.Painter, theme *Theme)
Draw paints the circular mark + label. The "circle" is a 12 x 12 box with a 1-pixel inset on every side, painted as a stroked rectangle (approximate to avoid bringing in trig). When Checked, a smaller Accent-filled rect sits inside as the radio dot.
func (*RadioButton) OnEvent ¶
func (r *RadioButton) OnEvent(ev Event)
OnEvent: on click, route through the group (if any) so siblings clear; otherwise toggle Checked locally.
type RadioGroup ¶
type RadioGroup struct {
Members []*RadioButton
Active int
}
RadioGroup makes a set of RadioButtons mutually exclusive. Active is the index of the currently-checked member, or -1 when none has been clicked yet.
func NewRadioGroup ¶
func NewRadioGroup() *RadioGroup
NewRadioGroup builds an empty group with Active = -1.
func (*RadioGroup) Add ¶
func (g *RadioGroup) Add(r *RadioButton)
Add appends r to the group + remembers its membership so a click on any member can clear the others.
type Rect ¶
Rect is an axis-aligned rectangle in pixel coordinates. X/Y is the top-left corner; W/H are width/height. Aliased to painter.Rect so widgets can render on any painter.Painter (PixelPainter for a pixel buffer, CellPainter for a terminal grid) without a type conversion. Contains() is inherited from painter.Rect.
type Scale ¶
Scale is a horizontal slider over a continuous Min..Max range. Click on the track jumps the thumb to that x-position + fires OnChange. The 4-px track sits across the vertical midpoint in Theme.SurfaceAlt; the 10-px square thumb sits at the value's position in Theme.Accent.
func NewScale ¶
NewScale builds a Scale spanning [min, max] with the given initial value. Min == Max is allowed but renders a non-interactive track.
type ScrollView ¶
type ScrollView struct {
Base
Child Widget
OffsetX, OffsetY int
// contains filtered or unexported fields
}
ScrollView is a viewport over a child widget whose content may be larger than the visible area. The child's own Bounds is logical (= content size); ScrollView paints the child clipped to its own Bounds, with origin shifted by -OffsetX/-OffsetY.
A thin scrollbar track (8 px wide) is painted on the right edge in Theme.SurfaceAlt; a Theme.Accent thumb sized proportionally to the viewport/content ratio shows the current scroll position.
Wheel events scroll vertically; horizontal scrolling is supported via direct Scroll(dx, dy) calls (no horizontal scrollbar drawn in v0.2).
func NewScrollView ¶
func NewScrollView(child Widget) *ScrollView
NewScrollView builds a ScrollView around child. Call SetContentSize after construction to declare the child's logical extent so the thumb is sized correctly + scrolling is clamped.
func (*ScrollView) Draw ¶
func (s *ScrollView) Draw(p painter.Painter, theme *Theme)
Draw paints the child clipped to the viewport, then the scrollbar track + thumb on the right edge.
func (*ScrollView) HitTest ¶
func (s *ScrollView) HitTest(px, py int) bool
HitTest covers the full bounds (the scrollbar is interactive too).
func (*ScrollView) Scroll ¶
func (s *ScrollView) Scroll(dx, dy int)
Scroll mutates the offsets by (dx, dy) and clamps to [0, contentSize - viewportSize] so the thumb never falls off the track. Negative offsets are clamped to 0.
func (*ScrollView) SetContentSize ¶
func (s *ScrollView) SetContentSize(w, h int)
SetContentSize tells the ScrollView how big the child's logical drawing area is. Used by Scroll() to clamp + by Draw() to size the thumb. Caller is responsible for invoking this when the child grows / shrinks.
type Selection ¶
Selection is a (start, end) range of TextView positions. Positions are (line, col) pairs in rune coordinates -- same model the TextView cursor uses. Start <= End in canonical order; SelectionRange normalises any (anchor, cursor) pair the caller hands it.
Selection is pure data; the TextView holds one + uses it to drive painting + range-delete + clipboard ops.
func SelectionRange ¶
SelectionRange returns a canonical Selection from an anchor + a cursor: whichever pair is "earlier" in document order becomes the start.
type SpinButton ¶
SpinButton is an integer input with `+` and `−` buttons on the right. Click `+` adds Step, click `−` subtracts Step (clamped to [Min, Max]). The value is rendered as a decimal string in the left portion of the body.
func NewSpinButton ¶
func NewSpinButton(min, max, initial, step int) *SpinButton
NewSpinButton builds a SpinButton spanning [min, max] with the given initial + step. Step <= 0 is clamped to 1 so clicks never no-op silently.
func (*SpinButton) Draw ¶
func (s *SpinButton) Draw(p painter.Painter, theme *Theme)
Draw paints the body (with the value text) + the two stacked buttons on the right.
func (*SpinButton) OnEvent ¶
func (s *SpinButton) OnEvent(ev Event)
OnEvent: click on the upper-right button increments; click on the lower-right button decrements.
type Spinner ¶
Spinner is an indeterminate loading indicator. When Active, Draw paints a "clock hand" from the centre of bounds rotated by Phase * 2π in Theme.Accent. Caller drives Phase via Tick(dt) so the animation cadence stays tied to the host's frame loop (no goroutine, no timer).
type Stack ¶
Stack holds N named pages (Widgets) but shows only ONE at a time -- the page named by Visible. Use AddPage / SetVisible to navigate. Events route to the visible page only.
Suitable for application "screens" (settings vs main vs about), wizard steps, or anywhere the user expects a CLEAN swap with no transition.
func NewStack ¶
func NewStack() *Stack
NewStack builds an empty Stack with no pages + no visible name.
func (*Stack) AddPage ¶
AddPage registers a page under name. If this is the first page, it auto-becomes Visible so an unconfigured Stack still draws something.
func (*Stack) SetBounds ¶
SetBounds also propagates to the visible page so it fills the Stack's rect. Other pages have stale bounds until SetVisible brings them forward -- they re-bound at draw time.
func (*Stack) SetVisible ¶
SetVisible swaps the showing page. Names not in Pages are silently ignored so the caller can SetVisible blind.
type Statusbar ¶
type Statusbar struct {
Base
Segments []string
// SegmentMinW is the minimum width any non-last segment takes. The
// last segment ALWAYS fills the rest of the bar.
SegmentMinW int // default StatusbarSegmentMinW
}
Statusbar is a thin horizontal strip at the bottom of a window that shows N text segments (e.g. "Line 12, Col 4" + "UTF-8" + "Plain text" in an editor). Segments paint left-to-right with a 1-pixel divider between them; the LAST segment expands to fill any remaining width so an empty Statusbar still looks deliberate.
Statusbar is the natural pairing for MenuBar + Toolbar above and a document area in the middle — together they assemble the "stock GTK" window frame.
func NewStatusbar ¶
NewStatusbar builds a Statusbar with the given segments.
func (*Statusbar) SetSegment ¶
SetSegment replaces the i-th segment in place. Indexes out of range are appended (filling intermediate slots with "") so callers can grow the bar lazily.
type TextView ¶
type TextView struct {
Base
Lines []string
CursorLine int
CursorCol int
Focused bool
OnChange func()
// Selection is the (start, end) range the host paints highlighted
// + range-deletes via DeleteSelection / cut+paste via
// CopySelection / CutSelection / Paste. An empty selection (Start
// == End) means "no selection"; HasSelection() is the convenience
// predicate.
Selection Selection
// Composition holds the in-progress IME preview string (dead-key
// output, CJK candidate, …). Non-empty while an IME composition
// is active; cleared on EventCompositionEnd. The Draw method
// paints it in a muted colour at the cursor position — the
// preview is NOT part of the buffer until the host commits via
// EventChar. Widgets that read Lines/Text() see only committed
// text, so downstream logic (search, syntax, autosave) never
// operates on half-formed input.
Composition string
}
TextView is the multi-line cousin of Entry. Lines are stored as a []string (one element per visible line); Cursor is a (line, col) position in rune coordinates. Wraps Entry's keyboard model with an added vertical axis (ArrowUp / ArrowDown / PageUp / PageDown).
This is the foundation a native wasmdesk editor builds on top of: syntax highlighting, search/replace and find can live above TextView without it growing those concerns. v0.3 ships the raw buffer; v0.4 will add a SelectionStart/End pair for range ops.
func NewTextView ¶
NewTextView builds a TextView pre-loaded with initial text (split on "\n"). Empty initial text creates a single empty line so the cursor always has a row to live on.
func (*TextView) ClearSelection ¶
func (t *TextView) ClearSelection()
ClearSelection collapses the selection to (CursorLine, CursorCol).
func (*TextView) CopySelection ¶
CopySelection returns the selected text + leaves the buffer untouched. Wired to a host clipboard via the host (the toolkit has no global clipboard).
func (*TextView) CutSelection ¶
CutSelection returns the selected text + removes it from the buffer.
func (*TextView) DeleteSelection ¶
func (t *TextView) DeleteSelection()
DeleteSelection removes the selected text + parks the cursor at the deletion point. No-op when the selection is empty.
func (*TextView) Draw ¶
Draw paints border + fill + every visible line + (when Focused) a 1-px vertical cursor stroke at the cursor's screen position.
Lines that would render past the bottom of the bounds are painted-but-clipped by the raster helpers; wrap in a ScrollView for proper scrollable behaviour.
func (*TextView) HasSelection ¶
HasSelection reports whether the TextView's selection covers > 0 characters.
func (*TextView) Paste ¶
Paste inserts text at the cursor (after first deleting the selection if any). "\n" splits lines.
func (*TextView) SelectAll ¶
func (t *TextView) SelectAll()
SelectAll selects the entire buffer + parks the cursor at its end.
func (*TextView) SelectionText ¶
SelectionText returns the selected substring, or "".
func (*TextView) SetSelection ¶
SetSelection records a new (start, end) selection without moving the cursor.
type Theme ¶
type Theme struct {
Background RGBA
Surface RGBA
SurfaceAlt RGBA
OnBackground RGBA
OnSurface RGBA
Accent RGBA
Border RGBA
// Extra holds @define-color entries from GTK-source themes that don't
// map to one of the canonical fields above (headerbar_bg_color,
// success_color, ...). Populated by LoadGTKTheme; nil for code-built
// themes. A host that needs a custom colour (e.g. for its window-
// decoration painter) looks it up here without growing this struct
// for every GTK colour name in the wild.
Extra map[string]RGBA
}
Theme bundles every visual constant a widget needs to render itself. One Theme value cascades through every widget in an app, so swapping to a dark / Aqua / Fluxbox theme is a single assignment.
Field naming follows Material/Fluxbox conventions:
- Background = the surface a widget sits on (panel/window body)
- Surface = the widget's own filled body (button face, ...)
- SurfaceAlt = a contrasting tone (hovered button, alternating row)
- OnBackground / OnSurface = ink/text on those grounds
- Accent = focus rings, the active-tab underline, the link colour
- Border = a thin separator line drawn around or between surface regions
func DefaultDark ¶
func DefaultDark() *Theme
DefaultDark is a low-contrast dark theme. Same shape as DefaultLight; used by themed wasmaqua apps + test coverage.
func DefaultLight ¶
func DefaultLight() *Theme
DefaultLight is a low-stakes light theme used by tests + as the fall-through when an app doesn't supply its own. Numbers are the Fluxbox Light palette wasmbox's dock already uses, so a widget dropped into the dock without an explicit theme renders cleanly.
func LoadGTKTheme ¶
LoadGTKTheme parses a GTK theme source (the gtk.css or gtk-3.0/gtk.css or gtk-4.0/gtk.css that ships with a libadwaita / GTK3 theme) and returns a Theme that mirrors the theme's palette.
We recognise BOTH the GTK3 names (theme_bg_color / theme_fg_color / …) AND the libadwaita / GTK4 names (window_bg_color / accent_bg_color / …); when both are present the GTK4 name wins because it is the newer convention and a theme that defines both intends the GTK4 name as canonical. Unknown @define-color declarations are kept in the returned Theme's Extra map so themes that ship custom color names (e.g. "headerbar_bg_color" for a window-decoration painter) can still be looked up by a host without growing the canonical Theme struct.
Anything beyond @define-color (selectors, properties, gradients, image references) is ignored — the toolkit is a flat-paint compositor that only consumes solid RGBA values. We do not implement a full CSS parser for the same reason.
The mapping from GTK names to toolkit Theme fields:
GTK4 (preferred) | GTK3 (fallback) | Theme field -------------------------|--------------------------|-------------- window_bg_color | theme_bg_color | Background window_fg_color | theme_fg_color | OnBackground view_bg_color | theme_base_color | Surface view_fg_color | theme_text_color | OnSurface card_bg_color | insensitive_bg_color | SurfaceAlt accent_bg_color | theme_selected_bg_color | Accent borders | borders | Border
Returns an error only if the input is empty (defensively) — malformed declarations are skipped, not fatal, so a real-world gtk.css with a stray syntax error still yields the rest of its palette.
type ToggleButton ¶
ToggleButton is a Button with a sticky on/off state. Click flips Pressed + fires OnToggle. Pressed = Theme.Accent face, unpressed = Theme.Surface; the label is rendered centered in the button.
func NewToggleButton ¶
func NewToggleButton(label string, pressed bool) *ToggleButton
NewToggleButton constructs a ToggleButton with the given label + initial state.
func (*ToggleButton) Draw ¶
func (t *ToggleButton) Draw(p painter.Painter, theme *Theme)
Draw paints the face + border + centred label.
func (*ToggleButton) OnEvent ¶
func (t *ToggleButton) OnEvent(ev Event)
OnEvent: click flips Pressed + fires OnToggle.
type Toolbar ¶
type Toolbar struct {
Base
Items []ToolbarItem
ButtonW int // default ToolbarButtonW
ButtonH int // default ToolbarButtonH
// contains filtered or unexported fields
}
Toolbar is a horizontal strip of square icon-buttons + optional separators. Each entry has a Label (used as the fallback glyph character), an optional Icon (drawn as an RGBA blit when non-empty), an OnClick callback + a Disabled flag.
Toolbar is the icon-strip that sits below a MenuBar; it composes cleanly with both Notebook + Statusbar so a "stock GTK" window can be assembled out of MenuBar + Toolbar + Notebook + Statusbar.
func NewToolbar ¶
func NewToolbar(items []ToolbarItem) *Toolbar
NewToolbar builds a Toolbar with the given items.
type ToolbarItem ¶
type ToolbarItem struct {
Label string
Icon []byte // optional ButtonW x ButtonH RGBA; nil = draw Label initial
OnClick func()
Disabled bool
// Separator, when true, draws a 1-pixel vertical divider instead of
// a button. Label/Icon/OnClick are ignored.
Separator bool
}
ToolbarItem is one cell in a Toolbar.
type Tooltip ¶
type Tooltip struct {
Base
Text string
Visible bool
Anchor Rect // widget the tooltip belongs to; positions below it
}
Tooltip is a small text bubble shown near the cursor when the user hovers over a target widget. The host app drives Visible + Anchor (typically toggled by a mouse-enter/leave handler with a 500 ms delay); the toolkit's role is the rendering geometry.
Auto-sized to the Text width + 8 px horizontal padding + 6 px vertical padding; appears just below/right of (Anchor.X, Anchor.Y).
func NewTooltip ¶
NewTooltip builds a hidden tooltip with the given text.
type TreeNode ¶
type TreeNode struct {
Label string
Expanded bool
Children []*TreeNode
// Anything the host wants to associate with this node (typically a
// path, an id, or the model object). The toolkit doesn't read it.
Data any
}
TreeNode is one entry in a TreeView. Children are nested arbitrarily deep; Expanded controls whether the children are rendered.
type TreeView ¶
type TreeView struct {
Base
Root *TreeNode
Selected *TreeNode
OnActivate func(node *TreeNode)
RowHeight int // default 18
// contains filtered or unexported fields
}
TreeView renders a hierarchical TreeNode set as indented rows. Click on a row's ▶/▼ chevron toggles Expanded; click anywhere else on the row selects it + fires OnActivate with the clicked node.
Use for file browsers, settings hierarchies, JSON inspectors, outline views.
func NewTreeView ¶
NewTreeView builds a TreeView rooted at root (which may be nil for an empty initial view).
type VBox ¶
type VBox struct {
Base
// Spacing is the gap in pixels between adjacent children; same
// semantics as HBox.Spacing.
Spacing int
// contains filtered or unexported fields
}
VBox is the vertical analogue of HBox: children stack top-to-bottom, sharing the container's height + filling its width.
type Widget ¶
type Widget interface {
// Bounds returns the widget's placement within its parent surface.
// Used by containers for hit-testing + relative-coordinate translation.
Bounds() Rect
// SetBounds updates the placement. Containers call this during
// layout to position children.
SetBounds(r Rect)
// Draw paints the widget onto the Painter using the supplied
// theme. The Painter's back-end decides whether the primitives
// land as pixels (browser canvas, native window, image file) or
// cells (terminal grid). Widgets MUST NOT draw outside their
// Bounds() rectangle.
Draw(p painter.Painter, theme *Theme)
// HitTest reports whether (px, py) (in surface coordinates) falls
// on a sensitive part of the widget. Most widgets just return
// Bounds().Contains(px, py); transparent or overlapping widgets
// may return false even within their bounds.
HitTest(px, py int) bool
// OnEvent delivers an input event whose X/Y are WIDGET-LOCAL.
// The widget mutates its internal state + may schedule a redraw
// (the caller is responsible for invoking Draw again).
OnEvent(ev Event)
}
Widget is the toolkit's single core abstraction. Every widget -- Button, Label, TextInput, HBox, ScrollView, ... -- implements it. Containers themselves are widgets too: a VBox passes Draw / OnEvent to its children after offsetting coordinates by the child's Rect.
Source Files
¶
- button.go
- calendar.go
- check.go
- colorchooser.go
- dialog.go
- dropdown.go
- entry.go
- expander.go
- filechooser.go
- font.go
- icons.go
- image.go
- label.go
- layout.go
- list.go
- menu.go
- notebook.go
- notification.go
- paned.go
- progress.go
- radio.go
- raster.go
- scale.go
- scroll.go
- selection.go
- spinbutton.go
- spinner.go
- stack.go
- statusbar.go
- textview.go
- theme.go
- theme_gtk.go
- toggle.go
- toolbar.go
- tooltip.go
- treeview.go
- widget.go