-
Notifications
You must be signed in to change notification settings - Fork 0
vtf textbuffer
srccircumflex edited this page Mar 9, 2023
·
3 revisions
This package contains all modules and objects for dynamic processing of text data, their visual representation and framing to further implement text input widgets.
The modules and objects for processing the data and displaying them are separated. The main object for saving and editing is the TextBuffer. For framing and creating the visual representation, a display component from the display module can be used.
name | declaration | |
---|---|---|
buffer |
module // buffer | TextBuffer objects. |
├─ ChunkBuffer | object // buffer // swap data util | A restricted editable TextBuffer object from a swap chunk in memory. |
└─ TextBuffer | object // buffer | The main object for data storage and processing. |
bufferreader ─ BufferReader
|
moduleobject // io | A Independent io object to read from a TextBuffer. |
chunkiter ─ ChunkIter
|
moduleobject // buffer // iterator // swap data util | An object to iterate through defined areas of the buffer across the boundaries to the swap. |
exceptions | module // exceptions | Module-specific exceptions. |
items (shortcut to _buffercomponents.items) | module // buffer components and utils // data management | TextBuffer data management. |
├─ ConfigurationError | object // exception | Incorrect configuration of the TextBuffer or its components. |
├─ ConfigurationWarning | object // exception | Non-conforming configuration of the TextBuffer or its components. |
├─ CursorChunkLoadError | object // exception | Cursor movement error. |
├─ CursorChunkMetaError | object // exception | Cursor movement error. |
├─ CursorError | object // exception | Main cursor movement error. |
├─ CursorNegativeIndexingError | object // exception | Cursor movement error. |
├─ CursorPlacingError | object // exception | Cursor movement error. |
├─ DatabaseCorruptedError | object // exception | Database error. |
├─ DatabaseFilesError | object // exception | Database error. |
├─ DatabaseInitError | object // exception | Database error. |
└─ DatabaseTableError | object // exception | Database error. |
display | packet // visualization | Objects for creating visual representations of TextBuffer data. |
├─ displays | module // visualization // main objects | Main display type objects. |
│ ├─ _DisplayBase | object // visualization // unfinished basic display | Parent display class. |
│ ├─ DisplayBrowsable | object // visualization // finished display | Display type for browsable display of TextBuffer data. |
│ ├─ DisplayScrollable | object // visualization // finished display | The display as scrolling text. |
│ └─ DisplayStatic | object // visualization // finished display | Restricted bounding display of TextBuffer data. |
├─ highlighters | module // visualization // display components // highlighters | Highlighter components of the displays. |
│ ├─ HighlighterBase | object // visualization // display component // highlighter // minimum requirement | Rudimentary highlighter component. |
│ ├─ HighlightAdvanced | object // visualization // display component // highlighter // extended features | Complex design of the highlighting. |
│ └─ HighlightRegex | object // visualization // display component // highlighter // extended features | Highlighting of individual patterns. |
├─ highlightertree | module // visualization // highlighter elements // parser derivatives | Derivatives of the syntaxtree for the highlighters. |
│ ├─ _HighlightTreeAdvanced | object // visualization // highlighter elements // highlighter parent | Derivative of the SyntaxTree. |
│ ├─ _HighlightTreeRegex | object // visualization // highlighter elements // highlighter parent | Derivative of the SyntaxTree. |
│ ├─ HighlighterBranch | object // visualization // highlighter elements // highlighter syntax tree element | Syntax branch of the highlighting. |
│ ├─ HighlighterGlobals | object // visualization // highlighter elements // highlighter syntax tree element | Container for branch-independent highlight definitions. |
│ └─ HighlighterLeaf | object // visualization // highlighter elements // highlighter syntax tree element | Syntax leaf object as the result of a parse. |
├─ items | module // visualization // data management | Display data management. |
│ ├─ DisplayItem | object // visualization // data management | The display rows. |
│ ├─ DisplayRowItem | object // visualization // data management | Display row. |
│ ├─ RowFrameItem | object // visualization // data management | First framing parameterization. |
│ └─ VisRowItem | object // visualization // data management | Frame parameterization and coordinates. |
└─ syntaxtree | module // visualization // parent syntax tree | Basic objects for the design of an abstract syntax tree (AST). |
. ├─ SyntaxTree | object // visualization // parent syntax tree | Basic object for the design of an abstract syntax tree (AST). |
. ├─ SyntaxBranch | object // visualization // parent syntax tree | Basic object for the design of an abstract syntax tree (AST). |
. └─ SyntaxGlobals | object // visualization // parent syntax tree | Basic object for the design of an abstract syntax tree (AST). |
_buffercomponents | packet // buffer components and utils | Optional components for the TextBuffer, data types and members of the TextBuffer. |
├─ _sql | module // buffer components and utils // sql utils | SQL utils. |
│ ├─ DATABASE_FILES_ERROR_SUIT | constant // buffer components and utils // sql util // global constant contextmanager | A global and constant suit that is applied when creating database files. |
│ ├─ DATABASE_TABLE_ERROR_SUIT | constant // buffer components and utils // sql util // global constant contextmanager | A global and constant suit that is applied when creating database tables. |
│ ├─ path_from_uri | function // buffer components and utils // sql util // parser | A parser for the path defined via a URI. |
│ ├─ _DBInitSuit | object // buffer components and utils // sql util // contextmanager | Contextmanager object for sql operations. |
│ └─ SQLTSCursor | object // buffer components and utils // sql util // sql cursor | A thread safe database cursor object. |
├─ _suit ─ _Suit
|
moduleobject // buffer components and utils // contextmanager | A rudimentary context manager that is defined and used internally for special operations. Can also be obtained via methods. |
├─ eofmetas ─ _EOFMetas
|
moduleobject // buffer components and utils // data calculation | Storage, calculation and management of data endpoints. |
├─ globcursor ─ _GlobCursor
|
moduleobject // buffer components and utils // cursor memory | Storage and management of cursor position data. |
├─ items | module // buffer components and utils // data management | TextBuffer data management. |
│ ├─ ChunkData | object // buffer components and utils // data management | Data package from the swap. |
│ ├─ ChunkLoad | object // buffer components and utils // data management | Return value as information about the work on the swap. |
│ ├─ ChunkMetaItem | object // buffer components and utils // data management | Item for indexing metadata of the swap chunks. |
│ ├─ DumpData | object // buffer components and utils // data management | Data that will be transferred to the database. |
│ ├─ HistoryItem | object // buffer components and utils // data management | Item for storing and processing chronological progress. |
│ └─ WriteItem | object // buffer components and utils // data management | Return value for writing actions to the buffer with information about the processed data. |
├─ localhistory ─ _LocalHistory
|
moduleobject // buffer components and utils // chronology memory and processing | Optional component for storing and processing chronological progress. |
├─ marker | module // buffer components and utils // data marking storage and processing | Optional component for creation and processing of marked data areas. |
│ ├─ _Marker | object // buffer components and utils // data marking storage and processing // main object | Object for creation and processing of marked data areas. |
│ └─ _Marking | object // buffer components and utils // data marking storage and processing // data type | Marking object. |
├─ nullcomponent ─ _NullComponent
|
moduleobject // buffer components and utils // default component | Default object for unselected components. |
├─ row | module // buffer components and utils // row data storage and processing | Row object for storing and processing data in the buffer. |
│ ├─ _Row | object // buffer components and utils // row data storage and processing // main object | The main row object. |
│ ├─ _CursorCache | object // buffer components and utils // row data storage and processing // row component // cursor component | LRU component of the cursor of a row. |
│ ├─ _Cursors | object // buffer components and utils // row data storage and processing // row component // cursor | The cursor object of a row. |
│ └─ _DataCache | object // buffer components and utils // row data storage and processing // row component // data cache | Data storage of a row. |
├─ swap | module // buffer components and utils // swap data storage and processing | Optional component for swapping out data packets from the buffer. |
│ ├─ _Swap | object // buffer components and utils // swap data storage and processing // main object | Object for swapping data packets out of the buffer. |
│ └─ _MetaIndex | object // buffer components and utils // swap data storage and processing // swap component // metadata storage and processing | Object for storing and processing metadata of chunks in the swap. |
└─ trimmer ─ _Trimmer
|
moduleobject // buffer components and utils // data size management | Optional component for limiting the number of rows stored in the TextBuffer. Created with swap, among other things. |
- [+]
- Indicates some internal correlations to components.
- alternate linebreak
- An alternate line break, also called non-breaking linebreak, is stored in the _Row objects of the buffer
as
""
under theend
attribute. - buffer rows
- Rows that are currently stored in the buffer are kept as _Row objects in a list of
rows
. - chunk position
- Swapped out data packets are stored under slot numbers in the database; the processing, storage and adjustment of
the positions of the packets in the data is kept separately in the memory.
If a chunk is " shifted to the side " from the buffer this package gets a position identifier increased by 1
depending on the side. The topmost/first data packet in the swap always carries the position number
-1
, the lowest1
-- if present. - chunk slot
- The actual slot number of a data packet is assigned by an associative dictionary (positions id to slot). Under these numbers the chunks are stored in the swap.
- content
- All characters except line breaks (
"\n"
nor""
). - content point
-
Data point of the content characters.
"foo bar\n x" x = content point 8
- current buffer
- Row data that actually exists in the TextBuffer object and is not swapped out.
- current chunk position
- The chunk position numbers adjacent to the TextBuffer object are stored in a list with two fields
(above, below). If there are no chunks in one direction, this is indicated as
0
in the list. If data is related to the current buffer, the keyNone
is used. - current marking
- If a marking of data areas is started, a _Marking object is attached to a list in _Marker and held at position -1 until the marking is finished, then it is sorted into the list. The finish of a marking can be communicated by a method or with omission by parameter in some other methods.
- cursor
- Each _Row contains its own cursor object (_Cursors). The current main cursor position is composed of the row defined as current in the buffer object and the cursor position in this row.
- cursors
- The cursor position of a _Row is stored and processed via the _Cursors object, which contains the cursor position in relation to the data, the content and the tab raster.
- data
- All characters including line breaks (non-breaking and real).
- data point
- Data point considering all characters.
- eof
- "End of File" means the end of the entirety of the data stored in the current buffer and swap.
- global cursor
- A stored cursor position on the x-axis, this is adjusted when the cursor is moved on the x-axis and tried to apply to other rows when the cursor is moved on the y-axis.
- inplace of chunk slot
- A direct editing of the data of a chunk under the slot number.
- line
- A line, unlike a row, is interpreted up to the next linebreak (non-breaking and real) and can span several rows.
- line point
- The specification of a data point by a line number.
- linebreak
- A linebreak, also called a real linebreak, is stored in the _Row objects of the buffer
as
"\n"
under theend
attribute. - non-breaking linebreak
- An alternate line break, also called non-breaking linebreak, is stored in the _Row objects of the buffer
as
""
under theend
attribute. - null object
- An object from which any attribute can be retrieved, executed or assigned without effect.
- real linebreak
- A linebreak, explicitly real linebreak, is stored under the attributes
end
in the _Row as"\n"
. - row
- A row describes the data of a _Row, and unlike a line, can end without a line break.
- row cursors
- The cursor position on the x-axis is defined individually in each _Row via its _Cursors object. The main cursor in the TextBuffer is composed of the row defined as the current one and its cursor memory.
- row end
- The end attributes of a line is by default
None
, positive values are stored as a string and can be""
for an alternate linebreak or"\n"
for a real linebreak. - row index
-
_Rows in the current buffer are stored in a list of
rows
, the index of a row describes the position in this list and is not directly related to the totality of the data. - row number
- A row number describes the position of the _Row in relation to the totality of the data.
- row point
- A row point describes a coordinate for a _Row over its number in the totality of rows.
- sql cursor
- A sql cursor is an abstract object of the sqlite3 module and is used for queries to a database.
- tab raster
-
The visual spacing between tab-delimited strings is determined by the defined tab size and the length of the string before a tab, resulting in a raster that determines the positions of characters after a tab at the tab stop.
tab_size = 8 | | | | | | Anything that can go\t foo will go \t bar.
- tab representation
- The visual representation of data containing tab characters includes the relative spacing by tabs.
- visual length
- The visual length/size of a string includes the relative spacing through the tabs and excludes non-printable characters and sequences.
- visual size
- The visual length/size of a string includes the relative spacing through the tabs and excludes non-printable characters and sequences.
Date: | 21 Dec 2022 |
---|---|
Version: | 0.1 |
Author: | Adrian Hoefflin [srccircumflex] |