#ifndef TUI_TUI_LAYOUT_H
#define TUI_TUI_LAYOUT_H
+#include "ui-file.h"
+
#include "tui/tui.h"
#include "tui/tui-data.h"
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;
{
}
+ 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;
/* 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
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;
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 ();