20 lines
385 B
C++
20 lines
385 B
C++
#pragma once
|
|
|
|
#include <string_view>
|
|
|
|
namespace XCEngine::UI::Editor {
|
|
|
|
struct UIEditorTextMeasureRequest {
|
|
std::string_view text = {};
|
|
float fontSize = 0.0f;
|
|
};
|
|
|
|
class UIEditorTextMeasurer {
|
|
public:
|
|
virtual ~UIEditorTextMeasurer() = default;
|
|
|
|
virtual float MeasureTextWidth(const UIEditorTextMeasureRequest& request) const = 0;
|
|
};
|
|
|
|
} // namespace XCEngine::UI::Editor
|