#include <sprk_publish.h>

Inheritance diagram for HPS::Publish::TextKit:
HPS::SprocketKit HPS::Sprocket HPS::Object

Public Member Functions

bool Empty () const
 
bool Equals (TextKit const &in_kit) const
 
HPS::Type ObjectType () const
 
bool operator!= (TextKit const &in_kit) const
 
TextKitoperator= (TextKit const &in_kit)
 
TextKitoperator= (TextKit &&in_kit)
 
bool operator== (TextKit const &in_kit) const
 
void Set (TextKit const &in_kit)
 
TextKitSetColor (RGBColor const &in_color)
 
TextKitSetFont (Text::Font::Name in_font)
 
TextKitSetFont (char const *in_font_name, Text::Language in_language, bool in_embed_font)
 
TextKitSetSize (int in_size)
 
TextKitSetText (char const *in_text)
 
void Show (TextKit &out_kit) const
 
bool ShowColor (RGBColor &out_color) const
 
bool ShowFont (Text::Font::Type &out_type, Text::Font::Name &out_font, UTF8 &out_font_name, Text::Language &out_language, bool &out_embed_font) const
 
bool ShowSize (int &out_size) const
 
bool ShowText (UTF8 &out_text) const
 
 TextKit ()
 
 TextKit (TextKit const &in_kit)
 
 TextKit (TextKit &&in_kit)
 
TextKitUnsetColor ()
 
TextKitUnsetEverything ()
 
TextKitUnsetFont ()
 
TextKitUnsetSize ()
 
TextKitUnsetText ()
 
- Public Member Functions inherited from HPS::Sprocket
Sprocket (Sprocket &&in_that)
 
- Public Member Functions inherited from HPS::Object
intptr_t GetClassID () const
 
intptr_t GetInstanceID () const
 
bool HasType (HPS::Type in_mask) const
 
Object (Object const &that)
 
 Object (Object &&in_that)
 
Objectoperator= (Object const &other_object)
 
Objectoperator= (Object &&in_that)
 
virtual void Reset ()
 
virtual HPS::Type Type () const
 

Static Public Member Functions

static TextKit GetDefault ()
 
- Static Public Member Functions inherited from HPS::Object
template<typename T >
static intptr_t ClassID ()
 

Static Public Attributes

static const HPS::Type staticType = HPS::Type::PublishTextKit
 
- Static Public Attributes inherited from HPS::SprocketKit
static const HPS::Type staticType = HPS::Type::SprocketKit
 
- Static Public Attributes inherited from HPS::Object
static const HPS::Type staticType = HPS::Type::None
 

Additional Inherited Members

- Protected Member Functions inherited from HPS::SprocketKit
SprocketKitoperator= (SprocketKit &&in_that)
 
 SprocketKit (SprocketKit &&in_that)
 

Detailed Description

The TextKit class is a user space object. It acts as the container for all data that can be used to specify a text string for a Publish PDF.

Constructor & Destructor Documentation

◆ TextKit() [1/3]

HPS::Publish::TextKit::TextKit ( )

The default constructor creates an empty TextKit object.

◆ TextKit() [2/3]

HPS::Publish::TextKit::TextKit ( TextKit const &  in_kit)

The copy constructor creates a new TextKit object that contains the same settings as the source TextKit.

Parameters
in_kitThe source TextKit to copy.

◆ TextKit() [3/3]

HPS::Publish::TextKit::TextKit ( TextKit &&  in_kit)

The move constructor creates a TextKit by transferring the underlying object of the rvalue reference to this TextKit.

Parameters
in_kitAn rvalue reference to a TextKit to take the underlying object from.

Member Function Documentation

◆ Empty()

bool HPS::Publish::TextKit::Empty ( ) const
virtual

Indicates whether this TextKit has any values set on it.

Returns
true if no values are set on this TextKit, false otherwise.

Reimplemented from HPS::Object.

◆ Equals()

bool HPS::Publish::TextKit::Equals ( TextKit const &  in_kit) const

Check if the source TextKit is equivalent to this TextKit.

Parameters
in_kitThe source TextKit to compare to this TextKit.
Returns
true if the objects are equivalent, false otherwise.

◆ GetDefault()

static TextKit HPS::Publish::TextKit::GetDefault ( )
static

Creates a TextKit which contains the default settings. The returned object will not necessarily have values for every setting, but it will have them where it is reasonable to have a default. These values will be used for export unless a setting is overridden by the TextKit passed to File::Export.

Returns
A TextKit with the default settings.

◆ ObjectType()

HPS::Type HPS::Publish::TextKit::ObjectType ( ) const
inlinevirtual

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Returns
The declared type of the object in question, which may differ from the true, underlying type.

Reimplemented from HPS::SprocketKit.

◆ operator!=()

bool HPS::Publish::TextKit::operator!= ( TextKit const &  in_kit) const

Check if the source TextKit is not equivalent to this TextKit.

Parameters
in_kitThe source TextKit to compare to this TextKit.
Returns
true if the objects are not equivalent, false otherwise.

◆ operator=() [1/2]

TextKit& HPS::Publish::TextKit::operator= ( TextKit const &  in_kit)

Copies the source TextKit into this TextKit.

Parameters
in_kitThe source TextKit to copy.
Returns
A reference to this TextKit.

◆ operator=() [2/2]

