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

Side by Side Diff: fpdfsdk/pdfwindow/PWL_ListBox.cpp

Issue 1821043003: Remove FX_WORD in favor of uint16_t. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Use stdint.h directly, bitfield minefield. Created 4 years, 9 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 | « fpdfsdk/pdfwindow/PWL_IconList.cpp ('k') | fpdfsdk/pdfwindow/PWL_SpecialButton.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 "fpdfsdk/include/pdfwindow/PWL_ListBox.h" 7 #include "fpdfsdk/include/pdfwindow/PWL_ListBox.h"
8 8
9 #include "fpdfsdk/include/pdfwindow/PWL_Edit.h" 9 #include "fpdfsdk/include/pdfwindow/PWL_Edit.h"
10 #include "fpdfsdk/include/pdfwindow/PWL_EditCtrl.h" 10 #include "fpdfsdk/include/pdfwindow/PWL_EditCtrl.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 IFX_SystemHandler* pSysHandler = GetSystemHandler(); 196 IFX_SystemHandler* pSysHandler = GetSystemHandler();
197 IFX_Edit::DrawEdit(pDevice, pUser2Device, m_pList->GetItemEdit(i), 197 IFX_Edit::DrawEdit(pDevice, pUser2Device, m_pList->GetItemEdit(i),
198 CPWL_Utils::PWLColorToFXColor(GetTextColor()), 198 CPWL_Utils::PWLColorToFXColor(GetTextColor()),
199 CPWL_Utils::PWLColorToFXColor(GetTextStrokeColor()), 199 CPWL_Utils::PWLColorToFXColor(GetTextStrokeColor()),
200 rcList, ptOffset, NULL, pSysHandler, NULL); 200 rcList, ptOffset, NULL, pSysHandler, NULL);
201 } 201 }
202 } 202 }
203 } 203 }
204 } 204 }
205 205
206 FX_BOOL CPWL_ListBox::OnKeyDown(FX_WORD nChar, FX_DWORD nFlag) { 206 FX_BOOL CPWL_ListBox::OnKeyDown(uint16_t nChar, FX_DWORD nFlag) {
207 CPWL_Wnd::OnKeyDown(nChar, nFlag); 207 CPWL_Wnd::OnKeyDown(nChar, nFlag);
208 208
209 if (!m_pList) 209 if (!m_pList)
210 return FALSE; 210 return FALSE;
211 211
212 switch (nChar) { 212 switch (nChar) {
213 default: 213 default:
214 return FALSE; 214 return FALSE;
215 case FWL_VKEY_Up: 215 case FWL_VKEY_Up:
216 case FWL_VKEY_Down: 216 case FWL_VKEY_Down:
(...skipping 26 matching lines...) Expand all
243 case FWL_VKEY_Delete: 243 case FWL_VKEY_Delete:
244 break; 244 break;
245 } 245 }
246 246
247 FX_BOOL bExit = FALSE; 247 FX_BOOL bExit = FALSE;
248 OnNotifySelChanged(TRUE, bExit, nFlag); 248 OnNotifySelChanged(TRUE, bExit, nFlag);
249 249
250 return TRUE; 250 return TRUE;
251 } 251 }
252 252
253 FX_BOOL CPWL_ListBox::OnChar(FX_WORD nChar, FX_DWORD nFlag) { 253 FX_BOOL CPWL_ListBox::OnChar(uint16_t nChar, FX_DWORD nFlag) {
254 CPWL_Wnd::OnChar(nChar, nFlag); 254 CPWL_Wnd::OnChar(nChar, nFlag);
255 255
256 if (!m_pList) 256 if (!m_pList)
257 return FALSE; 257 return FALSE;
258 258
259 if (!m_pList->OnChar(nChar, IsSHIFTpressed(nFlag), IsCTRLpressed(nFlag))) 259 if (!m_pList->OnChar(nChar, IsSHIFTpressed(nFlag), IsCTRLpressed(nFlag)))
260 return FALSE; 260 return FALSE;
261 261
262 FX_BOOL bExit = FALSE; 262 FX_BOOL bExit = FALSE;
263 OnNotifySelChanged(TRUE, bExit, nFlag); 263 OnNotifySelChanged(TRUE, bExit, nFlag);
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 if (zDelta < 0) { 524 if (zDelta < 0) {
525 m_pList->OnVK_DOWN(IsSHIFTpressed(nFlag), IsCTRLpressed(nFlag)); 525 m_pList->OnVK_DOWN(IsSHIFTpressed(nFlag), IsCTRLpressed(nFlag));
526 } else { 526 } else {
527 m_pList->OnVK_UP(IsSHIFTpressed(nFlag), IsCTRLpressed(nFlag)); 527 m_pList->OnVK_UP(IsSHIFTpressed(nFlag), IsCTRLpressed(nFlag));
528 } 528 }
529 529
530 FX_BOOL bExit = FALSE; 530 FX_BOOL bExit = FALSE;
531 OnNotifySelChanged(FALSE, bExit, nFlag); 531 OnNotifySelChanged(FALSE, bExit, nFlag);
532 return TRUE; 532 return TRUE;
533 } 533 }
OLDNEW
« no previous file with comments | « fpdfsdk/pdfwindow/PWL_IconList.cpp ('k') | fpdfsdk/pdfwindow/PWL_SpecialButton.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698