1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-29 21:09:56 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/widgets/Widgets.tid

20 lines
1.3 KiB
Plaintext
Raw Normal View History

2014-09-10 22:42:13 +00:00
created: 20140908130500000
modified: 20150219182745000
tags: Concepts Reference
2014-09-08 18:06:50 +00:00
title: Widgets
2014-09-10 22:42:13 +00:00
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.
2014-09-11 14:52:47 +00:00
~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.
The following classes of widget are built into the core:
2014-09-11 14:52:47 +00:00
<<list-links "[tag[Widgets]]">>