TextKit& HPS::Publish::TextKit::operator= ( TextKit &&  in_kit)

The move assignment operator transfers the underlying object of the rvalue reference to this TextKit.

Parameters
in_kitAn rvalue reference to a TextKit to take the underlying object from.
Returns
A reference to this TextKit.

◆ operator==()

bool HPS::Publish::TextKit::operator== ( TextKit const &  in_kit) const

Check if the source TextKit is equivalent to this TextKit.

Parameters
in_kitThe source TextKit to compare to this TextKit.
Returns
true if the objects are equivalent, false otherwise.

◆ Set()

void HPS::Publish::TextKit::Set ( TextKit const &  in_kit)

Copies the source TextKit into this TextKit.

Parameters
in_kitThe source TextKit to copy.

◆ SetColor()

TextKit& HPS::Publish::TextKit::SetColor ( RGBColor const &  in_color)

Sets the color for the text. This corresponds to the value that will be passed to A3DPDFTextData::m_sColor or A3DPDFTextDataEx::m_sColor.

Parameters
in_colorColor for the text.
Returns
A reference to this TextKit.

◆ SetFont() [1/2]

TextKit& HPS::Publish::TextKit::SetFont ( Text::Font::Name  in_font)

Sets a built-in font for the text. This corresponds to the value that will be passed to A3DPDFTextData::m_eFontName.

Parameters
in_fontThe built-in font for the text.
Returns
A reference to this TextKit.

◆ SetFont() [2/2]

TextKit& HPS::Publish::TextKit::SetFont ( char const *  in_font_name,
Text::Language  in_language,
bool  in_embed_font 
)

Sets an explicit font for the text. As of Publish 5.11, this is only known to create a valid text string in the PDF if the font name is "MS Gothic" and the language is Japanese, otherwise the creation will fail.

Parameters
in_font_nameUTF8-encoded font name for the text. This corresponds to the value that will be passed to A3DPDFTextDataEx::m_pcFontName.
in_languageThe language for the font. This corresponds to the value that will be passed to A3DPDFTextDataEx::m_eLanguage.
in_embed_fontWhether to embed the font in the PDF. This corresponds to the value that will be passed to A3DPDFTextDataEx::m_bEmbedFontInPDF.
Returns
A reference to this TextKit.

◆ SetSize()

TextKit& HPS::Publish::TextKit::SetSize ( int  in_size)

Sets the size in points for the text. This corresponds to the value that will be passed to A3DPDFTextData::m_iFontSize or A3DPDFTextDataEx::m_iFontSize.

Parameters
in_sizeThe size in points for the text.
Returns
A reference to this TextKit.

◆ SetText()

TextKit& HPS::Publish::TextKit::SetText ( char const *  in_text)

Sets the text string for the text. This corresponds to the value that will be passed to A3DPDFTextData::m_pcTextString or A3DPDFTextDataEx::m_pcTextString.

Parameters
in_textUTF8-encoded text string for the text.
Returns
A reference to this TextKit.

◆ Show()

void HPS::Publish::TextKit::Show ( TextKit out_kit) const

Copies this TextKit into the given TextKit.

Parameters
out_kitThe TextKit to populate with the contents of this TextKit.

◆ ShowColor()

bool HPS::Publish::TextKit::ShowColor ( RGBColor out_color) const

Shows the color setting

Parameters
out_colorThe color for the text.
Returns
true if a color was specified, false otherwise.

◆ ShowFont()

bool HPS::Publish::TextKit::ShowFont ( Text::Font::Type out_type,
Text::Font::Name out_font,
UTF8 out_font_name,
Text::Language out_language,
bool &  out_embed_font 
) const

Shows the font setting.

Parameters
out_typeThe type of font for the text.
out_fontThe built-in font for the text. This is only valid if out_type is Text::Font::Type::BuiltIn.
out_font_nameThe explicit font name for the text. This is only valid if out_type is Text::Font::Type::Explicit.
out_languageThe language for the font. This is only valid if out_type is Text::Font::Type::Explicit.
out_embed_fontWhether to embed the font in the PDF. This is only valid if out_type is Text::Font::Type::Explicit.
Returns
true if a font was specified, false otherwise.

◆ ShowSize()

bool HPS::Publish::TextKit::ShowSize ( int &  out_size) const

Shows the size setting.

Parameters
out_sizeThe size for the text.
Returns
true if a size was specified, false otherwise.

◆ ShowText()

bool HPS::Publish::TextKit::ShowText ( UTF8 out_text) const

Shows the text string setting.

Parameters
out_textThe text string for the text.
Returns
true if a text string was specified, false otherwise.

◆ UnsetColor()

TextKit& HPS::Publish::TextKit::UnsetColor ( )

Removes the color setting.

Returns
A reference to this TextKit.

◆ UnsetEverything()

TextKit& HPS::Publish::TextKit::UnsetEverything ( )

Removes all data from the text.

Returns
A reference to this TextKit.

◆ UnsetFont()

TextKit& HPS::Publish::TextKit::UnsetFont ( )

Removes the font setting.

Returns
A reference to this TextKit.

◆ UnsetSize()

TextKit& HPS::Publish::TextKit::UnsetSize ( )

Removes the size setting.

Returns
A reference to this TextKit.

◆ UnsetText()

TextKit& HPS::Publish::TextKit::UnsetText ( )

Removes the text string setting.

Returns
A reference to this TextKit.

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