diff options
author | Tom Tromey <tom@tromey.com> | 2019-06-16 14:52:08 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-06-25 07:48:34 -0600 |
commit | 1825f487ae903438eb2a9b6f461337d8ec1b06c0 (patch) | |
tree | ad8848b326dff919ab0ae05d62a9e9e9a62d4515 /gdb/tui/tui-data.h | |
parent | ad54d15bdb71b05010ece1ef32ab22ab46794166 (diff) | |
download | gdb-1825f487ae903438eb2a9b6f461337d8ec1b06c0.zip gdb-1825f487ae903438eb2a9b6f461337d8ec1b06c0.tar.gz gdb-1825f487ae903438eb2a9b6f461337d8ec1b06c0.tar.bz2 |
Introduce the refresh_all method
This introduces the tui_win_info::refresh_all method and implements it
as needed in subclasses. The name and comment are a bit of a guess on
my part. The main benefit of this patch is removing another switch on
the type of the window.
gdb/ChangeLog
2019-06-25 Tom Tromey <tom@tromey.com>
* tui/tui.c (tui_rl_other_window): Call the refresh_all method.
* tui/tui-windata.c (tui_data_window::refresh_all): Rename from
tui_refresh_data_win.
* tui/tui-win.c (tui_source_window_base::refresh_all): New
method.
(tui_refresh_all_win): Call the refresh_all method.
(tui_set_focus): Likewise.
* tui/tui-data.h (struct tui_win_info) <refresh_all>: New method.
(struct tui_source_window_base, struct tui_data_window) <refresh>:
Likewise.
Diffstat (limited to 'gdb/tui/tui-data.h')
-rw-r--r-- | gdb/tui/tui-data.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index 183efb1..e45c9fa 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -261,6 +261,12 @@ public: /* Refresh this window and any associated windows. */ virtual void refresh (); + /* Called after all the TUI windows are refreshed, to let this + window have a chance to update itself further. */ + virtual void refresh_all () + { + } + /* Methods to scroll the contents of this window. Note that they are named with "_scroll" coming at the end because the more obvious "scroll_forward" is defined as a macro in term.h. */ @@ -303,6 +309,7 @@ public: void make_visible (bool visible) override; void refresh () override; + void refresh_all () override; /* Refill the source window's source cache and update it. If this is a disassembly window, then just update it. */ @@ -371,6 +378,7 @@ struct tui_data_window : public tui_win_info DISABLE_COPY_AND_ASSIGN (tui_data_window); void clear_detail () override; + void refresh_all () override; /* Start of data display content. */ tui_win_content data_content = NULL; |