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.
-
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.
-
TableKit &operator=(TableKit &&in_kit)
The move assignment operator transfers the underlying object of the rvalue reference to this TableKit.
-
bool operator==(TableKit const &in_kit) const
Check if the source TableKit is equivalent to this TableKit.
-
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.
-
TableKit &SetHTMLStyle(char const *in_source, Source::Type in_type = Source::Type::Code)
Sets the HTML table style source or file.
-
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.
-
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.
-
void Show(TableKit &out_kit) const
-
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 ShowHTMLStyle(UTF8 &out_source, Source::Type &out_type) const
Shows the HTML table style setting.
-
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 &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
-
virtual bool Empty() const