CFx SDK Documentation
2020SP3
|
#include <PdfPublishAnnotation.h>
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 OdRxObject * | queryX (const OdRxClass *pClass) const |
virtual OdRxObject * | x (const OdRxClass *pClass) const |
virtual OdRxClass * | isA () 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 OdRxClass * | desc () |
Protected Member Functions inherited from OdPdfPublish::OdObject | |
OdObject (OdPublishObjectImpl *pImpl) | |
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.
OdPdfPublish::OdAnnotation::OdAnnotation | ( | ) |
Creates an annotation object.
|
virtual |
Destroys an annotation object.
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.
when | [out] A placeholder for the activation type value. |
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.
artwork | [out] A placeholder for the smart pointer to the annotation artwork. |
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.
color | [out] A placeholder for the background color value. |
Returns current border width of the annotation. The method fills a passed value and returns it to a calling subroutine.
width | [out] A placeholder for the border width value (in points). |
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.
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. |
It is necessary to set carousel buttons to generate carousel view.
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.
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. |
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.
when | [out] A placeholder for the deactivation type value. |
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.
state | [out] A placeholder for the interactivity flag value. |
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.
mode | [out] A placeholder for the lighting mode value. |
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.
state | [out] A placeholder for the visibility flag value. |
Returns the annotation name. The method fills a passed string object and returns it to a calling subroutine.
name | [out] A placeholder for the annotation name. |
void OdPdfPublish::OdAnnotation::getPartsList | ( | OdStringArray & | node_names, |
OdRect & | location, | ||
OdStringArray & | headers, | ||
OdDoubleArray & | columns, | ||
OdTextFieldPtr | text_style, | ||
OdTextFieldPtr | header_style | ||
) | const |
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.
image | [out] A placeholder for the smart pointer to an image object. |
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.
state | [out] A placeholder for the value of the attribute data removing flag. |
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.
level | [out] A placeholder for the compression level value. |
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.
state | [out] A placeholder for the value of the b-rep data removing flag. |
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.
state | [out] A placeholder for the tessellation compress flag value. |
void OdPdfPublish::OdAnnotation::getPropertyToTextField | ( | const OdString & | property_name, |
OdTextFieldPtrArray & | text_field | ||
) | const |
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.
mode | [out] A placeholder for the rendering mode value. |
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.
cad_model | [out] A placeholder for the smart pointer to the model. |
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.
state | [out] A placeholder for the visibility flag value. |
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.
state | [out] A placeholder for the transparency flag value. |
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.
location | [out] A placeholder for the list box location. |
list | [out] A placeholder for the list box object. |
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.
field | [out] A placeholder for the string containing view names. |
OdPdfPublish::OdAnnotation::ODRX_DECLARE_MEMBERS | ( | OdAnnotation | ) |
OdPdfPublish::OdAnnotation::ODRX_HEAP_OPERATORS | ( | ) |
void OdPdfPublish::OdAnnotation::setActivation | ( | Activation::When | when | ) |
Sets the annotation activation type. Activation type determines when the annotation becomes active.
when | [in] An activation type value. |
void OdPdfPublish::OdAnnotation::setArtwork | ( | const OdArtworkPtr & | artwork | ) |
Sets an <link OdPdfPublish::OdArtwork, artwork> object of the annotation.
artwork | [in] An <link OdPdfPublish::OdArtwork, artwork> object. |
void OdPdfPublish::OdAnnotation::setBackgroundColor | ( | ODCOLORREF | color | ) |
Sets the background color of the annotation.
color | [in] A background color value. |
Sets the border width of the annotation. Border width is measured in points.
width | [in] A border width value (in points). |
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.
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. |
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.
void OdPdfPublish::OdAnnotation::setCarouselViews | ( | const OdUInt32Array & | indices, |
const OdImagePtrArray & | images | ||
) |
Sets carousel views of the annotation.
indices | [in] An array of view indices. |
images | [in] An array of smart pointers to image objects, which are used as button preview images. |
void OdPdfPublish::OdAnnotation::setDeactivation | ( | Deactivation::When | when | ) |
Sets the annotation deactivation type. Deactivation type determines when the annotation becomes inactive.
when | [in] A deactivation type value. |
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.
state | [in] An interactivity flag value. |
void OdPdfPublish::OdAnnotation::setLighting | ( | Lighting::Mode | mode | ) |
Sets the annotation lighting mode.
mode | [in] A lighting mode value. |
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.
state | [in] A visibility flag value. |
Sets the annotation name.
name | [in] A name value. |
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() |
||
) |
void OdPdfPublish::OdAnnotation::setPosterImage | ( | const OdImagePtr & | image | ) |
Sets the annotation postger <link OdPdfPublish::OdImage, image>.
image | [in] A smart pointer to an <link OdPdfPublish::OdImage, image> object that should be used as poster. |
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.
state | [in] A new attributes data removing flag value. |
void OdPdfPublish::OdAnnotation::setPRCBRepCompression | ( | PRC::BRepCompression | level | ) |
Sets the compression level for .prc boundary representation data that the annotation exports.
level | [in] A new compression level to be applied. |
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.
state | [in] A new b-rep data removing flag value. |
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.
state | [in] A new tessellation compress flag value. |
void OdPdfPublish::OdAnnotation::setPropertyToTextField | ( | const OdString & | property_name, |
const OdTextFieldPtr | text_fields | ||
) |
void OdPdfPublish::OdAnnotation::setRendering | ( | Rendering::Mode | mode | ) |
Sets the annotation rendering mode.
mode | [in] A rendering mode value. |
void OdPdfPublish::OdAnnotation::setSource | ( | const OdCADModelPtr & | cad_model | ) |
Sets the annotation source. Source contains drawing data that should be exported to the annotation.
cad_model | [in] A smart pointer to an <link OdPdfPublish::OdCADModel, OdCADModel> object to be set as the annotation source. |
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.
state | [in] A visibility flag value. |
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.
state | [in] A transparency flag value. |
Sets a new list box object that contains the list of view names.
location | [out] A list box location. |
list | [out] A list box object. |
Sets a new list of view names concatenated in a single string.
field | [out] A string containing view names. |