diff options
author | Tom Tromey <tom@tromey.com> | 2020-07-01 21:21:12 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-07-01 21:21:16 -0600 |
commit | a30cb6dabb20e26dc80b0952ae709613372359f8 (patch) | |
tree | a4c1c203ba7b90c6e50d68da654d350eb2f50dbf | |
parent | 1eb2161f83babfad2f384efdadf49aa5c2f70860 (diff) | |
download | gdb-a30cb6dabb20e26dc80b0952ae709613372359f8.zip gdb-a30cb6dabb20e26dc80b0952ae709613372359f8.tar.gz gdb-a30cb6dabb20e26dc80b0952ae709613372359f8.tar.bz2 |
Derive tui_locator_window from tui_win_info
tui_locator_window is the last remaining concrete child class of
tui_gen_win_info. It seems a bit cleaner to me to flatten the
hierarchy a bit; this patch prepares for that by changing
tui_locator_window to derive from tui_win_info.
gdb/ChangeLog
2020-07-01 Tom Tromey <tom@tromey.com>
* tui/tui-stack.h (struct tui_locator_window): Derive from
tui_win_info.
<do_scroll_horizontal, do_scroll_vertical>: New methods.
<can_box>: New method.
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/tui/tui-stack.h | 17 |
2 files changed, 23 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 294e24f..52eae10 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,12 @@ 2020-07-01 Tom Tromey <tom@tromey.com> + * tui/tui-stack.h (struct tui_locator_window): Derive from + tui_win_info. + <do_scroll_horizontal, do_scroll_vertical>: New methods. + <can_box>: New method. + +2020-07-01 Tom Tromey <tom@tromey.com> + * tui/tui-stack.h (struct tui_locator_window): Remove body. 2020-07-01 Tom Tromey <tom@tromey.com> diff --git a/gdb/tui/tui-stack.h b/gdb/tui/tui-stack.h index 0253767..564ac22 100644 --- a/gdb/tui/tui-stack.h +++ b/gdb/tui/tui-stack.h @@ -28,7 +28,7 @@ struct frame_info; /* Locator window class. */ -struct tui_locator_window : public tui_gen_win_info +struct tui_locator_window : public tui_win_info { tui_locator_window () = default; @@ -42,6 +42,11 @@ struct tui_locator_window : public tui_gen_win_info return 1; } + bool can_box () const override + { + return false; + } + void rerender () override; /* Update the locator, with the provided arguments. @@ -62,6 +67,16 @@ struct tui_locator_window : public tui_gen_win_info /* Architecture associated with code at this location. */ struct gdbarch *gdbarch = nullptr; +protected: + + void do_scroll_vertical (int n) override + { + } + + void do_scroll_horizontal (int n) override + { + } + private: /* Create the status line to display as much information as we can |