Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
txt::ParagraphBuilder Class Referenceabstract

#include <paragraph_builder.h>

Public Member Functions

virtual ~ParagraphBuilder ()=default
 
virtual void PushStyle (const TextStyle &style)=0
 
virtual void Pop ()=0
 
virtual const TextStylePeekStyle ()=0
 
virtual void AddText (const std::u16string &text)=0
 
virtual void AddPlaceholder (PlaceholderRun &span)=0
 
virtual std::unique_ptr< ParagraphBuild ()=0
 

Static Public Member Functions

static std::unique_ptr< ParagraphBuilderCreateSkiaBuilder (const ParagraphStyle &style, std::shared_ptr< FontCollection > font_collection, const bool impeller_enabled)
 Creates a |ParagraphBuilder| based on Skia's text layout module. More...
 

Protected Member Functions

 ParagraphBuilder ()=default
 

Detailed Description

Definition at line 32 of file paragraph_builder.h.

Constructor & Destructor Documentation

◆ ~ParagraphBuilder()

virtual txt::ParagraphBuilder::~ParagraphBuilder ( )
virtualdefault

◆ ParagraphBuilder()

txt::ParagraphBuilder::ParagraphBuilder ( )
protecteddefault

Member Function Documentation

◆ AddPlaceholder()

virtual void txt::ParagraphBuilder::AddPlaceholder ( PlaceholderRun span)
pure virtual

◆ AddText()

virtual void txt::ParagraphBuilder::AddText ( const std::u16string &  text)
pure virtual

◆ Build()

virtual std::unique_ptr< Paragraph > txt::ParagraphBuilder::Build ( )
pure virtual

◆ CreateSkiaBuilder()

std::unique_ptr< ParagraphBuilder > txt::ParagraphBuilder::CreateSkiaBuilder ( const ParagraphStyle style,
std::shared_ptr< FontCollection font_collection,
const bool  impeller_enabled 
)
static

Creates a |ParagraphBuilder| based on Skia's text layout module.

Parameters
[in]styleThe style to use for the paragraph.
[in]font_collectionThe font collection to use for the paragraph.
[in]impeller_enabledWhether Impeller is enabled in the runtime.

Definition at line 31 of file paragraph_builder.cc.

34 {
35 return std::make_unique<ParagraphBuilderSkia>(style, font_collection,
36 impeller_enabled);
37}

◆ PeekStyle()

virtual const TextStyle & txt::ParagraphBuilder::PeekStyle ( )
pure virtual

◆ Pop()

virtual void txt::ParagraphBuilder::Pop ( )
pure virtual

◆ PushStyle()

virtual void txt::ParagraphBuilder::PushStyle ( const TextStyle style)
pure virtual

The documentation for this class was generated from the following files: