From 13446e05a363db17f0140b1450fc7df509d2ca37 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 16 Jun 2019 11:22:38 -0600 Subject: Introduce methods for scrolling This changes the TUI to use virtual methods on the various window types for scrolling. Window-specific functions for this purpose are renamed to be methods, and the generic tui_scroll function is removed as it is no longer called. gdb/ChangeLog 2019-06-25 Tom Tromey * tui/tui-winsource.h (tui_horizontal_source_scroll): Don't declare. * tui/tui-winsource.c (tui_source_window_base::do_scroll_horizontal): Rename from tui_horizontal_source_scroll. * tui/tui-windata.h (tui_vertical_data_scroll): Don't declare. * tui/tui-windata.c (tui_data_window::do_scroll_vertical): Rename from tui_vertical_data_scroll. * tui/tui-win.h (tui_scroll): Don't declare. * tui/tui-win.c (tui_win_info::forward_scroll) (tui_win_info::backward_scroll, tui_win_info::left_scroll) (tui_win_info::right_scroll): Rename and update. (tui_scroll_forward_command, tui_scroll_backward_command) (tui_scroll_left_command, tui_scroll_right_command): Update. (tui_scroll): Remove. * tui/tui-source.h: Don't declare tui_vertical_source_scroll. * tui/tui-source.c (tui_source_window::do_scroll_vertical): Rename from tui_vertical_source_scroll. * tui/tui-disasm.h (tui_vertical_disassem_scroll): Don't declare. * tui/tui-disasm.c (tui_disasm_window::do_scroll_vertical): Rename from tui_vertical_disassem_scroll. * tui/tui-data.h (struct tui_win_info) : New methods. : Likewise. (struct tui_source_window_base): Add do_scroll_horizontal. (struct tui_source_window, struct tui_disasm_window): Add do_scroll_vertical. (struct tui_data_window, struct tui_cmd_window): Add do_scroll_horizontal and do_scroll_vertical. * tui/tui-command.c (tui_dispatch_ctrl_char): Use method calls. --- gdb/tui/tui-winsource.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'gdb/tui/tui-winsource.h') diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h index 920032b04ea..98ce75fb620 100644 --- a/gdb/tui/tui-winsource.h +++ b/gdb/tui/tui-winsource.h @@ -53,9 +53,6 @@ extern void tui_update_source_windows_with_line (struct symtab *, extern void tui_clear_source_content (struct tui_win_info *, int); extern void tui_erase_source_content (struct tui_win_info *, int); extern void tui_show_source_content (struct tui_win_info *); -extern void tui_horizontal_source_scroll (struct tui_win_info *, - enum tui_scroll_direction, - int); extern void tui_refill_source_window (struct tui_win_info *); extern enum tui_status tui_set_exec_info_content (struct tui_win_info *); extern void tui_show_exec_info_content (struct tui_win_info *); -- cgit v1.2.1