Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(742)

Side by Side Diff: xfa/fxfa/app/xfa_ffcheckbutton.cpp

Issue 1901183002: Remove CFWL_Note. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_widget.cpp ('k') | xfa/fxfa/app/xfa_ffchoicelist.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fxfa/app/xfa_ffcheckbutton.h" 7 #include "xfa/fxfa/app/xfa_ffcheckbutton.h"
8 8
9 #include "xfa/fwl/core/cfwl_message.h" 9 #include "xfa/fwl/core/cfwl_message.h"
10 #include "xfa/fwl/core/ifwl_notedriver.h" 10 #include "xfa/fwl/core/ifwl_notedriver.h"
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 return FALSE; 291 return FALSE;
292 } 292 }
293 XFA_CHECKSTATE eState = m_pDataAcc->GetCheckState(); 293 XFA_CHECKSTATE eState = m_pDataAcc->GetCheckState();
294 SetFWLCheckState(eState); 294 SetFWLCheckState(eState);
295 m_pNormalWidget->Update(); 295 m_pNormalWidget->Update();
296 return TRUE; 296 return TRUE;
297 } 297 }
298 int32_t CXFA_FFCheckButton::OnProcessMessage(CFWL_Message* pMessage) { 298 int32_t CXFA_FFCheckButton::OnProcessMessage(CFWL_Message* pMessage) {
299 return m_pOldDelegate->OnProcessMessage(pMessage); 299 return m_pOldDelegate->OnProcessMessage(pMessage);
300 } 300 }
301
301 FWL_ERR CXFA_FFCheckButton::OnProcessEvent(CFWL_Event* pEvent) { 302 FWL_ERR CXFA_FFCheckButton::OnProcessEvent(CFWL_Event* pEvent) {
302 CXFA_FFField::OnProcessEvent(pEvent); 303 CXFA_FFField::OnProcessEvent(pEvent);
303 uint32_t dwEventID = pEvent->GetClassID(); 304 switch (pEvent->GetClassID()) {
304 switch (dwEventID) { 305 case CFWL_EventType::CheckStateChanged: {
305 case FWL_EVTHASH_CKB_CheckStateChanged: {
306 CXFA_EventParam eParam; 306 CXFA_EventParam eParam;
307 eParam.m_eType = XFA_EVENT_Change; 307 eParam.m_eType = XFA_EVENT_Change;
308 m_pDataAcc->GetValue(eParam.m_wsNewText, XFA_VALUEPICTURE_Raw); 308 m_pDataAcc->GetValue(eParam.m_wsNewText, XFA_VALUEPICTURE_Raw);
309 CXFA_WidgetAcc* pFFExclGroup = m_pDataAcc->GetExclGroup(); 309 CXFA_WidgetAcc* pFFExclGroup = m_pDataAcc->GetExclGroup();
310 if (ProcessCommittedData()) { 310 if (ProcessCommittedData()) {
311 eParam.m_pTarget = pFFExclGroup; 311 eParam.m_pTarget = pFFExclGroup;
312 if (pFFExclGroup) { 312 if (pFFExclGroup) {
313 m_pDocView->AddValidateWidget(pFFExclGroup); 313 m_pDocView->AddValidateWidget(pFFExclGroup);
314 m_pDocView->AddCalculateWidgetAcc(pFFExclGroup); 314 m_pDocView->AddCalculateWidgetAcc(pFFExclGroup);
315 pFFExclGroup->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam); 315 pFFExclGroup->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam);
316 } 316 }
317 eParam.m_pTarget = m_pDataAcc; 317 eParam.m_pTarget = m_pDataAcc;
318 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam); 318 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam);
319 } else { 319 } else {
320 SetFWLCheckState(m_pDataAcc->GetCheckState()); 320 SetFWLCheckState(m_pDataAcc->GetCheckState());
321 } 321 }
322 if (pFFExclGroup) { 322 if (pFFExclGroup) {
323 eParam.m_pTarget = pFFExclGroup; 323 eParam.m_pTarget = pFFExclGroup;
324 pFFExclGroup->ProcessEvent(XFA_ATTRIBUTEENUM_Click, &eParam); 324 pFFExclGroup->ProcessEvent(XFA_ATTRIBUTEENUM_Click, &eParam);
325 } 325 }
326 eParam.m_pTarget = m_pDataAcc; 326 eParam.m_pTarget = m_pDataAcc;
327 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Click, &eParam); 327 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Click, &eParam);
328 break; 328 break;
329 } 329 }
330 default: {} 330 default:
331 break;
331 } 332 }
332 return m_pOldDelegate->OnProcessEvent(pEvent); 333 return m_pOldDelegate->OnProcessEvent(pEvent);
333 } 334 }
335
334 FWL_ERR CXFA_FFCheckButton::OnDrawWidget(CFX_Graphics* pGraphics, 336 FWL_ERR CXFA_FFCheckButton::OnDrawWidget(CFX_Graphics* pGraphics,
335 const CFX_Matrix* pMatrix) { 337 const CFX_Matrix* pMatrix) {
336 return m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); 338 return m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix);
337 } 339 }
OLDNEW
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_widget.cpp ('k') | xfa/fxfa/app/xfa_ffchoicelist.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698