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

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

Issue 1943413002: Convert FWL_ERR into an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@bcdattribute
Patch Set: Created 4 years, 7 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/fxfa/app/xfa_ffpushbutton.h ('k') | xfa/fxfa/app/xfa_fftextedit.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 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_ffpushbutton.h" 7 #include "xfa/fxfa/app/xfa_ffpushbutton.h"
8 8
9 #include "xfa/fwl/core/fwl_noteimp.h" 9 #include "xfa/fwl/core/fwl_noteimp.h"
10 #include "xfa/fwl/core/fwl_widgetmgrimp.h" 10 #include "xfa/fwl/core/fwl_widgetmgrimp.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 if (m_pRolloverTextLayout->DrawString(pRenderDevice, mt, rtClip)) { 194 if (m_pRolloverTextLayout->DrawString(pRenderDevice, mt, rtClip)) {
195 return; 195 return;
196 } 196 }
197 } 197 }
198 } 198 }
199 if (pCapTextLayout) { 199 if (pCapTextLayout) {
200 pCapTextLayout->DrawString(pRenderDevice, mt, rtClip); 200 pCapTextLayout->DrawString(pRenderDevice, mt, rtClip);
201 } 201 }
202 } 202 }
203 } 203 }
204 int32_t CXFA_FFPushButton::OnProcessMessage(CFWL_Message* pMessage) { 204
205 return m_pOldDelegate->OnProcessMessage(pMessage); 205 void CXFA_FFPushButton::OnProcessMessage(CFWL_Message* pMessage) {
206 m_pOldDelegate->OnProcessMessage(pMessage);
206 } 207 }
207 FWL_ERR CXFA_FFPushButton::OnProcessEvent(CFWL_Event* pEvent) { 208
209 void CXFA_FFPushButton::OnProcessEvent(CFWL_Event* pEvent) {
208 m_pOldDelegate->OnProcessEvent(pEvent); 210 m_pOldDelegate->OnProcessEvent(pEvent);
209 return CXFA_FFField::OnProcessEvent(pEvent); 211 CXFA_FFField::OnProcessEvent(pEvent);
210 } 212 }
211 FWL_ERR CXFA_FFPushButton::OnDrawWidget(CFX_Graphics* pGraphics, 213
212 const CFX_Matrix* pMatrix) { 214 void CXFA_FFPushButton::OnDrawWidget(CFX_Graphics* pGraphics,
215 const CFX_Matrix* pMatrix) {
213 if (m_pNormalWidget->GetStylesEx() & XFA_FWL_PSBSTYLEEXT_HiliteInverted) { 216 if (m_pNormalWidget->GetStylesEx() & XFA_FWL_PSBSTYLEEXT_HiliteInverted) {
214 if ((m_pNormalWidget->GetStates() & FWL_STATE_PSB_Pressed) && 217 if ((m_pNormalWidget->GetStates() & FWL_STATE_PSB_Pressed) &&
215 (m_pNormalWidget->GetStates() & FWL_STATE_PSB_Hovered)) { 218 (m_pNormalWidget->GetStates() & FWL_STATE_PSB_Hovered)) {
216 CFX_RectF rtFill; 219 CFX_RectF rtFill;
217 m_pNormalWidget->GetWidgetRect(rtFill); 220 m_pNormalWidget->GetWidgetRect(rtFill);
218 rtFill.left = rtFill.top = 0; 221 rtFill.left = rtFill.top = 0;
219 FX_FLOAT fLineWith = GetLineWidth(); 222 FX_FLOAT fLineWith = GetLineWidth();
220 rtFill.Deflate(fLineWith, fLineWith); 223 rtFill.Deflate(fLineWith, fLineWith);
221 CFX_Color cr(FXARGB_MAKE(128, 128, 255, 255)); 224 CFX_Color cr(FXARGB_MAKE(128, 128, 255, 255));
222 pGraphics->SetFillColor(&cr); 225 pGraphics->SetFillColor(&cr);
(...skipping 10 matching lines...) Expand all
233 CFX_Color cr(FXARGB_MAKE(255, 128, 255, 255)); 236 CFX_Color cr(FXARGB_MAKE(255, 128, 255, 255));
234 pGraphics->SetStrokeColor(&cr); 237 pGraphics->SetStrokeColor(&cr);
235 pGraphics->SetLineWidth(fLineWidth); 238 pGraphics->SetLineWidth(fLineWidth);
236 CFX_Path path; 239 CFX_Path path;
237 path.Create(); 240 path.Create();
238 CFX_RectF rect; 241 CFX_RectF rect;
239 m_pNormalWidget->GetWidgetRect(rect); 242 m_pNormalWidget->GetWidgetRect(rect);
240 path.AddRectangle(0, 0, rect.width, rect.height); 243 path.AddRectangle(0, 0, rect.width, rect.height);
241 pGraphics->StrokePath(&path, (CFX_Matrix*)pMatrix); 244 pGraphics->StrokePath(&path, (CFX_Matrix*)pMatrix);
242 } 245 }
243 } else if (m_pNormalWidget->GetStylesEx() & XFA_FWL_PSBSTYLEEXT_HilitePush) {
244 } 246 }
245 return FWL_ERR_Succeeded;
246 } 247 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_ffpushbutton.h ('k') | xfa/fxfa/app/xfa_fftextedit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698