Derive tui_locator_window from tui_win_info
authorTom Tromey <tom@tromey.com>
Thu, 2 Jul 2020 03:21:12 +0000 (21:21 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 2 Jul 2020 03:21:16 +0000 (21:21 -0600)
tui_locator_window is the last remaining concrete child class of
tui_gen_win_info.  It seems a bit cleaner to me to flatten the
hierarchy a bit; this patch prepares for that by changing
tui_locator_window to derive from tui_win_info.

gdb/ChangeLog
2020-07-01  Tom Tromey  <tom@tromey.com>

* tui/tui-stack.h (struct tui_locator_window): Derive from
tui_win_info.
<do_scroll_horizontal, do_scroll_vertical>: New methods.
<can_box>: New method.

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

index 294e24fc1794e77facf727613a1bc4f156ba271b..52eae109ee690fe43d92be94d65bc2ad6484845d 100644 (file)
@@ -1,3 +1,10 @@
+2020-07-01  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui-stack.h (struct tui_locator_window): Derive from
+       tui_win_info.
+       <do_scroll_horizontal, do_scroll_vertical>: New methods.
+       <can_box>: New method.
+
 2020-07-01  Tom Tromey  <tom@tromey.com>
 
        * tui/tui-stack.h (struct tui_locator_window): Remove body.
index 0253767ad98ec58001943dde5c9351dc7e164e1a..564ac22495c124fb28a528b5afd10ec7e20e0995 100644 (file)
@@ -28,7 +28,7 @@ struct frame_info;
 
 /* Locator window class.  */
 
-struct tui_locator_window : public tui_gen_win_info
+struct tui_locator_window : public tui_win_info
 {
   tui_locator_window () = default;
 
@@ -42,6 +42,11 @@ struct tui_locator_window : public tui_gen_win_info
     return 1;
   }
 
+  bool can_box () const override
+  {
+    return false;
+  }
+
   void rerender () override;
 
   /* Update the locator, with the provided arguments.
@@ -62,6 +67,16 @@ struct tui_locator_window : public tui_gen_win_info
   /* Architecture associated with code at this location.  */
   struct gdbarch *gdbarch = nullptr;
 
+protected:
+
+  void do_scroll_vertical (int n) override
+  {
+  }
+
+  void do_scroll_horizontal (int n) override
+  {
+  }
+
 private:
 
   /* Create the status line to display as much information as we can
This page took 0.027952 seconds and 4 git commands to generate.