CFx SDK Documentation  2023 SP0
Public Member Functions | List of all members
OdPdfPublish::OdAnnotation Class Reference

#include <PdfPublishAnnotation.h>

Inheritance diagram for OdPdfPublish::OdAnnotation:
OdPdfPublish::OdObject OdRxObject

Public Member Functions

 ODRX_DECLARE_MEMBERS (OdAnnotation)
 
 ODRX_HEAP_OPERATORS ()
 
 OdAnnotation ()
 
virtual ~OdAnnotation ()
 
void setSource (const OdCADModelPtr &cad_model)
 
void setPRCTessellationCompression (bool state)
 
void setPRCBRepCompression (PRC::BRepCompression level)
 
void setPRCBRepRemoval (bool state)
 
void setPRCAttributeRemoval (bool state)
 
void setName (const OdString &name)
 
void setArtwork (const OdArtworkPtr &artwork)
 
void setToolbarVisibility (bool state)
 
void setModelTreeVisibility (bool state)
 
void setInteractivity (bool state)
 
void setBorderWidth (OdUInt16 width)
 
void setTransparentBackground (bool state)
 
void setBackgroundColor (ODCOLORREF color)
 
void setPosterImage (const OdImagePtr &image)
 
void setActivation (Activation::When when)
 
void setDeactivation (Deactivation::When when)
 
void setLighting (Lighting::Mode mode)
 
void setRendering (Rendering::Mode mode)
 
void setCarouselButtons (const OdStringArray &button_names, const OdString &previous_button_name, const OdString &next_button_name, OdUInt16 scroll_size)
 
void setCarouselViews (const OdUInt32Array &indices, const OdImagePtrArray &images)
 
void setViewListByField (const OdString &field)
 
void setViewList (const OdRect &location, const OdListBoxPtr &list)
 
void setPartsList (const OdStringArray node_names, const OdRect &location, const OdStringArray &headers, const OdDoubleArray &columns, const OdTextFieldPtr text_style=OdTextFieldPtr(), const OdTextFieldPtr header_style=OdTextFieldPtr())
 
void setPropertyList (const OdRect &location)
 
void setPropertyToTextField (const OdString &property_name, const OdTextFieldPtr text_fields)
 
void getSource (OdCADModelPtr &cad_model) const
 
void getPRCTessellationCompression (bool &state) const
 
void getPRCBRepCompression (PRC::BRepCompression &level) const
 
void getPRCBRepRemoval (bool &state) const
 
void getPRCAttributeRemoval (bool &state) const
 
void getName (OdString &name) const
 
void getArtwork (OdArtworkPtr &artwork) const
 
void getToolbarVisibility (bool &state) const
 
void getModelTreeVisibility (bool &state) const
 
void getInteractivity (bool &state) const
 
void getBorderWidth (OdUInt16 &width) const
 
void getTransparentBackground (bool &state) const
 
void getBackgroundColor (ODCOLORREF &color) const
 
void getPosterImage (OdImagePtr &image) const
 
void getActivation (Activation::When &when) const
 
void getDeactivation (Deactivation::When &when) const
 
void getLighting (Lighting::Mode &mode) const
 
void getRendering (Rendering::Mode &mode) const
 
void getCarouselButtons (OdStringArray &button_names, OdString &previous_button_name, OdString &next_button_name, OdUInt16 &scroll_size) const
 
void getCarouselViews (OdUInt32Array &indices, OdImagePtrArray &images) const
 
void getViewListField (OdString &field) const
 
void getViewList (OdRect &location, OdListBoxPtr &list) const
 
void getPartsList (OdStringArray &node_names, OdRect &location, OdStringArray &headers, OdDoubleArray &columns, OdTextFieldPtr text_style, OdTextFieldPtr header_style) const
 
void getPropertyList (OdRect &location) const
 
void getPropertyToTextField (const OdString &property_name, OdTextFieldPtrArray &text_field) 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 an annotation entity for .pdf documents created with Teigha Publish. Annotation is a user space object that stores a set of object of different types (acts like a container for other objects and controls). Annotation can contain compressed and uncompressed .prc tessellations, .prc boundary representation data , .prc attributes, carousel buttons, which allow to interactively switch between different views. Annotation entity is based on a <link OdPdfPublish::OdCADModel, CAD model>. <link OdPdfPublish::OdCADModel, CAD model> represents any drawing in format supported by Teigha (for example, a .dwg drawing).

Definition at line 57 of file PdfPublishAnnotation.h.

