本文整理汇总了C++中GetPDFWindow函数的典型用法代码示例。如果您正苦于以下问题:C++ GetPDFWindow函数的具体用法?C++ GetPDFWindow怎么用?C++ GetPDFWindow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetPDFWindow函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: switch
void CFFL_TextField::GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type,
PDFSDK_FieldAction& fa)
{
switch (type)
{
case CPDF_AAction::KeyStroke:
if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, FALSE))
{
fa.bFieldFull = pWnd->IsTextFull();
fa.sValue = pWnd->GetText();
if (fa.bFieldFull)
{
fa.sChange = L"";
fa.sChangeEx = L"";
}
}
break;
case CPDF_AAction::Validate:
if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, FALSE))
{
fa.sValue = pWnd->GetText();
}
break;
case CPDF_AAction::LoseFocus:
case CPDF_AAction::GetFocus:
ASSERT(m_pWidget != NULL);
fa.sValue = m_pWidget->GetValue();
break;
default:
break;
}
}
开发者ID:abbro-ca,项目名称:pdfium,代码行数:34,代码来源:FFL_TextField.cpp
示例2: ASSERT
void CFFL_RadioButton::SaveData(CPDFSDK_PageView* pPageView) {
ASSERT(m_pWidget != NULL);
if (CPWL_RadioButton* pWnd =
(CPWL_RadioButton*)GetPDFWindow(pPageView, FALSE)) {
FX_BOOL bNewChecked = pWnd->IsChecked();
if (bNewChecked) {
CPDF_FormField* pField = m_pWidget->GetFormField();
ASSERT(pField != NULL);
for (int32_t i = 0, sz = pField->CountControls(); i < sz; i++) {
if (CPDF_FormControl* pCtrl = pField->GetControl(i)) {
if (pCtrl->IsChecked()) {
break;
}
}
}
}
m_pWidget->SetCheck(bNewChecked, FALSE);
m_pWidget->UpdateField();
SetChangeMark();
}
}
开发者ID:azunite,项目名称:libpdfium,代码行数:25,代码来源:FFL_RadioButton.cpp
示例3: IsFieldFull
bool CFFL_TextField::IsFieldFull(CPDFSDK_PageView* pPageView) {
if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, false)) {
return pWnd->IsTextFull();
}
return false;
}
开发者ID:documentcloud,项目名称:pdfium,代码行数:7,代码来源:cffl_textfield.cpp
示例4: switch
bool CFFL_TextField::OnChar(CPDFSDK_Annot* pAnnot,
uint32_t nChar,
uint32_t nFlags) {
switch (nChar) {
case FWL_VKEY_Return:
if (!(m_pWidget->GetFieldFlags() & FIELDFLAG_MULTILINE)) {
CPDFSDK_PageView* pPageView = GetCurPageView(true);
ASSERT(pPageView);
m_bValid = !m_bValid;
CFX_FloatRect rcAnnot = pAnnot->GetRect();
m_pFormFillEnv->Invalidate(pAnnot->GetUnderlyingPage(), rcAnnot.left,
rcAnnot.top, rcAnnot.right, rcAnnot.bottom);
if (m_bValid) {
if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, true))
pWnd->SetFocus();
} else {
if (CommitData(pPageView, nFlags)) {
DestroyPDFWindow(pPageView);
return true;
}
return false;
}
}
break;
case FWL_VKEY_Escape: {
CPDFSDK_PageView* pPageView = GetCurPageView(true);
ASSERT(pPageView);
EscapeFiller(pPageView, true);
return true;
}
}
return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
}
开发者ID:documentcloud,项目名称:pdfium,代码行数:35,代码来源:cffl_textfield.cpp
示例5: SaveData
void CFFL_ComboBox::SaveData(CPDFSDK_PageView* pPageView) {
CPWL_ComboBox* pWnd =
static_cast<CPWL_ComboBox*>(GetPDFWindow(pPageView, false));
if (!pWnd)
return;
CFX_WideString swText = pWnd->GetText();
int32_t nCurSel = pWnd->GetSelect();
bool bSetValue = false;
if (m_pWidget->GetFieldFlags() & FIELDFLAG_EDIT)
bSetValue = (nCurSel < 0) || (swText != m_pWidget->GetOptionLabel(nCurSel));
if (bSetValue) {
m_pWidget->SetValue(swText, false);
} else {
m_pWidget->GetSelectedIndex(0);
m_pWidget->SetOptionSelection(nCurSel, true, false);
}
m_pWidget->ResetFieldAppearance(true);
m_pWidget->UpdateField();
SetChangeMark();
m_pWidget->GetPDFPage();
}
开发者ID:MIPS,项目名称:external-pdfium,代码行数:27,代码来源:cffl_combobox.cpp
示例6: GetCurPageView
void CFFL_FormFiller::KillFocusForAnnot(CPDFSDK_Annot* pAnnot, FX_UINT nFlag) {
if (!IsValid())
return;
CPDFSDK_PageView* pPageView = GetCurPageView(false);
if (!pPageView)
return;
CommitData(pPageView, nFlag);
if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE))
pWnd->KillFocus();
FX_BOOL bDestroyPDFWindow;
switch (m_pWidget->GetFieldType()) {
case FIELDTYPE_PUSHBUTTON:
case FIELDTYPE_CHECKBOX:
case FIELDTYPE_RADIOBUTTON:
bDestroyPDFWindow = TRUE;
break;
default:
bDestroyPDFWindow = FALSE;
break;
}
EscapeFiller(pPageView, bDestroyPDFWindow);
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:26,代码来源:cffl_formfiller.cpp
示例7: ASSERT
FX_BOOL CFFL_ComboBox::IsDataChanged(CPDFSDK_PageView* pPageView)
{
if (CPWL_ComboBox * pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
{
FX_INT32 nCurSel = pWnd->GetSelect();
ASSERT(m_pWidget != NULL);
if (m_pWidget->GetFieldFlags() & FIELDFLAG_EDIT)
{
if (nCurSel >= 0)
{
return nCurSel != m_pWidget->GetSelectedIndex(0);
}
else
{
return pWnd->GetText() != m_pWidget->GetValue();
}
}
else
{
return nCurSel != m_pWidget->GetSelectedIndex(0);
}
}
return FALSE;
}
开发者ID:Gottox,项目名称:pdfium,代码行数:27,代码来源:FFL_ComboBox.cpp
示例8: switch
void CFFL_ListBox::GetActionData(CPDFSDK_PageView* pPageView,
CPDF_AAction::AActionType type,
PDFSDK_FieldAction& fa) {
switch (type) {
case CPDF_AAction::Validate:
if (m_pWidget->GetFieldFlags() & FIELDFLAG_MULTISELECT) {
fa.sValue = L"";
} else {
if (CPWL_ListBox* pListBox =
(CPWL_ListBox*)GetPDFWindow(pPageView, FALSE)) {
ASSERT(m_pWidget != NULL);
int32_t nCurSel = pListBox->GetCurSel();
if (nCurSel >= 0)
fa.sValue = m_pWidget->GetOptionLabel(nCurSel);
}
}
break;
case CPDF_AAction::LoseFocus:
case CPDF_AAction::GetFocus:
if (m_pWidget->GetFieldFlags() & FIELDFLAG_MULTISELECT) {
fa.sValue = L"";
} else {
ASSERT(m_pWidget != NULL);
int32_t nCurSel = m_pWidget->GetSelectedIndex(0);
if (nCurSel >= 0)
fa.sValue = m_pWidget->GetOptionLabel(nCurSel);
}
break;
default:
break;
}
}
开发者ID:hoanganhx86,项目名称:pdfium,代码行数:32,代码来源:FFL_ListBox.cpp
示例9: GetWindowRect
CPDF_Rect CFFL_FormFiller::GetWindowRect(CPDFSDK_PageView* pPageView) {
if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE)) {
return pWnd->GetWindowRect();
}
return CPDF_Rect(0, 0, 0, 0);
}
开发者ID:azunite,项目名称:libpdfium,代码行数:7,代码来源:FFL_FormFiller.cpp
示例10: switch
FX_BOOL CFFL_RadioButton::OnChar(CPDFSDK_Annot* pAnnot,
FX_UINT nChar,
FX_UINT nFlags) {
switch (nChar) {
case FWL_VKEY_Return:
case FWL_VKEY_Space: {
CFFL_IFormFiller* pIFormFiller = m_pApp->GetIFormFiller();
CPDFSDK_PageView* pPageView = pAnnot->GetPageView();
ASSERT(pPageView);
FX_BOOL bReset = FALSE;
FX_BOOL bExit = FALSE;
pIFormFiller->OnButtonUp(m_pWidget, pPageView, bReset, bExit, nFlags);
if (bReset)
return TRUE;
if (bExit)
return TRUE;
CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
if (CPWL_RadioButton* pWnd =
(CPWL_RadioButton*)GetPDFWindow(pPageView, TRUE))
pWnd->SetCheck(TRUE);
CommitData(pPageView, nFlags);
return TRUE;
}
default:
return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
}
}
开发者ID:JinAirsOs,项目名称:pdfium,代码行数:32,代码来源:FFL_RadioButton.cpp
示例11: ASSERT
FX_BOOL CFFL_ListBox::IsDataChanged(CPDFSDK_PageView* pPageView)
{
ASSERT(m_pWidget != NULL);
if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE))
{
if (m_pWidget->GetFieldFlags() & FIELDFLAG_MULTISELECT)
{
int nSelCount = 0;
for (FX_INT32 i=0,sz=pListBox->GetCount(); i<sz; i++)
{
if (pListBox->IsItemSelected(i))
{
void* p = NULL;
if (!m_OriginSelections.Lookup(i, p))
return TRUE;
nSelCount++;
}
}
return nSelCount != m_OriginSelections.GetCount();
}
else
{
return pListBox->GetCurSel() != m_pWidget->GetSelectedIndex(0);
}
}
return FALSE;
}
开发者ID:MI-4i,项目名称:platform_external_pdfium,代码行数:31,代码来源:FFL_ListBox.cpp
示例12: IsFieldFull
bool CFFL_ComboBox::IsFieldFull(CPDFSDK_PageView* pPageView) {
if (CPWL_ComboBox* pComboBox =
static_cast<CPWL_ComboBox*>(GetPDFWindow(pPageView, false))) {
if (CPWL_Edit* pEdit = pComboBox->GetEdit())
return pEdit->IsTextFull();
}
return false;
}
开发者ID:MIPS,项目名称:external-pdfium,代码行数:8,代码来源:cffl_combobox.cpp
示例13: RestoreState
void CFFL_ListBox::RestoreState(CPDFSDK_PageView* pPageView)
{
if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE))
{
for (int i=0,sz=m_State.GetSize(); i<sz; i++)
pListBox->Select(m_State[i]);
}
}
开发者ID:mariospr,项目名称:chromium-browser,代码行数:8,代码来源:FFL_ListBox.cpp
示例14: IsDataChanged
FX_BOOL CFFL_RadioButton::IsDataChanged(CPDFSDK_PageView* pPageView) {
if (CPWL_RadioButton* pWnd =
(CPWL_RadioButton*)GetPDFWindow(pPageView, FALSE)) {
return pWnd->IsChecked() != m_pWidget->IsChecked();
}
return FALSE;
}
开发者ID:JinAirsOs,项目名称:pdfium,代码行数:8,代码来源:FFL_RadioButton.cpp
示例15: ASSERT
void CFFL_TextField::RestoreState(CPDFSDK_PageView* pPageView) {
ASSERT(pPageView);
if (CPWL_Edit* pWnd = (CPWL_Edit*)GetPDFWindow(pPageView, true)) {
pWnd->SetText(m_State.sValue);
pWnd->SetSel(m_State.nStart, m_State.nEnd);
}
}
开发者ID:documentcloud,项目名称:pdfium,代码行数:8,代码来源:cffl_textfield.cpp
示例16: GetFocusBox
CPDF_Rect CFFL_FormFiller::GetFocusBox(CPDFSDK_PageView* pPageView) {
if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE)) {
CPDF_Rect rcFocus = FFLtoWnd(pPageView, PWLtoFFL(pWnd->GetFocusRect()));
CPDF_Rect rcPage = pPageView->GetPDFPage()->GetPageBBox();
if (rcPage.Contains(rcFocus))
return rcFocus;
}
return CPDF_Rect(0, 0, 0, 0);
}
开发者ID:azunite,项目名称:libpdfium,代码行数:9,代码来源:FFL_FormFiller.cpp
示例17: ASSERT
FX_BOOL CFFL_TextField::IsDataChanged(CPDFSDK_PageView* pPageView)
{
ASSERT(m_pWidget != NULL);
if (CPWL_Edit * pEdit = (CPWL_Edit*)GetPDFWindow(pPageView, FALSE))
return pEdit->GetText() != m_pWidget->GetValue();
return FALSE;
}
开发者ID:abbro-ca,项目名称:pdfium,代码行数:9,代码来源:FFL_TextField.cpp
示例18: switch
void CFFL_ComboBox::GetActionData( CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type, PDFSDK_FieldAction& fa)
{
switch (type)
{
case CPDF_AAction::KeyStroke:
if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
{
if (CPWL_Edit* pEdit = (CPWL_Edit*)*pComboBox)
{
fa.bFieldFull = pEdit->IsTextFull();
int nSelStart = 0;
int nSelEnd = 0;
pEdit->GetSel(nSelStart, nSelEnd);
fa.nSelEnd = nSelEnd;
fa.nSelStart = nSelStart;
fa.sValue = pEdit->GetText();
fa.sChangeEx = GetSelectExportText();
if (fa.bFieldFull)
{
fa.sChange = L"";
fa.sChangeEx = L"";
}
}
}
break;
case CPDF_AAction::Validate:
if (CPWL_ComboBox* pComboBox = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE))
{
if (CPWL_Edit* pEdit = (CPWL_Edit*)*pComboBox)
{
fa.sValue = pEdit->GetText();
}
}
break;
case CPDF_AAction::LoseFocus:
case CPDF_AAction::GetFocus:
ASSERT(m_pWidget != NULL);
fa.sValue = m_pWidget->GetValue();
break;
default:
break;
}
}
开发者ID:Gottox,项目名称:pdfium,代码行数:44,代码来源:FFL_ComboBox.cpp
示例19: SaveState
CPWL_Wnd* CFFL_ListBox::ResetPDFWindow(CPDFSDK_PageView* pPageView,
FX_BOOL bRestoreValue) {
if (bRestoreValue)
SaveState(pPageView);
DestroyPDFWindow(pPageView);
CPWL_Wnd* pRet = NULL;
if (bRestoreValue) {
RestoreState(pPageView);
pRet = GetPDFWindow(pPageView, FALSE);
} else
pRet = GetPDFWindow(pPageView, TRUE);
m_pWidget->UpdateField();
return pRet;
}
开发者ID:hoanganhx86,项目名称:pdfium,代码行数:19,代码来源:FFL_ListBox.cpp
示例20: OnRButtonUp
FX_BOOL CFFL_FormFiller::OnRButtonUp(CPDFSDK_PageView* pPageView,
CPDFSDK_Annot* pAnnot,
FX_UINT nFlags,
const CPDF_Point& point) {
if (CPWL_Wnd* pWnd = GetPDFWindow(pPageView, FALSE)) {
pWnd->OnRButtonUp(WndtoPWL(pPageView, point), nFlags);
return TRUE;
}
return FALSE;
}
开发者ID:azunite,项目名称:libpdfium,代码行数:11,代码来源:FFL_FormFiller.cpp
注:本文中的GetPDFWindow函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论