Public Attributes | |
bool | cursorKeepVisible |
unsigned | decoratedTextLinesCacheSize |
unsigned | eolClipboardCopy |
unsigned | eolClipboardPaste |
unsigned | eolSplitLine |
unsigned | marginBottom |
unsigned | marginLeft |
unsigned | marginRight |
unsigned | marginTop |
bool | selectedTextAccurateHighlight |
ColorRGB | selectedTextBgColor |
bool | selectedTextInvert |
bool | tabIsCtrl |
bool | tabIsSoft |
unsigned | tabSize |
ColorRGB | textBgColor |
unsigned | textLayoutQuality |
unsigned | textLineMaxWidth |
bool | textOvertype |
bool | textReadonly |
unsigned | vScrollInBytesTextLineCount |
Controls editor behavior in a declarative way.
Controls if overtype or insert editing mode is active.
Controls if interactive text modification is forbidden.
unsigned fe::EditorFacadePolicy::tabSize |
Controls how editor should filter line terminators in text pasted from a clipboard with fe::IEditorFacade::pasteFromClipboard() method. The table below shows how editor should tokenize
A\nBB\rCCC\r\nDDDDinput string depending of the value of this field:
eolKeep | A\n |
eolVoid | A |
eolLF | A\n |
eolCR | A\r |
eolCRLF | A\r\n |
eolNEL, eolFF, eolLS, eolPS | Like eolLF and eolCR just different replacement character is used |
Other value | Unsupported, fe::IEditorFacade::setPolicy() should fail |
Controls how editor should filter line terminators in text copied to a clipboard with fe::IEditorFacade::copyToClipboard() method. The table below shows how editor should handle
A\n BB\r CCC DDDD\r\n EEEEEinternal text data depending of the value of this field:
eolKeep | A\nBB\rCCCDDDD\r\nEEEEE |
eolVoid | ABBCCCDDDDEEEEE |
eolLF | A\nBB\nCCC\nDDDD\nEEEEE |
eolCR | A\rBB\rCCC\rDDDD\rEEEEE |
eolCRLF | A\r\nBB\r\nCCC\r\nDDDD\r\nEEEEE |
eolNEL, eolFF, eolLS, eolPS | Like eolLF and eolCR just different replacement character is used |
Other value | Unsupported, fe::IEditorFacade::setPolicy() should fail |
unsigned fe::EditorFacadePolicy::eolSplitLine |
Controls what line terminator editor should insert when text line is split with fe::IEditorFacade::splitLine() method. Should be one of constants from fe::EndOfLine enumeration except of eolKeep.
Controls how editor layouts and renders text.
If textLayoutQuality is tlqHigh
, font substitution, bidirectional text reordering, glyph composition and other features for proper handling of complex Unicode text are all enabled.
This quality level allows to properly handle text in Thai, Arabic, Hebrew and other languages with complex scripting.
If textLayoutQuality is tlqDefault
, some Unicode text may be laid out and rendered incorrectly. This is particularly likely for Unicode code points that are not in the [0, 256)
range, i.e. for code points that don't match ISO 8859-1 encoded characters.
The only benefit of this quality level is that text layout and rendering is relatively fast. If textLayoutQuality is tlqAuto
, editor decides on its own how to handle particular text line depending on its contents.
The following table shows how the Déja vu
Unicode string is handled depending on the value of textLayoutQuality:
textLayoutQuality = tlqHigh | ![]() |
textLayoutQuality = tlqDefault | ![]() |
Controls selected text visual representation.
If selectedTextBgColor is equal to fe::InvalidColor the value of selectedTextInvert is ignored and selected text is always inverted.
selectedTextInvert = true; textBgColor = 0x00FF00; selectedTextBgColor = 0xFF0000 | ![]() |
selectedTextInvert = false; textBgColor = 0x00FF00; selectedTextBgColor = 0xFF0000 | ![]() |
Selected text background color.
Editor's text area background color.
textBgColor = 0xFFFFFF | ![]() |
textBgColor = 0x00A000 | ![]() |
Controls selected text visual representation.
selectedTextAccurateHighlight = true | ![]() |
selectedTextAccurateHighlight = false | ![]() |
Controls if sceen is automatically scrolled to show the text cursor (aka caret) when it is moved to another position.
Controls if text is automatically wrapped. Measured in pixels.
If textLineMaxWidth is (unsigned)-1
, text is not wrapped.
If textLineMaxWidth is 0
, text is wrapped to fit editor's text area width.
textLineMaxWidth = 0 | ![]() |
textLineMaxWidth = 50 | ![]() |
textLineMaxWidth = -1 | ![]() |
Controls for how many text lines editor can store decoration information.
If decoratedTextLinesCacheSize is 0
, then editor determins the value on its own.
Controls which algorithm for vertical scroll position calculation editor should use.
Editor supports two algorithms for vertical scroll position calculation. When automatic text wrap is disabled, both of them have equal time complexity of O(1)
, i.e. time complexity doesn't depend on amount of text loaded in editor.
Enabling of automatic text wrap doesn't hurt the first algorithm's performance. But this algorithm has one major disadvantage that limits its application: even a single character insert/delete action that doesn't change number of text lines results in resize of vertical scrollbar's thumb. This visual artifact can be very annoying. Fortunately the issue shows up only when scroll range is relatively small, i.e. when height of vertical scrollbar's thumb is not equal to its minimal value. So this algorithm works best when an editor maintains large text data.
Enabling of automatic text wrap hurts the second algorithm's performance. The reason is that this algorithm recalculates text line segments for all text lines on every text change action, i.e. its time complexity becomes to be O(n)
, where n
is the text data size. Fortunately this algorithm doesn't suffer from undesired vertical scrollbar's thumb resizing. So it best suits when an editor maintains a reasonably small text data.
As it is explained above when automatic text wrap is enabled the criteria to choose algorithm for vertical scroll position calculation is the text data size that an editor maintains at the moment.
So this parameter specifies the number of text lines that editor uses as a threshold to automatically switch between two algorithms for vertical scroll position calculation. When number of text lines exceeds the value of this parameter and if automatic text wrap is enabled the editor switches to use the first algorithm, otherwise it uses the second one. Similarly, when number of text lines becomes less then the threshold editor switches back to use the second algorithm.
unsigned fe::EditorFacadePolicy::marginLeft |
Left text area margin. Measured in pixels.
marginLeft = 28; | ![]() |
unsigned fe::EditorFacadePolicy::marginTop |
Top text area margin. Measured in pixels.
marginTop = 14; | ![]() |
unsigned fe::EditorFacadePolicy::marginRight |
Right text area margin. Measured in pixels.
marginRight = 20; | ![]() |
unsigned fe::EditorFacadePolicy::marginBottom |
Bottom text area margin. Measured in pixels.
marginBottom = 12; | ![]() |