Pango-backed text layout implementation.
More...
#include <aeongui/PangoTextLayout.hpp>
|
|
| PangoTextLayout () |
| | Default constructor. Creates a layout with default font settings.
|
|
| ~PangoTextLayout () override |
| | Destructor. Releases Pango resources.
|
| void | SetText (const std::string &aText) override |
| | Set the text content to lay out.
|
| void | SetFontFamily (const std::string &aFamily) override |
| | Set the font family.
|
| void | SetFontSize (double aSize) override |
| | Set the font size.
|
| void | SetFontWeight (int aWeight) override |
| | Set the font weight.
|
| void | SetFontStyle (int aStyle) override |
| | Set the font style.
|
| double | GetTextWidth () const override |
| | Get the logical width of the laid-out text.
|
| double | GetTextHeight () const override |
| | Get the logical height of the laid-out text.
|
| double | GetBaseline () const override |
| | Get the baseline offset from the top of the layout.
|
| double | GetCharOffsetX (long aIndex) const override |
| | Get the x-offset of a character at the given byte index.
|
| PangoLayout * | GetPangoLayout () const |
| | Access the underlying PangoLayout for advanced use.
|
|
virtual | ~TextLayout ()=0 |
| | Virtual destructor.
|
Pango-backed text layout implementation.
Uses PangoLayout and PangoFontDescription to measure and layout text for rendering by a Canvas.
◆ GetBaseline()
| double AeonGUI::PangoTextLayout::GetBaseline |
( |
| ) |
const |
|
overridevirtual |
Get the baseline offset from the top of the layout.
- Returns
- Baseline position in CSS pixels.
Implements AeonGUI::TextLayout.
◆ GetCharOffsetX()
| double AeonGUI::PangoTextLayout::GetCharOffsetX |
( |
long | aIndex | ) |
const |
|
overridevirtual |
Get the x-offset of a character at the given byte index.
- Parameters
-
- Returns
- X offset in CSS pixels.
Implements AeonGUI::TextLayout.
◆ GetPangoLayout()
| PangoLayout * AeonGUI::PangoTextLayout::GetPangoLayout |
( |
| ) |
const |
Access the underlying PangoLayout for advanced use.
- Returns
- Pointer to the PangoLayout.
◆ GetTextHeight()
| double AeonGUI::PangoTextLayout::GetTextHeight |
( |
| ) |
const |
|
overridevirtual |
Get the logical height of the laid-out text.
- Returns
- Height in CSS pixels.
Implements AeonGUI::TextLayout.
◆ GetTextWidth()
| double AeonGUI::PangoTextLayout::GetTextWidth |
( |
| ) |
const |
|
overridevirtual |
Get the logical width of the laid-out text.
- Returns
- Width in CSS pixels.
Implements AeonGUI::TextLayout.
◆ SetFontFamily()
| void AeonGUI::PangoTextLayout::SetFontFamily |
( |
const std::string & | aFamily | ) |
|
|
overridevirtual |
Set the font family.
- Parameters
-
| aFamily | Font family name (e.g. "sans-serif"). |
Implements AeonGUI::TextLayout.
◆ SetFontSize()
| void AeonGUI::PangoTextLayout::SetFontSize |
( |
double | aSize | ) |
|
|
overridevirtual |
◆ SetFontStyle()
| void AeonGUI::PangoTextLayout::SetFontStyle |
( |
int | aStyle | ) |
|
|
overridevirtual |
Set the font style.
- Parameters
-
| aStyle | 0 = normal, 1 = italic, 2 = oblique. |
Implements AeonGUI::TextLayout.
◆ SetFontWeight()
| void AeonGUI::PangoTextLayout::SetFontWeight |
( |
int | aWeight | ) |
|
|
overridevirtual |
Set the font weight.
- Parameters
-
| aWeight | CSS font weight (400 = normal, 700 = bold). |
Implements AeonGUI::TextLayout.
◆ SetText()
| void AeonGUI::PangoTextLayout::SetText |
( |
const std::string & | aText | ) |
|
|
overridevirtual |
The documentation for this class was generated from the following files: