Introduce tui_win_info::make_visible_with_new_height
authorTom Tromey <tom@tromey.com>
Tue, 18 Jun 2019 03:11:56 +0000 (21:11 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 25 Jun 2019 13:48:43 +0000 (07:48 -0600)
commit5fcee43a960f0735c53a7c24823b2e4bc1460b9f
tree0d7da0fd71177323352c4eac6630a06556653f19
parentd83f1fe65da075aa08ac7d6b6ef3508587c94600
Introduce tui_win_info::make_visible_with_new_height

This changes make_visible_with_new_height to be a method on
tui_win_info, letting us remove a spot that checks the window type.

gdb/ChangeLog
2019-06-25  Tom Tromey  <tom@tromey.com>

* tui/tui-win.c (tui_source_window_base::update_tab_width): Call
make_visible_with_new_height method.
(tui_win_info::make_visible_with_new_height): New method.
(tui_source_window_base::do_make_visible_with_new_height)
(tui_data_window::do_make_visible_with_new_height)
(tui_cmd_window::do_make_visible_with_new_height): New methods.
(make_visible_with_new_height): Remove.
(tui_resize_all, tui_adjust_win_heights): Use
make_visible_with_new_height method.
* tui/tui-data.h (struct tui_win_info)
<do_make_visible_with_new_height, make_visible_with_new_height>:
New methods.
(struct tui_source_window_base, struct tui_data_window)
(struct tui_cmd_window) <do_make_visible_with_new_height>: New
methods.
gdb/ChangeLog
gdb/tui/tui-data.h
gdb/tui/tui-win.c