Scroll Table Module

Types

A3DPDFScrollTableData

A3DPDFEColumnType

Fields

kA3DPDFTextContent

kA3DPDFImageContent

kA3DPDFCheckBoxContent

Functions

A3DStatus

A3DPDFDefineSlideTable

A3DStatus

A3DPDFDefineSlideTable2

A3DStatus

A3DPDFSlideTableLinkTo3DNodes

A3DStatus

A3DPDFScrollTableCreate

A3DStatus

A3DPDFPageInsertScrollTable

Detailed Description

group a3d_pdfwidget_scrolltable

(HOOPS Publish Advanced) Module to access and define Scroll Table widget

This module describes the functions and structures that allow you to define a Scroll Table. A Scroll Table is a high level widget.

Type Documentation

enum A3DPDFEColumnType

Type of content of the column.

Version

10.2

Values:

enumerator kA3DPDFTextContent

The contents of the column are texts.

enumerator kA3DPDFImageContent

The contents of the column are pictures.

enumerator kA3DPDFCheckBoxContent

The contents of the column are checkboxes.

Function Documentation

A3DStatus A3DPDFDefineSlideTable(A3DPDFDocument *pDoc, A3DPDFPage *pPage, const A3DInt32 iPosLeft, const A3DInt32 iPosTop, const A3DUTF8Char *pcHtmlFrameTable, const A3DUTF8Char *pcHtmlFrameStyle, const A3DUTF8Char *pPreviousButtonName, const A3DUTF8Char *pNextButtonName, const A3DInt32 iNbTextRows, const A3DInt32 iNbTextCols, const A3DPDFTextField *const *const *ppTexts, const A3DBool bHasHeader)

Function to create a slide table. This is a table with a fixed size, and two buttons to scroll the rows of the table.

Deprecated:

This function is deprecated. Please use the A3DPDFScrollTable widget and A3DPDFDataTable to implement the same behaviour (see Data Model Module module).

The frame of the table is specified through html definition and printed as-is on the page. Then the text data is populated dynamically from an array of texts specified. The table MUST be of simple shape, with the same number of rows for each columns. Optionally, a header can figure in the table data at first row.

Please note that the table implementation uses an add-on to HOOPS Publish (TableToPDF) which is provided for free by Tech Soft 3D. The add-on is using components that are licensed under GNU LGPL terms. Consequently, the usage of tables using HOOPS Publish add-on requires our customer’s application to comply with LGPL requirements. TableToPDF can be downloaded at http://developer.techsoft3d.com/add-ons/tabletopdf/ The deployment process is simple and just requires to copy the provided DLLs in HOOPS Publish binaries folder.

The text data defines the text content, as well as text format attributes (font, font size, and text color). All rows must have the same text attributes, so that only the first row of text data is used internally to get the text format.

Version

7.2

Parameters
  • pDoc[inout] The document which will contain the slide table.

  • pPage[inout] The page where the slide table will be put.

  • iPosLeft[in] The x coordinate of the insertion point of the table. The insertion point is the top left corner of the table. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • iPosTop[in] The y coordinate of the insertion point of the table. The insertion point is the top left corner of the table. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • pcHtmlFrameTable[in] String for definition of the frame table in a HTML format. See example definition in TableToPDF Module.

  • pcHtmlFrameStyle[in] String for definition of the frame table style in a CSS format. See example definition in TableToPDF Module.

  • pPreviousButtonName[in] The name of the button to press to go to the previous page.

  • pNextButtonName[in] The name of the button to press to go to the next page.

  • iNbTextRows[in] the number of rows in the matrix of text data specified in ppTextData.

  • iNbTextCols[in] the number of columns in the matrix of text data specified in ppTextData. It should be the same number as of the number of columns specified in the table frame.

  • ppTexts[in] must contain the text data that will be used to dynamically populate the table. It is a matrix of iNbTextRows*iNbTextCols elements of type (A3DPDFTextField*). These elements should be created with A3DPDFTextFieldCreate. The first row might contain the header for the table. In that case, specify bHasHeader to TRUE, then the first row will not be scrolled and the formatting specific to this row will be applied. The following members of A3DPDFTextFieldData structure are used:

    • the text content is specified in member m_pcDefaultValue

    • the font name is specified in member m_pcFontName

    • the font size is specified in member m_iFontSize

    • the text color is specified in member m_sTextColor

    • the background color is specified in member m_sFillColor if member m_bHasFillColor is TRUE

    • the text alignment is specified in member m_eTextAlignment

    • the text orientation is specified in member m_eTextOrientation

    • the readonly attribute is specified in member m_bReadOnly

    • the multiline attribute is specified in member m_bMultiLine

    • the donotscroll attribute is specified in member m_bDoNotScroll

    • the formfield attribute is specified in member m_eFormField

    Only first row is used to get attributes.

  • bHasHeader[in] If true, the table header is described at first row of ppTexts. This row will remain visible and won’t be scrolled when pushing the prev/next buttons. If false, the table is considered without header, then the whole rows will be scrolled when pushing the prev/next buttons.