Constructor & Destructor Documentation

◆ OdAnnotation()

OdPdfPublish::OdAnnotation::OdAnnotation ( )

Creates an annotation object.

◆ ~OdAnnotation()

virtual OdPdfPublish::OdAnnotation::~OdAnnotation ( )
virtual

Destroys an annotation object.

Member Function Documentation

◆ getActivation()

void OdPdfPublish::OdAnnotation::getActivation ( Activation::When when) const

Returns the annotation activation type. The method fills a passed activation type value and returns it to a calling subroutine.

Parameters
when[out] A placeholder for the activation type value.
Remarks
Activation type determines when the annotation becomes active.
See also
<link OdPdfPublish::Activation::When, Activation::When enumeration>.

◆ getArtwork()

void OdPdfPublish::OdAnnotation::getArtwork ( OdArtworkPtr &  artwork) const

Returns a smart pointer to the annotation <link OdPdfPublish::OdArtwork, artwork> object. The method fills a passed smart pointer value and returns it to a calling subroutine.

Parameters
artwork[out] A placeholder for the smart pointer to the annotation artwork.
See also
<link OdPdfPublish::OdArtwork, OdArtwork class>.

◆ getBackgroundColor()

void OdPdfPublish::OdAnnotation::getBackgroundColor ( ODCOLORREF color) const

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

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

◆ getBorderWidth()

void OdPdfPublish::OdAnnotation::getBorderWidth ( OdUInt16 width) const

Returns current border width of the annotation. The method fills a passed value and returns it to a calling subroutine.

Parameters
width[out] A placeholder for the border width value (in points).
Remarks
Border width is measured in points.

◆ getCarouselButtons()

void OdPdfPublish::OdAnnotation::getCarouselButtons ( OdStringArray button_names,
OdString previous_button_name,
OdString next_button_name,
OdUInt16 scroll_size 
) const

Returns the annotation carousel buttons information. Information contains button names, including previous and next button names and scrolling size value. The method fills passed objects with button information and returns them to a calling subroutine.

Parameters
button_names[out] A placeholder for the array of button names.
previous_button_name[out] A placeholder for the name of previous button.
next_button_name[out] A placeholder for the name of previous button.
scroll_size[out] A placeholder for the scroll size value.
Remarks
Carousel buttons array includes a collection of buttons to switch between different views (each button contains a small preview) and two specific buttons for switching to a previous or next view relatively the view that is currently displayed. The scroll size property determines how many buttons are scrolled when user presses next or previous button.

It is necessary to set carousel buttons to generate carousel view.

◆ getCarouselViews()

void OdPdfPublish::OdAnnotation::getCarouselViews ( OdUInt32Array indices,
OdImagePtrArray &  images 
) const

Returns carousel views of the annotation. Views information contains an array of view indicies and array of button icons. The method fills passed objects with data about views and returns them to a calling subroutine.

Parameters
indices[out] A placeholder for the array of view indices.
images[out] A placeholder for the array of smart pointers to image objects, which are used as button preview images.
Remarks
Carousel view array includes a collection of views to represent different points of view to a published drawing. To switch from one view to another a set of carousel buttons is used. Each button (except previous and next buttons) is associated with a particular view.

◆ getDeactivation()

void OdPdfPublish::OdAnnotation::getDeactivation ( Deactivation::When when) const

Returns the annotation deactivation type. The method fills a passed deactivation type value and returns it to a calling subroutine.

Parameters
when[out] A placeholder for the deactivation type value.
Remarks
Dectivation type determines when the annotation becomes inactive.
See also
<link OdPdfPublish::Deactivation::When, Deactivation::When enumeration>.

◆ getInteractivity()

void OdPdfPublish::OdAnnotation::getInteractivity ( bool &  state) const

Returns current value of the interactivity flag of the annotation. The method fills a passed boolean value and returns it to a calling subroutine.

Parameters
state[out] A placeholder for the interactivity flag value.
Remarks
If the flag is true, the annotation interactiviy is enabled, otherwise interactivity is disabled.

◆ getLighting()

void OdPdfPublish::OdAnnotation::getLighting ( Lighting::Mode mode) const

Returns the annotation lighting mode. The method fills a passed lighting mode value and returns it to a calling subroutine.

Parameters
mode[out] A placeholder for the lighting mode value.
See also
<link OdPdfPublish::Lighting::Mode, Lighting::Mode enumeration>.

◆ getModelTreeVisibility()

void OdPdfPublish::OdAnnotation::getModelTreeVisibility ( bool &  state) const

