Start UI core layout value tests

This commit is contained in:
2026-06-01 00:07:55 +02:00
parent 31322bbd83
commit a67e7fc9bb
9 changed files with 171 additions and 8 deletions

View File

@@ -0,0 +1,24 @@
#pragma once
#include "foundation/result.h"
#include <cstdint>
#include <string_view>
namespace pp::ui {
enum class LayoutLengthKind : std::uint8_t {
auto_value,
pixels,
percent,
};
struct LayoutLength {
LayoutLengthKind kind = LayoutLengthKind::auto_value;
std::uint32_t value = 0;
};
[[nodiscard]] pp::foundation::Result<LayoutLength> parse_layout_length(std::string_view text) noexcept;
[[nodiscard]] const char* layout_length_kind_name(LayoutLengthKind kind) noexcept;
}