mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-25 02:53:48 +08:00
13446e05a3
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 <tom@tromey.com> * 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) <do_scroll_vertical, do_scroll_horizontal>: New methods. <forward_scroll, backward_scroll, left_scroll, right_scroll>: 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.
61 lines
1.9 KiB
C
61 lines
1.9 KiB
C
/* TUI window generic functions.
|
|
|
|
Copyright (C) 1998-2019 Free Software Foundation, Inc.
|
|
|
|
Contributed by Hewlett-Packard Company.
|
|
|
|
This file is part of GDB.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
#ifndef TUI_TUI_WIN_H
|
|
#define TUI_TUI_WIN_H
|
|
|
|
#include "tui/tui-data.h"
|
|
|
|
struct tui_win_info;
|
|
|
|
extern void tui_scroll_forward (struct tui_win_info *, int);
|
|
extern void tui_scroll_backward (struct tui_win_info *, int);
|
|
extern void tui_scroll_left (struct tui_win_info *, int);
|
|
extern void tui_scroll_right (struct tui_win_info *, int);
|
|
extern void tui_set_win_focus_to (struct tui_win_info *);
|
|
extern void tui_resize_all (void);
|
|
extern void tui_refresh_all_win (void);
|
|
extern void tui_rehighlight_all (void);
|
|
|
|
extern chtype tui_border_ulcorner;
|
|
extern chtype tui_border_urcorner;
|
|
extern chtype tui_border_lrcorner;
|
|
extern chtype tui_border_llcorner;
|
|
extern chtype tui_border_vline;
|
|
extern chtype tui_border_hline;
|
|
extern int tui_border_attrs;
|
|
extern int tui_active_border_attrs;
|
|
|
|
extern int tui_update_variables (void);
|
|
|
|
extern void tui_initialize_win (void);
|
|
|
|
/* Update gdb's knowledge of the terminal size. */
|
|
extern void tui_update_gdb_sizes (void);
|
|
|
|
/* Create or get the TUI command list. */
|
|
struct cmd_list_element **tui_get_cmd_list (void);
|
|
|
|
/* Set a TUI variable. */
|
|
void tui_set_var_cmd (char *, int, struct cmd_list_element *);
|
|
|
|
#endif /* TUI_TUI_WIN_H */
|