[4/6] gdb/tui: make tui_win_info::rerender public
Commit Message
In the next commit I'm going to want to call rerender from outside the
tui_win_info class, so let's make it public.
This is just a refactor, there should be no user-visible changes after
this commit.
---
gdb/tui/tui-data.h | 12 +++++++-----
gdb/tui/tui-regs.h | 4 ++--
gdb/tui/tui-winsource.h | 4 ++--
3 files changed, 11 insertions(+), 9 deletions(-)
@@ -44,10 +44,6 @@ struct tui_win_info
tui_win_info () = default;
DISABLE_COPY_AND_ASSIGN (tui_win_info);
- /* This is called after the window is resized, and should update the
- window's contents. */
- virtual void rerender ();
-
/* Create the curses window. */
void make_window ();
@@ -55,7 +51,13 @@ struct tui_win_info
tui_win_info (tui_win_info &&) = default;
virtual ~tui_win_info () = default;
- /* Call to refresh this window. */
+ /* Call to update the in-memory contents of this window. Does not
+ cause the contents to be drawn to the screen. */
+ virtual void rerender ();
+
+ /* Call to refresh this window on the screen. The in-memory contents of
+ the window are not updated by this call, whatever the current contents
+ are, they are drawn to the screen. */
virtual void refresh_window ();
/* Make this window visible or invisible. */
@@ -90,6 +90,8 @@ struct tui_data_window : public tui_win_info
return m_current_group;
}
+ void rerender () override;
+
protected:
void do_scroll_vertical (int num_to_scroll) override;
@@ -97,8 +99,6 @@ struct tui_data_window : public tui_win_info
{
}
- void rerender () override;
-
private:
/* Display the registers in the content from 'start_element_no'
@@ -103,8 +103,6 @@ struct tui_source_window_base : public tui_win_info
/* Erase the content and display STRING. */
void do_erase_source_content (const char *string);
- void rerender () override;
-
virtual bool set_contents (struct gdbarch *gdbarch,
const struct symtab_and_line &sal) = 0;
@@ -138,6 +136,8 @@ struct tui_source_window_base : public tui_win_info
public:
+ void rerender () override;
+
/* Refill the source window's source cache and update it. If this
is a disassembly window, then just update it. */
void refill ();