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 COXChildFrameState::ComputeProperties(CFrameWnd* pFrameWnd) { ASSERT_VALID(this); // Get the position of the frame window ::ZeroMemory(&m_framePlacement, sizeof(WINDOWPLACEMENT)); m_framePlacement.length = sizeof(WINDOWPLACEMENT); if (pFrameWnd != NULL) { VERIFY(pFrameWnd->GetWindowPlacement(&m_framePlacement)); if(!pFrameWnd->IsWindowVisible()) { m_framePlacement.showCmd=SW_HIDE; } } // Get the document and view of this frame CDocument* pDoc = NULL; CView* pView = NULL; if (!GetDocView(pFrameWnd, pDoc, pView)) { TRACE0("COXChildFrameState::ComputeProperties : Failed to get the doc-view for this frame, failing\n"); return FALSE; } // Get the file path of the document if (pDoc != NULL) m_sDocPath = pDoc->GetPathName(); // Store the name of the classes of doc, frame and view if (pDoc != NULL) m_sDocClassName = pDoc->GetRuntimeClass()->m_lpszClassName; if (pFrameWnd != NULL) m_sFrameClassName = pFrameWnd->GetRuntimeClass()->m_lpszClassName; if (pView != NULL) m_sViewClassName = pView->GetRuntimeClass()->m_lpszClassName; EmptySplitterPanes(m_pSplitterPanes); if (m_bSaveSplitterPanes) ComputeSplitterPanes(pFrameWnd); ASSERT_VALID(this); return TRUE; }
void CXFA_FFTextEdit::OnTextWillChange(CFWL_Widget* pWidget, CFWL_EventTextWillChange* event) { m_dwStatus |= XFA_WidgetStatus_TextEditValueChanged; CXFA_EventParam eParam; eParam.m_eType = XFA_EVENT_Change; eParam.m_wsChange = event->change_text; eParam.m_pTarget = m_pNode.Get(); eParam.m_wsPrevText = event->previous_text; eParam.m_iSelStart = static_cast<int32_t>(event->selection_start); eParam.m_iSelEnd = static_cast<int32_t>(event->selection_end); m_pNode->ProcessEvent(GetDocView(), XFA_AttributeValue::Change, &eParam); // Copy the data back out of the EventParam and into the TextChanged event so // it can propagate back to the calling widget. event->cancelled = eParam.m_bCancelAction; event->change_text = std::move(eParam.m_wsChange); event->selection_start = static_cast<size_t>(eParam.m_iSelStart); event->selection_end = static_cast<size_t>(eParam.m_iSelEnd); }
void CXFA_FFTextEdit::OnTextFull(CFWL_Widget* pWidget) { CXFA_EventParam eParam; eParam.m_eType = XFA_EVENT_Full; eParam.m_pTarget = m_pNode.Get(); m_pNode->ProcessEvent(GetDocView(), XFA_AttributeValue::Full, &eParam); }