Work on the text editing control is underway. It consists of two main elements. The first is the part responsible for data storage and operations. This data is text, its attributes - color, font size, font type, etc., as well as pictures. Exactly it's not just pictures but any GUI elements, e.g. buttons. This part also implements the undo/redo functionality and provides way to read/write data. The second element is responsible for displaying content and processing actions performed by the user. These actions can be of two types. The first group do not affect the content, for example, moving the cursor, selecting text. Their implementation takes place inside displaying component and has no effect on the data. The second group is related to the edition. Each time a user enters new text or modifies an existing one, or inserts or deletes images, information about it is transferred to the data storage component, which makes the appropriate modification. This in turn is reflected in the displayed text. Breaking the operation of the control on these two aspects makes it possible to implement in a simple way the functionality that would otherwise be problematic, for example editing the same document in multiple views.
The first element of the editor is mostly finished. The work has just started on the second. Below is a video showing text placement depending on the size of the control. It shows how the length of the line is set and that the words are moved to the next line if they do not fit in the current.