本文整理汇总了C++中CFX_ArrayTemplate::GetData方法的典型用法代码示例。如果您正苦于以下问题:C++ CFX_ArrayTemplate::GetData方法的具体用法?C++ CFX_ArrayTemplate::GetData怎么用?C++ CFX_ArrayTemplate::GetData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFX_ArrayTemplate
的用法示例。
在下文中一共展示了CFX_ArrayTemplate::GetData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OrderContainer
void CXFA_FFTabOrderPageWidgetIterator::OrderContainer(
CXFA_LayoutItemIterator* sIterator,
CXFA_LayoutItem* pContainerItem,
CXFA_TabParam* pContainer,
FX_BOOL& bCurrentItem,
FX_BOOL& bContentArea,
FX_BOOL bMarsterPage) {
CFX_ArrayTemplate<CXFA_TabParam*> tabParams;
CXFA_LayoutItem* pSearchItem = sIterator->MoveToNext();
while (pSearchItem) {
if (!pSearchItem->IsContentLayoutItem()) {
bContentArea = TRUE;
pSearchItem = sIterator->MoveToNext();
continue;
}
if (bMarsterPage && bContentArea) {
break;
}
if (bMarsterPage || bContentArea) {
CXFA_FFWidget* hWidget = GetWidget(pSearchItem);
if (!hWidget) {
pSearchItem = sIterator->MoveToNext();
continue;
}
if (pContainerItem && (pSearchItem->GetParent() != pContainerItem)) {
bCurrentItem = TRUE;
break;
}
CXFA_TabParam* pParam = new CXFA_TabParam;
pParam->m_pWidget = hWidget;
tabParams.Add(pParam);
if (XFA_IsLayoutElement(pSearchItem->GetFormNode()->GetElementType(),
TRUE)) {
OrderContainer(sIterator, pSearchItem, pParam, bCurrentItem,
bContentArea, bMarsterPage);
}
}
if (bCurrentItem) {
pSearchItem = sIterator->GetCurrent();
bCurrentItem = FALSE;
} else {
pSearchItem = sIterator->MoveToNext();
}
}
int32_t iChildren = tabParams.GetSize();
if (iChildren > 1) {
FXSYS_qsort(tabParams.GetData(), iChildren, sizeof(void*),
XFA_TabOrderWidgetComparator);
}
for (int32_t iStart = 0; iStart < iChildren; iStart++) {
CXFA_TabParam* pParam = tabParams[iStart];
pContainer->m_Children.Add(pParam->m_pWidget);
if (pParam->m_Children.GetSize() > 0) {
pContainer->m_Children.Append(pParam->m_Children);
}
delete pParam;
}
tabParams.RemoveAll();
}
示例2: OrderContainer
void CXFA_FFTabOrderPageWidgetIterator::OrderContainer(
CXFA_LayoutItemIterator* sIterator,
CXFA_LayoutItem* pContainerItem,
CXFA_TabParam* pContainer,
bool& bCurrentItem,
bool& bContentArea,
bool bMarsterPage) {
CFX_ArrayTemplate<CXFA_TabParam*> tabParams;
CXFA_LayoutItem* pSearchItem = sIterator->MoveToNext();
while (pSearchItem) {
if (!pSearchItem->IsContentLayoutItem()) {
bContentArea = true;
pSearchItem = sIterator->MoveToNext();
continue;
}
if (bMarsterPage && bContentArea) {
break;
}
if (bMarsterPage || bContentArea) {
CXFA_FFWidget* hWidget = GetWidget(pSearchItem);
if (!hWidget) {
pSearchItem = sIterator->MoveToNext();
continue;
}
if (pContainerItem && (pSearchItem->GetParent() != pContainerItem)) {
bCurrentItem = true;
break;
}
CXFA_TabParam* pParam = new CXFA_TabParam;
pParam->m_pWidget = hWidget;
tabParams.Add(pParam);
if (IsLayoutElement(pSearchItem->GetFormNode()->GetElementType(), true)) {
OrderContainer(sIterator, pSearchItem, pParam, bCurrentItem,
bContentArea, bMarsterPage);
}
}
if (bCurrentItem) {
pSearchItem = sIterator->GetCurrent();
bCurrentItem = false;
} else {
pSearchItem = sIterator->MoveToNext();
}
}
int32_t iChildren = tabParams.GetSize();
if (iChildren > 1) {
FXSYS_qsort(tabParams.GetData(), iChildren, sizeof(void*),
XFA_TabOrderWidgetComparator);
}
for (int32_t iStart = 0; iStart < iChildren; iStart++) {
std::unique_ptr<CXFA_TabParam> pParam(tabParams[iStart]);
pContainer->m_Children.push_back(pParam->m_pWidget);
pContainer->m_Children.insert(pContainer->m_Children.end(),
pParam->m_Children.begin(),
pParam->m_Children.end());
}
tabParams.RemoveAll();
}