CFx SDK Documentation 2024 SP0
|
#include <PdfPublishAnnotation.h>
Public Member Functions | |
ODRX_DECLARE_MEMBERS (OdAnnotation) | |
ODRX_HEAP_OPERATORS () | |
virtual | ~OdAnnotation () |
void | setSource (const OdCADModelPtr &cad_model) |
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 | setPosterImage (const OdImagePtr &image) |
void | setActivation (Activation::When when) |
void | setDeactivation (Deactivation::When when) |
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 | setCarouselScrollButtonsImages (const OdImagePtr &previous_button, const OdImagePtr &next_button) |
void | setCarouselButtonsFillColor (const ODCOLORREF color) |
void | setCarouselButtonsOffset (const OdUInt32 value) |
void | setCarouselButtonsFont (const OdString &fontName, Text::FontStyle fontStyle=Text::kRegular) |
void | setCarouselButtonsFont (const Text::StandardFontsType fontType) |
void | setCarouselButtonsFontSize (OdUInt16 size) |
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 | 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 | getPosterImage (OdImagePtr &image) const |
void | getActivation (Activation::When &when) const |
void | getDeactivation (Deactivation::When &when) 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 | getCarouselScrollButtonsImages (OdImagePtr &previous_button, OdImagePtr &next_button) const |
void | getCarouselButtonsFillColor (ODCOLORREF &color) const |
void | getCarouselButtonsOffset (OdUInt32 &value) const |
void | getCarouselButtonsFont (Text::StorageType &storageType, Text::StandardFontsType &fontType, OdString &fontName, Text::FontStyle &fontStyle) const |
void | getCarouselButtonsFontSize (OdUInt16 &size) 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 |
Protected Member Functions | |
OdAnnotation () | |
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 OdRxClass * | desc () |
This class implements an annotation entity for .pdf documents created with Publish SDK. An annotation is a user space object that stores a set of objects of different types (acts like a container for other objects and controls). Annotations can contain compressed and uncompressed .prc tessellations, .prc boundary representation data, .prc attributes, and carousel buttons which allow users to interactively switch between different views. An annotation entity is based on a <link OdPdfPublish::OdCADModel, CAD model>. The <link OdPdfPublish::OdCADModel, CAD model> represents any drawing in a format supported by ODA Software (for example, a .dwg drawing), exported to PRC data format.
Definition at line 58 of file PdfPublishAnnotation.h.
|
protected |
|
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. |
Returns the 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. The information contains button names, including previous and next button names, and scroll size value. The method fills the 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 the previous button. |
next_button_name | [out] A placeholder for the name of the next button. |
scroll_size | [out] A placeholder for the scroll size value. |
It is necessary to set carousel buttons to generate a carousel view.
void OdPdfPublish::OdAnnotation::getCarouselButtonsFillColor | ( | ODCOLORREF & | color | ) | const |
Returns a color that is used for filling the carousel buttons.
color | [out] A placeholder for the value of the fill color. |
void OdPdfPublish::OdAnnotation::getCarouselButtonsFont | ( | Text::StorageType & | storageType, |
Text::StandardFontsType & | fontType, | ||
OdString & | fontName, | ||
Text::FontStyle & | fontStyle | ||
) | const |
Returns the current carousel buttons font parameters. The method fills passed values and returns them to a calling subroutine.
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. |
Returns the carousel buttons font size. The method fills a passed value and returns it to a calling subroutine.
size | [out] A placeholder for the font size value. |
Returns a offset between annotations and the carousel buttons.
color | [out] A placeholder for the value of the offset. |
void OdPdfPublish::OdAnnotation::getCarouselScrollButtonsImages | ( | OdImagePtr & | previous_button, |
OdImagePtr & | next_button | ||
) | const |
Returns the images for carousel scroll buttons.
previous_button | [out] A placeholder for the smart pointer to image objects that are used as previous button image. |
next_button | [out] A placeholder for the smart pointer to image objects that are used as next button image. |
void OdPdfPublish::OdAnnotation::getCarouselViews | ( | OdUInt32Array & | indices, |
OdImagePtrArray & | images | ||
) | const |
Returns the carousel views of the annotation. The view information contains an array of view indices and an array of button icons. The method fills the passed objects with data about the 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 the image objects that 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 the 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::getModelTreeVisibility | ( | bool & | state | ) | const |
Returns the 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 |
Returns the table that contains the list of annotation parts. The method accepts placeholders for the parts list table, fills them and returns to a calling subroutine.
node_names | [out] A placeholder for the array of node names. |
location | [out] A placeholder for the location of the parts list table. |
headers | [out] A placeholder for the header titles (number, name, quantity). If the array is empty, the table will not have headers. |
columns | [out] A placeholder for the column width proportions. The sum of proportion values must be equal to 1.0. |
text_style | [out] A placeholder for the text styles of the table cells. |
header_style | [out] A placeholder for the column header styles. |
The annotation must have an OdCADModel object as its source.
The OdCADModel object must contain data in PRC format.
The columns parameter allows you to specify how the whole table width should be divided between three columns (number, name, quantity). For example, if the column array contains values 0.1, 0.75 and 0.15, the number column occupies 10%, name column occupies 75%, and quantity column occupies 15% of the table width respectively.
void OdPdfPublish::OdAnnotation::getPosterImage | ( | OdImagePtr & | image | ) | const |
Returns the annotation poster 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. |
Returns the current location of the property list label.
location | [in] A placehloder for the property list location. |
void OdPdfPublish::OdAnnotation::getPropertyToTextField | ( | const OdString & | property_name, |
OdTextFieldPtrArray & | text_field | ||
) | const |
Returns the current text field property with a specified name.
property_name | [in] A property name. |
text_field | [in] A smart pointer to a text field array. |
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 the 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 the 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 the passed location and list box objects, 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 combined in a single string. The method fills the 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. The 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. |
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 for the previous button. |
next_button_name | [in] A name for the next button. |
scroll_size | [in] A scroll size value. |
A 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 relative to the view that is currently displayed. View indices and small previews are set using the setCarouselViews function. The scroll size property determines how many buttons are scrolled when the user presses the next or previous button.
It is necessary to set carousel buttons to generate a carousel view.
void OdPdfPublish::OdAnnotation::setCarouselButtonsFillColor | ( | const ODCOLORREF | color | ) |
Sets a color that is used for filling the carousel buttons.
color | [in] A new value of the fill color. |
void OdPdfPublish::OdAnnotation::setCarouselButtonsFont | ( | const OdString & | fontName, |
Text::FontStyle | fontStyle = Text::kRegular |
||
) |
Sets the carousel buttons font name and style.
fontName | [in] A new font name. |
fontStyle | [in] A new font style. |
void OdPdfPublish::OdAnnotation::setCarouselButtonsFont | ( | const Text::StandardFontsType | fontType | ) |
Sets the carousel buttons font type from the list of <link OdPdfPublish::Text::StandardFontsType, predefined fonts>.
fontType | [in] A new font type value. |
Sets the carousel buttons font size.
size | [in] A new font size value. |
Sets a offset between annotations and the carousel buttons.
color | [in] A new value of the offset. |
void OdPdfPublish::OdAnnotation::setCarouselScrollButtonsImages | ( | const OdImagePtr & | previous_button, |
const OdImagePtr & | next_button | ||
) |
Sets the images for carousel scroll buttons.
previous_button | [in] A smart pointer to image objects that are used as previous button image. |
next_button | [in] A smart pointer to image objects that are used as next button image. |
void OdPdfPublish::OdAnnotation::setCarouselViews | ( | const OdUInt32Array & | indices, |
const OdImagePtrArray & | images | ||
) |
Sets the carousel views of the annotation.
indices | [in] An array of view indices. |
images | [in] An array of smart pointers to image objects that are used as button preview images. |
void OdPdfPublish::OdAnnotation::setDeactivation | ( | Deactivation::When | when | ) |
Sets the annotation deactivation type. The 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, annotation interactivity is enabled, otherwise interactivity is disabled.
state | [in] An interactivity flag 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 the 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() |
||
) |
Sets the table that contains the list of annotation parts.
node_names | [in] A string array that contains the distinct node names. |
location | [in] A location of the parts list table. |
headers | [in] The parts list table header titles (number, name, quantity). If the array is empty, the table will not have headers. |
columns | [in] A double array that contains column width proportions. The sum of proportion values must be equal to 1.0. |
text_style | [in] A text field object that is used to represent table cells. It means that cells will have the same text style as the specified text field object. |
header_style | [in] A text field object that is used to represent column headers. It means that the headers will have the same text style as the specified text field object. |
The annotation must have an OdCADModel object as its source.
The OdCADModel object must contain data in PRC format.
The columns parameter allows you to specify how the whole table width should be divided between three columns (number, name, quantity). For example if the column array contains values 0.1, 0.75 and 0.15, the number column occupies 10%, name column occupies 75%, and quantity column occupies 15% of the table width respectively.
void OdPdfPublish::OdAnnotation::setPosterImage | ( | const OdImagePtr & | image | ) |
Sets the annotation poster <link OdPdfPublish::OdImage, image>.
image | [in] A smart pointer to an <link OdPdfPublish::OdImage, image> object that should be used as the poster. |
Creates a new OdList object in a specified location and fills it with property values of the node selected at the annotation object. If the node has no property, the list object remains empty.
location | [in] A rectangle that determines the location. |
void OdPdfPublish::OdAnnotation::setPropertyToTextField | ( | const OdString & | property_name, |
const OdTextFieldPtr | text_fields | ||
) |
Displays the property value of the selected node to a specified text field. The property to be displayed is defined by its name.
property_name | [in] A property name to be displayed. |
text_fields | [in] A smart pointer to a text field that displays the property value. |
void OdPdfPublish::OdAnnotation::setSource | ( | const OdCADModelPtr & | cad_model | ) |
Sets the annotation source. The 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 the 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. |
Adds a new list box object in a specified area and creates a list of view names in it.
location | [out] A list box location. |
list | [out] A list box object. |
Creates a new list of view names combined in a single string.
field | [out] A string containing view names. |