Introduce the tui_gen_win_info::min_height method
authorTom Tromey <tom@tromey.com>
Mon, 7 Oct 2019 23:36:49 +0000 (17:36 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 11 Dec 2019 22:49:00 +0000 (15:49 -0700)
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-12-11  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

gdb/ChangeLog
gdb/tui/tui-data.h
gdb/tui/tui-regs.h
gdb/tui/tui-stack.h

index 88fa1c1d15c7d811d76fbc47739cdd36578abe53..d436bb514b4fd729e72f6f5847376d6469d6ed3d 100644 (file)
@@ -1,3 +1,13 @@
+2019-12-11  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-12-11  Tom Tromey  <tom@tromey.com>
 
        * tui/tui-data.h (struct tui_gen_win_info) <can_box>: New method.
index d441a381468801697750a7f58bac75854a82fd42..a25ab11dc5eb6e8a5981536550cb66a8a8c66940 100644 (file)
@@ -85,6 +85,9 @@ public:
   /* 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
   {
@@ -184,6 +187,11 @@ public:
 
   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 ()
   {
index d476bcffee19561cceab2d2e7d6dab659da6a7c7..92df61836772c8d67cab51680bc1edae9f47a4ab 100644 (file)
@@ -46,6 +46,11 @@ struct tui_data_item_window : public tui_gen_win_info
     return 1;
   }
 
+  int min_height () const override
+  {
+    return 1;
+  }
+
   const char *name = nullptr;
   /* The register number, or data display number.  */
   int item_no = -1;
index dd9851b8ed4b30f0532d7aa6b148719d2421961f..27af5d2fe1ab42060e309e1b400d6aed857d568f 100644 (file)
@@ -42,6 +42,11 @@ struct tui_locator_window : public tui_gen_win_info
     return 1;
   }
 
+  int min_height () const override
+  {
+    return 1;
+  }
+
   void rerender () override;
 
   /* Update the locator, with the provided arguments.
This page took 0.031222 seconds and 4 git commands to generate.