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

Side by Side Diff: xfa/fwl/cfwl_widget.cpp

Issue 2578473003: Remove more unused widget styles (Closed)
Patch Set: Rebase to master 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
« no previous file with comments | « xfa/fwl/cfwl_pushbutton.cpp ('k') | xfa/fwl/cfwl_widgetmgr.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/fwl/cfwl_widget.h" 7 #include "xfa/fwl/cfwl_widget.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 272
273 bool CFWL_Widget::IsEnabled() const { 273 bool CFWL_Widget::IsEnabled() const {
274 return (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled) == 0; 274 return (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled) == 0;
275 } 275 }
276 276
277 bool CFWL_Widget::HasBorder() const { 277 bool CFWL_Widget::HasBorder() const {
278 return !!(m_pProperties->m_dwStyles & FWL_WGTSTYLE_Border); 278 return !!(m_pProperties->m_dwStyles & FWL_WGTSTYLE_Border);
279 } 279 }
280 280
281 bool CFWL_Widget::HasEdge() const { 281 bool CFWL_Widget::HasEdge() const {
282 return !!(m_pProperties->m_dwStyles & FWL_WGTSTYLE_EdgeMask); 282 return false;
283 } 283 }
284 284
285 bool CFWL_Widget::IsVisible() const { 285 bool CFWL_Widget::IsVisible() const {
286 return (m_pProperties->m_dwStates & FWL_WGTSTATE_Invisible) == 0; 286 return (m_pProperties->m_dwStates & FWL_WGTSTATE_Invisible) == 0;
287 } 287 }
288 288
289 bool CFWL_Widget::IsOverLapper() const { 289 bool CFWL_Widget::IsOverLapper() const {
290 return (m_pProperties->m_dwStyles & FWL_WGTSTYLE_WindowTypeMask) == 290 return (m_pProperties->m_dwStyles & FWL_WGTSTYLE_WindowTypeMask) ==
291 FWL_WGTSTYLE_OverLapper; 291 FWL_WGTSTYLE_OverLapper;
292 } 292 }
(...skipping 23 matching lines...) Expand all
316 316
317 FX_FLOAT CFWL_Widget::GetBorderSize(bool bCX) { 317 FX_FLOAT CFWL_Widget::GetBorderSize(bool bCX) {
318 FX_FLOAT* pfBorder = static_cast<FX_FLOAT*>(GetThemeCapacity( 318 FX_FLOAT* pfBorder = static_cast<FX_FLOAT*>(GetThemeCapacity(
319 bCX ? CFWL_WidgetCapacity::CXBorder : CFWL_WidgetCapacity::CYBorder)); 319 bCX ? CFWL_WidgetCapacity::CXBorder : CFWL_WidgetCapacity::CYBorder));
320 if (!pfBorder) 320 if (!pfBorder)
321 return 0; 321 return 0;
322 return *pfBorder; 322 return *pfBorder;
323 } 323 }
324 324
325 FX_FLOAT CFWL_Widget::GetEdgeWidth() { 325 FX_FLOAT CFWL_Widget::GetEdgeWidth() {
326 CFWL_WidgetCapacity dwCapacity = CFWL_WidgetCapacity::None;
327 switch (m_pProperties->m_dwStyles & FWL_WGTSTYLE_EdgeMask) {
328 case FWL_WGTSTYLE_EdgeFlat: {
329 dwCapacity = CFWL_WidgetCapacity::EdgeFlat;
330 break;
331 }
332 case FWL_WGTSTYLE_EdgeRaised: {
333 dwCapacity = CFWL_WidgetCapacity::EdgeRaised;
334 break;
335 }
336 case FWL_WGTSTYLE_EdgeSunken: {
337 dwCapacity = CFWL_WidgetCapacity::EdgeSunken;
338 break;
339 }
340 }
341 if (dwCapacity != CFWL_WidgetCapacity::None) {
342 FX_FLOAT* fRet = static_cast<FX_FLOAT*>(GetThemeCapacity(dwCapacity));
343 return fRet ? *fRet : 0;
344 }
345 return 0; 326 return 0;
346 } 327 }
347 328
348 CFX_RectF CFWL_Widget::GetRelativeRect() { 329 CFX_RectF CFWL_Widget::GetRelativeRect() {
349 CFX_RectF rect = m_pProperties->m_rtWidget; 330 CFX_RectF rect = m_pProperties->m_rtWidget;
350 rect.left = 0; 331 rect.left = 0;
351 rect.top = 0; 332 rect.top = 0;
352 return rect; 333 return rect;
353 } 334 }
354 335
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 } 685 }
705 default: 686 default:
706 break; 687 break;
707 } 688 }
708 } 689 }
709 690
710 void CFWL_Widget::OnProcessEvent(CFWL_Event* pEvent) {} 691 void CFWL_Widget::OnProcessEvent(CFWL_Event* pEvent) {}
711 692
712 void CFWL_Widget::OnDrawWidget(CFX_Graphics* pGraphics, 693 void CFWL_Widget::OnDrawWidget(CFX_Graphics* pGraphics,
713 const CFX_Matrix* pMatrix) {} 694 const CFX_Matrix* pMatrix) {}
OLDNEW
« no previous file with comments | « xfa/fwl/cfwl_pushbutton.cpp ('k') | xfa/fwl/cfwl_widgetmgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698