aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-data.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-06-16 15:16:52 -0600
committerTom Tromey <tom@tromey.com>2019-06-25 07:48:35 -0600
commit8903bd8a37f905f5d77d2e04219e1a1eddaa6133 (patch)
tree18b361687cd3700d12e228b3e7c704b212a01e9e /gdb/tui/tui-data.h
parent3f02ce1e3df15731872befd2e711854b2b259745 (diff)
downloadgdb-8903bd8a37f905f5d77d2e04219e1a1eddaa6133.zip
gdb-8903bd8a37f905f5d77d2e04219e1a1eddaa6133.tar.gz
gdb-8903bd8a37f905f5d77d2e04219e1a1eddaa6133.tar.bz2
Introduce max_height method
This introduces the tui_win_info::max_height method and changes new_height_ok to use it, rather than checking the window type directly. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-win.c (tui_win_info::max_height) (tui_cmd_window::max_height): New methods. (new_height_ok): Call max_height. * tui/tui-data.h (struct tui_win_info, struct tui_cmd_window) <max_height>: New method.
Diffstat (limited to 'gdb/tui/tui-data.h')
-rw-r--r--gdb/tui/tui-data.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h
index 07ec977..08b0dad 100644
--- a/gdb/tui/tui-data.h
+++ b/gdb/tui/tui-data.h
@@ -273,6 +273,9 @@ public:
{
}
+ /* Compute the maximum height of this window. */
+ virtual int max_height () const;
+
/* 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. */
@@ -426,6 +429,8 @@ struct tui_cmd_window : public tui_win_info
{
}
+ int max_height () const override;
+
int start_line = 0;
protected: