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

Side by Side Diff: xfa/fwl/core/ifwl_comboedit.cpp

Issue 2506083002: Continue formatting fwl/core (Closed)
Patch Set: format Created 4 years, 1 month 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/core/ifwl_comboboxproxy.cpp ('k') | xfa/fwl/core/ifwl_combolist.h » ('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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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/fwl/core/ifwl_comboedit.h" 7 #include "xfa/fwl/core/ifwl_comboedit.h"
8 8
9 #include "xfa/fde/cfde_txtedtengine.h" 9 #include "xfa/fde/cfde_txtedtengine.h"
10 #include "xfa/fwl/core/ifwl_combobox.h" 10 #include "xfa/fwl/core/ifwl_combobox.h"
(...skipping 13 matching lines...) Expand all
24 24
25 void IFWL_ComboEdit::SetSelected() { 25 void IFWL_ComboEdit::SetSelected() {
26 FlagFocus(true); 26 FlagFocus(true);
27 GetTxtEdtEngine()->MoveCaretPos(MC_End); 27 GetTxtEdtEngine()->MoveCaretPos(MC_End);
28 AddSelRange(0); 28 AddSelRange(0);
29 } 29 }
30 30
31 void IFWL_ComboEdit::FlagFocus(bool bSet) { 31 void IFWL_ComboEdit::FlagFocus(bool bSet) {
32 if (bSet) { 32 if (bSet) {
33 m_pProperties->m_dwStates |= FWL_WGTSTATE_Focused; 33 m_pProperties->m_dwStates |= FWL_WGTSTATE_Focused;
34 } else { 34 return;
35 m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Focused;
36 ShowCaret(false);
37 } 35 }
36
37 m_pProperties->m_dwStates &= ~FWL_WGTSTATE_Focused;
38 ShowCaret(false);
38 } 39 }
39 40
40 void IFWL_ComboEdit::OnProcessMessage(CFWL_Message* pMessage) { 41 void IFWL_ComboEdit::OnProcessMessage(CFWL_Message* pMessage) {
41 if (!pMessage) 42 if (!pMessage)
42 return; 43 return;
43 44
44 bool backDefault = true; 45 bool backDefault = true;
45 switch (pMessage->GetClassID()) { 46 switch (pMessage->GetClassID()) {
46 case CFWL_MessageType::SetFocus: { 47 case CFWL_MessageType::SetFocus: {
47 m_pProperties->m_dwStates |= FWL_WGTSTATE_Focused; 48 m_pProperties->m_dwStates |= FWL_WGTSTATE_Focused;
(...skipping 13 matching lines...) Expand all
61 m_pOuter->SetFocus(true); 62 m_pOuter->SetFocus(true);
62 } 63 }
63 break; 64 break;
64 } 65 }
65 default: 66 default:
66 break; 67 break;
67 } 68 }
68 if (backDefault) 69 if (backDefault)
69 IFWL_Edit::OnProcessMessage(pMessage); 70 IFWL_Edit::OnProcessMessage(pMessage);
70 } 71 }
OLDNEW
« no previous file with comments | « xfa/fwl/core/ifwl_comboboxproxy.cpp ('k') | xfa/fwl/core/ifwl_combolist.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698