From 38fc08c15f5f4dca0b5987bbae326bf8f5468aa5 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Thu, 16 Nov 2023 14:58:49 -0800 Subject: Added clear(), some methods protected->public New public methods: void clear(void); void clear(Fl_Color val); old protected methods made public: void clear_screen(bool scroll_to_hist=true); // ESC [ 2 J void clear_screen_home(bool scroll_to_hist=true); // ESC [ H ESC [ 2 J void cursor_home(void); // ESC [ 0 H test/terminal modified to test these, and added separate tests for both the API and ANSI code ways to do these ops. --- FL/Fl_Terminal.H | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'FL') diff --git a/FL/Fl_Terminal.H b/FL/Fl_Terminal.H index d5ac13885..961713296 100644 --- a/FL/Fl_Terminal.H +++ b/FL/Fl_Terminal.H @@ -790,8 +790,6 @@ protected: int w_to_col(int W) const; int h_to_row(int H) const; // API: Display clear operations - void clear_screen(bool scroll_to_hist=true); - void clear_screen_home(bool scroll_to_hist=true); void clear_sod(void); void clear_eod(void); void clear_eol(void); @@ -819,8 +817,13 @@ protected: void history_use(int val, bool update=true); public: // API: Terminal operations - void clear_history(void); // ESC [ 3 J - void reset_terminal(void); // ESC c + void clear(void); + void clear(Fl_Color val); + void clear_screen(bool scroll_to_hist=true); // ESC [ 2 J + void clear_screen_home(bool scroll_to_hist=true); // ESC [ H ESC [ 2 J + void clear_history(void); // ESC [ 3 J + void reset_terminal(void); // ESC c + void cursor_home(void); // ESC [ 0 H protected: // Cursor management int cursor_h(void) const; @@ -841,7 +844,6 @@ protected: void cursor_down(int count=1, bool do_scroll=false); void cursor_left(int count=1); void cursor_right(int count=1, bool do_scroll=false); - void cursor_home(void); void cursor_eol(void); void cursor_sol(void); void cursor_cr(void); -- cgit v1.2.3