Return values
  • A3D_SUCCESS

  • A3DPDF_SLIDETABLE_NBCOLUMNS_ERROR – if iNbTextCols differs from the number of columns in table frame.

  • A3DPDF_SLIDETABLE_TEXTDATA_ERROR – if ppTexts has wrong data (typically null pointer).

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFDefineSlideTable2(A3DPDFDocument *pDoc, A3DPDFPage *pPage, const A3DInt32 iPosLeft, const A3DInt32 iPosTop, const A3DUTF8Char *pcHtmlFrameTable, const A3DUTF8Char *pcHtmlFrameStyle, const A3DInt32 iSliderWidth, const A3DInt32 iNbTextRows, const A3DInt32 iNbTextCols, const A3DPDFTextField *const *const *ppTexts, const A3DBool bHasHeader, A3DUTF8Char **ppcSTName)

Function to create a slide table. This is a table with a fixed size, and a scroll bar to scroll the rows of the table.

Deprecated:

This function is deprecated. Please use the A3DPDFScrollTable widget and A3DPDFDataTable to implement the same behaviour (see Data Model Module module).

This function differs from A3DPDFDefineSlideTable in that it uses a scroll bar to scroll the rows instead of previous and next buttons. The frame of the table is specified through html definition and printed as-is on the page. Then the text data is populated dynamically from an array of texts specified. The table MUST be of simple shape, with the same number of rows for each columns. Optionally, a header can figure in the table data at first row.

Please note that the table implementation uses an add-on to HOOPS Publish (TableToPDF) which is provided for free by Tech Soft 3D. The add-on is using components that are licensed under GNU LGPL terms. Consequently, the usage of tables using HOOPS Publish add-on requires our customer’s application to comply with LGPL requirements. TableToPDF can be downloaded at http://developer.techsoft3d.com/add-ons/tabletopdf/ The deployment process is simple and just requires to copy the provided DLLs in HOOPS Publish binaries folder.

The text data defines the text content, as well as text format attributes (font, font size, and text color). All rows must have the same text attributes, so that only the first row of text data is used internally to get the text format.

Version

8.1

Parameters
  • pDoc[inout] The document which will contain the slide table.

  • pPage[inout] The page where the slide table will be put.

  • iPosLeft[in] The x coordinate of the insertion point of the table. The insertion point is the top left corner of the table. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • iPosTop[in] The y coordinate of the insertion point of the table. The insertion point is the top left corner of the table. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • pcHtmlFrameTable[in] String for definition of the frame table in a HTML format. See example definition in TableToPDF Module.

  • pcHtmlFrameStyle[in] String for definition of the frame table style in a CSS format. See example definition in TableToPDF Module.

  • iSliderWidth[in] The width of the scroll bar (in points). Important: The scrollbar is positioned on the right of the table, outside of the frame.

  • iNbTextRows[in] the number of rows in the matrix of text data specified in ppTextData.

  • iNbTextCols[in] the number of columns in the matrix of text data specified in ppTextData. It should be the same number as of the number of columns specified in the table frame.

  • ppTexts[in] must contain the text data that will be used to dynamically populate the table. It is a matrix of iNbTextRows*iNbTextCols elements of type (A3DPDFTextField*). These elements should be created with A3DPDFTextFieldCreate. The first row might contain the header for the table. In that case, specify bHasHeader to TRUE, then the first row will not be scrolled and the formatting specific to this row will be applied. The following members of A3DPDFTextFieldData structure are used:

    • the text content is specified in member m_pcDefaultValue

    • the font name is specified in member m_pcFontName

    • the font size is specified in member m_iFontSize

    • the text color is specified in member m_sTextColor

    • the background color is specified in member m_sFillColor if member m_bHasFillColor is TRUE

    • the text alignment is specified in member m_eTextAlignment

    • the text orientation is specified in member m_eTextOrientation

    • the readonly attribute is specified in member m_bReadOnly

    • the multiline attribute is specified in member m_bMultiLine

    • the donotscroll attribute is specified in member m_bDoNotScroll

    • the formfield attribute is specified in member m_eFormField

    Only first row is used to get attributes.

  • bHasHeader[in] If true, the table header is described at first row of ppTexts. This row will remain visible and won’t be scrolled when using the scroll bar. If false, the table is considered without header, then the whole rows will be scrolled when using the scroll bar.

  • ppcSTName[out] The identifier of the slide table as a string. It can be useful to add Javascript instructions to work on this specific slide table.

