当前位置: 首页>>代码示例>>C++>>正文


C++ CXFA_FFWidget::SetDocView方法代码示例

本文整理汇总了C++中CXFA_FFWidget::SetDocView方法的典型用法代码示例。如果您正苦于以下问题:C++ CXFA_FFWidget::SetDocView方法的具体用法?C++ CXFA_FFWidget::SetDocView怎么用?C++ CXFA_FFWidget::SetDocView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CXFA_FFWidget的用法示例。


在下文中一共展示了CXFA_FFWidget::SetDocView方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnCreateLayoutItem

CXFA_LayoutItem* CXFA_FFNotify::OnCreateLayoutItem(CXFA_Node* pNode) {
  CXFA_LayoutProcessor* pLayout = m_pDoc->GetXFADoc()->GetDocLayout();
  CXFA_FFDocView* pDocView = m_pDoc->GetDocView(pLayout);
  XFA_Element eType = pNode->GetElementType();
  if (eType == XFA_Element::PageArea)
    return new CXFA_FFPageView(pDocView, pNode);
  if (eType == XFA_Element::ContentArea)
    return new CXFA_ContainerLayoutItem(pNode);

  CXFA_WidgetAcc* pAcc = static_cast<CXFA_WidgetAcc*>(pNode->GetWidgetData());
  if (!pAcc)
    return new CXFA_ContentLayoutItem(pNode);

  CXFA_FFWidget* pWidget;
  switch (pAcc->GetUIType()) {
    case XFA_Element::Barcode:
      pWidget = new CXFA_FFBarcode(nullptr, pAcc);
      break;
    case XFA_Element::Button:
      pWidget = new CXFA_FFPushButton(nullptr, pAcc);
      break;
    case XFA_Element::CheckButton:
      pWidget = new CXFA_FFCheckButton(nullptr, pAcc);
      break;
    case XFA_Element::ChoiceList: {
      if (pAcc->IsListBox()) {
        pWidget = new CXFA_FFListBox(nullptr, pAcc);
      } else {
        pWidget = new CXFA_FFComboBox(nullptr, pAcc);
      }
    } break;
    case XFA_Element::DateTimeEdit:
      pWidget = new CXFA_FFDateTimeEdit(nullptr, pAcc);
      break;
    case XFA_Element::ImageEdit:
      pWidget = new CXFA_FFImageEdit(nullptr, pAcc);
      break;
    case XFA_Element::NumericEdit:
      pWidget = new CXFA_FFNumericEdit(nullptr, pAcc);
      break;
    case XFA_Element::PasswordEdit:
      pWidget = new CXFA_FFPasswordEdit(nullptr, pAcc);
      break;
    case XFA_Element::Signature:
      pWidget = new CXFA_FFSignature(nullptr, pAcc);
      break;
    case XFA_Element::TextEdit:
      pWidget = new CXFA_FFTextEdit(nullptr, pAcc);
      break;
    case XFA_Element::Arc:
      pWidget = new CXFA_FFArc(nullptr, pAcc);
      break;
    case XFA_Element::Line:
      pWidget = new CXFA_FFLine(nullptr, pAcc);
      break;
    case XFA_Element::Rectangle:
      pWidget = new CXFA_FFRectangle(nullptr, pAcc);
      break;
    case XFA_Element::Text:
      pWidget = new CXFA_FFText(nullptr, pAcc);
      break;
    case XFA_Element::Image:
      pWidget = new CXFA_FFImage(nullptr, pAcc);
      break;
    case XFA_Element::Draw:
      pWidget = new CXFA_FFDraw(nullptr, pAcc);
      break;
    case XFA_Element::Subform:
      pWidget = new CXFA_FFSubForm(nullptr, pAcc);
      break;
    case XFA_Element::ExclGroup:
      pWidget = new CXFA_FFExclGroup(nullptr, pAcc);
      break;
    case XFA_Element::DefaultUi:
    default:
      pWidget = nullptr;
      break;
  }

  if (pWidget)
    pWidget->SetDocView(pDocView);
  return pWidget;
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:83,代码来源:xfa_ffnotify.cpp


注:本文中的CXFA_FFWidget::SetDocView方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。