Allow TUI sub-layouts in "new-layout" command
[deliverable/binutils-gdb.git] / gdb / tui / tui-layout.h
index 05089ab8fffc7551e11c8c90840d62a817932a84..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"
 
@@ -68,6 +70,14 @@ public:
      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;
@@ -114,6 +124,10 @@ public:
   {
   }
 
+  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;
@@ -140,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
@@ -159,6 +173,10 @@ public:
 
   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;
@@ -189,7 +207,8 @@ 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 ();
This page took 0.023783 seconds and 4 git commands to generate.