-
-
Notifications
You must be signed in to change notification settings - Fork 42
Technical Documentation
Mogens Brødsgaard Lund edited this page Nov 18, 2016
·
9 revisions
This section contains documentation of the technical parts of Liquid. The target audience are developers who want to know how Liquid is designed in its engine. Maybe as inspiration for creating similar applications or to do advanced plugins.
Scratch! Not done yet.
To understand the flow through the main loop, here is a detailed case of the actions called in-between a key press and the display update:
- USER: The user presses the "a" button.
- CORE: Liquid recieves the keycode 97
- CORE: 97 is translated to :a
- CORE: :a is sent to editor
- EDIT: editor finds mode from topmost buffer
- EDIT: editor gets function from map in mode with keyword :a and executes it, like
(editor/insert "a")
-
(editor/insert "a")
calls(buffer/insert "a")
on the topmost buffer -
(buffer/insert "a")
calls(slider/insert "a")
on the associated slider which updates the data structure.
- CORE: windows and corresponding buffers are retrieved from editor
- CORE: windows and buffers are used to render sets of lines with formatting tags
- CORE: Formatted lines are translated to ui commands to be displayed on screen
- USER: The user sees "a" on the screen.
Before:
(defn
After:
(defn a
Before:
{:before '(" " "n" "f" "e" "d" "(") :after '()}
After:
{:before '("a" " " "n" "f" "e" "d" "(") :after '()}
'("(" {:face :type1 :bgface :plain} "d" "e" "f" "n"
{:face :plain :bgface :plain} " "
{:face :type2 :bgface :plain} "a")
In the terminal case the formatting tags are translated into escape codes to change text colors.
A not yet finished task is to translate the rendered lines into html which might be used to display in a browser or a JTextEditor.