Returns current value of the visibility flag of the annotation model tree. The method fills a passed boolean value and returns it to a calling subroutine.

Parameters
state[out] A placeholder for the visibility flag value.
Remarks
If the flag is true, the model tree is diplayed when the annotation becomes active, otherwise model tree stays hidden.

◆ getName()

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

Returns the annotation name. The method fills a passed string object and returns it to a calling subroutine.

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

◆ getPartsList()

void OdPdfPublish::OdAnnotation::getPartsList ( OdStringArray node_names,
OdRect location,
OdStringArray headers,
OdDoubleArray columns,
OdTextFieldPtr  text_style,
OdTextFieldPtr  header_style 
) const

◆ getPosterImage()

void OdPdfPublish::OdAnnotation::getPosterImage ( OdImagePtr &  image) const

Returns the annotation postger image. The method fills a passed smart pointer to an <link OdPdfPublish::OdImage, image> object and returns it to a calling subroutine.

Parameters
image[out] A placeholder for the smart pointer to an image object.
See also
<link OdPdfPublish::OdImage, OdImage class>.

◆ getPRCAttributeRemoval()

void OdPdfPublish::OdAnnotation::getPRCAttributeRemoval ( bool &  state) const

Returns current value of the the removing flag for .prc attribute information that the annotation exports. The method fills a passed boolean value and returns it to a calling subroutine.

Parameters
state[out] A placeholder for the value of the attribute data removing flag.
Remarks
If the flag is equal to true, attribute information is removed from the annotation, otherwise it stays in the annotation.

◆ getPRCBRepCompression()

void OdPdfPublish::OdAnnotation::getPRCBRepCompression ( PRC::BRepCompression level) const

Returns current value of the compression level for .prc boundary representation data that the annotation exports. The method fills a passed level value and returns it to a calling subroutine.

Parameters
level[out] A placeholder for the compression level value.
See also
<link OdPdfPublish::PRC::BRepCompression, PRC::BRepCompression enumeration>.

◆ getPRCBRepRemoval()

void OdPdfPublish::OdAnnotation::getPRCBRepRemoval ( bool &  state) const

Returns current value of the removing flag for .prc boundary representation data that the annotation exports. The method fills a passed boolean value and returns it to a calling subroutine.

Parameters
state[out] A placeholder for the value of the b-rep data removing flag.
Remarks
If the flag is equal to true, b-rep data is removed from the annotation, otherwise it stays in the annotation.

◆ getPRCTessellationCompression()

void OdPdfPublish::OdAnnotation::getPRCTessellationCompression ( bool &  state) const

Returns current value of the compression flag for .prc tessellation of the annotation. The method fills a passed boolean value and returns it to a calling subroutine.

Parameters
state[out] A placeholder for the tessellation compress flag value.
Remarks
Compression algorithm for .prc tessellation is applied if the flag value is true, otherwise .prc tessellation is processed without compressing.

◆ getPropertyList()

void OdPdfPublish::OdAnnotation::getPropertyList ( OdRect location) const

◆ getPropertyToTextField()

void OdPdfPublish::OdAnnotation::getPropertyToTextField ( const OdString property_name,
OdTextFieldPtrArray &  text_field 
) const

◆ getRendering()

void OdPdfPublish::OdAnnotation::getRendering ( Rendering::Mode mode) const

Returns the annotation rendering mode. The method fills a passed rendering mode value and returns it to a calling subroutine.

Parameters
mode[out] A placeholder for the rendering mode value.
See also
<link OdPdfPublish::Rendering::Mode, Rendering::Mode enumeration>.

◆ getSource()

void OdPdfPublish::OdAnnotation::getSource ( OdCADModelPtr &  cad_model) const

Returns the annotation source. The method fills a passed smart pointer to the model object and returns it to a calling subroutine.

Parameters
cad_model[out] A placeholder for the smart pointer to the model.
Remarks
Source contains drawing data that has been exported to the annotation.
See also
<link OdPdfPublish::OdCADModel, OdCADModel class>.

◆ getToolbarVisibility()

void OdPdfPublish::OdAnnotation::getToolbarVisibility ( bool &  state) const

Returns current value of the visibility flag of the annotation toolbar. The method fills a passed boolean value and returns it to a calling subroutine.

Parameters
state[out] A placeholder for the visibility flag value.
Remarks
If the flag is true, the toolbar is diplayed when the annotation becomes active, otherwise toolbar stays hidden.

◆ getTransparentBackground()

