AeonGUI
A portable video game graphic user interface library.
Loading...
Searching...
No Matches
TextLayout.hpp
1/*
2Copyright (C) 2025,2026 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16#ifndef AEONGUI_TEXTLAYOUT_H
17#define AEONGUI_TEXTLAYOUT_H
18#include <cstdint>
19#include <cstddef>
20#include <string>
21#include <vector>
22#include <memory>
23#include "aeongui/Platform.hpp"
24#include "aeongui/Color.hpp"
25#include "aeongui/Attribute.hpp"
26#include "aeongui/Matrix2x3.hpp"
27namespace AeonGUI
28{
35 {
36 public:
38 DLL virtual ~TextLayout() = 0;
42 virtual void SetText ( const std::string& aText ) = 0;
46 virtual void SetFontFamily ( const std::string& aFamily ) = 0;
50 virtual void SetFontSize ( double aSize ) = 0;
54 virtual void SetFontWeight ( int aWeight ) = 0;
58 virtual void SetFontStyle ( int aStyle ) = 0;
62 virtual double GetTextWidth() const = 0;
66 virtual double GetTextHeight() const = 0;
70 virtual double GetBaseline() const = 0;
75 virtual double GetCharOffsetX ( long aIndex ) const = 0;
76 };
77}
78#endif
Platform-specific DLL import/export macros and compiler helpers.
Abstract text layout interface.
Definition TextLayout.hpp:35
virtual void SetFontStyle(int aStyle)=0
Set the font style.
virtual void SetFontSize(double aSize)=0
Set the font size.
virtual double GetCharOffsetX(long aIndex) const =0
virtual double GetTextHeight() const =0
Get the logical height of the laid-out text.
virtual ~TextLayout()=0
Virtual destructor.
virtual double GetBaseline() const =0
Get the baseline offset from the top.
virtual void SetFontWeight(int aWeight)=0
Set the font weight.
virtual double GetTextWidth() const =0
Get the logical width of the laid-out text.
virtual void SetFontFamily(const std::string &aFamily)=0
Set the font family.
virtual void SetText(const std::string &aText)=0
Set the text content to lay out.