OLD | NEW |
---|---|
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/theme/cfwl_scrollbartp.h" | 7 #include "xfa/fwl/theme/cfwl_scrollbartp.h" |
8 | 8 |
9 #include "xfa/fwl/basewidget/ifwl_scrollbar.h" | 9 #include "xfa/fwl/basewidget/ifwl_scrollbar.h" |
10 #include "xfa/fwl/core/cfwl_themebackground.h" | 10 #include "xfa/fwl/core/cfwl_themebackground.h" |
(...skipping 10 matching lines...) Expand all Loading... | |
21 | 21 |
22 CFWL_ScrollBarTP::CFWL_ScrollBarTP() : m_pThemeData(new SBThemeData) { | 22 CFWL_ScrollBarTP::CFWL_ScrollBarTP() : m_pThemeData(new SBThemeData) { |
23 SetThemeData(0); | 23 SetThemeData(0); |
24 } | 24 } |
25 | 25 |
26 CFWL_ScrollBarTP::~CFWL_ScrollBarTP() { | 26 CFWL_ScrollBarTP::~CFWL_ScrollBarTP() { |
27 delete m_pThemeData; | 27 delete m_pThemeData; |
28 } | 28 } |
29 | 29 |
30 FX_BOOL CFWL_ScrollBarTP::IsValidWidget(IFWL_Widget* pWidget) { | 30 FX_BOOL CFWL_ScrollBarTP::IsValidWidget(IFWL_Widget* pWidget) { |
31 if (!pWidget) | 31 if (!pWidget) |
Tom Sepez
2016/05/05 16:56:48
ditto
dsinclair
2016/05/05 17:13:35
Done.
| |
32 return FALSE; | 32 return FALSE; |
33 return pWidget->GetClassID() == FWL_CLASSHASH_ScrollBar; | 33 return pWidget->GetClassID() == FWL_Type::ScrollBar; |
34 } | 34 } |
35 void* CFWL_ScrollBarTP::GetCapacity(CFWL_ThemePart* pThemePart, | 35 void* CFWL_ScrollBarTP::GetCapacity(CFWL_ThemePart* pThemePart, |
36 CFWL_WidgetCapacity dwCapacity) { | 36 CFWL_WidgetCapacity dwCapacity) { |
37 if (dwCapacity == CFWL_WidgetCapacity::Size) { | 37 if (dwCapacity == CFWL_WidgetCapacity::Size) { |
38 m_fValue = 5; | 38 m_fValue = 5; |
39 return &m_fValue; | 39 return &m_fValue; |
40 } | 40 } |
41 return CFWL_WidgetTP::GetCapacity(pThemePart, dwCapacity); | 41 return CFWL_WidgetTP::GetCapacity(pThemePart, dwCapacity); |
42 } | 42 } |
43 uint32_t CFWL_ScrollBarTP::SetThemeID(IFWL_Widget* pWidget, | 43 uint32_t CFWL_ScrollBarTP::SetThemeID(IFWL_Widget* pWidget, |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
306 m_pThemeData->clrBtnBorder[1] = ArgbEncode(0xff, 218, 230, 254); | 306 m_pThemeData->clrBtnBorder[1] = ArgbEncode(0xff, 218, 230, 254); |
307 m_pThemeData->clrPawColorLight[2] = ArgbEncode(0xff, 207, 221, 253); | 307 m_pThemeData->clrPawColorLight[2] = ArgbEncode(0xff, 207, 221, 253); |
308 m_pThemeData->clrPawColorDark[2] = ArgbEncode(0xff, 131, 158, 216); | 308 m_pThemeData->clrPawColorDark[2] = ArgbEncode(0xff, 131, 158, 216); |
309 m_pThemeData->clrBtnBK[2][0] = ArgbEncode(0xff, 167, 190, 245); | 309 m_pThemeData->clrBtnBK[2][0] = ArgbEncode(0xff, 167, 190, 245); |
310 m_pThemeData->clrBtnBK[2][1] = ArgbEncode(0xff, 146, 179, 249); | 310 m_pThemeData->clrBtnBK[2][1] = ArgbEncode(0xff, 146, 179, 249); |
311 m_pThemeData->clrBtnBorder[2] = ArgbEncode(0xff, 124, 159, 211); | 311 m_pThemeData->clrBtnBorder[2] = ArgbEncode(0xff, 124, 159, 211); |
312 m_pThemeData->clrTrackBKStart = ArgbEncode(0xff, 243, 241, 236); | 312 m_pThemeData->clrTrackBKStart = ArgbEncode(0xff, 243, 241, 236); |
313 m_pThemeData->clrTrackBKEnd = ArgbEncode(0xff, 254, 254, 251); | 313 m_pThemeData->clrTrackBKEnd = ArgbEncode(0xff, 254, 254, 251); |
314 } | 314 } |
315 } | 315 } |
OLD | NEW |