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

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

Issue 2530993002: Cleanup FWL Event and Message code. (Closed)
Patch Set: Review feedback Created 4 years 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
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_ffchoicelist.h" 7 #include "xfa/fxfa/app/xfa_ffchoicelist.h"
8 8
9 #include "third_party/base/ptr_util.h" 9 #include "third_party/base/ptr_util.h"
10 #include "xfa/fwl/core/cfwl_app.h" 10 #include "xfa/fwl/core/cfwl_app.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 listBox->Update(); 189 listBox->Update();
190 AddInvalidateRect(); 190 AddInvalidateRect();
191 } 191 }
192 192
193 void CXFA_FFListBox::OnProcessMessage(CFWL_Message* pMessage) { 193 void CXFA_FFListBox::OnProcessMessage(CFWL_Message* pMessage) {
194 m_pOldDelegate->OnProcessMessage(pMessage); 194 m_pOldDelegate->OnProcessMessage(pMessage);
195 } 195 }
196 196
197 void CXFA_FFListBox::OnProcessEvent(CFWL_Event* pEvent) { 197 void CXFA_FFListBox::OnProcessEvent(CFWL_Event* pEvent) {
198 CXFA_FFField::OnProcessEvent(pEvent); 198 CXFA_FFField::OnProcessEvent(pEvent);
199 switch (pEvent->GetClassID()) { 199 switch (pEvent->GetType()) {
200 case CFWL_EventType::SelectChanged: { 200 case CFWL_Event::Type::SelectChanged: {
201 CFX_Int32Array arrSels; 201 CFX_Int32Array arrSels;
202 OnSelectChanged(m_pNormalWidget, arrSels); 202 OnSelectChanged(m_pNormalWidget, arrSels);
203 break; 203 break;
204 } 204 }
205 default: 205 default:
206 break; 206 break;
207 } 207 }
208 m_pOldDelegate->OnProcessEvent(pEvent); 208 m_pOldDelegate->OnProcessEvent(pEvent);
209 } 209 }
210 void CXFA_FFListBox::OnDrawWidget(CFX_Graphics* pGraphics, 210 void CXFA_FFListBox::OnDrawWidget(CFX_Graphics* pGraphics,
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 eParam.m_pTarget = m_pDataAcc; 503 eParam.m_pTarget = m_pDataAcc;
504 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_PostOpen, &eParam); 504 m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_PostOpen, &eParam);
505 } 505 }
506 506
507 void CXFA_FFComboBox::OnProcessMessage(CFWL_Message* pMessage) { 507 void CXFA_FFComboBox::OnProcessMessage(CFWL_Message* pMessage) {
508 m_pOldDelegate->OnProcessMessage(pMessage); 508 m_pOldDelegate->OnProcessMessage(pMessage);
509 } 509 }
510 510
511 void CXFA_FFComboBox::OnProcessEvent(CFWL_Event* pEvent) { 511 void CXFA_FFComboBox::OnProcessEvent(CFWL_Event* pEvent) {
512 CXFA_FFField::OnProcessEvent(pEvent); 512 CXFA_FFField::OnProcessEvent(pEvent);
513 switch (pEvent->GetClassID()) { 513 switch (pEvent->GetType()) {
514 case CFWL_EventType::SelectChanged: { 514 case CFWL_Event::Type::SelectChanged: {
515 CFWL_EvtSelectChanged* postEvent = 515 CFWL_EvtSelectChanged* postEvent =
516 static_cast<CFWL_EvtSelectChanged*>(pEvent); 516 static_cast<CFWL_EvtSelectChanged*>(pEvent);
517 OnSelectChanged(m_pNormalWidget, postEvent->bLButtonUp); 517 OnSelectChanged(m_pNormalWidget, postEvent->bLButtonUp);
518 break; 518 break;
519 } 519 }
520 case CFWL_EventType::EditChanged: { 520 case CFWL_Event::Type::EditChanged: {
521 CFX_WideString wsChanged; 521 CFX_WideString wsChanged;
522 OnTextChanged(m_pNormalWidget, wsChanged); 522 OnTextChanged(m_pNormalWidget, wsChanged);
523 break; 523 break;
524 } 524 }
525 case CFWL_EventType::PreDropDown: { 525 case CFWL_Event::Type::PreDropDown: {
526 OnPreOpen(m_pNormalWidget); 526 OnPreOpen(m_pNormalWidget);
527 break; 527 break;
528 } 528 }
529 case CFWL_EventType::PostDropDown: { 529 case CFWL_Event::Type::PostDropDown: {
530 OnPostOpen(m_pNormalWidget); 530 OnPostOpen(m_pNormalWidget);
531 break; 531 break;
532 } 532 }
533 default: 533 default:
534 break; 534 break;
535 } 535 }
536 m_pOldDelegate->OnProcessEvent(pEvent); 536 m_pOldDelegate->OnProcessEvent(pEvent);
537 } 537 }
538 538
539 void CXFA_FFComboBox::OnDrawWidget(CFX_Graphics* pGraphics, 539 void CXFA_FFComboBox::OnDrawWidget(CFX_Graphics* pGraphics,
540 const CFX_Matrix* pMatrix) { 540 const CFX_Matrix* pMatrix) {
541 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix); 541 m_pOldDelegate->OnDrawWidget(pGraphics, pMatrix);
542 } 542 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698