[review,v2] Introduce the tui_gen_win_info::min_height method
Commit Message
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/365
......................................................................
Introduce the tui_gen_win_info::min_height method
This introduces a new method, tui_gen_win_info::min_height, to fetch
the minimum height of a window. This is used in the subsequent
unified layout patch.
gdb/ChangeLog
2019-11-06 Tom Tromey <tom@tromey.com>
* tui/tui-stack.h (struct tui_locator_window) <min_height>:
Implement.
* tui/tui-regs.h (struct tui_data_item_window) <min_height>:
Implement.
* tui/tui-data.h (struct tui_gen_win_info) <min_height>: New
method.
(struct tui_win_info) <min_height>: Implement.
Change-Id: Id33baffdf041fde072e15c1ff89b75f8b8118adb
---
M gdb/ChangeLog
M gdb/tui/tui-data.h
M gdb/tui/tui-regs.h
M gdb/tui/tui-stack.h
4 files changed, 28 insertions(+), 1 deletion(-)
@@ -1,5 +1,15 @@
2019-11-06 Tom Tromey <tom@tromey.com>
+ * tui/tui-stack.h (struct tui_locator_window) <min_height>:
+ Implement.
+ * tui/tui-regs.h (struct tui_data_item_window) <min_height>:
+ Implement.
+ * tui/tui-data.h (struct tui_gen_win_info) <min_height>: New
+ method.
+ (struct tui_win_info) <min_height>: Implement.
+
+2019-11-06 Tom Tromey <tom@tromey.com>
+
* tui/tui-data.h (struct tui_gen_win_info) <can_box>: New method.
(struct tui_win_info) <can_box>: Update.
@@ -85,12 +85,14 @@
/* Compute the maximum height of this window. */
virtual int max_height () const = 0;
+ /* Compute the minimum height of this window. */
+ virtual int min_height () const = 0;
+
/* Return true if this window can be boxed. */
virtual bool can_box () const
{
return false;
}
-
/* Resize this window. The parameters are used to set the window's
size and position. */
virtual void resize (int height, int width,
@@ -184,6 +186,11 @@
int max_height () const override;
+ int min_height () const override
+ {
+ return MIN_WIN_HEIGHT;
+ }
+
/* Called after the tab width has been changed. */
virtual void update_tab_width ()
{
@@ -46,6 +46,11 @@
return 1;
}
+ int min_height () const override
+ {
+ return 1;
+ }
+
const char *name = nullptr;
/* The register number, or data display number. */
int item_no = -1;
@@ -42,6 +42,11 @@
return 1;
}
+ int min_height () const override
+ {
+ return 1;
+ }
+
void rerender () override;
/* Update the locator, with the provided arguments.