HPS::Publish::LinkKit

class HPS::Publish::LinkKit : public HPS::SprocketKit

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

Public Functions

virtual bool Empty() const

Indicates whether this LinkKit has any values set on it.

Returns

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

bool Equals(LinkKit const &in_kit) const

Check if the source LinkKit is equivalent to this LinkKit.

Parameters

in_kit – The source LinkKit to compare to this LinkKit.

Returns

true if the objects are equivalent, false otherwise.

LinkKit()

The default constructor creates an empty LinkKit object.

LinkKit(LinkKit &&in_kit)

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

Parameters

in_kit – An rvalue reference to a LinkKit to take the underlying object from.

LinkKit(LinkKit const &in_kit)

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

Parameters

in_kit – The source LinkKit to copy.

inline virtual HPS::Type ObjectType() const

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.

bool operator!=(LinkKit const &in_kit) const

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

Parameters

in_kit – The source LinkKit to compare to this LinkKit.

Returns

true if the objects are not equivalent, false otherwise.

LinkKit &operator=(LinkKit &&in_kit)

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

Parameters

in_kit – An rvalue reference to a LinkKit to take the underlying object from.

Returns

A reference to this LinkKit.

LinkKit &operator=(LinkKit const &in_kit)

Copies the source LinkKit into this LinkKit.

Parameters

in_kit – The source LinkKit to copy.

Returns

A reference to this LinkKit.

bool operator==(LinkKit const &in_kit) const

Check if the source LinkKit is equivalent to this LinkKit.

Parameters

in_kit – The source LinkKit to compare to this LinkKit.

Returns

true if the objects are equivalent, false otherwise.

void Set(LinkKit const &in_kit)

Copies the source LinkKit into this LinkKit.

Parameters

in_kit – The source LinkKit to copy.

LinkKit &SetBorderColor(RGBColor const &in_color)

Sets the color of the border for the link. This corresponds to the value that will be passed to A3DPDFLinkData::m_sColor.

Parameters

in_color – The color of the border for the link.

Returns

A reference to this LinkKit.

LinkKit &SetBorderWidth(int in_width)

Sets the border width in points for the link. This corresponds to the value that will be passed to A3DPDFLinkData::m_iBorderWidth.

Parameters

in_width – The border width in points for the link.

Returns

A reference to this LinkKit.

LinkKit &SetHighlighting(Highlighting::Mode in_mode)

Sets the highlighting mode for the link. This corresponds to the value that will be passed to A3DPDFLinkData::m_eHighlightingMode.

Parameters

in_mode – The highlighting mode for the link.

Returns

A reference to this LinkKit.

LinkKit &SetJavaScript(char const *in_source, Source::Type in_type = Source::Type::Code)

Sets the JavaScript source or file for the link. This corresponds to the value that will be passed to A3DPDFLinkData::m_pcJavascriptString.

Parameters
  • in_source – The JavaScript source or file (depending on the next argument) for the link.

  • in_type – The type of the preceding argument. Defaults to Source::Type::Code.

Returns

A reference to this LinkKit.

void Show(LinkKit &out_kit) const

Copies this LinkKit into the given LinkKit.

Parameters

out_kit – The LinkKit to populate with the contents of this LinkKit.

bool ShowBorderColor(RGBColor &out_color) const

Shows the border color setting.

Parameters

out_color – The border color of the link.

Returns

true if a border color was specified, false otherwise.

bool ShowBorderWidth(int &out_width) const

Shows the border width setting.

Parameters

out_width – The border width of the link.

Returns

true if a border width was specified, false otherwise.

bool ShowHighlighting(Highlighting::Mode &out_mode) const

Shows the highlighting mode setting.

Parameters

out_mode – The highlighting mode of the link.

Returns

true if a highlighting mode was specified, false otherwise.

bool ShowJavaScript(UTF8 &out_source, Source::Type &out_type) const

Shows the JavaScript setting.

Parameters
  • out_source – The JavaScript source or file (depending on the next argument) for the link.

  • out_type – The type of the preceding argument.

Returns

true if a JavaScript source or file was specified, false otherwise.

LinkKit &UnsetBorderColor()

Removes the border color setting.

Returns

A reference to this LinkKit.

LinkKit &UnsetBorderWidth()

Removes the border width setting.

Returns

A reference to this LinkKit.

LinkKit &UnsetEverything()

Removes all data from the link.

Returns

A reference to this LinkKit.

LinkKit &UnsetHighlighting()

Removes the highlighting mode setting.

Returns

A reference to this LinkKit.

LinkKit &UnsetJavaScript()

Removes the JavaScript setting.

Returns

A reference to this LinkKit.

virtual ~LinkKit()

Public Static Attributes

static const HPS::Type staticType = HPS::Type::PublishLinkKit