CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
OdPdfPublish::OdTextField Class Reference

#include <PdfPublishTextField.h>

Inheritance diagram for OdPdfPublish::OdTextField:
OdPdfPublish::OdObject OdRxObject

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdTextField)
 
 ODRX_HEAP_OPERATORS ()
 
virtual ~OdTextField ()
 
void setName (const OdString &name)
 
void setFont (Text::StandardFontsType fontType)
 
void setFont (const OdString &fontName, Text::FontStyle fontStyle=Text::kRegular)
 
void setFontSize (OdUInt16 size)
 
void setTextColor (ODCOLORREF color)
 
void setTooltip (const OdString &tooltip)
 
void setVisibility (bool state)
 
void setPrintability (bool state)
 
void setLock (bool state)
 
void setBorder (bool state)
 
void setBorderColor (ODCOLORREF color)
 
void setBorderThickness (Border::Thickness thickness)
 
void setBorderStyle (Border::Style style)
 
void setFillColor (ODCOLORREF color)
 
void setDefaultValue (const OdString &value)
 
void setTextJustification (Text::Justification justification)
 
void setMultiline (bool state)
 
void setScrolling (bool state)
 
void setReadOnly (bool state)
 
void setTextRotation (Text::Rotation rotation)
 
void getName (OdString &name) const
 
void getFont (Text::StorageType &storageType, Text::StandardFontsType &fontType, OdString &fontName, Text::FontStyle &fontStyle) const
 
void getFontSize (OdUInt16 &size) const
 
void getTextColor (ODCOLORREF &color) const
 
void getTooltip (OdString &tooltip) const
 
void getVisibility (bool &state) const
 
void getPrintability (bool &state) const
 
void getLock (bool &state) const
 
void getBorder (bool &state) const
 
void getBorderColor (ODCOLORREF &color) const
 
void getBorderThickness (Border::Thickness &thickness) const
 
void getBorderStyle (Border::Style &style) const
 
void getFillColor (ODCOLORREF &color) const
 
void getDefaultValue (OdString &value) const
 
void getTextJustification (Text::Justification &justification) const
 
void getMultiline (bool &state) const
 
void getScrolling (bool &state) const
 
void getReadOnly (bool &state) const
 
void getTextRotation (Text::Rotation &rotation) const
 
- Public Member Functions inherited from OdPdfPublish::OdObject
 ODRX_DECLARE_MEMBERS (OdObject)
 
 ODRX_HEAP_OPERATORS ()
 
virtual ~OdObject ()
 
virtual bool isEmpty () const
 
virtual bool isValid () const
 
virtual void clear ()
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Protected Member Functions

 OdTextField ()
 
- Protected Member Functions inherited from OdPdfPublish::OdObject
 OdObject (OdPublishObjectImpl *pImpl)
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

This class implements a text field control contained in a .pdf document created with Publish SDK. A text field allows entry of text information with specified format options.

Definition at line 46 of file PdfPublishTextField.h.

Constructor & Destructor Documentation

◆ OdTextField()

OdPdfPublish::OdTextField::OdTextField ( )
protected

◆ ~OdTextField()

virtual OdPdfPublish::OdTextField::~OdTextField ( )
virtual

Destroys the text field.

Member Function Documentation

◆ getBorder()

void OdPdfPublish::OdTextField::getBorder ( bool &  state) const

Returns the current value of the flag that determines whether the text field has a border. If the flag value is equal to true, the text field has a border, otherwise it does not. The method fills a passed boolean value with the text field border flag value and returns it to a calling subroutine.

Parameters
state[out] A placeholder for the flag value.

◆ getBorderColor()

void OdPdfPublish::OdTextField::getBorderColor ( ODCOLORREF color) const

Returns the current text field border color. The method fills a passed ODCOLORREF value with the text field border color value and returns it to a calling subroutine.

Parameters
color[out] A placeholder for the color value.

◆ getBorderStyle()

void OdPdfPublish::OdTextField::getBorderStyle ( Border::Style style) const

Returns the current text field border style.

