mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-15 06:14:53 +00:00
18 lines
1.2 KiB
Plaintext
18 lines
1.2 KiB
Plaintext
created: 20140908130500000
|
|
modified: 20240422083334052
|
|
tags: Concepts [[Core Widgets]]
|
|
title: Widgets
|
|
type: text/vnd.tiddlywiki
|
|
|
|
~TiddlyWiki's display is driven by an underlying collection of <<.def widgets>>. These are organised into a tree structure: each widget has a parent widget and zero or more child widgets.
|
|
|
|
~TiddlyWiki generates this <<.def "widget tree">> by parsing the ~WikiText of tiddlers. Each component of the ~WikiText syntax, including even the trivial case of ordinary text, generates a corresponding widget. The widget tree is an intermediate representation that is subsequently rendered into the actual display.
|
|
|
|
Widgets are analogous to elements in an HTML document. Indeed, HTML tags in ~WikiText generate dedicated <<.def "element widgets">>.
|
|
|
|
Each class of widget contributes a specific ability to the overall functionality, such as the ability to <<.wlink2 "display an image" ImageWidget>> or <<.wlink2 "a button" ButtonWidget>>, to <<.wlink2 "call a macro" MacroCallWidget>> or <<.wlink2 "transclude text from elsewhere" TranscludeWidget>>, or to [[mark a piece of text as a heading|HTML in WikiText]].
|
|
|
|
The more specialised widgets use a general-purpose [[widget syntax|Widgets in WikiText]] as their only possible WikiText representation.
|
|
|
|
|