Shaka Packager SDK
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
shaka::media::TextFragment Struct Reference

#include <text_sample.h>

Public Member Functions

 TextFragment (const TextFragmentStyle &style, const std::vector< TextFragment > &sub_fragments)
 
 TextFragment (const TextFragmentStyle &style, const char *body)
 
 TextFragment (const TextFragmentStyle &style, const std::string &body)
 
 TextFragment (const TextFragmentStyle &style, const std::vector< uint8_t > &image)
 
 TextFragment (const TextFragmentStyle &style, bool newline)
 
bool is_empty () const
 

Public Attributes

TextFragmentStyle style
 
std::vector< TextFragmentsub_fragments
 
std::string body
 
std::vector< uint8_t > image
 PNG image data.
 
bool newline = false
 

Detailed Description

Represents a recursive structure of styled blocks of text. Only one of sub_fragments, body, image, or newline will be set.

Definition at line 92 of file text_sample.h.

Constructor & Destructor Documentation

◆ TextFragment() [1/6]

shaka::media::TextFragment::TextFragment ( )
inline

Definition at line 93 of file text_sample.h.

◆ TextFragment() [2/6]

shaka::media::TextFragment::TextFragment ( const TextFragmentStyle style,
const std::vector< TextFragment > &  sub_fragments 
)
inline

Definition at line 94 of file text_sample.h.

◆ TextFragment() [3/6]

shaka::media::TextFragment::TextFragment ( const TextFragmentStyle style,
const char *  body 
)
inline

Definition at line 97 of file text_sample.h.

◆ TextFragment() [4/6]

shaka::media::TextFragment::TextFragment ( const TextFragmentStyle style,
const std::string &  body 
)
inline

Definition at line 99 of file text_sample.h.

◆ TextFragment() [5/6]

shaka::media::TextFragment::TextFragment ( const TextFragmentStyle style,
const std::vector< uint8_t > &  image 
)
inline

Definition at line 101 of file text_sample.h.

◆ TextFragment() [6/6]

shaka::media::TextFragment::TextFragment ( const TextFragmentStyle style,
bool  newline 
)
inline

Definition at line 104 of file text_sample.h.

Member Function Documentation

◆ is_empty()

bool shaka::media::TextFragment::is_empty ( ) const

Definition at line 17 of file text_sample.cc.

Member Data Documentation

◆ body

std::string shaka::media::TextFragment::body

Definition at line 110 of file text_sample.h.

◆ image

std::vector<uint8_t> shaka::media::TextFragment::image

PNG image data.

Definition at line 112 of file text_sample.h.

◆ newline

bool shaka::media::TextFragment::newline = false

Definition at line 113 of file text_sample.h.

◆ style

TextFragmentStyle shaka::media::TextFragment::style

Definition at line 107 of file text_sample.h.

◆ sub_fragments

std::vector<TextFragment> shaka::media::TextFragment::sub_fragments

Definition at line 109 of file text_sample.h.


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