HPS::Publish::ButtonKit

class HPS::Publish::ButtonKit : public HPS::SprocketKit

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

Public Functions

ButtonKit()

The default constructor creates an empty ButtonKit object.

ButtonKit(ButtonKit &&in_kit)

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

Parameters

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

ButtonKit(ButtonKit const &in_kit)

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

Parameters

in_kit – The source ButtonKit to copy.

virtual bool Empty() const

Indicates whether this ButtonKit has any values set on it.

Returns

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

bool Equals(ButtonKit const &in_kit) const

Check if the source ButtonKit is equivalent to this ButtonKit.

Parameters

in_kit – The source ButtonKit to compare to this ButtonKit.

Returns

true if the objects are equivalent, false otherwise.

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!=(ButtonKit const &in_kit) const

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

Parameters

in_kit – The source ButtonKit to compare to this ButtonKit.

Returns

true if the objects are not equivalent, false otherwise.

ButtonKit &operator=(ButtonKit &&in_kit)

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

Parameters

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

Returns

A reference to this ButtonKit.

ButtonKit &operator=(ButtonKit const &in_kit)

Copies the source ButtonKit into this ButtonKit.

Parameters

in_kit – The source ButtonKit to copy.

Returns

A reference to this ButtonKit.

bool operator==(ButtonKit const &in_kit) const

Check if the source ButtonKit is equivalent to this ButtonKit.

Parameters

in_kit – The source ButtonKit to compare to this ButtonKit.

Returns

true if the objects are equivalent, false otherwise.

void Set(ButtonKit const &in_kit)

Copies the source ButtonKit into this ButtonKit.

Parameters

in_kit – The source ButtonKit to copy.

ButtonKit &SetBorder(bool in_state)

Sets whether the button has a border. This corresponds to the value that will be passed to A3DPDFButtonData::m_bHasBorder.

Parameters

in_state – Whether the button has a border.

Returns

A reference to this ButtonKit.

ButtonKit &SetBorderColor(RGBColor const &in_color)

Sets the border color for the button. This corresponds to the value that will be passed to A3DPDFButtonData::m_sBorderColor.

Parameters

in_color – The border color of the button.

Returns

A reference to this ButtonKit.

ButtonKit &SetBorderStyle(Border::Style in_style)

Sets the border style for the button. This corresponds to the value that will be passed to A3DPDFButtonData::m_eLineStyleBorder.

Parameters

in_style – The border style for the button.

Returns

A reference to this ButtonKit.

ButtonKit &SetBorderThickness(Border::Thickness in_thickness)

Sets the border thickness for the button. This corresponds to the value that will be passed to A3DPDFButtonData::m_eThicknessBorder.

Parameters

in_thickness – The border thickness for the button.

Returns

A reference to this ButtonKit.

ButtonKit &SetFillColor(RGBColor const &in_color)

Sets the fill color for the button. This corresponds to the value that will be passed to A3DPDFButtonData::m_sFillColor and implicitly sets A3DPDFButtonData::m_bHasFillColor to true.

Parameters

in_color – The fill color for the button.

Returns

A reference to this ButtonKit.

ButtonKit &SetFont(char const *in_name, Text::Font::Style in_style = Text::Font::Style::Regular)

Sets a specific font for the button. This corresponds to the value that will be passed to A3DPDFButtonData::m_pcFontName.

Parameters
  • in_name – UTF8-encoded font name for the button.

  • in_style – The style of font to use for the button.

Returns

A reference to this ButtonKit.

ButtonKit &SetFont(Text::Font::Name in_name)

Sets a builtin font for the button. This corresponds to the value that will be passed to A3DPDFButtonData::m_pcFontName.

Parameters

in_name – The builtin font for the button.

Returns

A reference to this ButtonKit.

ButtonKit &SetFontSize(int in_size)

Sets the font size for the button. This corresponds to the value that will be passed to A3DPDFButtonData::m_iFontSize.

Parameters

in_size – The font size for the button.

Returns

A reference to this ButtonKit.

ButtonKit &SetHighlighting(Highlighting::Mode in_mode)

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

Parameters

in_mode – The highlighting mode for the button.

Returns

A reference to this ButtonKit.

ButtonKit &SetIconImage(ImageKit const &in_image)

Sets the icon image for the button. This corresponds to the value that will be passed to A3DPDFButtonData::m_pImage.

Parameters

