#include <fl_TableLayout.h>

| fl_TableLayout::fl_TableLayout | ( | FL_DocLayout * | pLayout, | |
| PL_StruxDocHandle | sdh, | |||
| PT_AttrPropIndex | ap, | |||
| fl_ContainerLayout * | pMyContainerLayout | |||
| ) |
References UT_GenericVector< T >::clear(), createTableContainer(), m_vecColProps, m_vecRowProps, UT_ASSERT, and UT_DEBUGMSG.
| fl_TableLayout::~fl_TableLayout | ( | ) | [virtual] |
| SectionType fl_TableLayout::getType | ( | void | ) | const [inline] |
Reimplemented from fl_SectionLayout.
| bool fl_TableLayout::recalculateFields | ( | UT_uint32 | iUpdateCount | ) | [virtual] |
Reimplemented from fl_SectionLayout.
References fl_ContainerLayout::getFirstLayout(), fl_ContainerLayout::getNext(), and fl_ContainerLayout::recalculateFields().
| bool fl_TableLayout::doclistener_changeStrux | ( | const PX_ChangeRecord_StruxChange * | pcrxc | ) | [virtual] |
Implements fl_SectionLayout.
References fl_HdrFtrSectionLayout::bl_doclistener_changeStrux(), collapse(), FL_CONTAINER_HDRFTR, fl_ContainerLayout::getContainerType(), PX_ChangeRecord::getIndexAP(), fl_ContainerLayout::getNext(), fl_ContainerLayout::getPrev(), PX_ChangeRecord_StruxChange::getStruxType(), PX_ChangeRecord::getType(), fl_ContainerLayout::myContainingLayout(), PTX_SectionTable, PX_ChangeRecord::PXT_ChangeStrux, fl_Layout::setAttrPropIndex(), updateTable(), UT_ASSERT, and xxx_UT_DEBUGMSG.
Referenced by fl_DocListener::change().
| bool fl_TableLayout::doclistener_deleteStrux | ( | const PX_ChangeRecord_Strux * | pcrx | ) | [virtual] |
References fl_HdrFtrSectionLayout::bl_doclistener_deleteTableStrux(), collapse(), decNumNestedTables(), fl_CellLayout::decNumNestedTables(), FL_CONTAINER_CELL, FL_CONTAINER_HDRFTR, fl_ContainerLayout::getContainerType(), PX_ChangeRecord_Strux::getStruxType(), PX_ChangeRecord::getType(), fl_ContainerLayout::myContainingLayout(), PTX_SectionTable, PX_ChangeRecord::PXT_DeleteStrux, fl_ContainerLayout::remove(), UT_ASSERT, and xxx_UT_DEBUGMSG.
| bool fl_TableLayout::bl_doclistener_insertCell | ( | fl_ContainerLayout * | pCell, | |
| const PX_ChangeRecord_Strux * | pcrx, | |||
| PL_StruxDocHandle | sdh, | |||
| PL_ListenerId | lid, | |||
| void(*)(PL_StruxDocHandle sdhNew, PL_ListenerId lid, PL_StruxFmtHandle sfhNew) | pfnBindHandles | |||
| ) | [virtual] |
References attachCell(), fl_HdrFtrSectionLayout::bl_doclistener_insertCell(), fl_BLOCK_STRUX_OFFSET, FL_CONTAINER_CELL, FL_CONTAINER_HDRFTR, fl_ContainerLayout::getContainerType(), PX_ChangeRecord::getIndexAP(), FV_View::getPoint(), PX_ChangeRecord::getPosition(), FL_DocLayout::getView(), fl_ContainerLayout::insert(), FV_View::isActive(), FV_View::isPreview(), fl_SectionLayout::m_pLayout, fl_ContainerLayout::myContainingLayout(), FV_View::setPoint(), and FV_View::updateCarets().
Referenced by fl_DocListener::insertStrux().
| bool fl_TableLayout::bl_doclistener_insertBlock | ( | fl_ContainerLayout * | pCell, | |
| const PX_ChangeRecord_Strux * | pcrx, | |||
| PL_StruxDocHandle | sdh, | |||
| PL_ListenerId | lid, | |||
| void(*)(PL_StruxDocHandle sdhNew, PL_ListenerId lid, PL_StruxFmtHandle sfhNew) | pfnBindHandles | |||
| ) | [virtual] |
Reimplemented from fl_SectionLayout.
References fl_BLOCK_STRUX_OFFSET, FL_CONTAINER_BLOCK, PX_ChangeRecord::getIndexAP(), FV_View::getPoint(), PX_ChangeRecord::getPosition(), PX_ChangeRecord_Strux::getStruxType(), PX_ChangeRecord::getType(), FL_DocLayout::getView(), fl_ContainerLayout::insert(), FV_View::isActive(), FV_View::isPreview(), fl_SectionLayout::m_pLayout, fl_ContainerLayout::myContainingLayout(), PTX_Block, PX_ChangeRecord::PXT_InsertStrux, FV_View::setPoint(), fl_BlockLayout::setSectionLayout(), FV_View::updateCarets(), and UT_ASSERT.
Referenced by fl_DocListener::insertStrux().
| bool fl_TableLayout::bl_doclistener_insertEndTable | ( | fl_ContainerLayout * | , | |
| const PX_ChangeRecord_Strux * | pcrx, | |||
| PL_StruxDocHandle | sdh, | |||
| PL_ListenerId | lid, | |||
| void(*)(PL_StruxDocHandle sdhNew, PL_ListenerId lid, PL_StruxFmtHandle sfhNew) | pfnBindHandles | |||
| ) | [virtual] |
References fl_HdrFtrSectionLayout::bl_doclistener_insertEndTable(), fl_BLOCK_STRUX_OFFSET, FL_CONTAINER_HDRFTR, fl_ContainerLayout::getContainerType(), FV_View::getPoint(), PX_ChangeRecord::getPosition(), FL_DocLayout::getView(), FV_View::isActive(), FV_View::isPreview(), m_bIsEndTableIn, fl_SectionLayout::m_pLayout, fl_ContainerLayout::myContainingLayout(), fl_SectionLayout::setNeedsReformat(), FV_View::setPoint(), and FV_View::updateCarets().
| bool fl_TableLayout::bl_doclistener_insertTable | ( | const PX_ChangeRecord_Strux * | pcrx, | |
| SectionType | iType, | |||
| PL_StruxDocHandle | sdh, | |||
| PL_ListenerId | lid, | |||
| void(*)(PL_StruxDocHandle sdhNew, PL_ListenerId lid, PL_StruxFmtHandle sfhNew) | pfnBindHandles | |||
| ) | [virtual] |
References fl_BLOCK_STRUX_OFFSET, FL_CONTAINER_TABLE, FL_SECTION_TABLE, PD_Document::getBounds(), PX_ChangeRecord::getIndexAP(), FV_View::getPoint(), PX_ChangeRecord::getPosition(), getSectionLayout(), PX_ChangeRecord_Strux::getStruxType(), PX_ChangeRecord::getType(), FL_DocLayout::getView(), fl_ContainerLayout::insert(), FV_View::isActive(), FV_View::isPreview(), fl_Layout::m_pDoc, fl_SectionLayout::m_pLayout, fl_ContainerLayout::myContainingLayout(), PTX_SectionTable, PX_ChangeRecord::PXT_InsertStrux, FV_View::setPoint(), FV_View::updateCarets(), and UT_ASSERT.
Referenced by fl_DocListener::insertStrux().
| void fl_TableLayout::setTableContainerProperties | ( | fp_TableContainer * | pTab | ) |
This method sets all the parameters of the table container from properties of this section.
References m_bIsHomogeneous, m_iBottomOffset, m_iColSpacing, m_iLeftOffset, m_iLineThickness, m_iRightOffset, m_iRowHeight, m_iRowHeightType, m_iRowSpacing, m_iTopOffset, fp_TableContainer::setBorderWidth(), fp_TableContainer::setBottomOffset(), fp_TableContainer::setColSpacings(), fp_TableContainer::setHomogeneous(), fp_TableContainer::setLeftOffset(), fp_TableContainer::setLineThickness(), fp_TableContainer::setRightOffset(), fp_TableContainer::setRowHeight(), fp_TableContainer::setRowHeightType(), fp_TableContainer::setRowSpacings(), and fp_TableContainer::setTopOffset().
Referenced by createTableContainer().
| void fl_TableLayout::format | ( | void | ) | [virtual] |
Implements fl_ContainerLayout.
References attachCell(), UT_GenericVector< T >::clear(), doSimpleChange(), FL_CONTAINER_HDRFTR, FL_CONTAINER_SHADOW, fl_ContainerLayout::format(), FP_VISIBLE, fl_ContainerLayout::getContainerType(), fl_ContainerLayout::getDocSectionLayout(), fl_Layout::getDocument(), fp_TableContainer::getFirstBrokenTable(), fl_ContainerLayout::getFirstContainer(), fl_ContainerLayout::getFirstLayout(), fp_ContainerObject::getHeight(), getNewContainer(), fl_ContainerLayout::getNext(), fp_Container::getPage(), fl_ContainerLayout::getPrev(), isDirty(), fl_ContainerLayout::isHidden(), fp_ShadowContainer::layout(), m_bIsDirty, m_bIsEndTableIn, fl_SectionLayout::m_bNeedsReformat, m_bRecursiveFormat, m_iHeightChanged, m_pNewHeightCell, fl_SectionLayout::m_vecFormatLayout, markAllRunsDirty(), fl_ContainerLayout::myContainingLayout(), fl_SectionLayout::setNeedsRedraw(), fl_DocSectionLayout::setNeedsSectionBreak(), UT_DEBUGMSG, and xxx_UT_DEBUGMSG.
Referenced by fl_DocListener::populateStrux(), updateLayout(), and updateTable().
| void fl_TableLayout::attachCell | ( | fl_ContainerLayout * | pCell | ) |
This method attaches pCell to the current tablecontainer.
References fl_ContainerLayout::getFirstLayout(), fl_ContainerLayout::getLastContainer(), fl_ContainerLayout::getNext(), setDirty(), fp_TableContainer::tableAttach(), UT_ASSERT, UT_SHOULD_NOT_HAPPEN, and xxx_UT_DEBUGMSG.
Referenced by fl_CellLayout::bl_doclistener_insertCell(), bl_doclistener_insertCell(), format(), and fl_DocListener::populateStrux().
| void fl_TableLayout::createTableContainer | ( | void | ) |
Only one Master Table container per Table Layout. Create it here.
References FP_HIDDEN_FOLDED, fl_ContainerLayout::getDocSectionLayout(), fl_ContainerLayout::getLastContainer(), fl_DocSectionLayout::getWidth(), fp_ContainerObject::getWidth(), fl_ContainerLayout::isHidden(), fl_ContainerLayout::lookupProperties(), fl_ContainerLayout::myContainingLayout(), fl_ContainerLayout::setFirstContainer(), fl_ContainerLayout::setLastContainer(), setTableContainerProperties(), fp_VerticalContainer::setWidth(), fp_ContainerObject::setWidth(), and xxx_UT_DEBUGMSG.
Referenced by fl_TableLayout(), and getNewContainer().
| void fl_TableLayout::insertTableContainer | ( | fp_TableContainer * | pNewTab | ) |
This method inserts the given TableContainer into its correct place in the Vertical container.
References fp_Container::addCon(), fp_Line::containsForcedPageBreak(), fp_Container::countCons(), fp_Container::findCon(), FL_CONTAINER_DOCSECTION, FL_CONTAINER_ENDNOTE, FL_CONTAINER_FOOTNOTE, FL_CONTAINER_FRAME, FL_CONTAINER_HDRFTR, FL_CONTAINER_SHADOW, FL_CONTAINER_TABLE, FP_CONTAINER_LINE, FP_HIDDEN_FOLDED, fp_Container::getContainer(), fp_ContainerObject::getContainerType(), fl_ContainerLayout::getContainerType(), fp_TableContainer::getFirstBrokenTable(), fl_ContainerLayout::getFirstContainer(), fp_TableContainer::getLastBrokenTable(), fl_ContainerLayout::getLastContainer(), fl_ContainerLayout::getNewContainer(), fp_Container::getNext(), fp_Line::getPage(), fp_Container::getPage(), fl_ContainerLayout::getPrev(), fp_Container::insertConAt(), fl_ContainerLayout::isHidden(), fl_ContainerLayout::myContainingLayout(), fp_TableContainer::setContainer(), UT_ASSERT, UT_SHOULD_NOT_HAPPEN, and xxx_UT_DEBUGMSG.
Referenced by getNewContainer().
| void fl_TableLayout::updateLayout | ( | bool | bDoFull | ) | [virtual] |
Implements fl_ContainerLayout.
References UT_GenericVector< T >::clear(), format(), fl_Layout::getDocument(), fl_ContainerLayout::getFirstLayout(), fl_ContainerLayout::getNext(), isDirty(), fl_SectionLayout::m_vecFormatLayout, fl_ContainerLayout::needsReformat(), fl_ContainerLayout::updateLayout(), UT_DEBUGMSG, and xxx_UT_DEBUGMSG.
| void fl_TableLayout::updateTable | ( | void | ) |
| void fl_TableLayout::collapse | ( | void | ) | [virtual] |
Implements fl_ContainerLayout.
References fp_TableContainer::clearScreen(), fl_ContainerLayout::collapse(), fp_Container::getContainer(), fl_ContainerLayout::getFirstContainer(), fl_ContainerLayout::getFirstLayout(), fl_ContainerLayout::getNext(), m_iHeightChanged, m_pNewHeightCell, fp_VerticalContainer::removeContainer(), fl_ContainerLayout::setFirstContainer(), fl_ContainerLayout::setLastContainer(), and fl_SectionLayout::setNeedsReformat().
Referenced by _lookupMarginProperties(), doclistener_changeStrux(), and doclistener_deleteStrux().
| void fl_TableLayout::markAllRunsDirty | ( | void | ) | [virtual] |
Implements fl_SectionLayout.
References fl_ContainerLayout::getFirstLayout(), fl_ContainerLayout::getNext(), FL_DocLayout::isLayoutFilling(), fl_SectionLayout::m_pLayout, and fl_ContainerLayout::markAllRunsDirty().
Referenced by doSimpleChange(), format(), and updateTable().
| bool fl_TableLayout::needsReformat | ( | void | ) | const [virtual] |
| PT_DocPosition fl_TableLayout::getPosition | ( | bool | bActualBlockPosition = false |
) | const [virtual] |
Return the position of the table strux.
Reimplemented from fl_ContainerLayout.
References fl_ContainerLayout::getPosition().
Referenced by FV_View::cmdTableToText(), and FV_View::isInTable().
| UT_uint32 fl_TableLayout::getLength | ( | void | ) |
Return the total length of the table including nested tables. This length includes the table and endtable struxs so if you add it to the position of the table strux you will get the first position past the endtable strux
References PD_Document::getBounds(), fl_Layout::getStruxDocHandle(), PD_Document::getStruxPosition(), and fl_Layout::m_pDoc.
Referenced by FV_View::isInTable().
| void fl_TableLayout::redrawUpdate | ( | void | ) | [virtual] |
Implements fl_ContainerLayout.
References fp_TableContainer::doRedrawLines(), fp_TableContainer::drawLines(), fl_Layout::getDocument(), fl_ContainerLayout::getFirstContainer(), fl_ContainerLayout::getFirstLayout(), fl_ContainerLayout::getNext(), fl_SectionLayout::m_bNeedsRedraw, fl_ContainerLayout::needsRedraw(), fl_SectionLayout::needsRedraw(), fl_ContainerLayout::redrawUpdate(), and xxx_UT_DEBUGMSG.
| fp_Container * fl_TableLayout::getNewContainer | ( | fp_Container * | pFirstContainer = NULL |
) | [virtual] |
Create a new Table container and plug it into the linked list of Table containers.
| If | pPrevTab is non-null place the new cell after this in the linked list, otherwise just append it to the end. |
Implements fl_SectionLayout.
References createTableContainer(), fl_ContainerLayout::getFirstContainer(), insertTableContainer(), fp_Container::setNext(), fp_Container::setPrev(), and UT_ASSERT.
Referenced by format().
| fl_SectionLayout * fl_TableLayout::getSectionLayout | ( | void | ) | const [virtual] |
Implements fl_ContainerLayout.
References FL_CONTAINER_DOCSECTION, fl_ContainerLayout::getContainerType(), and fl_ContainerLayout::myContainingLayout().
Referenced by bl_doclistener_insertTable().
| void fl_TableLayout::markForRebuild | ( | void | ) | [inline] |
| void fl_TableLayout::clearRebuild | ( | void | ) | [inline] |
| bool fl_TableLayout::needsRebuild | ( | void | ) | const [inline] |
| void fl_TableLayout::markForReformat | ( | void | ) | [inline] |
| bool fl_TableLayout::needsReFormat | ( | void | ) | const [inline] |
| UT_sint32 fl_TableLayout::getLeftOffset | ( | void | ) | const |
References m_iLeftOffset.
| void fl_TableLayout::setHeightChanged | ( | fp_CellContainer * | pCell | ) |
Rather than do a complete new relayout, if we have a simple change of height for one cell, just updated the positions of the cells below it.
References m_iHeightChanged, and m_pNewHeightCell.
| bool fl_TableLayout::doSimpleChange | ( | void | ) |
Often editting ina table changes the height of just one cell. We can short circuit a complete relayout if this happens and just re-adjust the ypositions of the cells. returns true if the row size could be successfully adjusted
References fp_TableRowColumn::allocation, fp_TableContainer::deleteBrokenTables(), fl_CellLayout::format(), fp_CellContainer::getBottomAttach(), fp_TableContainer::getCellAtRowColumn(), fl_ContainerLayout::getFirstContainer(), fp_TableContainer::getHeight(), fp_CellContainer::getLeftAttach(), fp_Container::getNext(), fp_TableContainer::getNthRow(), fp_TableContainer::getNumCols(), fp_TableContainer::getNumRows(), fp_TableContainer::getRowHeight(), fp_ContainerObject::getSectionLayout(), fp_CellContainer::getTopAttach(), fp_VerticalContainer::getY(), _fp_Requisition::height, m_pNewHeightCell, markAllRunsDirty(), fp_TableContainer::setHeight(), fp_CellContainer::setLineMarkers(), fp_VerticalContainer::setMaxHeight(), fl_SectionLayout::setNeedsRedraw(), fp_VerticalContainer::setY(), and fp_CellContainer::sizeRequest().
Referenced by format().
| UT_sint32 fl_TableLayout::getRightOffset | ( | void | ) | const |
References m_iRightOffset.
| UT_sint32 fl_TableLayout::getTopOffset | ( | void | ) | const |
| UT_sint32 fl_TableLayout::getBottomOffset | ( | void | ) | const |
References m_iBottomOffset.
Referenced by fp_TableContainer::layout(), and fp_CellContainer::setLineMarkers().
| bool fl_TableLayout::isDirty | ( | void | ) | const [inline] |
Referenced by format(), and updateLayout().
| void fl_TableLayout::setDirty | ( | void | ) |
References m_bIsDirty, and xxx_UT_DEBUGMSG.
Referenced by attachCell(), fl_ShadowListener::populateStrux(), and fl_DocListener::populateStrux().
| UT_sint32 fl_TableLayout::getLineThickness | ( | void | ) | const |
| UT_sint32 fl_TableLayout::getColSpacing | ( | void | ) | const |
References m_iColSpacing.
| UT_sint32 fl_TableLayout::getRowSpacing | ( | void | ) | const |
References m_iRowSpacing.
| UT_sint32 fl_TableLayout::getLeftColPos | ( | void | ) | const [inline] |
Referenced by fp_TableContainer::_size_allocate_pass2().
| const UT_GenericVector<fl_ColProps*>* fl_TableLayout::getVecColProps | ( | void | ) | const [inline] |
| const UT_GenericVector<fl_RowProps*>* fl_TableLayout::getVecRowProps | ( | void | ) | const [inline] |
Referenced by fl_CellLayout::_lookupProperties(), and fp_TableContainer::getRowHeight().
| const PP_PropertyMap::Background& fl_TableLayout::getBackground | ( | ) | const [inline] |
| const UT_RGBColor& fl_TableLayout::getDefaultColor | ( | ) | const [inline] |
Referenced by s_cell_border_style().
| const PP_PropertyMap::Line& fl_TableLayout::getBottomStyle | ( | ) | const [inline] |
Referenced by fl_CellLayout::_lookupProperties(), and fp_CellContainer::getBottomStyle().
| const PP_PropertyMap::Line& fl_TableLayout::getLeftStyle | ( | ) | const [inline] |
Referenced by fl_CellLayout::_lookupProperties(), and fp_CellContainer::getLeftStyle().
| const PP_PropertyMap::Line& fl_TableLayout::getRightStyle | ( | ) | const [inline] |
Referenced by fl_CellLayout::_lookupProperties(), and fp_CellContainer::getRightStyle().
| const PP_PropertyMap::Line& fl_TableLayout::getTopStyle | ( | ) | const [inline] |
Referenced by fl_CellLayout::_lookupProperties(), and fp_CellContainer::getTopStyle().
| UT_sint32 fl_TableLayout::getNumNestedTables | ( | void | ) | const |
| void fl_TableLayout::incNumNestedTables | ( | void | ) |
| void fl_TableLayout::decNumNestedTables | ( | void | ) |
| void fl_TableLayout::setEndTableIn | ( | void | ) | [inline] |
Referenced by fl_ShadowListener::populateStrux(), and fl_DocListener::populateStrux().
| bool fl_TableLayout::isEndTableIn | ( | void | ) | [inline] |
Referenced by IE_Imp_RTF::insertStrux().
| bool fl_TableLayout::isDoingDestructor | ( | void | ) | [inline] |
Referenced by fp_TableContainer::deleteBrokenTables().
| void fl_TableLayout::_lookupProperties | ( | const PP_AttrProp * | pSectionAP | ) | [protected, virtual] |
this function is only to be called by fl_ContainerLayout::lookupProperties() all other code must call lookupProperties() instead
Implements fl_ContainerLayout.
References UT_GenericVector< T >::addItem(), AP_PREF_KEY_RulerUnits, UT_String::c_str(), UT_GenericVector< T >::clear(), GR_Graphics::DGP_PAPER, dim, DIM_CM, DIM_IN, DIM_MM, DIM_none, DIM_PERCENT, DIM_PI, DIM_PT, DIM_PX, FL_ROW_HEIGHT_AT_LEAST, FL_ROW_HEIGHT_AUTO, FL_ROW_HEIGHT_EXACTLY, FL_ROW_HEIGHT_NOT_DEFINED, gchar, XAP_App::getApp(), fl_SectionLayout::getDocLayout(), FL_DocLayout::getGraphics(), UT_GenericVector< T >::getItemCount(), UT_GenericVector< T >::getNthItem(), PP_AttrProp::getProperty(), FL_DocLayout::getView(), FV_View::getViewMode(), m_background, m_bIsHomogeneous, m_colorDefault, m_dBottomOffsetUserUnits, m_dLeftOffsetUserUnits, m_dRightOffsetUserUnits, m_dTopOffsetUserUnits, m_iBottomOffset, m_iColSpacing, fl_ColProps::m_iColWidth, m_iLeftColPos, m_iLeftOffset, m_iLineThickness, m_iRightOffset, fl_RowProps::m_iRowHeight, m_iRowHeight, m_iRowHeightType, m_iRowSpacing, m_iTopOffset, m_lineBottom, m_lineLeft, m_lineRight, m_lineTop, fl_SectionLayout::m_pLayout, m_vecColProps, m_vecRowProps, GR_Graphics::queryProperties(), PP_PropertyMap::Background::reset(), s_background_properties(), s_border_properties(), UT_String::size(), UT_ASSERT_HARMLESS, UT_convertDimensionless(), UT_convertToLogicalUnits(), UT_DEBUGMSG, UT_determineDimension(), UT_parseColor(), UT_return_if_fail, UT_SHOULD_NOT_HAPPEN, UT_VECTOR_PURGEALL, VIEW_NORMAL, VIEW_WEB, and xxx_UT_DEBUGMSG.
| void fl_TableLayout::_lookupMarginProperties | ( | const PP_AttrProp * | pAP | ) | [protected, virtual] |
Reimplemented from fl_ContainerLayout.
References UT_String::c_str(), collapse(), GR_Graphics::DGP_PAPER, gchar, fl_SectionLayout::getDocLayout(), FL_DocLayout::getGraphics(), PP_AttrProp::getProperty(), FL_DocLayout::getView(), FV_View::getViewMode(), m_dBottomOffsetUserUnits, m_dLeftOffsetUserUnits, m_dRightOffsetUserUnits, m_dTopOffsetUserUnits, m_iBottomOffset, m_iLeftColPos, m_iLeftOffset, m_iRightOffset, m_iTopOffset, fl_SectionLayout::m_pLayout, GR_Graphics::queryProperties(), UT_convertDimensionless(), UT_convertToLogicalUnits(), UT_DEBUGMSG, UT_return_if_fail,