The TextKit class is a user space object. More...
#include <sprk_publish.h>
Public Member Functions | |
TextKit () | |
The default constructor creates an empty TextKit object. More... | |
TextKit (TextKit const &in_kit) | |
The copy constructor creates a new TextKit object that contains the same settings as the source TextKit. More... | |
TextKit (TextKit &&in_kit) | |
The move constructor creates a TextKit by transferring the underlying object of the rvalue reference to this TextKit. More... | |
virtual | ~TextKit () |
HPS::Type | ObjectType () const |
void | Set (TextKit const &in_kit) |
Copies the source TextKit into this TextKit. More... | |
void | Show (TextKit &out_kit) const |
Copies this TextKit into the given TextKit. More... | |
TextKit & | operator= (TextKit const &in_kit) |
Copies the source TextKit into this TextKit. More... | |
TextKit & | operator= (TextKit &&in_kit) |
The move assignment operator transfers the underlying object of the rvalue reference to this TextKit. More... | |
bool | Empty () const |
Indicates whether this TextKit has any values set on it. More... | |
bool | Equals (TextKit const &in_kit) const |
Check if the source TextKit is equivalent to this TextKit. More... | |
bool | operator== (TextKit const &in_kit) const |
Check if the source TextKit is equivalent to this TextKit. More... | |
bool | operator!= (TextKit const &in_kit) const |
Check if the source TextKit is not equivalent to this TextKit. More... | |
TextKit & | SetText (char const *in_text) |
Sets the text string for the text. More... | |
TextKit & | SetFont (Text::Font::Name in_font) |
Sets a built-in font for the text. More... | |
TextKit & | SetFont (char const *in_font_name, Text::Language in_language, bool in_embed_font) |
Sets an explicit font for the text. More... | |
TextKit & | SetSize (int in_size) |
Sets the size in points for the text. More... | |
TextKit & | SetColor (RGBColor const &in_color) |
Sets the color for the text. More... | |
TextKit & | UnsetText () |
Removes the text string setting. More... | |
TextKit & | UnsetFont () |
Removes the font setting. More... | |
TextKit & | UnsetSize () |
Removes the size setting. More... | |
TextKit & | UnsetColor () |
Removes the color setting. More... | |
TextKit & | UnsetEverything () |
Removes all data from the text. More... | |
bool | ShowText (UTF8 &out_text) const |
Shows the text string setting. More... | |
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 |
Shows the font setting. More... | |
bool | ShowSize (int &out_size) const |
Shows the size setting. More... | |
bool | ShowColor (RGBColor &out_color) const |
Shows the color setting. More... | |
virtual HPS::Type | Type () const |
This function returns the true type of the underlying object. More... | |
virtual void | Reset () |
Resets this object to its initial, uninitialized state. More... | |
bool | HasType (HPS::Type in_mask) const |
This function indicates whether this Object has the given Type mask. More... | |
intptr_t | GetClassID () const |
Returns a unique identifier that is shared by all objects of the same class. More... | |
intptr_t | GetInstanceID () const |
Returns an identifier that can be used to identify which instance of a class an object is. More... | |
Static Public Member Functions | |
static TextKit | GetDefault () |
Creates a TextKit which contains the default settings. More... | |
template<typename T > | |
static intptr_t | ClassID () |
Unique identifier for this class. More... | |
Static Public Attributes | |
static const HPS::Type | staticType = HPS::Type::PublishTextKit |
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.
HPS::Publish::TextKit::TextKit | ( | ) |
The default constructor creates an empty TextKit object.
HPS::Publish::TextKit::TextKit | ( | TextKit const & | in_kit | ) |
HPS::Publish::TextKit::TextKit | ( | TextKit && | in_kit | ) |
|
virtual |
|
inlinestaticinherited |
Unique identifier for this class.
Note: this method uses construction of static objects. If used in a constructor, it should be used in the body not the initializer list.
|
virtual |
Indicates whether this TextKit has any values set on it.
Reimplemented from HPS::Object.
bool HPS::Publish::TextKit::Equals | ( | TextKit const & | in_kit | ) | const |
|
inherited |
Returns a unique identifier that is shared by all objects of the same class.
|
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.
|
inherited |
Returns an identifier that can be used to identify which instance of a class an object is.
Different keys and controls will return the same value if they are backed by the same database resource.
|
inherited |
|
inlinevirtual |
bool HPS::Publish::TextKit::operator!= | ( | TextKit const & | in_kit | ) | const |
bool HPS::Publish::TextKit::operator== | ( | TextKit const & | in_kit | ) | const |
|
virtualinherited |
Resets this object to its initial, uninitialized state.
Reimplemented in HPS::EventHandler, HPS::EventDispatcher, HPS::World, HPS::HighlightSearchResults, HPS::HighlightSearchResultsIterator, HPS::SelectionResults, HPS::SelectionResultsIterator, HPS::FontSearchResults, HPS::FontSearchResultsIterator, HPS::SearchResults, and HPS::SearchResultsIterator.
void HPS::Publish::TextKit::Set | ( | TextKit const & | in_kit | ) |
Sets the color for the text.
This corresponds to the value that will be passed to A3DPDFTextData::m_sColor or A3DPDFTextDataEx::m_sColor.
in_color | Color for the text. |
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.
in_font | The built-in font for the text. |
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.
in_font_name | UTF8-encoded font name for the text. This corresponds to the value that will be passed to A3DPDFTextDataEx::m_pcFontName. |
in_language | The language for the font. This corresponds to the value that will be passed to A3DPDFTextDataEx::m_eLanguage. |
in_embed_font | Whether to embed the font in the PDF. This corresponds to the value that will be passed to A3DPDFTextDataEx::m_bEmbedFontInPDF. |
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.
in_size | The size in points for the text. |
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.
in_text | UTF8-encoded text string for the text. |
void HPS::Publish::TextKit::Show | ( | TextKit & | out_kit | ) | const |
bool HPS::Publish::TextKit::ShowColor | ( | RGBColor & | out_color | ) | const |
Shows the color setting.
out_color | The color for the text. |
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.
out_type | The type of font for the text. |
out_font | The built-in font for the text. This is only valid if out_type is Text::Font::Type::BuiltIn. |
out_font_name | The explicit font name for the text. This is only valid if out_type is Text::Font::Type::Explicit. |
out_language | The language for the font. This is only valid if out_type is Text::Font::Type::Explicit. |
out_embed_font | Whether to embed the font in the PDF. This is only valid if out_type is Text::Font::Type::Explicit. |
bool HPS::Publish::TextKit::ShowSize | ( | int & | out_size | ) | const |
Shows the size setting.
out_size | The size for the text. |
bool HPS::Publish::TextKit::ShowText | ( | UTF8 & | out_text | ) | const |
Shows the text string setting.
out_text | The text string for the text. |
|
virtualinherited |
This function returns the true type of the underlying object.
This function is useful for finding the type of smart pointer objects that have been cast to more generic types.
Reimplemented in HPS::UpdateOptionsControl, HPS::HighlightControl, HPS::SelectionOptionsControl, HPS::OffScreenWindowOptionsControl, HPS::ApplicationWindowOptionsControl, HPS::StandAloneWindowOptionsControl, HPS::AttributeLockControl, HPS::WindowInfoControl, HPS::DebuggingControl, HPS::SubwindowControl, HPS::ContourLineControl, HPS::VisualEffectsControl, HPS::TransformMaskControl, HPS::PostProcessEffectsControl, HPS::DrawingAttributeControl, HPS::HiddenLineAttributeControl, HPS::PerformanceControl, HPS::NURBSSurfaceAttributeControl, HPS::ConditionControl, HPS::StyleControl, HPS::PortfolioControl, HPS::MaterialMappingControl, HPS::TextureMatrixControl, HPS::ModellingMatrixControl, HPS::CurveAttributeControl, HPS::EdgeAttributeControl, HPS::LineAttributeControl, HPS::TextAttributeControl, HPS::CuttingSectionAttributeControl, HPS::CylinderAttributeControl, HPS::LightingAttributeControl, HPS::SphereAttributeControl, HPS::MarkerAttributeControl, HPS::CullingControl, HPS::ColorInterpolationControl, HPS::TransparencyControl, HPS::SelectabilityControl, HPS::CameraControl, HPS::VisibilityControl, HPS::BoundingControl, HPS::Kit, and HPS::Control.
TextKit& HPS::Publish::TextKit::UnsetColor | ( | ) |
Removes the color setting.
TextKit& HPS::Publish::TextKit::UnsetEverything | ( | ) |
Removes all data from the text.
TextKit& HPS::Publish::TextKit::UnsetFont | ( | ) |
Removes the font setting.
TextKit& HPS::Publish::TextKit::UnsetSize | ( | ) |
Removes the size setting.
TextKit& HPS::Publish::TextKit::UnsetText | ( | ) |
Removes the text string setting.
|
static |