The entry notes
The source src/modules/demonstrations/notes built with the setting DRAWING_THROUGH_MODULE=true. The text after this paragraph is the comment of that source.
The notes of the principal: a list of notes, the text of one note, and the versions of that note, in a window that the principal resizes .
Each note is one object of the private store. The process has no save action: a change waits until the keys pause for one second, or until another note is shown, and then is one commit. Each commit is a version, so the pane of the versions steps back through the states of a note and restores one in a new commit: nothing is lost.
Start: start("notes") in the console, or the start menu.
Keys, with no modes but the pane of the versions and the question of a deletion: a character goes in at the caret, in place of the selection; Enter starts a new line, Tab writes a tab; the arrows, Home, End, Page Up and Page Down move the caret, Control with Home or End goes to the start or the end of the note, and with Shift each of them selects; Ctrl+A selects all; Backspace and Delete remove the selection or one character; Ctrl+C, Ctrl+X and Ctrl+V copy, cut and paste through the clipboard of the compositor. Ctrl+N makes a new note, Ctrl+D asks to delete the note shown (Enter deletes it, Escape keeps it), Ctrl+Page Up and Ctrl+Page Down show the note before and after it in the list, Ctrl+H shows the versions of the note: Down for an older one, Up for a newer one, Enter restores the one shown, Escape goes back to the note. A press on a note of the list shows it, a press in the text places the caret, a drag selects, and the wheel or the scroll bar scrolls.
Grants, as the root service gives them:
- Store: its private store, which holds one object for each note and the versions of each.
What a reader sees: at the left the list of the notes, each by its first line, the one shown on the chosen color; with Ctrl+H, the versions of the note in its place. At the right the text, wrapped by word at the width of the window, with its scroll bar. At the bottom a status band: a problem of the store or the question of a deletion at the left, the line, the column and whether the store keeps the text at the right; then the action bar. The log has, at the start, one of:
notes: a new store: no note;notes: restored N notes; the note shown is "...";notes: no store: the notes are not kept.
Then notes: the note is "...", B bytes, generation G after each commit.
notes module with an entry
- Hash
b89085b6a20271f133a2901f62fc126744656be1b28912759cd8ad2418a9950c- Size
290089 bytes- Exports
0- Imports
1- Imported by
0- License
- MIT
The notes of the principal: a list of notes, the text of one note, and the versions of that note, in a window that the principal resizes
| Fact | Value |
|---|---|
| Kind | Modules with an entry |
| Source | src/modules/demonstrations/notes |
| Boot image | yes: in the boot image, 290089 bytes in this build |
| Build settings |
|
| Imports | |
| Imported by | none |
Neighbours
What it imports, at its left, and what imports it, at its right: the part of the module graph that touches it.
Exports
| Export | What it does |
|---|---|
entry() | The entry of notes: it reads the list of the notes of its store and shows the one changed last, then edits until the principal closes the window |
entry
entry()
The entry of notes: it reads the list of the notes of its store and shows the one changed last, then edits until the principal closes the window. A change waits for a pause of the keys, then is a commit.
With no window it stops with Failed. With no store it runs, and keeps nothing. Then one loop waits for the events of the window, or for the end of the pause of a change that waits, and draws after each turn.
- Form
- The entry of the module: one parameter, an address, fixed by the contract.
src/modules/demonstrations/notes/main.odin:1126
Read from the source of the module, as the build reads it to describe the exports (tools/modustool/build/describe.odin).
What the root service gives it
| What | Value | As the root service says |
|---|---|---|
| Grants | The notes and their versions live in its private store: a version of a note of 32 KiB holds 8 blocks of data and their nodes, and the store keeps each version for 10 minutes before the thinning. | |
| Other terms of its start grant set | store_blocks = 4500 | |
| Budget that it asks for |
| The least budget of the module, with its text, the rows of the text, its layout tree, the queues of the store thread with their records, and the stack of that thread; two threads: the window and the store. The tool counts the window at the largest scale, 2, at its largest size . See: Module contract: The budget that a module asks for |
The start grant set is read from start_grant_sets in src/modules/system/root/start_grant_sets.odin. The stated budget is read from the constant MODULE_BUDGET of the source of the module (its line); the build adds the counted parts and writes the sum in the module (tools/modustool/build/budget_count.odin); the root service accepts it up to the largest budget of a process, and adds the limits of processor time and of log records (src/modules/system/root/budgets.odin).
