51 std::vector<attribute> attributes;
53 struct scrolling_region { coordinate_type top; coordinate_type bottom; };
54 enum class character_set
60 enum class keypad_mode
67 point_type bufferOrigin;
68 std::optional<point_type> cursorPos;
69 std::vector<buffer_line> lines;
70 coordinate_type defaultTabStop = 8;
71 std::optional<attribute> attribute;
72 bool originMode =
true;
74 bool bracketedPaste =
false;
76 character_set characterSet = character_set::USASCII;
77 keypad_mode keypadMode = keypad_mode::Numeric;
78 bool cursorKeysMode =
false;
79 std::optional<scrolling_region> scrollingRegion;
99 using base_type::font;
100 void set_font(optional_font
const& aFont)
override;
125 buffer& active_buffer() const;
126 void enable_alternate_buffer();
127 void disable_alternate_buffer();
133 attribute default_attribute() const;
134 attribute active_attribute() const;
135 size character_extents() const;
137 void erase_in_display(point_type const& aBufferPosStart, point_type const& aBufferPosEnd);
138 char32_t to_unicode(
char32_t aCharacter) const;
139 buffer_line&
line(coordinate_type aLine);
140 char32_t& character(point_type const& aBufferPos);
141 void output_character(
char32_t aCharacter,
std::
optional<attribute> const& aAttribute = {});
142 point_type buffer_origin()
const;
143 void set_buffer_origin(point_type aBufferOrigin);
144 point_type buffer_pos()
const;
145 point_type to_buffer_pos(point_type aCursorPos)
const;
146 point_type cursor_pos()
const;
147 bool set_cursor_pos(point_type aCursorPos,
bool aExtendBuffer =
true);
148 void update_cursor();
149 rect cursor_rect()
const;
150 void make_cursor_visible(
bool aToBufferOrigin =
true);
153 size_type iTerminalSize;
154 size_type iBufferSize;
155 mutable optional_font iNormalFont;
156 mutable optional_font iBoldFont;
157 mutable optional_font iItalicFont;
158 mutable optional_font iBoldItalicFont;
160 optional_text_format iTextFormat;
161 buffer iPrimaryBuffer = {};
162 buffer iAlternateBuffer = {};
163 buffer* iActiveBuffer = &iPrimaryBuffer;
164 std::optional<std::string> iEscapeSequence;
165 mutable bool iOutputting =
false;
166 uint64_t iCursorAnimationStartTime;
167 widget_timer iAnimator;