diff options
author | Tom Tromey <tom@tromey.com> | 2019-07-09 17:29:13 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-08-15 14:17:11 -0600 |
commit | 3df505f60eacd2c931092c7007f084d27583f9e5 (patch) | |
tree | 46ba8a87a1473d10e92433f803684184ff378948 /gdb/tui/tui-regs.h | |
parent | 272560b577894c388a3d0d3fda8294683714f582 (diff) | |
download | gdb-3df505f60eacd2c931092c7007f084d27583f9e5.zip gdb-3df505f60eacd2c931092c7007f084d27583f9e5.tar.gz gdb-3df505f60eacd2c931092c7007f084d27583f9e5.tar.bz2 |
TUI resize unification
The TUI currently has two different ways to resize a window: the
resize method, and the methods make_invisible_and_set_new_height and
make_visible_with_new_height.
There's no deep reason to have two different ways to resize a window,
so this patch unifies them, leaving just the "resize" method.
This also changes the locator to be handled more like an ordinary
window and less like an adjunct of the associated source window.
gdb/ChangeLog
2019-08-15 Tom Tromey <tom@tromey.com>
* tui/tui-io.c (tui_puts_internal): Check TUI_CMD_WIN before
calling update_cmdwin_start_line.
* tui/tui-winsource.h (struct tui_source_window_base)
<do_make_visible_with_new_height, set_new_height>: Don't declare.
<rerender>: Declare.
* tui/tui-winsource.c (tui_source_window_base::update_tab_width):
Call rerender.
(tui_source_window_base::set_new_height): Remove.
(tui_source_window_base::rerender): Rename from
do_make_visible_with_new_height.
* tui/tui-win.c (tui_resize_all, tui_adjust_win_heights): Use
resize method.
(tui_win_info::make_invisible_and_set_new_height)
(tui_win_info::make_visible_with_new_height): Remove.
* tui/tui-stack.h (struct tui_locator_window) <rerender>:
Declare.
* tui/tui-stack.c (tui_locator_window::rerender): New method.
* tui/tui-regs.h (struct tui_data_window) <set_new_height,
do_make_visible_with_new_height>: Don't declare.
<rerender>: Declare.
* tui/tui-regs.c (tui_data_window::rerender): Rename from
set_new_height.
(tui_data_window::do_make_visible_with_new_height): Remove.
* tui/tui-layout.c (show_source_disasm_command, show_data): Don't
call tui_show_locator_content.
(tui_gen_win_info::resize): Call rerender.
(show_source_or_disasm_and_command): Don't call
tui_show_locator_content.
* tui/tui-data.h (struct tui_gen_win_info) <rerender>: New
method.
(struct tui_win_info) <rerender>: Declare.
<set_new_height, make_invisible_and_set_new_height,
make_visible_with_new_height>: Don't declare.
* tui/tui-data.c (tui_win_list::rerender): New method.
* tui/tui-command.h (struct tui_cmd_window)
<do_make_visible_with_new_height>: Don't declare.
* tui/tui-command.c
(tui_cmd_window::do_make_visible_with_new_height): Remove.
gdb/testsuite/ChangeLog
2019-08-15 Tom Tromey <tom@tromey.com>
* gdb.tui/empty.exp: Enable resizing tests.
Diffstat (limited to 'gdb/tui/tui-regs.h')
-rw-r--r-- | gdb/tui/tui-regs.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h index b2abfc2..7b0bb50 100644 --- a/gdb/tui/tui-regs.h +++ b/gdb/tui/tui-regs.h @@ -55,8 +55,6 @@ struct tui_data_window : public tui_win_info void refresh_all () override; - void set_new_height (int height) override; - void refresh_window () override; const char *name () const override @@ -111,7 +109,6 @@ protected: void do_scroll_horizontal (int num_to_scroll) override { } - void do_make_visible_with_new_height () override; /* Return the index of the first element displayed. If none are displayed, then return -1. */ @@ -122,6 +119,8 @@ protected: of the display height. This function checks that we won't display off the end of the register display. */ void display_reg_element_at_line (int start_element_no, int start_line_no); + + void rerender () override; }; extern void tui_check_register_values (struct frame_info *); |