diff options
author | Tom Tromey <tom@tromey.com> | 2019-06-16 16:28:12 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-06-25 07:48:38 -0600 |
commit | 5b81daba91b035ce98fb7be4970fc2be0183f6ea (patch) | |
tree | 95b05f93cccf3058b358619c00276272ecf23097 /gdb/tui/tui-data.h | |
parent | cb2ce89305264543a4014d98bacb26800d92d394 (diff) | |
download | gdb-5b81daba91b035ce98fb7be4970fc2be0183f6ea.zip gdb-5b81daba91b035ce98fb7be4970fc2be0183f6ea.tar.gz gdb-5b81daba91b035ce98fb7be4970fc2be0183f6ea.tar.bz2 |
Introduce refresh_window method
This replaces tui_refresh_win with a new refresh_window method. This
removes another spot that was checking the window's type.
gdb/ChangeLog
2019-06-25 Tom Tromey <tom@tromey.com>
* tui/tui-winsource.c (tui_erase_source_content)
(tui_show_source_content, tui_show_exec_info_content)
(tui_erase_exec_info_content): Use refresh_window method.
* tui/tui-wingeneral.h (tui_refresh_win): Don't declare.
* tui/tui-wingeneral.c (tui_gen_win_info::refresh_window): Rename
from tui_refresh_win.
(tui_data_window::refresh_window): New method.
(tui_win_info::refresh, tui_source_window_base::refresh)
(tui_refresh_all): Use refresh_window method.
* tui/tui-stack.c (tui_show_locator_content): Call refresh_window
method.
* tui/tui-regs.c (tui_display_register): Call refresh_window
method.
* tui/tui-layout.c (show_source_disasm_command)
(show_source_or_disasm_and_command): Call refresh_window method.
* tui/tui-data.h (struct tui_gen_win_info)
(struct tui_data_window, struct tui_cmd_window) <refresh_window>:
New method.
Diffstat (limited to 'gdb/tui/tui-data.h')
-rw-r--r-- | gdb/tui/tui-data.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index 08d388f..8f77c9d 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -48,6 +48,9 @@ struct tui_gen_win_info { } + /* Call to refresh this window. */ + virtual void refresh_window (); + /* Window handle. */ WINDOW *handle = nullptr; /* Type of window. */ @@ -418,6 +421,8 @@ struct tui_data_window : public tui_win_info void set_new_height (int height) override; + void refresh_window () override; + /* Start of data display content. */ tui_win_content data_content = NULL; int data_content_count = 0; @@ -456,6 +461,10 @@ struct tui_cmd_window : public tui_win_info int max_height () const override; + void refresh_window () override + { + } + int start_line = 0; protected: |