aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-data.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-06-16 15:12:25 -0600
committerTom Tromey <tom@tromey.com>2019-06-25 07:48:34 -0600
commit3f02ce1e3df15731872befd2e711854b2b259745 (patch)
tree4533dea0d713965b61ea43397d6c1dfc9b3e3a2e /gdb/tui/tui-data.h
parent1825f487ae903438eb2a9b6f461337d8ec1b06c0 (diff)
downloadgdb-3f02ce1e3df15731872befd2e711854b2b259745.zip
gdb-3f02ce1e3df15731872befd2e711854b2b259745.tar.gz
gdb-3f02ce1e3df15731872befd2e711854b2b259745.tar.bz2
Introduce set_new_height method
This introduces tui_win_info::set_new_height and implements it in the subclasses as appropriate. This removes another switch on the window type. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-win.c (tui_source_window_base::set_new_height) (tui_data_window::set_new_height): New methods. (make_invisible_and_set_new_height): Call set_new_height method. * tui/tui-data.h (struct tui_win_info) (struct tui_source_window_base, struct tui_data_window) <set_new_height>: New method.
Diffstat (limited to 'gdb/tui/tui-data.h')
-rw-r--r--gdb/tui/tui-data.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index e45c9fa..07ec977 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -267,6 +267,12 @@ public:
{
}
+ /* Called after a TUI window is given a new height; this updates any
+ related auxiliary windows. */
+ virtual void set_new_height (int height)
+ {
+ }
+
/* Methods to scroll the contents of this window. Note that they
are named with "_scroll" coming at the end because the more
obvious "scroll_forward" is defined as a macro in term.h. */
@@ -318,6 +324,8 @@ public:
/* Set the location of the execution point. */
void set_is_exec_point_at (struct tui_line_or_address l);
+ void set_new_height (int height) override;
+
/* Does the locator belong to this window? */
bool m_has_locator = false;
/* Execution information window. */
@@ -380,6 +388,8 @@ struct tui_data_window : public tui_win_info
void clear_detail () override;
void refresh_all () override;
+ void set_new_height (int height) override;
+
/* Start of data display content. */
tui_win_content data_content = NULL;
int data_content_count = 0;