Parameters
style[out] A placeholder for the border style of the text field.
See also
<link OdPdfPublish::Border::Style, Border::Style enumeration>.

◆ getBorderThickness()

void OdPdfPublish::OdTextField::getBorderThickness ( Border::Thickness thickness) const

Returns the current thickness value of the text field border. This method fills a passed value with the current thickness value and returns it to a calling subroutine.

Parameters
thickness[out] A placeholder for the thickness value.
See also
<link OdPdfPublish::Border::Thickness, Border::Thickness enumeration>.

◆ getDefaultValue()

void OdPdfPublish::OdTextField::getDefaultValue ( OdString value) const

Returns the current text field default value. The method fills a passed string object with the current text field default value and returns it to a calling subroutine.

Parameters
value[out] A placeholder for the text field default value.

◆ getFillColor()

void OdPdfPublish::OdTextField::getFillColor ( ODCOLORREF color) const

Returns the text field fill color. The method fills a passed ODCOLORREF value and returns it to a calling subroutine.

Parameters
color[out] A placeholder for the fill color value.

◆ getFont()

void OdPdfPublish::OdTextField::getFont ( Text::StorageType storageType,
Text::StandardFontsType fontType,
OdString fontName,
Text::FontStyle fontStyle 
) const

Returns the current font type name used for displaying the text field caption. The method fills a passed string object with the text field font name and returns it to a calling subroutine.

Parameters
storageType[out] A placeholder for the storage type value.
fontType[out] A placeholder for the font type that should be used for displaying the text field caption.
fontName[out] A placeholder for the font name that should be used for displaying the text field caption.
fontStyle[out] A placeholder for the font style that should be used for displaying the text field caption.
See also
<link OdPdfPublish::Text::StorageType, Text::StorageType enumeration> <link OdPdfPublish::Text::StandardFontsType, Text::StandardFontsType enumeration> <link OdPdfPublish::Text::FontStyle, Text::FontStyle enumeration>

◆ getFontSize()

void OdPdfPublish::OdTextField::getFontSize ( OdUInt16 size) const

Returns the current font size used for displaying the text field caption. The method fills a passed integer value with the text field font size and returns it to a calling subroutine.

Parameters
size[out] A placeholder for the font size that should be used for the text field caption.

◆ getLock()

void OdPdfPublish::OdTextField::getLock ( bool &  state) const

Returns the current value of the flag that determines whether the text field is locked. If the flag value is equal to true, the text field is locked and becomes disabled, otherwise it is enabled and unlocked. The method fills a passed boolean value with the text field lock flag value and returns it to a calling subroutine.

Parameters
state[out] A placeholder for the flag value.

◆ getMultiline()

void OdPdfPublish::OdTextField::getMultiline ( bool &  state) const

Returns the current multiline flag value of the text. This flag determines whether the text field content can be divided into several lines. If the flag is equal to true, the text field can contain several lines, otherwise text field content is in a single line. The method fills a passed boolean value with the current flag value and returns it to a calling subroutine.

Parameters
state[out] A placeholder for the multiline flag value.

◆ getName()

void OdPdfPublish::OdTextField::getName ( OdString name) const

Returns the current name of the text field. The method fills a passed string object with the text field name and returns it to a calling subroutine.

Parameters
name[out] A placeholder for the text field name.

◆ getPrintability()

void OdPdfPublish::OdTextField::getPrintability ( bool &  state) const

Returns the current value of the flag that determines whether the text field should be printed. If the text field should be printed, the flag value is equal to true, otherwise it is equal to false. The method fills a passed boolean value with the text field printability flag value and returns it to a calling subroutine.

Parameters
state[out] A placeholder for the flag value.

◆ getReadOnly()

void OdPdfPublish::OdTextField::getReadOnly ( bool &  state) const

Returns the current read-only flag value of the text field. The read-only flag determines whether text field content can be edited (if its value is true) or not (if its value is false). The method fills a passed boolean value with the current flag value and returns it to a calling subroutine.

Parameters
state[out] A placeholder for the read-only flag value.

◆ getScrolling()

