From 05a95e146b2429154b360030d098f0dae5555706 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sun, 7 Apr 2024 15:35:45 +0200 Subject: Fix Fl_Terminal::handle_unknown_char() for plot_char() (#948) - Add 'int Fl_Terminal::handle_unknown_char(int drow, int dcol)' to write the "unknown" character to the intended display position. - Define Fl_Terminal::unknown_char as a static variable to avoid redundancy. In the future this might be overridden by users. --- FL/Fl_Terminal.H | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'FL') diff --git a/FL/Fl_Terminal.H b/FL/Fl_Terminal.H index 3b9b39a86..d6580a106 100644 --- a/FL/Fl_Terminal.H +++ b/FL/Fl_Terminal.H @@ -1027,6 +1027,7 @@ public: void append(const char *s, int len=-1); protected: int handle_unknown_char(void); + int handle_unknown_char(int drow, int dcol); // Drawing void draw_row_bg(int grow, int X, int Y) const; void draw_row(int grow, int Y) const; @@ -1170,6 +1171,9 @@ public: // API: Show unknown/unprintable chars bool show_unknown(void) const; void show_unknown(bool val); +protected: + static const char *unknown_char; ///< "unknown" replacement character +public: // API: ANSI sequences bool ansi(void) const; void ansi(bool val); -- cgit v1.2.3