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

#include <PdfPublishButton.h>

Inheritance diagram for OdPdfPublish::OdButton:
OdPdfPublish::OdObject OdRxObject

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdButton)
 
 ODRX_HEAP_OPERATORS ()
 
virtual ~OdButton ()
 
void setName (const OdString &name)
 
void setLabel (const OdString &label)
 
void setFont (const OdString &fontName, Text::FontStyle fontStyle=Text::kRegular)
 
void setFont (const Text::StandardFontsType fontType)
 
void setFontSize (OdUInt16 size)
 
void setTextColor (ODCOLORREF color)
 
void setTooltip (const OdString &tooltip)
 
void setVisibility (bool state)
 
void setPrintability (bool state)
 
void setTextRotation (Text::Rotation rotation)
 
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 setLabelPosition (Label::Position position)
 
void setHighlighting (Highlighting::Mode mode)
 
void setIconImage (const OdImagePtr &image)
 
void getName (OdString &name) const
 
void getLabel (OdString &label) 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 getTextRotation (Text::Rotation &rotation) 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 getLabelPosition (Label::Position &position) const
 
void getHighlighting (Highlighting::Mode &mode) const
 
void getIconImage (OdImagePtr &image) 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

 OdButton ()
 
- 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 button control encapsulated in a .pdf document created with Publish SDK. A button control is used in a .pdf document to implement a reaction to user actions (such as different kinds of mouse clicks). The button control appearance (how a button looks in a document) is defined by a set of special properties (for example, font, color, text and so on).

Definition at line 48 of file PdfPublishButton.h.

Constructor & Destructor Documentation

◆ OdButton()

OdPdfPublish::OdButton::OdButton ( )
protected

◆ ~OdButton()

virtual OdPdfPublish::OdButton::~OdButton ( )
virtual

Destroys a button object.

Member Function Documentation

◆ getBorder()

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

Returns whether the button has a border. The method fills a passed boolean value and returns it to a calling subroutine. If the button has a border, the method returns true, otherwise it returns false.

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

◆ getBorderColor()

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

Returns the button border color. The method fills a passed ODCOLORREF value and returns it to a calling subroutine.

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

◆ getBorderStyle()

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

Returns the button border style. The method fills a passed value with the current style and returns it to a calling subroutine.

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

◆ getBorderThickness()

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

Returns the button border thickness. The method fills a passed value with the current thickness value and returns it to a calling subroutine.

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

◆ getFillColor()

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

Returns the button 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::OdButton::getFont ( Text::StorageType storageType,
Text::StandardFontsType fontType,
OdString fontName,
Text::FontStyle fontStyle 
) const

Returns the current button font parameters. The method fills passed values and returns them to a calling subroutine.

Parameters
storageType[out] A placeholder for the storage type.
fontType[out] A placeholder for the font type.
fontName[out] A placeholder for the font name.
fontStyle[out] A placeholder for the font style.
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::OdButton::getFontSize ( OdUInt16 size) const

Returns the button font size. The method fills a passed value and returns it to a calling subroutine.

Parameters
size[out] A placeholder for the font size value.

◆ getHighlighting()

void OdPdfPublish::OdButton::getHighlighting ( Highlighting::Mode mode) const

Returns the current button highlighting mode. The method fills a passed value and returns it to a calling subroutine.

Parameters
mode[out] A placeholder for the button hightlighting mode.
See also
<link OdPdfPublish::Highlighting::Mode, Highlighting::Mode enumeration>.

◆ getIconImage()

void OdPdfPublish::OdButton::getIconImage ( OdImagePtr &  image) const

Returns the button icon <link OdPdfPublish::OdImage, image>. The method fills a passed OdImage object and returns it to a calling subroutine.

Parameters
image[out] A placeholder for the icon image.
See also
<link OdPdfPublish::OdImage, OdImage class>.

◆ getLabel()

void OdPdfPublish::OdButton::getLabel ( OdString label) const

Returns the button label text. The method fills a passed string object with the label text and returns this string to a calling subroutine.

Parameters
label[out] A placeholder for the button label text.

◆ getLabelPosition()