void OdPdfPublish::OdTextField::getScrolling ( bool &  state) const

Returns the current text field scrolling flag value. If the flag is equal to true, the text field has a scroll control that can be used to scroll multiline text. Otherwise the text field does not contain a scroll control. The method fills a passed boolean value with the current flag value and returns it to a calling subroutine.

Parameters
state[out] A placeholder for the scrolling flag value.

◆ getTextColor()

void OdPdfPublish::OdTextField::getTextColor ( ODCOLORREF color) const

Returns the current text color used for displaying the text field caption. The method fills a passed ODCOLORREF value with the text field caption color and returns it to a calling subroutine.

Parameters
color[out] A placeholder for the text color that should be used for the text field caption.

◆ getTextJustification()

void OdPdfPublish::OdTextField::getTextJustification ( Text::Justification justification) const

Returns the current text field justification. The method fills a passed justification value and returns it to a calling subroutine.

Parameters
justification[out] A placeholder for the justification value.
See also
<link OdPdfPublish::Text::Justification, Text::Justification enumeration>.

◆ getTextRotation()

void OdPdfPublish::OdTextField::getTextRotation ( Text::Rotation rotation) const

Returns the current text field rotation value. The method fills a passed value with the current rotation value and returns it to a calling subroutine.

Parameters
rotation[out] A placeholder for the rotation value of the text field.
See also
<link OdPdfPublish::Text::Rotation, Text::Rotation enumeration>.

◆ getTooltip()

void OdPdfPublish::OdTextField::getTooltip ( OdString tooltip) const

Returns the current tooltip text for the text field. Tooltip text is the text that appears when a user hovers the mouse pointer over the text field.

The method fills a passed string object with the text field tooltip text and returns it to a calling subroutine.

Parameters
tooltip[out] A placeholder for the tooltip text.

◆ getVisibility()

void OdPdfPublish::OdTextField::getVisibility ( bool &  state) const

Returns the current value of the visibility flag for the text field. The visibility flag determines whether the text field is visible in the document (if true) or is hidden (if false). The method fills a passed boolean value with the text field visibility flag value and returns it to a calling subroutine.

Parameters
state[out] A placeholder for the flag value.

◆ ODRX_DECLARE_MEMBERS()

OdPdfPublish::OdTextField::ODRX_DECLARE_MEMBERS ( OdTextField  )

◆ ODRX_HEAP_OPERATORS()

OdPdfPublish::OdTextField::ODRX_HEAP_OPERATORS ( )

◆ setBorder()

void OdPdfPublish::OdTextField::setBorder ( bool  state)

Sets a new value of the flag that determines whether the text field has a border. If the flag value is equal to true, the text field has a border, otherwise it does not.

Parameters
state[in] A new flag value.

◆ setBorderColor()

void OdPdfPublish::OdTextField::setBorderColor ( ODCOLORREF  color)

Sets a text field border color.

Parameters
color[in] A new color value.

◆ setBorderStyle()

void OdPdfPublish::OdTextField::setBorderStyle ( Border::Style  style)

Sets a text field border style.

Parameters
style[in] A new border style.
See also
<link OdPdfPublish::Border::Style, Border::Style enumeration>.

◆ setBorderThickness()

void OdPdfPublish::OdTextField::setBorderThickness ( Border::Thickness  thickness)

Sets a text field border thickness.

Parameters
thickness[in] A new thickness value.
See also
<link OdPdfPublish::Border::Thickness, Border::Thickness enumeration>.

◆ setDefaultValue()

void OdPdfPublish::OdTextField::setDefaultValue ( const OdString value)

Sets a text field default value.

Parameters
value[in] A new default value.

◆ setFillColor()

void OdPdfPublish::OdTextField::setFillColor ( ODCOLORREF  color)

Sets a text field fill color.

Parameters
color[in] A new color value.

◆ setFont() [1/2]

void OdPdfPublish::OdTextField::setFont ( const OdString fontName,
Text::FontStyle  fontStyle = Text::kRegular 
)

Sets the text field font name and style.

