Reference
Generated out of parse.c, dom.c and spark.h, the source that decides these answers, so this page cannot drift.
Tags, and what they become
| tag | macOS | Windows | Linux |
|---|---|---|---|
<button> | NSButton | BUTTON | GtkButton |
<native> | the class you name | the window class you name | the GType you name |
<input> | NSTextField | EDIT | GtkEntry |
<check> | NSButton switch | BUTTON BS_CHECKBOX | GtkCheckButton |
<sep> | NSBox | a line | GtkSeparator |
<text> | NSTextField | STATIC | GtkLabel |
<scroll> | NSScrollView | a clipping window | GtkScrolledWindow |
<list> | NSTableView | SysListView32 | GtkListBox |
<item> | a row | a row | a row |
<area> | NSTextView | EDIT ES_MULTILINE | GtkTextView |
<select> | NSPopUpButton | COMBOBOX | GtkComboBoxText |
<radio> | NSButton radio | BUTTON BS_RADIOBUTTON | GtkRadioButton |
<slider> | NSSlider | msctls_trackbar32 | GtkScale |
<progress> | NSProgressIndicator | msctls_progress32 | GtkProgressBar |
<spin> | NSStepper | msctls_updown32 | GtkSpinButton |
<image> | NSImageView | GDI+ | GtkImage |
<link> | NSButton link | drawn | GtkLinkButton |
<password> | NSSecureTextField | EDIT ES_PASSWORD | GtkEntry, visibility off |
<search> | NSSearchField | EDIT | GtkEntry |
<toggle> | NSSwitch | drawn | GtkSwitch |
<togglebutton> | NSButton push-on | BUTTON BS_PUSHLIKE | GtkToggleButton |
<spinner> | NSProgressIndicator spinning | drawn | GtkSpinner |
<menu> | NSMenu | HMENU | GtkMenuBar |
<menuitem> | NSMenuItem | a menu entry | GtkMenuItem |
<tabs> | NSTabView | SysTabControl32 | GtkNotebook |
<tab> | a tab | a tab | a tab |
<tree> | NSOutlineView | SysTreeView32 | GtkListBox |
<date> | NSDatePicker | SysDateTimePick32 | GtkEntry |
<toolbar> | a row | a row | a row |
<table> | NSTableView | SysListView32 | GtkListBox |
<column> | NSTableColumn | a column | a column |
<stack> | layered views | layered windows | layered |
<tip> | a styled window | a styled window | the widget's own tooltip |
<bar> | a bar | a bar | a bar |
<surface> | a drawn view | an owner-drawn control | GtkDrawingArea |
<fill> | a shape | a shape | a shape |
<picture> | a shape | a shape | a shape |
Attributes 79
Settable from markup and from a script by the same name, and readable back as what they are.
What a thing looks like 59
gappadmin-sizemax-sizeresizablealways-on-topframelessfullscreenatfitrotateopacitywrapscalezoombundletypeallowmaxlengthtransitionanimatefromtocolsmin-colwhgrowalignselfsizebolditalictext-alignvalignshadowshadow-ygradient-xgradientcaret-colorselection-colormodaldisableddefaultfillcolorbgradiusborderaccent-hoveraccentborder-color-hoverborder-colorbg-hoverbg-activebg-disabledplaceholderlabelvalue
What a thing is 20
bindidminmaxstepfontsrcdatahreftipfont-filefont-dataaccelclassagentreadonlybarscheckedhiddentitle
Events
clickchangeinputfocusblurmouseentermouseleaveresizeframekeytrayhotkeydropmessage
Services
What the system already runs, asked for by name. Each answers
null where the system has no such thing.
| service | what it is |
|---|---|
alert confirm | open save dialogs |
open dir|multi|any | a folder, several at once, or either |
snapshot <path> | a picture of the window as it stands |
clip-get clip-set | clipboard |
window-size window-title | the window |
window-raise | take the front, coming back from a |
run | a program, returning its output |
open-url | hand a URL to the system browser |
tray <icon> <tooltip> | an icon in the system's status area |
notify <title> <body> | a message in the system's own centre |
hotkey <combo> | a key the system reports while we sleep |
window-open <file> | a second window, running that document |
window-tell <text> | hand a line to every other window |
sound <file> | play it, through whatever the system has |
fetch <url> <spec> | ask a server, through the system's own |
update-check <manifest> | what version is out there, or nothing |
update-apply <manifest> | fetch it and put it in place |
spark.fetch waits for the answer. Give it
into and it does not: the call returns at once and the answer
lands in that signal, with statusInto beside it if you want the
code. Everything bound to the signal follows on its own.
spark.fetch(url, { into: "games", statusInto: "code" });
Two attributes worth naming
<button default> is the button Enter presses, from
wherever the keyboard is. Each system does its own thing with the mark: a
Return key equivalent on AppKit, BS_DEFPUSHBUTTON on Win32, and
the suggested-action class on GTK.
agent="read write invoke deny" says what a driver from
outside may do with a control, and it is inherited from the nearest ancestor
that says anything. It decides what tree and
actions answer, and therefore which controls become tools when
the window is served over MCP.