| 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 #ifndef XFA_FXFA_APP_XFA_FWLTHEME_H_ | 7 #ifndef XFA_FXFA_APP_XFA_FWLTHEME_H_ |
| 8 #define XFA_FXFA_APP_XFA_FWLTHEME_H_ | 8 #define XFA_FXFA_APP_XFA_FWLTHEME_H_ |
| 9 | 9 |
| 10 #include "xfa/fwl/core/ifwl_themeprovider.h" | 10 #include "xfa/fwl/core/ifwl_themeprovider.h" |
| 11 #include "xfa/fwl/theme/cfwl_barcodetp.h" | 11 #include "xfa/fwl/theme/cfwl_barcodetp.h" |
| 12 #include "xfa/fwl/theme/cfwl_carettp.h" | 12 #include "xfa/fwl/theme/cfwl_carettp.h" |
| 13 #include "xfa/fwl/theme/cfwl_checkboxtp.h" | 13 #include "xfa/fwl/theme/cfwl_checkboxtp.h" |
| 14 #include "xfa/fwl/theme/cfwl_comboboxtp.h" | 14 #include "xfa/fwl/theme/cfwl_comboboxtp.h" |
| 15 #include "xfa/fwl/theme/cfwl_datetimepickertp.h" | 15 #include "xfa/fwl/theme/cfwl_datetimepickertp.h" |
| 16 #include "xfa/fwl/theme/cfwl_edittp.h" | 16 #include "xfa/fwl/theme/cfwl_edittp.h" |
| 17 #include "xfa/fwl/theme/cfwl_listboxtp.h" | 17 #include "xfa/fwl/theme/cfwl_listboxtp.h" |
| 18 #include "xfa/fwl/theme/cfwl_monthcalendartp.h" | 18 #include "xfa/fwl/theme/cfwl_monthcalendartp.h" |
| 19 #include "xfa/fwl/theme/cfwl_pictureboxtp.h" | 19 #include "xfa/fwl/theme/cfwl_pictureboxtp.h" |
| 20 #include "xfa/fwl/theme/cfwl_pushbuttontp.h" | 20 #include "xfa/fwl/theme/cfwl_pushbuttontp.h" |
| 21 #include "xfa/fwl/theme/cfwl_scrollbartp.h" | 21 #include "xfa/fwl/theme/cfwl_scrollbartp.h" |
| 22 #include "xfa/fwl/theme/cfwl_widgettp.h" | 22 #include "xfa/fwl/theme/cfwl_widgettp.h" |
| 23 #include "xfa/fxfa/include/xfa_ffapp.h" | 23 #include "xfa/fxfa/include/xfa_ffapp.h" |
| 24 | 24 |
| 25 class CXFA_FWLTheme : public IFWL_ThemeProvider { | 25 class CXFA_FWLTheme : public IFWL_ThemeProvider { |
| 26 public: | 26 public: |
| 27 CXFA_FWLTheme(CXFA_FFApp* pApp); | 27 CXFA_FWLTheme(CXFA_FFApp* pApp); |
| 28 virtual ~CXFA_FWLTheme(); | 28 virtual ~CXFA_FWLTheme(); |
| 29 virtual FWL_ERR Release() { | 29 virtual FWL_Error Release() { |
| 30 delete this; | 30 delete this; |
| 31 return FWL_ERR_Succeeded; | 31 return FWL_Error::Succeeded; |
| 32 } | 32 } |
| 33 virtual IFWL_Widget* Retain() { return NULL; } | 33 virtual IFWL_Widget* Retain() { return NULL; } |
| 34 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const { | 34 virtual FWL_Error GetClassName(CFX_WideString& wsClass) const { |
| 35 return FWL_ERR_Succeeded; | 35 return FWL_Error::Succeeded; |
| 36 } | 36 } |
| 37 virtual uint32_t GetHashCode() const { return 0; } | 37 virtual uint32_t GetHashCode() const { return 0; } |
| 38 virtual FWL_ERR Initialize(); | 38 virtual FWL_Error Initialize(); |
| 39 virtual FWL_ERR Finalize(); | 39 virtual FWL_Error Finalize(); |
| 40 virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); | 40 virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); |
| 41 virtual uint32_t GetThemeID(IFWL_Widget* pWidget); | 41 virtual uint32_t GetThemeID(IFWL_Widget* pWidget); |
| 42 virtual uint32_t SetThemeID(IFWL_Widget* pWidget, | 42 virtual uint32_t SetThemeID(IFWL_Widget* pWidget, |
| 43 uint32_t dwThemeID, | 43 uint32_t dwThemeID, |
| 44 FX_BOOL bChildren = TRUE); | 44 FX_BOOL bChildren = TRUE); |
| 45 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); | 45 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); |
| 46 virtual FX_BOOL DrawText(CFWL_ThemeText* pParams); | 46 virtual FX_BOOL DrawText(CFWL_ThemeText* pParams); |
| 47 virtual void* GetCapacity(CFWL_ThemePart* pThemePart, | 47 virtual void* GetCapacity(CFWL_ThemePart* pThemePart, |
| 48 CFWL_WidgetCapacity dwCapacity); | 48 CFWL_WidgetCapacity dwCapacity); |
| 49 virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget); | 49 virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget); |
| 50 virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart); | 50 virtual FWL_Error GetPartRect(CFWL_ThemePart* pThemePart); |
| 51 virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart, | 51 virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart, |
| 52 FX_FLOAT fx, | 52 FX_FLOAT fx, |
| 53 FX_FLOAT fy); | 53 FX_FLOAT fy); |
| 54 | 54 |
| 55 virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect); | 55 virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect); |
| 56 virtual FWL_ERR GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) { | 56 virtual FWL_Error GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix) { |
| 57 return FWL_ERR_Succeeded; | 57 return FWL_Error::Succeeded; |
| 58 } | 58 } |
| 59 virtual FWL_ERR SetThemeMatrix(IFWL_Widget* pWidget, | 59 virtual FWL_Error SetThemeMatrix(IFWL_Widget* pWidget, |
| 60 const CFX_Matrix& matrix) { | 60 const CFX_Matrix& matrix) { |
| 61 return FWL_ERR_Succeeded; | 61 return FWL_Error::Succeeded; |
| 62 } | 62 } |
| 63 virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart) { | 63 virtual FWL_Error GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart) { |
| 64 return FWL_ERR_Succeeded; | 64 return FWL_Error::Succeeded; |
| 65 } | 65 } |
| 66 | 66 |
| 67 protected: | 67 protected: |
| 68 CFWL_WidgetTP* GetTheme(IFWL_Widget* pWidget); | 68 CFWL_WidgetTP* GetTheme(IFWL_Widget* pWidget); |
| 69 CFWL_CheckBoxTP* m_pCheckBoxTP; | 69 CFWL_CheckBoxTP* m_pCheckBoxTP; |
| 70 CFWL_ListBoxTP* m_pListBoxTP; | 70 CFWL_ListBoxTP* m_pListBoxTP; |
| 71 CFWL_PictureBoxTP* m_pPictureBoxTP; | 71 CFWL_PictureBoxTP* m_pPictureBoxTP; |
| 72 CFWL_ScrollBarTP* m_pSrollBarTP; | 72 CFWL_ScrollBarTP* m_pSrollBarTP; |
| 73 CFWL_EditTP* m_pEditTP; | 73 CFWL_EditTP* m_pEditTP; |
| 74 CFWL_ComboBoxTP* m_pComboBoxTP; | 74 CFWL_ComboBoxTP* m_pComboBoxTP; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 101 class CXFA_FWLEditTP : public CFWL_EditTP { | 101 class CXFA_FWLEditTP : public CFWL_EditTP { |
| 102 public: | 102 public: |
| 103 CXFA_FWLEditTP(); | 103 CXFA_FWLEditTP(); |
| 104 virtual ~CXFA_FWLEditTP(); | 104 virtual ~CXFA_FWLEditTP(); |
| 105 | 105 |
| 106 public: | 106 public: |
| 107 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); | 107 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); |
| 108 }; | 108 }; |
| 109 | 109 |
| 110 #endif // XFA_FXFA_APP_XFA_FWLTHEME_H_ | 110 #endif // XFA_FXFA_APP_XFA_FWLTHEME_H_ |
| OLD | NEW |