void OdPdfPublish::OdButton::getLabelPosition ( Label::Position position) const

Returns the current button label position. The method fills a passed value and returns it to a calling subroutine.

Parameters
position[out] A placeholder for the button label position value.
See also
<link OdPdfPublish::Label::Position, Label::Position enumeration>.

◆ getLock()

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

Returns whether the button is locked. The method fills a passed boolean value and returns it to a calling subroutine. If the button is locked, the method returns true, otherwise it returns false.

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

◆ getName()

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

Returns the button name. The method fills a passed string object with the name value and returns this string to a calling subroutine.

Parameters
name[out] A placeholder for the button name.

◆ getPrintability()

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

Returns the current flag value that defines whether the button should be printed. The method fills a passed boolean value and returns it to a calling subroutine. If the button should be printed, the method returns true, otherwise it returns false.

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

◆ getTextColor()

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

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

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

◆ getTextRotation()

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

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

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

◆ getTooltip()

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

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

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

◆ getVisibility()

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

Returns the current button visibility state. The method fills a passed boolean value and returns it to a calling subroutine. If the button is visible, the method returns true, otherwise it returns false.

Parameters
state[out] A placeholder for the visibility state.

◆ ODRX_DECLARE_MEMBERS()

OdPdfPublish::OdButton::ODRX_DECLARE_MEMBERS ( OdButton  )

◆ ODRX_HEAP_OPERATORS()

OdPdfPublish::OdButton::ODRX_HEAP_OPERATORS ( )

◆ setBorder()

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

Shows or hides a border around the button.

Parameters
state[in] A flag value that determines whether the button has a border (if true) or not (if false).

◆ setBorderColor()

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

Sets the button border color.

Parameters
color[in] A new value of the border color.

◆ setBorderStyle()

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

Sets the button border style.

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

◆ setBorderThickness()

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

Sets the button border thickness.

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

◆ setFillColor()

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

Sets a color that is used for filling the button.

Parameters
color[in] A new value of the fill color.

◆ setFont() [1/2]

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

Sets the button 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 represented 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::OdButton::setFont ( const Text::StandardFontsType  fontType)

Sets the button 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::OdButton::setFontSize ( OdUInt16  size)

Sets the button font size.

Parameters
size[in] A new font size value.

◆ setHighlighting()

void OdPdfPublish::OdButton::setHighlighting ( Highlighting::Mode  mode)

Sets the button highlighting mode.

Parameters
mode[in] A new value of the highlighting mode.
See also
<link OdPdfPublish::Highlighting::Mode, Highlighting::Mode enumeration>.

◆ setIconImage()

void OdPdfPublish::OdButton::setIconImage ( const OdImagePtr &  image)

Sets the button icon <link OdPdfPublish::OdImage, image>.

Parameters
image[in] A smart pointer to an image object to be used as the button icon.
See also
<link OdPdfPublish::OdImage, OdImage class>.

◆ setLabel()

void OdPdfPublish::OdButton::setLabel ( const OdString label)

Sets the button label text.

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

◆ setLabelPosition()

void OdPdfPublish::OdButton::setLabelPosition ( Label::Position  position)

Sets a position for the button label.

Parameters
position[in] A new value of the label position.
See also
<link OdPdfPublish::Label::Position, Label::Position enumeration>.

◆ setLock()

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

Locks or unlocks the button.

Parameters
state[in] A flag value that determines whether the button is locked (if true) or is unlocked (if false).

◆ setName()

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

Sets the button name.

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

◆ setPrintability()

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

Sets the button behavior when a document is printed.

Parameters
state[in] A flag value that determines whether the button should be printed (if true) or not (if false).

◆ setTextColor()

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

Sets the button text color. The text color is applied to the button label.

Parameters
color[in] A new text color value.

◆ setTextRotation()

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

Sets the button text rotation.

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

◆ setTooltip()

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

Sets the button tooltip text. Tooltip text is text that appears when a user hovers the pointer over the button.

Parameters
tooltip[in] New text for the tooltip.

◆ setVisibility()

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

Sets the button visibility.

Parameters
state[in] A flag value that determines whether the button is visible (if true) or not (if false).

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