Allow TUI sub-layouts in "new-layout" command
[deliverable/binutils-gdb.git] / gdb / tui / tui-layout.h
index 37f07c24e4fbfb357b5f5c1bc943437b4a7883b0..4351e260720a7863814909e59d9f2e27f1cfd8b7 100644 (file)
@@ -22,6 +22,8 @@
 #ifndef TUI_TUI_LAYOUT_H
 #define TUI_TUI_LAYOUT_H
 
+#include "ui-file.h"
+
 #include "tui/tui.h"
 #include "tui/tui-data.h"
 
@@ -64,6 +66,18 @@ public:
      the sizes of the other windows around it.  */
   virtual bool adjust_size (const char *name, int new_height) = 0;
 
+  /* Remove some windows from the layout, leaving the command window
+     and the window being passed in here.  */
+  virtual void remove_windows (const char *name) = 0;
+
+  /* Replace the window named NAME in the layout with the window named
+     NEW_WINDOW.  */
+  virtual void replace_window (const char *name, const char *new_window) = 0;
+
+  /* Append the specification to this window to OUTPUT.  DEPTH is the
+     depth of this layout in the hierarchy (zero-based).  */
+  virtual void specification (ui_file *output, int depth) = 0;
+
   /* The most recent space allocation.  */
   int x = 0;
   int y = 0;
@@ -106,6 +120,14 @@ public:
 
   bool bottom_boxed_p () const override;
 
+  void remove_windows (const char *name) override
+  {
+  }
+
+  void replace_window (const char *name, const char *new_window) override;
+
+  void specification (ui_file *output, int depth) override;
+
 protected:
 
   void get_sizes (int *min_height, int *max_height) override;
@@ -132,7 +154,7 @@ public:
   /* Add a new split layout to this layout.  WEIGHT is the desired
      size, which is relative to the other weights given in this
      layout.  */
-  tui_layout_split *add_split (int weight);
+  void add_split (std::unique_ptr<tui_layout_split> &&layout, int weight);
 
   /* Add a new window to this layout.  NAME is the name of the window
      to add.  WEIGHT is the desired size, which is relative to the
@@ -149,6 +171,12 @@ public:
 
   bool bottom_boxed_p () const override;
 
+  void remove_windows (const char *name) override;
+
+  void replace_window (const char *name, const char *new_window) override;
+
+  void specification (ui_file *output, int depth) override;
+
 protected:
 
   void get_sizes (int *min_height, int *max_height) override;
@@ -179,7 +207,19 @@ private:
    way.  */
 extern void tui_add_win_to_layout (enum tui_win_type);
 
-extern void tui_set_layout (enum tui_layout_type);
+/* Set the initial layout.  */
+extern void tui_set_initial_layout ();
+
+/* Switch to the next layout.  */
+extern void tui_next_layout ();
+
+/* Show the register window.  Like "layout regs".  */
+extern void tui_regs_layout ();
+
+/* Remove some windows from the layout, leaving only the focused
+   window and the command window; if no window has the focus, then
+   some other window is chosen to remain.  */
+extern void tui_remove_some_windows ();
 
 /* Apply the current layout.  */
 extern void tui_apply_current_layout ();
This page took 0.024495 seconds and 4 git commands to generate.