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


C++ CPDFSDK_Widget::GetFormControl方法代码示例

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


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

示例1: OnDraw

void CFFL_Button::OnDraw(CPDFSDK_PageView* pPageView,
                         CPDFSDK_Annot* pAnnot,
                         CFX_RenderDevice* pDevice,
                         CPDF_Matrix* pUser2Device,
                         FX_DWORD dwFlags) {
  ASSERT(pPageView != NULL);
  CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
  CPDF_FormControl* pCtrl = pWidget->GetFormControl();
  CPDF_FormControl::HighlightingMode eHM = pCtrl->GetHighlightingMode();

  if (eHM == CPDF_FormControl::Push) {
    if (m_bMouseDown) {
      if (pWidget->IsWidgetAppearanceValid(CPDF_Annot::Down))
        pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Down, NULL);
      else
        pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal,
                                NULL);
    } else if (m_bMouseIn) {
      if (pWidget->IsWidgetAppearanceValid(CPDF_Annot::Rollover))
        pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Rollover,
                                NULL);
      else
        pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal,
                                NULL);
    } else {
      pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL);
    }
  } else
    pWidget->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL);
}
开发者ID:azunite,项目名称:libpdfium,代码行数:30,代码来源:FFL_FormFiller.cpp

示例2: OnDraw

void CFFL_Button::OnDraw(CPDFSDK_PageView* pPageView,
                         CPDFSDK_Annot* pAnnot,
                         CFX_RenderDevice* pDevice,
                         const CFX_Matrix& mtUser2Device) {
  ASSERT(pPageView);
  CPDFSDK_Widget* pWidget = ToCPDFSDKWidget(pAnnot);
  CPDF_FormControl* pCtrl = pWidget->GetFormControl();
  if (pCtrl->GetHighlightingMode() != CPDF_FormControl::Push) {
    pWidget->DrawAppearance(pDevice, mtUser2Device, CPDF_Annot::Normal,
                            nullptr);
    return;
  }
  if (m_bMouseDown) {
    if (pWidget->IsWidgetAppearanceValid(CPDF_Annot::Down)) {
      pWidget->DrawAppearance(pDevice, mtUser2Device, CPDF_Annot::Down,
                              nullptr);
    } else {
      pWidget->DrawAppearance(pDevice, mtUser2Device, CPDF_Annot::Normal,
                              nullptr);
    }
    return;
  }
  if (m_bMouseIn) {
    if (pWidget->IsWidgetAppearanceValid(CPDF_Annot::Rollover)) {
      pWidget->DrawAppearance(pDevice, mtUser2Device, CPDF_Annot::Rollover,
                              nullptr);
    } else {
      pWidget->DrawAppearance(pDevice, mtUser2Device, CPDF_Annot::Normal,
                              nullptr);
    }
    return;
  }

  pWidget->DrawAppearance(pDevice, mtUser2Device, CPDF_Annot::Normal, nullptr);
}
开发者ID:,项目名称:,代码行数:35,代码来源:

示例3: ReleaseAnnot

void CPDFSDK_BFAnnotHandler::ReleaseAnnot(CPDFSDK_Annot* pAnnot) {
  ASSERT(pAnnot);

  if (m_pFormFiller)
    m_pFormFiller->OnDelete(pAnnot);

  CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot;
  CPDFSDK_InterForm* pInterForm = pWidget->GetInterForm();
  CPDF_FormControl* pCtrol = pWidget->GetFormControl();
  pInterForm->RemoveMap(pCtrol);

  delete pWidget;
}
开发者ID:andoma,项目名称:pdfium,代码行数:13,代码来源:fsdk_annothandler.cpp


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