in_image – The icon image for the button.

Returns

A reference to this ButtonKit.

ButtonKit &SetLabel(char const *in_label)

Sets the label for the button. This corresponds to the value that will be passed to A3DPDFButtonData::m_pcLabel.

Parameters

in_label – UTF8-encoded label for the button.

Returns

A reference to this ButtonKit.

ButtonKit &SetLabelPosition(Label::Position in_position)

Sets the label position for the button. This corresponds to the value that will be passed to A3DPDFButtonData::m_eLayoutTextIcon.

Parameters

in_position – The label position for the button.

Returns

A reference to this ButtonKit.

ButtonKit &SetLock(bool in_state)

Sets whether the button is locked. This corresponds to the value that will be passed to A3DPDFButtonData::m_bIsLocked.

Parameters

in_state – Whether the button is locked.

Returns

A reference to this ButtonKit.

ButtonKit &SetName(char const *in_name)

Sets the name of the button. This corresponds to the value that will be passed to A3DPDFButtonData::m_pcName.

Parameters

in_name – UTF8-encoded name of the button.

Returns

A reference to this ButtonKit.

ButtonKit &SetPrintability(bool in_state)

Sets the printability for the button. This corresponds to the value that will be passed to A3DPDFButtonData::m_eFormField.

Parameters

in_state – The printability for the button.

Returns

A reference to this ButtonKit.

ButtonKit &SetTextColor(RGBColor const &in_color)

Sets the text color for the button. This corresponds to the value that will be passed to A3DPDFButtonData::m_sTextColor.

Parameters

in_color – The text color for the button.

Returns

A reference to this ButtonKit.

ButtonKit &SetTextRotation(Text::Rotation in_rotation)

Sets the text rotation for the button. This corresponds to the value that will be passed to A3DPDFButtonData::m_eTextOrientation.

Parameters

in_rotation – The text rotation for the button.

Returns

A reference to this ButtonKit.

ButtonKit &SetTooltip(char const *in_tooltip)

Sets the tooltip for the button. This corresponds to the value that will be passed to A3DPDFButtonData::m_pcTooltip.

Parameters

in_tooltip – UTF8-encoded tooltip text for the button.

Returns

A reference to this ButtonKit.

ButtonKit &SetVisibility(bool in_state)

Sets the visibility for the button. This corresponds to the value that will be passed to A3DPDFButtonData::m_eFormField.

Parameters

in_state – The visibility for the button.

Returns

A reference to this ButtonKit.

void Show(ButtonKit &out_kit) const

Copies this ButtonKit into the given ButtonKit.

Parameters

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

bool ShowBorder(bool &out_state) const

Shows the border setting for the button.

Parameters

out_state – Whether the button has a border.

Returns

true if a border setting was specified, false otherwise.

bool ShowBorderColor(RGBColor &out_color) const

Shows the border color for the button.

Parameters

out_color – The border color of the button.

Returns

true if a border color was specified, false otherwise.

bool ShowBorderStyle(Border::Style &out_style) const

Shows the border style for the button.

Parameters

out_style – The border style for the button.

Returns

true if a border style was specified, false otherwise.

bool ShowBorderThickness(Border::Thickness &out_thickness) const

Shows the border thickness for the button.

Parameters

out_thickness – The border thickness for the button.

Returns

true if a border thickness was specified, false otherwise.

bool ShowFillColor(RGBColor &out_color) const

Shows the fill color for the button.

Parameters

out_color – The fill color for the button.

Returns

true if a fill color was specified, false otherwise.

bool ShowFont(Text::Font::Type &out_type, Text::Font::Name &out_font, UTF8 &out_font_name, Text::Font::Style &out_style) const

Shows the font for the button.

Parameters
  • out_type – The type of font for the button.

  • out_font – The built-in font for the button. This is only valid if out_type is Text::Font::Type::BuiltIn.

  • out_font_name – The explicit font name for the button. This is only valid if out_type is Text::Font::Type::Explicit.

  • out_style – The font style for the button. This is only valid if out_type is Text::Font::Type::Explicit.

Returns

true if a font was specified, false otherwise.

bool ShowFontSize(int &out_size) const

Shows the font size for the button.

Parameters

out_size – The font size for the button.

Returns

true if a font size was specified, false otherwise.

bool ShowHighlighting(Highlighting::Mode &out_mode) const

Shows the highlighting mode for the button.