Parameters
fontName[in] A new font name.
fontStyle[in] A new font style.
Remarks
This method can set a font that is not in the list of <link OdPdfPublish::Text::StandardFontsType, standard fonts>. By default the <link OdPdfPublish::Text::StandardFontsType::kTimesRoman, normal Times New Roman font> is used.
See also
<link OdPdfPublish::Text::FontStyle, Text::FontStyle enumeration> <link OdPdfPublish::Text::StandardFontsType, StandardFontsType enumeration>

◆ setFont() [2/2]

void OdPdfPublish::OdTextField::setFont ( Text::StandardFontsType  fontType)

Sets the text field font type from the list of <link OdPdfPublish::Text::StandardFontsType, predefined fonts>.

Parameters
fontType[in] A new font type value.
See also
<link OdPdfPublish::Text::StandardFontsType, Text::StandardFontsType enumeration>.

◆ setFontSize()

void OdPdfPublish::OdTextField::setFontSize ( OdUInt16  size)

Sets a font size for the text field.

Parameters
size[in] A new font size value of the text field.

◆ setLock()

void OdPdfPublish::OdTextField::setLock ( bool  state)

Sets a new value of the flag that determines whether the text field is locked. If the flag value is equal to true, the text field is locked and becomes disabled, otherwise it is enabled and unlocked.

Parameters
state[in] A new flag value.

◆ setMultiline()

void OdPdfPublish::OdTextField::setMultiline ( bool  state)

Sets a text field multiline flag value. This flag determines whether the text field content can be divided into several lines. If the flag is equal to true, the text field can contain several lines, otherwise text field content is in a single line.

Parameters
state[in] A new multiline flag value.

◆ setName()

void OdPdfPublish::OdTextField::setName ( const OdString name)

Sets the text field name.

Parameters
name[in] A new text field name.
Remarks
The name is mandatory and must be unique among the document object names.

◆ setPrintability()

void OdPdfPublish::OdTextField::setPrintability ( bool  state)

Sets a new value of the flag that determines whether the text field should be printed. If the text field should be printed, the flag value is equal to true, otherwise it is equal to false.

Parameters
state[in] A new flag value.

◆ setReadOnly()

void OdPdfPublish::OdTextField::setReadOnly ( bool  state)

Sets a text field read-only flag value. The read-only flag determines whether text field content can be edited (if its value is true) or not (if its value is false).

Parameters
state[in] A new read-only flag value.

◆ setScrolling()

void OdPdfPublish::OdTextField::setScrolling ( bool  state)

Sets a text field scrolling flag value. If the flag is equal to true, the text field has a scroll control that can be used to scroll multiline text. Otherwise the text field does not contain a scroll control.

Parameters
state[in] A new scrolling flag value.

◆ setTextColor()

void OdPdfPublish::OdTextField::setTextColor ( ODCOLORREF  color)

Sets a foreground color for the text field.

Parameters
color[in] A new color value.

◆ setTextJustification()

void OdPdfPublish::OdTextField::setTextJustification ( Text::Justification  justification)

Sets a text field justification value.

Parameters
justification[in] A new text justification value.
See also
<link OdPdfPublish::Text::Justification, Text::Justification enumeration>.

◆ setTextRotation()

void OdPdfPublish::OdTextField::setTextRotation ( Text::Rotation  rotation)

Sets a text field rotation value.

Parameters
rotation[in] A new rotation value.
See also
<link OdPdfPublish::Text::Rotation, Text::Rotation enumeration>.

◆ setTooltip()

void OdPdfPublish::OdTextField::setTooltip ( const OdString tooltip)

Sets tooltip text for the text field. Tooltip text is the text that appears when a user hovers the mouse pointer over the text field.

Parameters
tooltip[in] A new value of the tooltip text.

◆ setVisibility()

void OdPdfPublish::OdTextField::setVisibility ( bool  state)

Sets a new value of the visibility flag for the text field. The visibility flag determines whether the text field is visible in the document (if true) or is hidden (if false).

Parameters
state[in] A new flag value.

The documentation for this class was generated from the following file: