HPS::Publish::TableKit

class HPS::Publish::TableKit : public HPS::SprocketKit

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

Warning

The TableToPDF Publish add-on must be installed in order to use this class.

Public Functions

virtual bool Empty() const

Indicates whether this TableKit has any values set on it.

Returns

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

bool Equals(TableKit const &in_kit) const

Check if the source TableKit is equivalent to this TableKit.

Parameters

in_kit – The source TableKit to compare to this TableKit.

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

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

Parameters

in_kit – The source TableKit to compare to this TableKit.

Returns

true if the objects are not equivalent, false otherwise.

TableKit &operator=(TableKit &&in_kit)

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

Parameters

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

Returns

A reference to this TableKit.

TableKit &operator=(TableKit const &in_kit)

Copies the source TableKit into this TableKit.

Parameters

in_kit – The source TableKit to copy.

Returns

A reference to this TableKit.

bool operator==(TableKit const &in_kit) const

Check if the source TableKit is equivalent to this TableKit.

Parameters

in_kit – The source TableKit to compare to this TableKit.

Returns

true if the objects are equivalent, false otherwise.

void Set(TableKit const &in_kit)

Copies the source TableKit into this TableKit.

Parameters

in_kit – The source TableKit to copy.

TableKit &SetButton(int in_row, int in_column, ButtonKit const &in_button)

Adds a button to this table at the specified row and column. This corresponds to the value that will be passed to A3DPDFPageInsertButtonInTable.

Parameters
  • in_row – Row in which to add the button.

  • in_column – Column in which to add the button.

  • in_button – Button to add at the specified row and column in the table.

Returns

A reference to this TableKit.

TableKit &SetHTML(char const *in_source, Source::Type in_type = Source::Type::Code)

Sets the HTML table source or file.

Parameters
  • in_source – UTF8-encoded HTML table source or file (depending on the following argument).

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

Returns

A reference to this TableKit.

TableKit &SetHTMLStyle(char const *in_source, Source::Type in_type = Source::Type::Code)

Sets the HTML table style source or file.

Parameters
  • in_source – UTF8-encoded HTML table style source or file (depending on the following argument).

  • in_type – Type of the preceding argument.

Returns

A reference to this TableKit.

TableKit &SetLink(int in_row, int in_column, LinkKit const &in_link)

Adds a link to this table at the specified row and column. This corresponds to the value that will be passed to A3DPDFPageInsertLinkInTable.

Parameters
  • in_row – Row in which to add the link.

  • in_column – Column in which to add the link.

  • in_link – Link to add at the specified row and column in the table.

Returns

A reference to this TableKit.

TableKit &SetText(int in_row, int in_column, TextKit const &in_text)

Adds text to this table at the specified row and column. This corresponds to the value that will be passed to A3DPDFPageInsertTextInTable.

Parameters
  • in_row – Row in which to add the text.

  • in_column – Column in which to add the text.

  • in_textText to add at the specified row and column in the table.

Returns

A reference to this TableKit.

TableKit &SetTextField(int in_row, int in_column, TextFieldKit const &in_text_field)

Adds a text field to this table at the specified row and column. This corresponds to the value that will be passed to A3DPDFPageInsertTextFieldInTable.

Parameters
  • in_row – Row in which to add the text field.

  • in_column – Column in which to add the text field.

  • in_text_fieldText field to add at the specified row and column in the table.

Returns

A reference to this TableKit.

void Show(TableKit &out_kit) const

Copies this TableKit into the given TableKit.

Parameters

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

bool ShowButton(int in_row, int in_column, ButtonKit &out_button) const

Shows the button at the specified row and column.

Parameters
  • in_row – Row in which to show the button.

  • in_column – Column in which to show the button.

  • out_button – The button at the specified row and column in the table.

Returns

true if a button was added at the specified row and column, false otherwise.

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

Shows the HTML table setting.

Parameters
  • out_source – The HTML table source or file (depending on the following argument).

  • out_type – The type of the preceding argument.

Returns

true if an HTML table was specified, false otherwise.

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

Shows the HTML table style setting.

Parameters
  • out_source – The HTML table style source or file (depending on the following argument).

  • out_type – The type of the preceding argument.

Returns

true if an HTML table style was specified, false otherwise.

bool ShowLink(int in_row, int in_column, LinkKit &out_link) const

Shows the link at the specified row and column.

Parameters
  • in_row – Row in which to show the link.

  • in_column – Column in which to show the link.

  • out_link – The link at the specified row and column in the table.

Returns

true if a link was added at the specified row and column, false otherwise.

bool ShowText(int in_row, int in_column, TextKit &out_text) const

Shows the text at the specified row and column.

Parameters
  • in_row – Row in which to show the text.

  • in_column – Column in which to show the text.

  • out_text – The text at the specified row and column in the table.

Returns

true if text was added at the specified row and column, false otherwise.

bool ShowTextField(int in_row, int in_column, TextFieldKit &out_text_field) const

Shows the link at the specified row and column.

Parameters
  • in_row – Row in which to show the link.

  • in_column – Column in which to show the link.

  • out_text_field – The text field at the specified row and column in the table.

Returns

true if a link was added at the specified row and column, false otherwise.

TableKit()

The default constructor creates an empty TableKit object.

TableKit(TableKit &&in_kit)

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

Parameters

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

TableKit(TableKit const &in_kit)

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

Parameters

in_kit – The source TableKit to copy.

TableKit &UnsetButton(int in_row, int in_column)

Removes the button at the specified row and column.

Returns

A reference to this TableKit.

TableKit &UnsetEverything()

Removes all data from the table.

Returns

A reference to this TableKit.

TableKit &UnsetHTML()

Removes the HTML table setting.

Returns

A reference to this TableKit.

TableKit &UnsetHTMLStyle()

Removes the HTML table style setting.

Returns

A reference to this TableKit.

TableKit &UnsetLink(int in_row, int in_column)

Removes the link at the specified row and column.

Returns

A reference to this TableKit.

TableKit &UnsetText(int in_row, int in_column)

Removes the text at the specified row and column.

Returns

A reference to this TableKit.

TableKit &UnsetTextField(int in_row, int in_column)

Removes the text field at the specified row and column.

Returns

A reference to this TableKit.

virtual ~TableKit()

Public Static Attributes

static const HPS::Type staticType = HPS::Type::PublishTableKit