HPS::Publish::TextKit

class HPS.Publish.TextKit : public HPS.SprocketKit

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.

Public Functions

override void Dispose ()
override bool Empty ()

Indicates whether this TextKit has any values set on it.

Return

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

bool Equals (HPS.Publish.TextKit in_kit)

Check if the source TextKit is equivalent to this TextKit.

Param in_kit

The source TextKit to compare to this TextKit.

Return

true if the objects are equivalent, false otherwise.

override bool Equals (Object obj)
override int GetHashCode ()
override HPS.Type ObjectType ()

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).

Return

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

void Set (HPS.Publish.TextKit in_kit)

Copies the source TextKit into this TextKit.

Param in_kit

The source TextKit to copy.

HPS.Publish.TextKit SetColor (HPS.RGBColor 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.

Param in_color

Color for the text.

Return

A reference to this TextKit.

HPS.Publish.TextKit SetFont (HPS.Publish.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.

Param in_font

The built-in font for the text.

Return

A reference to this TextKit.

HPS.Publish.TextKit SetFont (string in_font_name, HPS.Publish.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.

Param in_font_name

UTF8-encoded font name for the text. This corresponds to the value that will be passed to A3DPDFTextDataEx::m_pcFontName.

Param in_language

The language for the font. This corresponds to the value that will be passed to A3DPDFTextDataEx::m_eLanguage.

Param in_embed_font

Whether to embed the font in the PDF. This corresponds to the value that will be passed to A3DPDFTextDataEx::m_bEmbedFontInPDF.

Return

A reference to this 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.

Param in_size

The size in points for the text.

Return

A reference to this TextKit.

HPS.Publish.TextKit SetText (string 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.

Param in_text

UTF8-encoded text string for the text.

Return

A reference to this TextKit.

void Show (out HPS.Publish.TextKit out_kit)

Copies this TextKit into the given TextKit.

Param out_kit

The TextKit to populate with the contents of this TextKit.

bool ShowColor (out HPS.RGBColor out_color)

Shows the color setting

Param out_color

The color for the text.

Return

true if a color was specified, false otherwise.

bool ShowFont (out HPS.Publish.Text.Font.Type out_type, out HPS.Publish.Text.Font.Name out_font, out string out_font_name, out HPS.Publish.Text.Language out_language, out bool out_embed_font)

Shows the font setting.

Param out_type

The type of font for the text.

Param out_font

The built-in font for the text. This is only valid if out_type is Text.Font.Type.BuiltIn.

Param out_font_name

The explicit font name for the text. This is only valid if out_type is Text.Font.Type.Explicit.

Param out_language

The language for the font. This is only valid if out_type is Text.Font.Type.Explicit.

Param out_embed_font

Whether to embed the font in the PDF. This is only valid if out_type is Text.Font.Type.Explicit.

Return

true if a font was specified, false otherwise.

bool ShowSize (out int out_size)

Shows the size setting.

Param out_size

The size for the text.

Return

true if a size was specified, false otherwise.

bool ShowText (out string out_text)

Shows the text string setting.

Param out_text

The text string for the text.

Return

true if a text string was specified, false otherwise.

TextKit ()

The default constructor creates an empty TextKit object.

TextKit (HPS.Publish.TextKit in_kit)

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

Param in_kit

The source TextKit to copy.

HPS.Publish.TextKit UnsetColor ()

Removes the color setting.

Return

A reference to this TextKit.

HPS.Publish.TextKit UnsetEverything ()

Removes all data from the text.

Return

A reference to this TextKit.

HPS.Publish.TextKit UnsetFont ()

Removes the font setting.

Return

A reference to this TextKit.

HPS.Publish.TextKit UnsetSize ()

Removes the size setting.

Return

A reference to this TextKit.

HPS.Publish.TextKit UnsetText ()

Removes the text string setting.

Return

A reference to this TextKit.

Public Static Functions

HPS.Publish.TextKit GetDefault ()

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.

Return

A TextKit with the default settings.

bool operator!= (HPS.Publish.TextKit a, HPS.Publish.TextKit b)
bool operator== (HPS.Publish.TextKit a, HPS.Publish.TextKit b)