1#ifndef YAZE_APP_EDITOR_LAYOUT_DESIGNER_LAYOUT_SERIALIZATION_H_
2#define YAZE_APP_EDITOR_LAYOUT_DESIGNER_LAYOUT_SERIALIZATION_H_
7#include "absl/status/statusor.h"
11namespace layout_designer {
31 static absl::StatusOr<LayoutDefinition>
FromJson(
const std::string& json_str);
40 const std::string& filepath);
47 static absl::StatusOr<LayoutDefinition>
LoadFromFile(
const std::string& filepath);
Handles JSON serialization and deserialization of layouts.
static absl::StatusOr< LayoutDefinition > LoadFromFile(const std::string &filepath)
Load layout from JSON file.
static absl::Status SaveToFile(const LayoutDefinition &layout, const std::string &filepath)
Save layout to JSON file.
static absl::StatusOr< LayoutDefinition > FromJson(const std::string &json_str)
Deserialize a layout from JSON string.
static std::string ToJson(const LayoutDefinition &layout)
Serialize a layout to JSON string.
static std::unique_ptr< DockNode > DeserializeDockNode(const std::string &json)
static LayoutPanel DeserializePanel(const std::string &json)
static std::string SerializeDockNode(const DockNode &node)
static std::string SerializePanel(const LayoutPanel &panel)
Represents a dock node in the layout tree.
Complete layout definition with metadata.
Represents a single panel in a layout.