[review,v3] Move max_height method to tui_gen_win_info
Commit Message
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/364
......................................................................
Move max_height method to tui_gen_win_info
This moves the max_height method to tui_gen_win_info and implements it
in the subclasses. This is used by a subsequent patch, which will
normalize window layout across all window types.
gdb/ChangeLog
2019-11-12 Tom Tromey <tom@tromey.com>
* tui/tui-stack.h (struct tui_locator_window) <max_height>: New
method.
* tui/tui-regs.h (struct tui_data_item_window) <max_height>: New
method.
* tui/tui-data.h (struct tui_gen_win_info) <max_height>: New
method.
(struct tui_win_info) <max_height>: Now override.
Change-Id: I4ba3e8899bc4668328d3d78e3c1674c61882450d
---
M gdb/ChangeLog
M gdb/tui/tui-data.h
M gdb/tui/tui-regs.h
M gdb/tui/tui-stack.h
4 files changed, 24 insertions(+), 2 deletions(-)
@@ -1,3 +1,13 @@
+2019-11-12 Tom Tromey <tom@tromey.com>
+
+ * tui/tui-stack.h (struct tui_locator_window) <max_height>: New
+ method.
+ * tui/tui-regs.h (struct tui_data_item_window) <max_height>: New
+ method.
+ * tui/tui-data.h (struct tui_gen_win_info) <max_height>: New
+ method.
+ (struct tui_win_info) <max_height>: Now override.
+
2019-11-14 Tom Tromey <tromey@adacore.com>
* eval.c (evaluate_subexp_standard) <BINOP_ASSIGN>: Do not pass an
@@ -82,6 +82,9 @@
return "";
}
+ /* Compute the maximum height of this window. */
+ virtual int max_height () const = 0;
+
/* Resize this window. The parameters are used to set the window's
size and position. */
virtual void resize (int height, int width,
@@ -173,8 +176,7 @@
{
}
- /* Compute the maximum height of this window. */
- virtual int max_height () const;
+ int max_height () const override;
/* Called after the tab width has been changed. */
virtual void update_tab_width ()
@@ -41,6 +41,11 @@
void refresh_window () override;
+ int max_height () const override
+ {
+ return 1;
+ }
+
const char *name = nullptr;
/* The register number, or data display number. */
int item_no = -1;
@@ -37,6 +37,11 @@
proc_name[0] = 0;
}
+ int max_height () const override
+ {
+ return 1;
+ }
+
void rerender () override;
/* Update the locator, with the provided arguments.