CFx SDK Documentation  2022 SP0
Public 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 ()
 
 OdButton ()
 
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
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 
- Protected Member Functions inherited from OdPdfPublish::OdObject
 OdObject (OdPublishObjectImpl *pImpl)
 

Detailed Description

This class implements a button control encapsulated in a .pdf document created with Teigha Publish. Button control is used in a .pdf document to implement reaction on a user actions (such as different kinds of mouse clicks). A button control appearance (in other words, how a button looks in a document) is defined with a set of special properties (for example, font, color, text and so on).

Definition at line 47 of file PdfPublishButton.h.

Constructor & Destructor Documentation

◆ OdButton()

OdPdfPublish::OdButton::OdButton ( )

Creates a button object.

◆ ~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 border. The method fills a passed boolean value and returns it to a calling subroutine. If the button has 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 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 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 filling color. The method fills a passed ODCOLORREF value and returns it to a calling subroutine.

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

◆ getFont()

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

Returns current button font name and style. The method fills passed string object and Text::FontStyle value with font text name and font style, then returns them to a calling subroutine.

Parameters
font_name[out] A placeholder for the font name.
style[out] A placeholder for the font style.
See also
<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 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 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 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 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 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 current button text rotation. The method fills a passed value with 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 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 is true) or has not (if is 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 filling color.

◆ setFont() [1/2]

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

Sets the button font name and style.

Parameters
name[in] A new font name.
font_style[in] A new font style.
See also
<link OdPdfPublish::Text::FontStyle, Text::FontStyle enumeration>.

◆ setFont() [2/2]

void OdPdfPublish::OdButton::setFont ( const Text::StandardFontsType  fontType)

Sets the button font type.

Parameters
font_type[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 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 of 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 is true) or is unlocked (if is 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 is true) or not (if is false).

◆ setTextColor()

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

Sets the button text color. Text color is applied for 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 a text that appears when user hovers over the button.

Parameters
tooltip[in] A new text of 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 is true) or not (if is false).

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