Attributes of a text field, list box field or combo box field used for the construction of the appearance (PDF documents only). More...
#include <SignDocSDK-cpp.h>
Public Member Functions | |
SignDocTextFieldAttributes () | |
Constructor. | |
SignDocTextFieldAttributes (const SignDocTextFieldAttributes &aSource) | |
Copy constructor. | |
~SignDocTextFieldAttributes () | |
Destructor. | |
SignDocTextFieldAttributes & | operator= (const SignDocTextFieldAttributes &aSource) |
Assignment operator. | |
void | swap (SignDocTextFieldAttributes &aOther) |
Efficiently swap this object with another one. | |
bool | isSet () const |
Check if text field attributes are set or not. | |
bool | isValid () const |
Check if the text field attributes are valid. | |
void | clear () |
Unset all attributes. | |
std::string | getFontName (Encoding aEncoding) const |
Get the name of the font. | |
void | setFontName (Encoding aEncoding, const std::string &aFontName) |
Set the name of the font. | |
std::string | getFontResourceName (Encoding aEncoding) const |
Get the resource name of the font. | |
double | getFontSize () const |
Get the font size. | |
void | setFontSize (double aFontSize) |
Set the font size. | |
SignDocColor * | getTextColor () const |
Get the text color. | |
void | setTextColor (const SignDocColor &aTextColor) |
Set the text color. | |
std::string | getRest (Encoding aEncoding) const |
Get unparsed parts of default appearance string. | |
void | setRest (Encoding aEncoding, const std::string &aInput) |
Set unparsed parts of default appearance string. | |
SignDocTextFieldAttributes (SIGNDOC_TextFieldAttributes *aP) | |
Internal function. | |
SIGNDOC_TextFieldAttributes * | getImpl () |
Internal function. | |
const SIGNDOC_TextFieldAttributes * | getImpl () const |
Internal function. | |
void | setImpl (SIGNDOC_TextFieldAttributes *aP) |
Internal function. |
Attributes of a text field, list box field or combo box field used for the construction of the appearance (PDF documents only).
This class represents a PDF default appearance string.
Modifying an object of this type does not modify the underlying field or document. Use SignDocDocument::setTextFieldAttributes() or SignDocField::setTextFieldAttributes() to update the text attributes of a field or of the document.
de::softpro::doc::SignDocTextFieldAttributes::SignDocTextFieldAttributes | ( | ) | [inline] |
Constructor.
de::softpro::doc::SignDocTextFieldAttributes::SignDocTextFieldAttributes | ( | const SignDocTextFieldAttributes & | aSource ) | [inline] |
Copy constructor.
[in] | aSource | The object to be copied. |
de::softpro::doc::SignDocTextFieldAttributes::~SignDocTextFieldAttributes | ( | ) | [inline] |
Destructor.
de::softpro::doc::SignDocTextFieldAttributes::SignDocTextFieldAttributes | ( | SIGNDOC_TextFieldAttributes * | aP ) | [inline] |
Internal function.
void de::softpro::doc::SignDocTextFieldAttributes::clear | ( | ) | [inline] |
Unset all attributes.
isSet() will return false.
std::string de::softpro::doc::SignDocTextFieldAttributes::getFontName | ( | Encoding | aEncoding ) | const [inline] |
Get the name of the font.
This function returns an empty string if isSet() would return false.
[in] | aEncoding | The encoding to be used for the return value. |
std::string de::softpro::doc::SignDocTextFieldAttributes::getFontResourceName | ( | Encoding | aEncoding ) | const [inline] |
Get the resource name of the font.
This function returns an empty string if isSet() would return false.
Note that setting the resource name is not possible.
[in] | aEncoding | The encoding to be used for the return value. |
double de::softpro::doc::SignDocTextFieldAttributes::getFontSize | ( | ) | const [inline] |
Get the font size.
This function returns 0 if isSet() would return false.
const SIGNDOC_TextFieldAttributes* de::softpro::doc::SignDocTextFieldAttributes::getImpl | ( | ) | const [inline] |
Internal function.
SIGNDOC_TextFieldAttributes* de::softpro::doc::SignDocTextFieldAttributes::getImpl | ( | ) | [inline] |
Internal function.
std::string de::softpro::doc::SignDocTextFieldAttributes::getRest | ( | Encoding | aEncoding ) | const [inline] |
Get unparsed parts of default appearance string.
If this function returns a non-empty string, there are unsupported operators in the default appearance string.
[in] | aEncoding | The encoding to be used for the return value. |
SignDocColor* de::softpro::doc::SignDocTextFieldAttributes::getTextColor | ( | ) | const [inline] |
Get the text color.
This function returns NULL if isSet() would return false.
bool de::softpro::doc::SignDocTextFieldAttributes::isSet | ( | ) | const [inline] |
Check if text field attributes are set or not.
If this function returns false for a SignDocTextFieldAttributes object retrieved from a text field, the document's natural text field attributes will be used (if present).
This function returns false for all SignDocTextFieldAttributes objects retrieved from TIFF documents (but you can set the attributes anyway, making isSet() return true).
bool de::softpro::doc::SignDocTextFieldAttributes::isValid | ( | ) | const [inline] |
SignDocTextFieldAttributes& de::softpro::doc::SignDocTextFieldAttributes::operator= | ( | const SignDocTextFieldAttributes & | aSource ) | [inline] |
Assignment operator.
[in] | aSource | The source object. |
void de::softpro::doc::SignDocTextFieldAttributes::setFontName | ( | Encoding | aEncoding, |
const std::string & | aFontName | ||
) | [inline] |
Set the name of the font.
The font name can be the name of a standard font, the name of an already embedded font, or the name of a font defined by a font configuration file.
SignDocDocument::addSignature() ignores the font name set by this function if string parameter "FontName" of SignDocSignatureParameters is set to a non-empty value or if the "SignatureTemplate" element of the XML document given to blob parameter "Template" has a non-empty "font-name" attribute.
[in] | aEncoding | The encoding of aFontName. |
[in] | aFontName | The new font name. |
void de::softpro::doc::SignDocTextFieldAttributes::setFontSize | ( | double | aFontSize ) | [inline] |
Set the font size.
SignDocDocument::addSignature() ignores the font size set by this function and uses length parameter "FontSize" of SignDocSignatureParameters instead.
[in] | aFontSize | The font size (in user space units). If the font size is 0, the default font size (which depends on the field size) will be used. |
void de::softpro::doc::SignDocTextFieldAttributes::setImpl | ( | SIGNDOC_TextFieldAttributes * | aP ) | [inline] |
Internal function.
void de::softpro::doc::SignDocTextFieldAttributes::setRest | ( | Encoding | aEncoding, |
const std::string & | aInput | ||
) | [inline] |
Set unparsed parts of default appearance string.
[in] | aEncoding | The encoding of aInput. |
[in] | aInput | The new string of unparsed operators. If this string is non-empty and does not start with a space character, a space character will be prepended automatically. |
void de::softpro::doc::SignDocTextFieldAttributes::setTextColor | ( | const SignDocColor & | aTextColor ) | [inline] |
Set the text color.
[in] | aTextColor | The text color. |
void de::softpro::doc::SignDocTextFieldAttributes::swap | ( | SignDocTextFieldAttributes & | aOther ) | [inline] |
Efficiently swap this object with another one.
[in] | aOther | The other object. |