void OdPdfPublish::OdAnnotation::getTransparentBackground ( bool &  state) const

Returns current value of the transparency flag of the annotation. The method fills a passed boolean value and returns it to a calling subroutine.

Parameters
state[out] A placeholder for the transparency flag value.
Remarks
If the flag is true, the annotation background is transparent, otherwise the annotation background is opaque.

◆ getViewList()

void OdPdfPublish::OdAnnotation::getViewList ( OdRect location,
OdListBoxPtr &  list 
) const

Returns the list box object that contains the list of view names. The method fills passed location and list box objects with, then returns them to a calling subroutine.

Parameters
location[out] A placeholder for the list box location.
list[out] A placeholder for the list box object.

◆ getViewListField()

void OdPdfPublish::OdAnnotation::getViewListField ( OdString field) const

Returns a list of view names concatenated in a single string. The method fills passed string objects with view names and returns it to a calling subroutine.

Parameters
field[out] A placeholder for the string containing view names.

◆ ODRX_DECLARE_MEMBERS()

OdPdfPublish::OdAnnotation::ODRX_DECLARE_MEMBERS ( OdAnnotation  )

◆ ODRX_HEAP_OPERATORS()

OdPdfPublish::OdAnnotation::ODRX_HEAP_OPERATORS ( )

◆ setActivation()

void OdPdfPublish::OdAnnotation::setActivation ( Activation::When  when)

Sets the annotation activation type. Activation type determines when the annotation becomes active.

Parameters
when[in] An activation type value.
See also
<link OdPdfPublish::Activation::When, Activation::When enumeration>.

◆ setArtwork()

void OdPdfPublish::OdAnnotation::setArtwork ( const OdArtworkPtr &  artwork)

Sets an <link OdPdfPublish::OdArtwork, artwork> object of the annotation.

Parameters
artwork[in] An <link OdPdfPublish::OdArtwork, artwork> object.

◆ setBackgroundColor()

void OdPdfPublish::OdAnnotation::setBackgroundColor ( ODCOLORREF  color)

Sets the background color of the annotation.

Parameters
color[in] A background color value.

◆ setBorderWidth()

void OdPdfPublish::OdAnnotation::setBorderWidth ( OdUInt16  width)

Sets the border width of the annotation. Border width is measured in points.

Parameters
width[in] A border width value (in points).

◆ setCarouselButtons()

void OdPdfPublish::OdAnnotation::setCarouselButtons ( const OdStringArray button_names,
const OdString previous_button_name,
const OdString next_button_name,
OdUInt16  scroll_size 
)

Sets the annotation carousel buttons.

Parameters
button_names[in] An array of button names.
previous_button_name[in] A name of previous button.
next_button_name[in] A name of previous button.
scroll_size[in] A scroll size value.
Remarks

Carousel buttons array includes a collection of buttons to switch between different views (each button contains a small preview) and two specific buttons for switching to a previous or next view relatively the view that is currently displayed. The scroll size property determines how many buttons are scrolled when user presses next or previous button.

It is necessary to set carousel buttons to generate carousel view.

◆ setCarouselViews()

void OdPdfPublish::OdAnnotation::setCarouselViews ( const OdUInt32Array indices,
const OdImagePtrArray &  images 
)

Sets carousel views of the annotation.

Parameters
indices[in] An array of view indices.
images[in] An array of smart pointers to image objects, which are used as button preview images.
Remarks
Carousel view array includes a collection of views to represent different points of view to a published drawing. To switch from one view to another a set of carousel buttons is used. Each button (except previous and next buttons) is associated with a particular view.

◆ setDeactivation()

void OdPdfPublish::OdAnnotation::setDeactivation ( Deactivation::When  when)

Sets the annotation deactivation type. Deactivation type determines when the annotation becomes inactive.

Parameters
when[in] A deactivation type value.
See also
<link OdPdfPublish::Deactivation::When, Deactivation::When enumeration>.

◆ setInteractivity()

void OdPdfPublish::OdAnnotation::setInteractivity ( bool  state)

Sets the interactivity flag of the annotation. If the flag is true, the annotation interactivity is enabled, otherwise interactivity is disabled.

Parameters
state[in] An interactivity flag value.

◆ setLighting()

void OdPdfPublish::OdAnnotation::setLighting ( Lighting::Mode  mode)

Sets the annotation lighting mode.

Parameters
mode[in] A lighting mode value.
See also
<link OdPdfPublish::Lighting::Mode, Lighting::Mode enumeration>.

