3df505f TUI resize unification

Authored and Committed by Tom Tromey 4 years ago
    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) 
    	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.
    	
    	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.
    
        
file modified
+41 -0
file modified
+4 -0
file modified
+0 -12
file modified
+0 -2
file modified
+6 -0
file modified
+7 -17
file modified
+2 -1
file modified
+2 -3
file modified
+1 -8
file modified
+2 -3
file modified
+5 -0
file modified
+2 -0
file modified
+52 -87
file modified
+5 -37
file modified
+2 -3