Parameters

out_mode – The highlighting mode for the button.

Returns

true if a highlighting mode was specified, false otherwise.

bool ShowIconImage(ImageKit &out_image) const

Shows the icon image for the button.

Parameters

out_image – The icon image for the button.

Returns

true if an icon image was specified, false otherwise.

bool ShowLabel(UTF8 &out_label) const

Shows the label for the button.

Parameters

out_label – The label for the button.

Returns

true if a label was specified, false otherwise.

bool ShowLabelPosition(Label::Position &out_position) const

Shows the label position for the button.

Parameters

out_position – The label position for the button.

Returns

true if a label position was specified, false otherwise.

bool ShowLock(bool &out_state) const

Shows the lock setting for the button.

Parameters

in_state – Whether the button is locked.

Returns

true if a lock setting was specified, false otherwise.

bool ShowName(UTF8 &out_name) const

Shows the name for the button.

Parameters

out_name – The name of the button.

Returns

true if a name was specified, false otherwise.

bool ShowPrintability(bool &out_state) const

Shows the printability for the button.

Parameters

out_state – The printability for the button.

Returns

true if a printability was specified, false otherwise.

bool ShowTextColor(RGBColor &out_color) const

Shows the text color for the button.

Parameters

out_color – The text color for the button.

Returns

true if a text color was specified, false otherwise.

bool ShowTextRotation(Text::Rotation &out_rotation) const

Shows the text rotation for the button.

Parameters

out_rotation – The text rotation for the button.r

Returns

true if a rotation was specified, false otherwise.

bool ShowTooltip(UTF8 &out_tooltip) const

Shows the tooltip for the button.

Parameters

out_tooltip – The tooltip text for the button.

Returns

true if a tooltip was specified, false otherwise.

bool ShowVisibility(bool &out_state) const

Shows the visibility for the button.

Parameters

out_state – The visibility for the button.

Returns

true if a visibility was specified, false otherwise.

ButtonKit &UnsetBorder()

Removes the border setting.

Returns

A reference to this ButtonKit.

ButtonKit &UnsetBorderColor()

Removes the border color setting.

Returns

A reference to this ButtonKit.

ButtonKit &UnsetBorderStyle()

Removes the border style setting.

Returns

A reference to this ButtonKit.

ButtonKit &UnsetBorderThickness()

Removes the border thickness setting.

Returns

A reference to this ButtonKit.

ButtonKit &UnsetEverything()

Removes all data from the button.

Returns

A reference to this ButtonKit.

ButtonKit &UnsetFillColor()

Removes the fill color setting.

Returns

A reference to this ButtonKit.

ButtonKit &UnsetFont()

Removes the font setting.

Returns

A reference to this ButtonKit.

ButtonKit &UnsetFontSize()

Removes the font size setting.

Returns

A reference to this ButtonKit.

ButtonKit &UnsetHighlighting()

Removes the highlighting mode setting.

Returns

A reference to this ButtonKit.

ButtonKit &UnsetIconImage()

Removes the icon image setting.

Returns

A reference to this ButtonKit.

ButtonKit &UnsetLabel()

Removes the label setting.

Returns

A reference to this ButtonKit.

ButtonKit &UnsetLabelPosition()

Removes the label position setting.

Returns

A reference to this ButtonKit.

ButtonKit &UnsetLock()

Removes the lock setting.

Returns

A reference to this ButtonKit.

ButtonKit &UnsetName()

Removes the name setting.

Returns

A reference to this ButtonKit.

ButtonKit &UnsetPrintability()

Removes the printability setting.

Returns

A reference to this ButtonKit.

ButtonKit &UnsetTextColor()

Removes the text color setting.

Returns

A reference to this ButtonKit.

ButtonKit &UnsetTextRotation()

Removes the text rotation setting.

Returns

A reference to this ButtonKit.

ButtonKit &UnsetTooltip()

Removes the tooltip setting.

Returns

A reference to this ButtonKit.

ButtonKit &UnsetVisibility()

Removes the visibility setting.

Returns

A reference to this ButtonKit.

virtual ~ButtonKit()

Public Static Functions

static ButtonKit GetDefault()

Creates a ButtonKit 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 a button unless a setting is overridden by the ButtonKit passed to a function.

Returns

A ButtonKit with the default settings.

Public Static Attributes

static const HPS::Type staticType = HPS::Type::PublishButtonKit