◆ setModelTreeVisibility()

void OdPdfPublish::OdAnnotation::setModelTreeVisibility ( bool  state)

Sets the visibility flag of the annotation model tree. If the flag is true, the model tree is diplayed when the annotation becomes active, otherwise model tree stays hidden.

Parameters
state[in] A visibility flag value.

◆ setName()

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

Sets the annotation name.

Parameters
name[in] A name value.

◆ setPartsList()

void OdPdfPublish::OdAnnotation::setPartsList ( const OdStringArray  node_names,
const OdRect location,
const OdStringArray headers,
const OdDoubleArray columns,
const OdTextFieldPtr  text_style = OdTextFieldPtr(),
const OdTextFieldPtr  header_style = OdTextFieldPtr() 
)

◆ setPosterImage()

void OdPdfPublish::OdAnnotation::setPosterImage ( const OdImagePtr &  image)

Sets the annotation postger <link OdPdfPublish::OdImage, image>.

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

◆ setPRCAttributeRemoval()

void OdPdfPublish::OdAnnotation::setPRCAttributeRemoval ( bool  state)

Sets the removing flag for .prc attribute information that the annotation exports. If the flag is equal to true, attribute information is removed from the annotation, otherwise it stays in the annotation.

Parameters
state[in] A new attributes data removing flag value.

◆ setPRCBRepCompression()

void OdPdfPublish::OdAnnotation::setPRCBRepCompression ( PRC::BRepCompression  level)

Sets the compression level for .prc boundary representation data that the annotation exports.

Parameters
level[in] A new compression level to be applied.
See also
<link OdPdfPublish::PRC::BRepCompression, BRepCompression enumeration>

◆ setPRCBRepRemoval()

void OdPdfPublish::OdAnnotation::setPRCBRepRemoval ( bool  state)

Sets the removing flag for .prc boundary representation data that the annotation exports. If the flag is equal to true, b-rep data is removed from the annotation, otherwise it stays in the annotation.

Parameters
state[in] A new b-rep data removing flag value.

◆ setPRCTessellationCompression()

void OdPdfPublish::OdAnnotation::setPRCTessellationCompression ( bool  state)

Sets the compression flag value for .prc tessellation of the annotation. Compression algorithm for .prc tessellation is applied if the flag value is true, otherwise .prc tessellation is processed without compressing.

Parameters
state[in] A new tessellation compress flag value.

◆ setPropertyList()

void OdPdfPublish::OdAnnotation::setPropertyList ( const OdRect location)

◆ setPropertyToTextField()

void OdPdfPublish::OdAnnotation::setPropertyToTextField ( const OdString property_name,
const OdTextFieldPtr  text_fields 
)

◆ setRendering()

void OdPdfPublish::OdAnnotation::setRendering ( Rendering::Mode  mode)

Sets the annotation rendering mode.

Parameters
mode[in] A rendering mode value.
See also
<link OdPdfPublish::Rendering::Mode, Rendering::Mode enumeration>.

◆ setSource()

void OdPdfPublish::OdAnnotation::setSource ( const OdCADModelPtr &  cad_model)

Sets the annotation source. Source contains drawing data that should be exported to the annotation.

Parameters
cad_model[in] A smart pointer to an <link OdPdfPublish::OdCADModel, OdCADModel> object to be set as the annotation source.
See also
<link OdPdfPublish::OdCADModel, OdCADModel>

◆ setToolbarVisibility()

void OdPdfPublish::OdAnnotation::setToolbarVisibility ( bool  state)

Sets the visibility flag of the annotation toolbar. If the flag is true, the toolbar is diplayed when the annotation becomes active, otherwise toolbar stays hidden.

Parameters
state[in] A visibility flag value.

◆ setTransparentBackground()

void OdPdfPublish::OdAnnotation::setTransparentBackground ( bool  state)

Sets the transparency flag of the annotation. If the flag is true, the annotation background is transparent, otherwise the annotation background is opaque.

Parameters
state[in] A transparency flag value.

◆ setViewList()

void OdPdfPublish::OdAnnotation::setViewList ( const OdRect location,
const OdListBoxPtr &  list 
)

Sets a new list box object that contains the list of view names.

Parameters
location[out] A list box location.
list[out] A list box object.

◆ setViewListByField()

void OdPdfPublish::OdAnnotation::setViewListByField ( const OdString field)

Sets a new list of view names concatenated in a single string.

Parameters
field[out] A string containing view names.
Remarks
The name is mandatory and must be unique among the document object names.

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