Return values
  • A3D_SUCCESS

  • A3DPDF_SLIDETABLE_NBCOLUMNS_ERROR – if iNbTextCols differs from the number of columns in table frame.

  • A3DPDF_SLIDETABLE_TEXTDATA_ERROR – if ppTexts has wrong data (typically null pointer).

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFSlideTableLinkTo3DNodes(A3DPDFDocument *pDoc, A3DPDFPage *pPage, const A3DUTF8Char *pcSTName, const A3DPDF3DAnnot *p3DAnnot, const A3DPDFRgbColorData sHighlightRowColor, const A3DInt32 iNbRows, const A3DPDF3DNodesReferencesData *const p3DNodesReferences)

Function to link 3D nodes to a slide table.

Deprecated:

This function is deprecated. Please use the A3DPDFScrollTable and A3DPDF3DNodeScene widgets and A3DPDFDataTable to implement the same behaviour (see Data Model Module module).

Each row of the slide table are linked to a set of 3D nodes. Thus, when the user clicks on a row, the 3D nodes are automatically highlighted; and vice versa: when a 3D node is clicked in the 3D, the row is automatically selected.

Version

9.1

Parameters
  • pDoc[inout] The document which contains the slide table

  • pPage[inout] The page where the slide table is

  • pcSTName[in] The identifier of the slide table as a string

  • p3DAnnot[in] The 3D annotation

  • sHighlightRowColor[in] The color for the highlighted row

  • iNbRows[in] The size of the following array

  • p3DNodesReferences[in] The set of nodes for each row

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFScrollTableCreate(A3DPDFDocument *pDoc, const A3DPDFScrollTableData *pScrollTableData, A3DPDFScrollTable **ppScrollTable)

Function to create a ScrollTable widget.

The ScrollTable is primarily created with this function, and it should be positioned on the page with the function A3DPDFPageInsertScrollTable. Ultimately, the widget should be linked to a data table with A3DPDFScrollTableBindToTable.

Version

10.0

Parameters
  • pDoc[inout] The Document object to work with.

  • pScrollTableData[in] The ScrollTable parameters. The name is mandatory.

  • ppScrollTable[out] The ScrollTable created.

Return values

A3D_SUCCESS

Returns

A3D_SUCCESS in case of success or an error code

A3DStatus A3DPDFPageInsertScrollTable(A3DPDFPage *pPage, A3DPDFScrollTable *pScrollTable, const A3DInt32 iPosLeft, const A3DInt32 iPosTop)

Function to insert a ScrollTable widget in a page.

Version

10.0

Parameters
  • pPage[inout] The Page object to work with.

  • pScrollTable[in] The ScrollTable object to insert on the page.

  • iPosLeft[in] The x coordinate of the insertion point of the text. The insertion point is the top left corner of the text. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

  • iPosTop[in] The y coordinate of the insertion point of the text. The insertion point is the top left corner of the text. The coordinate origin (0, 0) is the bottom left of the page. The unit is point.

Return values
  • A3D_SUCCESS

  • A3DPDF_CANNOT_INITIALIZE_RESOURCES – if the resources directory is not properly defined.

  • A3DPDF_CANNOT_LOAD_TABLETOPDF_DLL – if the tabletopdf dll cannot be loaded.

Returns

A3D_SUCCESS in case of success or an error code