Amendment to 7b59c78. This should prevent spurious NOS character sets from
appearing in the widgets, and should also prevent the G0 and G2 character
sets from getting mixed up in the widgets when those triplets are within
object definitions.
The G0 and G2 character set in the widgets may still be incorrect in corner
cases of objects invoked within areas of the page where the character set
has been changed either with the ESC/Switch spacing attribute or with the
"modified G0/G2 character set designation" triplet.
A complete rewrite of decode.cpp and decode.h to make it easier to follow
and maintain. Rather than a set of "layers" descended from C++ classes, the
for-loop across the rows and columns explicitly lays out the order of
processing the Level 1 characters and attributes, the X/26 enhancements
that affect the page directly as well as those within each Invocation of an
Object, followed by selecting which Invoked Object to place in the character
cell or in the absence of an Object the underlying page fragment will be
placed in the cell.
The new decoder has the following improvements over the old...
- Local Enhancement Data has priority over Active Objects.
- Active Objects can set Full Screen and Full Row colours.
- Incremental/decremental flash phases are tracked correctly within Objects.
- X/26 characters overwriting the bottom half of Level 1 Double Height rows.
- Interaction between the underlying page and Objects where characters of
different sizes overlap.
This is needed for the upcoming decoder write as decode.cpp will track the
Active Position from the internal data of x26triplets.
If decode.cpp is rewritten again to track the Active Position independently
of x26triplets this commit may be reverted, but then again tracking how the
Active Position moves on both levels 1.5 and 2.5+ may be useful in terms of
warning the user of differing results on different decoder levels.
Previously every character on the page was drawn up to six times. Now the
page is drawn once, quickly copied up to five times and then only the
flashing characters are redrawn on the copies.
Amendment to 7493c8f so that a document even with only one subpage will not
be marked as cleanly saved. This should reinforce the fact that only TTI
files will be guaranteed to store everything.
This allows a single keypress or menu click to repeatedly export a subpage
over the same .t42 file, like "Save" does for TTI files. If further teletext
page formats are added in the future this option should remember which
format was exported.
This option is deliberately different from "Save" as .t42 files are only
exported as the current subpage on view, and some metadata stored in TTI
files but not in .t42 files could be lost.
When exporting .t42 files the document is only marked as cleanly saved if it
consisted of a single subpage. Documents of more than one subpage will still
cause a confirmation dialog to be shown if unsaved, as the other subpages
will be lost unless the document is saved again as TTI.
When the clipboard has plain text data copied from a plain text or ASCII
text editor, pasting the text will perform word wrapping.
The text will originate from the cursor position and subsequent lines will
by default start from column 1 to provide room for alphanumeric colour
control codes in column 0.
If the cursor is at column 0 then all lines will start at column 0.
If a box selection is dragged before pasting the text will originate at
the top left of the selection box and be confined to the box. This can be
used if the second and subsequent lines need to start at a different
column, or if the pasted text must not overwrite an existing feature at
the right side of the page.
Note that cutting or copying text from within QTeletextMaker itself will
not be word wrapped on paste.