void CXFA_FFCheckButton::OnProcessEvent(CFWL_Event* pEvent) { CXFA_FFField::OnProcessEvent(pEvent); switch (pEvent->GetClassID()) { case CFWL_EventType::CheckStateChanged: { CXFA_EventParam eParam; eParam.m_eType = XFA_EVENT_Change; m_pDataAcc->GetValue(eParam.m_wsNewText, XFA_VALUEPICTURE_Raw); CXFA_WidgetAcc* pFFExclGroup = m_pDataAcc->GetExclGroup(); if (ProcessCommittedData()) { eParam.m_pTarget = pFFExclGroup; if (pFFExclGroup) { m_pDocView->AddValidateWidget(pFFExclGroup); m_pDocView->AddCalculateWidgetAcc(pFFExclGroup); pFFExclGroup->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam); } eParam.m_pTarget = m_pDataAcc; m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam); } else { SetFWLCheckState(m_pDataAcc->GetCheckState()); } if (pFFExclGroup) { eParam.m_pTarget = pFFExclGroup; pFFExclGroup->ProcessEvent(XFA_ATTRIBUTEENUM_Click, &eParam); } eParam.m_pTarget = m_pDataAcc; m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Click, &eParam); break; } default: break; } m_pOldDelegate->OnProcessEvent(pEvent); }
bool CXFA_FFComboBox::OnKillFocus(CXFA_FFWidget* pNewWidget) { bool flag = ProcessCommittedData(); if (!flag) { UpdateFWLData(); } CXFA_FFField::OnKillFocus(pNewWidget); return true; }
FX_BOOL CXFA_FFListBox::OnKillFocus(CXFA_FFWidget* pNewFocus) { FX_BOOL flag = ProcessCommittedData(); if (!flag) { UpdateFWLData(); } CXFA_FFField::OnKillFocus(pNewFocus); return TRUE; }
bool CXFA_FFTextEdit::OnKillFocus(CXFA_FFWidget* pNewWidget) { CFWL_MsgKillFocus ms; ms.m_pDstTarget = m_pNormalWidget->GetWidget(); ms.m_pSrcTarget = nullptr; TranslateFWLMessage(&ms); m_dwStatus &= ~XFA_WidgetStatus_Focused; SetEditScrollOffset(); ProcessCommittedData(); UpdateFWLData(); AddInvalidateRect(); CXFA_FFWidget::OnKillFocus(pNewWidget); m_dwStatus &= ~XFA_WidgetStatus_TextEditValueChanged; return true; }
bool CXFA_FFTextEdit::OnKillFocus(CXFA_FFWidget* pNewWidget) { CFWL_MessageKillFocus ms(nullptr, m_pNormalWidget.get()); TranslateFWLMessage(&ms); m_dwStatus &= ~XFA_WidgetStatus_Focused; SetEditScrollOffset(); ProcessCommittedData(); UpdateFWLData(); InvalidateRect(); CXFA_FFWidget::OnKillFocus(pNewWidget); m_dwStatus &= ~XFA_WidgetStatus_TextEditValueChanged; return true; }
FX_BOOL CXFA_FFTextEdit::OnKillFocus(CXFA_FFWidget* pNewWidget) { CFWL_MsgKillFocus ms; ms.m_pDstTarget = m_pNormalWidget->m_pIface; ms.m_pSrcTarget = NULL; TranslateFWLMessage(&ms); m_dwStatus &= ~XFA_WIDGETSTATUS_Focused; SetEditScrollOffset(); ProcessCommittedData(); UpdateFWLData(); AddInvalidateRect(); CXFA_FFWidget::OnKillFocus(pNewWidget); m_dwStatus &= ~XFA_WIDGETSTATUS_TextEditValueChanged; return TRUE; }
void CXFA_FFCheckButton::OnProcessEvent(CFWL_Event* pEvent) { CXFA_FFField::OnProcessEvent(pEvent); switch (pEvent->GetType()) { case CFWL_Event::Type::CheckStateChanged: { CXFA_EventParam eParam; eParam.m_eType = XFA_EVENT_Change; eParam.m_wsPrevText = m_pNode->GetValue(XFA_VALUEPICTURE_Raw); CXFA_Node* exclNode = m_pNode->GetExclGroupIfExists(); if (ProcessCommittedData()) { eParam.m_pTarget = exclNode; if (exclNode) { m_pDocView->AddValidateNode(exclNode); m_pDocView->AddCalculateNode(exclNode); exclNode->ProcessEvent(GetDocView(), XFA_AttributeValue::Change, &eParam); } eParam.m_pTarget = m_pNode.Get(); m_pNode->ProcessEvent(GetDocView(), XFA_AttributeValue::Change, &eParam); } else { SetFWLCheckState(m_pNode->GetCheckState()); } if (exclNode) { eParam.m_pTarget = exclNode; exclNode->ProcessEvent(GetDocView(), XFA_AttributeValue::Click, &eParam); } eParam.m_pTarget = m_pNode.Get(); m_pNode->ProcessEvent(GetDocView(), XFA_AttributeValue::Click, &eParam); break; } default: break; } m_pOldDelegate->OnProcessEvent(pEvent); }
bool CXFA_FFListBox::OnKillFocus(CXFA_FFWidget* pNewFocus) { if (!ProcessCommittedData()) UpdateFWLData(); CXFA_FFField::OnKillFocus(pNewFocus); return true; }