diff options
Diffstat (limited to 'xfa/include/fwl/theme')
-rw-r--r-- | xfa/include/fwl/theme/barcodetp.h | 21 | ||||
-rw-r--r-- | xfa/include/fwl/theme/carettp.h | 27 | ||||
-rw-r--r-- | xfa/include/fwl/theme/checkboxtp.h | 84 | ||||
-rw-r--r-- | xfa/include/fwl/theme/comboboxtp.h | 29 | ||||
-rw-r--r-- | xfa/include/fwl/theme/datetimepickertp.h | 27 | ||||
-rw-r--r-- | xfa/include/fwl/theme/edittp.h | 22 | ||||
-rw-r--r-- | xfa/include/fwl/theme/formtp.h | 111 | ||||
-rw-r--r-- | xfa/include/fwl/theme/listboxtp.h | 29 | ||||
-rw-r--r-- | xfa/include/fwl/theme/monthcalendartp.h | 51 | ||||
-rw-r--r-- | xfa/include/fwl/theme/pictureboxtp.h | 20 | ||||
-rw-r--r-- | xfa/include/fwl/theme/pushbuttontp.h | 44 | ||||
-rw-r--r-- | xfa/include/fwl/theme/scrollbartp.h | 57 | ||||
-rw-r--r-- | xfa/include/fwl/theme/utils.h | 75 | ||||
-rw-r--r-- | xfa/include/fwl/theme/widgettp.h | 220 |
14 files changed, 0 insertions, 817 deletions
diff --git a/xfa/include/fwl/theme/barcodetp.h b/xfa/include/fwl/theme/barcodetp.h deleted file mode 100644 index 89c9a679f3..0000000000 --- a/xfa/include/fwl/theme/barcodetp.h +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef XFA_INCLUDE_FWL_THEME_BARCODETP_H_ -#define XFA_INCLUDE_FWL_THEME_BARCODETP_H_ - -#include "xfa/include/fwl/theme/utils.h" -#include "xfa/include/fwl/theme/widgettp.h" - -class CFWL_BarcodeTP : public CFWL_WidgetTP { - public: - CFWL_BarcodeTP(); - virtual ~CFWL_BarcodeTP(); - virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); - virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); -}; - -#endif // XFA_INCLUDE_FWL_THEME_BARCODETP_H_ diff --git a/xfa/include/fwl/theme/carettp.h b/xfa/include/fwl/theme/carettp.h deleted file mode 100644 index bd432dc401..0000000000 --- a/xfa/include/fwl/theme/carettp.h +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef XFA_INCLUDE_FWL_THEME_CARETTP_H_ -#define XFA_INCLUDE_FWL_THEME_CARETTP_H_ - -#include "xfa/include/fwl/theme/widgettp.h" - -class CFWL_CaretTP : public CFWL_WidgetTP { - public: - CFWL_CaretTP(); - virtual ~CFWL_CaretTP(); - virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); - virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); - - protected: - void DrawCaretBK(CFX_Graphics* pGraphics, - uint32_t dwStates, - const CFX_RectF* pRect, - CFX_Color* crFill, - CFX_Matrix* pMatrix = NULL); -}; - -#endif // XFA_INCLUDE_FWL_THEME_CARETTP_H_ diff --git a/xfa/include/fwl/theme/checkboxtp.h b/xfa/include/fwl/theme/checkboxtp.h deleted file mode 100644 index fc666d74b5..0000000000 --- a/xfa/include/fwl/theme/checkboxtp.h +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef XFA_INCLUDE_FWL_THEME_CHECKBOXTP_H_ -#define XFA_INCLUDE_FWL_THEME_CHECKBOXTP_H_ - -#include "xfa/include/fwl/theme/utils.h" -#include "xfa/include/fwl/theme/widgettp.h" - -class CFWL_CheckBoxTP : public CFWL_WidgetTP { - public: - CFWL_CheckBoxTP(); - virtual ~CFWL_CheckBoxTP(); - virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); - virtual uint32_t SetThemeID(IFWL_Widget* pWidget, - uint32_t dwThemeID, - FX_BOOL bChildren = TRUE); - virtual FX_BOOL DrawText(CFWL_ThemeText* pParams); - virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); - virtual FWL_ERR Initialize(); - virtual FWL_ERR Finalize(); - - protected: - void DrawBoxBk(IFWL_Widget* pWidget, - CFX_Graphics* pGraphics, - const CFX_RectF* pRect, - uint32_t dwStates, - CFX_Matrix* pMatrix = NULL); - void DrawSign(IFWL_Widget* pWidget, - CFX_Graphics* pGraphics, - const CFX_RectF* pRtBox, - uint32_t dwStates, - CFX_Matrix* pMatrix = NULL); - void DrawSignNeutral(CFX_Graphics* pGraphics, - const CFX_RectF* pRtSign, - CFX_Matrix* pMatrix = NULL); - void DrawSignCheck(CFX_Graphics* pGraphics, - const CFX_RectF* pRtSign, - FX_ARGB argbFill, - CFX_Matrix* pMatrix = NULL); - void DrawSignCircle(CFX_Graphics* pGraphics, - const CFX_RectF* pRtSign, - FX_ARGB argbFill, - CFX_Matrix* pMatrix = NULL); - void DrawSignCross(CFX_Graphics* pGraphics, - const CFX_RectF* pRtSign, - FX_ARGB argbFill, - CFX_Matrix* pMatrix = NULL); - void DrawSignDiamond(CFX_Graphics* pGraphics, - const CFX_RectF* pRtSign, - FX_ARGB argbFill, - CFX_Matrix* pMatrix = NULL); - void DrawSignSquare(CFX_Graphics* pGraphics, - const CFX_RectF* pRtSign, - FX_ARGB argbFill, - CFX_Matrix* pMatrix = NULL); - void DrawSignStar(CFX_Graphics* pGraphics, - const CFX_RectF* pRtSign, - FX_ARGB argbFill, - CFX_Matrix* pMatrix = NULL); - void DrawSignBorder(IFWL_Widget* pWidget, - CFX_Graphics* pGraphics, - const CFX_RectF* pRtBox, - FX_BOOL bDisable = FALSE, - CFX_Matrix* pMatrix = NULL); - void SetThemeData(uint32_t dwID); - void initCheckPath(FX_FLOAT fCheckLen); - struct CKBThemeData { - FX_ARGB clrBoxBk[13][2]; - FX_ARGB clrSignBorderNormal; - FX_ARGB clrSignBorderDisable; - FX_ARGB clrSignCheck; - FX_ARGB clrSignNeutral; - FX_ARGB clrSignNeutralNormal; - FX_ARGB clrSignNeutralHover; - FX_ARGB clrSignNeutralPressed; - } * m_pThemeData; - CFX_Path* m_pCheckPath; -}; - -#endif // XFA_INCLUDE_FWL_THEME_CHECKBOXTP_H_ diff --git a/xfa/include/fwl/theme/comboboxtp.h b/xfa/include/fwl/theme/comboboxtp.h deleted file mode 100644 index 74d49b45e7..0000000000 --- a/xfa/include/fwl/theme/comboboxtp.h +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef XFA_INCLUDE_FWL_THEME_COMBOBOXTP_H_ -#define XFA_INCLUDE_FWL_THEME_COMBOBOXTP_H_ - -#include "xfa/include/fwl/theme/widgettp.h" - -class CFWL_ComboBoxTP : public CFWL_WidgetTP { - public: - CFWL_ComboBoxTP(); - virtual ~CFWL_ComboBoxTP(); - virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); - virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); - virtual void* GetCapacity(CFWL_ThemePart* pThemePart, uint32_t dwCapacity); - - protected: - void DrawDropDownButton(CFWL_ThemeBackground* pParams, - uint32_t dwStates, - CFX_Matrix* pMatrix); - void DrawStrethHandler(CFWL_ThemeBackground* pParams, - uint32_t dwStates, - CFX_Matrix* pMatrix); -}; - -#endif // XFA_INCLUDE_FWL_THEME_COMBOBOXTP_H_ diff --git a/xfa/include/fwl/theme/datetimepickertp.h b/xfa/include/fwl/theme/datetimepickertp.h deleted file mode 100644 index de2f8304f0..0000000000 --- a/xfa/include/fwl/theme/datetimepickertp.h +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef XFA_INCLUDE_FWL_THEME_DATETIMEPICKERTP_H_ -#define XFA_INCLUDE_FWL_THEME_DATETIMEPICKERTP_H_ - -#include "xfa/include/fwl/theme/widgettp.h" - -class CFWL_DateTimePickerTP : public CFWL_WidgetTP { - public: - CFWL_DateTimePickerTP(); - virtual ~CFWL_DateTimePickerTP(); - virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); - virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); - - protected: - void DrawDropDownButton(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); - void initThemeData(); - struct DTPThemeData { - FX_ARGB BoxBkColor[13][2]; - } * m_pThemeData; -}; - -#endif // XFA_INCLUDE_FWL_THEME_DATETIMEPICKERTP_H_ diff --git a/xfa/include/fwl/theme/edittp.h b/xfa/include/fwl/theme/edittp.h deleted file mode 100644 index d03fbe60eb..0000000000 --- a/xfa/include/fwl/theme/edittp.h +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef XFA_INCLUDE_FWL_THEME_EDITTP_H_ -#define XFA_INCLUDE_FWL_THEME_EDITTP_H_ - -#include "xfa/include/fwl/theme/widgettp.h" - -class CFWL_EditTP : public CFWL_WidgetTP { - public: - CFWL_EditTP(); - virtual ~CFWL_EditTP(); - virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); - virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); - virtual FWL_ERR Initialize(); - virtual FWL_ERR Finalize(); -}; - -#endif // XFA_INCLUDE_FWL_THEME_EDITTP_H_ diff --git a/xfa/include/fwl/theme/formtp.h b/xfa/include/fwl/theme/formtp.h deleted file mode 100644 index 90ec67387e..0000000000 --- a/xfa/include/fwl/theme/formtp.h +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef XFA_INCLUDE_FWL_THEME_FORMTP_H_ -#define XFA_INCLUDE_FWL_THEME_FORMTP_H_ - -#include "xfa/include/fwl/theme/utils.h" -#include "xfa/include/fwl/theme/widgettp.h" - -class CFWL_FormTP : public CFWL_WidgetTP { - public: - CFWL_FormTP(); - virtual ~CFWL_FormTP(); - - virtual FWL_ERR Initialize(); - virtual FWL_ERR Finalize(); - virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); - virtual uint32_t SetThemeID(IFWL_Widget* pWidget, - uint32_t dwThemeID, - FX_BOOL bChildren = TRUE); - virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); - virtual FX_BOOL DrawText(CFWL_ThemeText* pParams); - virtual void* GetCapacity(CFWL_ThemePart* pThemePart, uint32_t dwCapacity); - virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart); - - protected: - void CalCloseBox(IFWL_Widget* pWidget, CFX_RectF& rect); - void CalMaxBox(IFWL_Widget* pWidget, CFX_RectF& rect); - void CalMinBox(IFWL_Widget* pWidget, CFX_RectF& rect); - void CalCaption(IFWL_Widget* pWidget, CFX_RectF& rect); - void CalIcon(IFWL_Widget* pWidget, CFX_RectF& rect); - - void DrawFormBorder(CFX_Graphics* pGraphics, - const CFX_RectF* pRect, - FWLTHEME_STATE eState, - CFX_Matrix* pMatrix, - int32_t iActive = 0); - void DrawCaption(CFX_Graphics* pGraphics, - const CFX_RectF* pRect, - FWLTHEME_STATE eState, - CFX_Matrix* pMatrix, - int32_t iActive = 0); - void DrawNarrowCaption(CFX_Graphics* pGraphics, - const CFX_RectF* pRect, - FWLTHEME_STATE eState, - CFX_Matrix* pMatrix, - int32_t iActive = 0); - void DrawCloseBox(CFX_Graphics* pGraphics, - const CFX_RectF* pRect, - FWLTHEME_STATE eState, - CFX_Matrix* pMatrix, - int32_t iActive = 0); - void DrawMinMaxBoxCommon(CFX_Graphics* pGraphics, - const CFX_RectF* pRect, - FWLTHEME_STATE eState, - CFX_Matrix* pMatrix, - int32_t iActive = 0); - void DrawMinimizeBox(CFX_Graphics* pGraphics, - const CFX_RectF* pRect, - FWLTHEME_STATE eState, - CFX_Matrix* pMatrix, - int32_t iActive = 0); - void DrawMaximizeBox(CFX_Graphics* pGraphics, - const CFX_RectF* pRect, - FWLTHEME_STATE eState, - FX_BOOL bMax, - CFX_Matrix* pMatrix, - int32_t iActive = 0); - void DrawIconImage(CFX_Graphics* pGraphics, - CFX_DIBitmap* pDIBitmap, - const CFX_RectF* pRect, - FWLTHEME_STATE eState, - CFX_Matrix* pMatrix, - int32_t iActive = 0); - void SetThemeData(uint32_t dwID); - void TransModeColor(FX_ARGB clrFore, FX_ARGB& clrBack); - void DeactiveForm(); - void InitCaption(FX_BOOL bActive); - CFX_DIBitmap* m_pActiveBitmap; - CFX_DIBitmap* m_pDeactivebitmap; - CFX_RectF m_rtDisCaption; - CFX_RectF m_rtDisLBorder; - CFX_RectF m_rtDisRBorder; - CFX_RectF m_rtDisBBorder; - struct SBThemeData { - FX_ARGB clrHeadBK[2][4]; - FX_ARGB clrHeadEdgeLeft[2][3]; - FX_ARGB clrHeadEdgeRight[2][3]; - FX_ARGB clrHeadEdgeTop[2][3]; - FX_ARGB clrHeadEdgeBottom[2][3]; - FX_ARGB clrCloseBtBKStart[2][3]; - FX_ARGB clrCloseBtBKEnd[2][3]; - FX_ARGB clrCloseBtEdgeLight[2][3]; - FX_ARGB clrCloseBtEdgeDark[2][3]; - FX_ARGB clrNormalBtBKStart[2][3]; - FX_ARGB clrNormalBtBKEnd[2][3]; - FX_ARGB clrNormalBtEdgeLight[2][3]; - FX_ARGB clrNormalBtEdgeDark[2][3]; - FX_ARGB clrBtnEdgeOut[2]; - FX_ARGB clrBtnCornerLight[2][3]; - FX_ARGB clrHeadText[2]; - FX_ARGB clrFormBorder[2][5]; - FX_ARGB clrFormBorderLight[2]; - FX_ARGB clrTransWhite; - } * m_pThemeData; -}; - -#endif // XFA_INCLUDE_FWL_THEME_FORMTP_H_ diff --git a/xfa/include/fwl/theme/listboxtp.h b/xfa/include/fwl/theme/listboxtp.h deleted file mode 100644 index 8f5720c9fb..0000000000 --- a/xfa/include/fwl/theme/listboxtp.h +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef XFA_INCLUDE_FWL_THEME_LISTBOXTP_H_ -#define XFA_INCLUDE_FWL_THEME_LISTBOXTP_H_ - -#include "xfa/include/fwl/theme/widgettp.h" - -class CFWL_ListBoxTP : public CFWL_WidgetTP { - public: - CFWL_ListBoxTP(); - virtual ~CFWL_ListBoxTP(); - virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); - virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); - virtual FWL_ERR Initialize(); - virtual FWL_ERR Finalize(); - - protected: - void DrawListBoxItem(CFX_Graphics* pGraphics, - uint32_t dwStates, - const CFX_RectF* prtItem, - void* pData = NULL, - CFX_Matrix* pMatrix = NULL); -}; - -#endif // XFA_INCLUDE_FWL_THEME_LISTBOXTP_H_ diff --git a/xfa/include/fwl/theme/monthcalendartp.h b/xfa/include/fwl/theme/monthcalendartp.h deleted file mode 100644 index 8321965a8b..0000000000 --- a/xfa/include/fwl/theme/monthcalendartp.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef XFA_INCLUDE_FWL_THEME_MONTHCALENDARTP_H_ -#define XFA_INCLUDE_FWL_THEME_MONTHCALENDARTP_H_ - -#include "xfa/include/fwl/theme/widgettp.h" - -class CFWL_MonthCalendarTP : public CFWL_WidgetTP { - public: - CFWL_MonthCalendarTP(); - virtual ~CFWL_MonthCalendarTP(); - virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); - virtual uint32_t SetThemeID(IFWL_Widget* pWidget, - uint32_t dwThemeID, - FX_BOOL bChildren = TRUE); - virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); - virtual FX_BOOL DrawText(CFWL_ThemeText* pParams); - virtual void* GetCapacity(CFWL_ThemePart* pThemePart, uint32_t dwCapacity); - virtual FWL_ERR Initialize(); - virtual FWL_ERR Finalize(); - - protected: - FX_BOOL DrawTotalBK(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); - FX_BOOL DrawHeadBk(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); - FX_BOOL DrawLButton(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); - FX_BOOL DrawRButton(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); - FX_BOOL DrawDatesInBK(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); - FX_BOOL DrawDatesInCircle(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); - FX_BOOL DrawTodayCircle(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); - FX_BOOL DrawHSeperator(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); - FX_BOOL DrawWeekNumSep(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix); - FWLTHEME_STATE GetState(uint32_t dwFWLStates); - void SetThemeData(uint32_t dwThemeID); - class MCThemeData { - public: - FX_ARGB clrCaption; - FX_ARGB clrSeperator; - FX_ARGB clrDatesHoverBK; - FX_ARGB clrDatesSelectedBK; - FX_ARGB clrDatesCircle; - FX_ARGB clrToday; - FX_ARGB clrBK; - } * m_pThemeData; - CFX_WideString wsResource; -}; - -#endif // XFA_INCLUDE_FWL_THEME_MONTHCALENDARTP_H_ diff --git a/xfa/include/fwl/theme/pictureboxtp.h b/xfa/include/fwl/theme/pictureboxtp.h deleted file mode 100644 index 8879890649..0000000000 --- a/xfa/include/fwl/theme/pictureboxtp.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef XFA_INCLUDE_FWL_THEME_PICTUREBOXTP_H_ -#define XFA_INCLUDE_FWL_THEME_PICTUREBOXTP_H_ - -#include "xfa/include/fwl/theme/widgettp.h" - -class CFWL_PictureBoxTP : public CFWL_WidgetTP { - public: - CFWL_PictureBoxTP(); - virtual ~CFWL_PictureBoxTP(); - virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); - virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); -}; - -#endif // XFA_INCLUDE_FWL_THEME_PICTUREBOXTP_H_ diff --git a/xfa/include/fwl/theme/pushbuttontp.h b/xfa/include/fwl/theme/pushbuttontp.h deleted file mode 100644 index b951de0bed..0000000000 --- a/xfa/include/fwl/theme/pushbuttontp.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef XFA_INCLUDE_FWL_THEME_PUSHBUTTONTP_H_ -#define XFA_INCLUDE_FWL_THEME_PUSHBUTTONTP_H_ - -#include "xfa/include/fwl/theme/widgettp.h" - -class CFWL_PushButtonTP : public CFWL_WidgetTP { - public: - CFWL_PushButtonTP(); - virtual ~CFWL_PushButtonTP(); - virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); - virtual uint32_t SetThemeID(IFWL_Widget* pWidget, - uint32_t dwThemeID, - FX_BOOL bChildren = TRUE); - virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); - virtual void* GetCapacity(CFWL_ThemePart* pThemePart, uint32_t dwCapacity); - virtual FWL_ERR Initialize(); - virtual FWL_ERR Finalize(); - - protected: - void SetThemeData(uint32_t dwID); - void SetTopLineColor(uint32_t* pData); - void SetLeftLineColor(uint32_t* pData); - void SetRightLineColor(uint32_t* pData); - void SetBottomLineColor(uint32_t* pData); - void SetBackgroudColor(uint32_t* pData); - void SetCaptionColor(uint32_t* pData); - void SetCornerColor(uint32_t* pData); - int32_t GetColorID(uint32_t dwStates); - - struct PBThemeData { - FX_ARGB clrBorder[5]; - FX_ARGB clrStart[5]; - FX_ARGB clrEnd[5]; - FX_ARGB clrFill[5]; - } * m_pThemeData; -}; - -#endif // XFA_INCLUDE_FWL_THEME_PUSHBUTTONTP_H_ diff --git a/xfa/include/fwl/theme/scrollbartp.h b/xfa/include/fwl/theme/scrollbartp.h deleted file mode 100644 index 5b7145c155..0000000000 --- a/xfa/include/fwl/theme/scrollbartp.h +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef XFA_INCLUDE_FWL_THEME_SCROLLBARTP_H_ -#define XFA_INCLUDE_FWL_THEME_SCROLLBARTP_H_ - -#include "xfa/include/fwl/theme/widgettp.h" - -class CFWL_ScrollBarTP : public CFWL_WidgetTP { - public: - CFWL_ScrollBarTP(); - virtual ~CFWL_ScrollBarTP(); - virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); - virtual uint32_t SetThemeID(IFWL_Widget* pWidget, - uint32_t dwThemeID, - FX_BOOL bChildren = TRUE); - virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); - virtual void* GetCapacity(CFWL_ThemePart* pThemePart, uint32_t dwCapacity); - - protected: - void DrawThumbBtn(CFX_Graphics* pGraphics, - const CFX_RectF* pRect, - FX_BOOL bVert, - FWLTHEME_STATE eState, - FX_BOOL bPawButton = TRUE, - CFX_Matrix* pMatrix = NULL); - void DrawTrack(CFX_Graphics* pGraphics, - const CFX_RectF* pRect, - FX_BOOL bVert, - FWLTHEME_STATE eState, - FX_BOOL bLowerTrack, - CFX_Matrix* pMatrix = NULL); - void DrawMaxMinBtn(CFX_Graphics* pGraphics, - const CFX_RectF* pRect, - FWLTHEME_DIRECTION eDict, - FWLTHEME_STATE eState, - CFX_Matrix* pMatrix = NULL); - void DrawPaw(CFX_Graphics* pGraphics, - const CFX_RectF* pRect, - FX_BOOL bVert, - FWLTHEME_STATE eState, - CFX_Matrix* pMatrix = NULL); - void SetThemeData(uint32_t dwID); - struct SBThemeData { - FX_ARGB clrPawColorLight[4]; - FX_ARGB clrPawColorDark[4]; - FX_ARGB clrBtnBK[4][2]; - FX_ARGB clrBtnBorder[4]; - FX_ARGB clrTrackBKStart; - FX_ARGB clrTrackBKEnd; - } * m_pThemeData; -}; - -#endif // XFA_INCLUDE_FWL_THEME_SCROLLBARTP_H_ diff --git a/xfa/include/fwl/theme/utils.h b/xfa/include/fwl/theme/utils.h deleted file mode 100644 index 0a37d3274b..0000000000 --- a/xfa/include/fwl/theme/utils.h +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef XFA_INCLUDE_FWL_THEME_UTILS_H_ -#define XFA_INCLUDE_FWL_THEME_UTILS_H_ - -#include "core/fxcrt/include/fx_system.h" - -#define THEME_XPSimilar -enum FWLTHEME_EDGE { - FWLTHEME_EDGE_Flat = 0, - FWLTHEME_EDGE_Raised, - FWLTHEME_EDGE_Sunken -}; -enum FWLTHEME_STATE { - FWLTHEME_STATE_Normal = 1, - FWLTHEME_STATE_Hover, - FWLTHEME_STATE_Pressed, - FWLTHEME_STATE_Disabale -}; -enum FWLTHEME_DIRECTION { - FWLTHEME_DIRECTION_Up = 0, - FWLTHEME_DIRECTION_Down, - FWLTHEME_DIRECTION_Left, - FWLTHEME_DIRECTION_Right -}; -struct FWLCOLOR { - union { - uint32_t color; - struct { - uint8_t b; - uint8_t g; - uint8_t r; - uint8_t a; - }; - }; - - FWLCOLOR() : color(0) {} - FWLCOLOR(uint32_t c) : color(c) {} - FWLCOLOR(const FWLCOLOR& c) : color(c.color) {} - - bool operator==(const FWLCOLOR& frColor) { return color == frColor.color; } - operator uint32_t() { return color; } -}; -#define FWLTHEME_BEZIER FX_BEZIER -#define FWLTHEME_PI FX_PI -#define FWLTHEME_PI_2_1 (FX_PI / 2.0f) -#define FWLTHEME_PI_2_3 (3.0f * FX_PI / 2.0f) -#define FWLTHEME_COLOR_EDGELT1 (ArgbEncode(255, 172, 168, 153)) -#define FWLTHEME_COLOR_EDGELT2 (ArgbEncode(255, 113, 111, 100)) -#define FWLTHEME_COLOR_EDGERB1 (ArgbEncode(255, 241, 239, 226)) -#define FWLTHEME_COLOR_EDGERB2 (ArgbEncode(255, 255, 255, 255)) -#define FWLTHEME_COLOR_Background (ArgbEncode(255, 236, 233, 216)) -#define FWLTHEME_COLOR_BKSelected (ArgbEncode(255, 153, 193, 218)) -#define FWLTHEME_COLOR_Green_BKSelected (ArgbEncode(255, 147, 160, 112)) -#ifdef THEME_XPSimilar -#define FWLTHEME_CAPACITY_EdgeFlat 2.0f -#else -#define FWLTHEME_CAPACITY_EdgeFlat 0.0f -#endif -#define FWLTHEME_CAPACITY_EdgeRaised 2.0f -#define FWLTHEME_CAPACITY_EdgeSunken 2.0f -#define FWLTHEME_CAPACITY_FontSize 12.0f -#define FWLTHEME_CAPACITY_LineHeight 12.0f -#define FWLTHEME_CAPACITY_TextColor (ArgbEncode(255, 0, 0, 0)) -#define FWLTHEME_CAPACITY_TextSelColor (ArgbEncode(255, 153, 193, 218)) -#define FWLTHEME_CAPACITY_TextDisColor (ArgbEncode(255, 172, 168, 153)) -#define FWLTHEME_CAPACITY_ScrollBarWidth 17.0f -#define FWLTHEME_CAPACITY_CXBorder 1.0f -#define FWLTHEME_CAPACITY_CYBorder 1.0f - -#endif // XFA_INCLUDE_FWL_THEME_UTILS_H_ diff --git a/xfa/include/fwl/theme/widgettp.h b/xfa/include/fwl/theme/widgettp.h deleted file mode 100644 index 344f4d3034..0000000000 --- a/xfa/include/fwl/theme/widgettp.h +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef XFA_INCLUDE_FWL_THEME_WIDGETTP_H_ -#define XFA_INCLUDE_FWL_THEME_WIDGETTP_H_ - -#include <memory> -#include <vector> - -#include "core/fxcrt/include/fx_coordinates.h" -#include "core/fxcrt/include/fx_system.h" -#include "xfa/fwl/core/fwl_error.h" -#include "xfa/fxgraphics/include/cfx_graphics.h" -#include "xfa/include/fwl/theme/utils.h" - -class IFWL_Widget; -class IFDE_TextOut; -class IFX_Font; -class IFX_FontMgr; -class CFWL_ArrowData; -class CFWL_ThemeBackground; -class CFWL_ThemePart; -class CFWL_ThemeText; - -#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ -class IFX_FontSourceEnum; -#endif - -class CFWL_WidgetTP { - public: - virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); - virtual uint32_t GetThemeID(IFWL_Widget* pWidget); - virtual uint32_t SetThemeID(IFWL_Widget* pWidget, - uint32_t dwThemeID, - FX_BOOL bChildren = TRUE); - virtual FWL_ERR GetThemeMatrix(IFWL_Widget* pWidget, CFX_Matrix& matrix); - virtual FWL_ERR SetThemeMatrix(IFWL_Widget* pWidget, - const CFX_Matrix& matrix); - virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); - virtual FX_BOOL DrawText(CFWL_ThemeText* pParams); - virtual void* GetCapacity(CFWL_ThemePart* pThemePart, uint32_t dwCapacity); - virtual FX_BOOL IsCustomizedLayout(IFWL_Widget* pWidget); - virtual FWL_ERR GetPartRect(CFWL_ThemePart* pThemePart, CFX_RectF& rtPart); - virtual FX_BOOL IsInPart(CFWL_ThemePart* pThemePart, - FX_FLOAT fx, - FX_FLOAT fy); - virtual FX_BOOL CalcTextRect(CFWL_ThemeText* pParams, CFX_RectF& rect); - virtual FWL_ERR Initialize(); - virtual FWL_ERR Finalize(); - virtual ~CFWL_WidgetTP(); - FWL_ERR SetFont(IFWL_Widget* pWidget, - const FX_WCHAR* strFont, - FX_FLOAT fFontSize, - FX_ARGB rgbFont); - FWL_ERR SetFont(IFWL_Widget* pWidget, - IFX_Font* pFont, - FX_FLOAT fFontSize, - FX_ARGB rgbFont); - IFX_Font* GetFont(IFWL_Widget* pWidget); - - protected: - CFWL_WidgetTP(); - FX_ERR InitTTO(); - FX_ERR FinalizeTTO(); - void DrawEdge(CFX_Graphics* pGraphics, - uint32_t dwStyles, - const CFX_RectF* pRect, - CFX_Matrix* pMatrix = NULL); - void Draw3DRect(CFX_Graphics* pGraphics, - FWLTHEME_EDGE eType, - FX_FLOAT fWidth, - const CFX_RectF* pRect, - FX_ARGB cr1, - FX_ARGB cr2, - FX_ARGB cr3, - FX_ARGB cr4, - CFX_Matrix* pMatrix = NULL); - void Draw3DCircle(CFX_Graphics* pGraphics, - FWLTHEME_EDGE eType, - FX_FLOAT fWidth, - const CFX_RectF* pRect, - FX_ARGB cr1, - FX_ARGB cr2, - FX_ARGB cr3, - FX_ARGB cr4, - CFX_Matrix* pMatrix = NULL); - void DrawBorder(CFX_Graphics* pGraphics, - const CFX_RectF* pRect, - CFX_Matrix* pMatrix = NULL); - void FillBackground(CFX_Graphics* pGraphics, - const CFX_RectF* pRect, - CFX_Matrix* pMatrix = NULL); - void FillSoildRect(CFX_Graphics* pGraphics, - FX_ARGB fillColor, - const CFX_RectF* pRect, - CFX_Matrix* pMatrix = NULL); - void DrawAxialShading(CFX_Graphics* pGraphics, - FX_FLOAT fx1, - FX_FLOAT fy1, - FX_FLOAT fx2, - FX_FLOAT fy2, - FX_ARGB beginColor, - FX_ARGB endColor, - CFX_Path* path, - int32_t fillMode = FXFILL_WINDING, - CFX_Matrix* pMatrix = NULL); - void DrawAnnulusRect(CFX_Graphics* pGraphics, - FX_ARGB fillColor, - const CFX_RectF* pRect, - FX_FLOAT fRingWidth = 1, - CFX_Matrix* pMatrix = NULL); - void DrawAnnulusCircle(CFX_Graphics* pGraphics, - FX_ARGB fillColor, - const CFX_RectF* pRect, - FX_FLOAT fWidth = 1, - CFX_Matrix* pMatrix = NULL); - void DrawFocus(CFX_Graphics* pGraphics, - const CFX_RectF* pRect, - CFX_Matrix* pMatrix = NULL); - void DrawArrow(CFX_Graphics* pGraphics, - const CFX_RectF* pRect, - FWLTHEME_DIRECTION eDict, - FX_ARGB argbFill, - FX_BOOL bPressed, - CFX_Matrix* pMatrix = NULL); - void DrawArrow(CFX_Graphics* pGraphics, - const CFX_RectF* pRect, - FWLTHEME_DIRECTION eDict, - FX_ARGB argSign, - CFX_Matrix* pMatrix = NULL); - void DrawBtn(CFX_Graphics* pGraphics, - const CFX_RectF* pRect, - FWLTHEME_STATE eState, - CFX_Matrix* pMatrix = NULL); - void DrawArrowBtn(CFX_Graphics* pGraphics, - const CFX_RectF* pRect, - FWLTHEME_DIRECTION eDict, - FWLTHEME_STATE eState, - CFX_Matrix* pMatrix = NULL); - FWLCOLOR BlendColor(FWLCOLOR srcColor, FWLCOLOR renderColor, uint8_t scale); - uint32_t m_dwRefCount; - IFDE_TextOut* m_pTextOut; - IFX_Font* m_pFDEFont; - FX_FLOAT m_fValue; - uint32_t m_dwValue; - CFX_RectF m_rtMargin; - uint32_t m_dwThemeID; - CFX_Matrix _ctm; -}; -FX_BOOL FWLTHEME_Init(); -void FWLTHEME_Release(); -uint32_t FWL_GetThemeLayout(uint32_t dwThemeID); -uint32_t FWL_GetThemeColor(uint32_t dwThemeID); -uint32_t FWL_MakeThemeID(uint32_t dwLayout, uint32_t dwColor); - -class CFWL_ArrowData { - public: - static CFWL_ArrowData* GetInstance(); - static FX_BOOL IsInstance(); - static void DestroyInstance(); - virtual ~CFWL_ArrowData(); - void SetColorData(uint32_t dwID); - - class CColorData { - public: - FX_ARGB clrBorder[4]; - FX_ARGB clrStart[4]; - FX_ARGB clrEnd[4]; - FX_ARGB clrSign[4]; - } * m_pColorData; - - protected: - CFWL_ArrowData(); - static CFWL_ArrowData* m_pInstance; -}; - -class CFWL_FontData { - public: - CFWL_FontData(); - virtual ~CFWL_FontData(); - FX_BOOL Equal(const CFX_WideStringC& wsFontFamily, - uint32_t dwFontStyles, - uint16_t wCodePage); - FX_BOOL LoadFont(const CFX_WideStringC& wsFontFamily, - uint32_t dwFontStyles, - uint16_t wCodePage); - IFX_Font* GetFont() const { return m_pFont; } - - protected: - CFX_WideString m_wsFamily; - uint32_t m_dwStyles; - uint32_t m_dwCodePage; - IFX_Font* m_pFont; - IFX_FontMgr* m_pFontMgr; -#if _FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ - IFX_FontSourceEnum* m_pFontSource; -#endif -}; - -class CFWL_FontManager { - public: - static CFWL_FontManager* GetInstance(); - static void DestroyInstance(); - - IFX_Font* FindFont(const CFX_WideStringC& wsFontFamily, - uint32_t dwFontStyles, - uint16_t dwCodePage); - - protected: - CFWL_FontManager(); - virtual ~CFWL_FontManager(); - - static CFWL_FontManager* s_FontManager; - std::vector<std::unique_ptr<CFWL_FontData>> m_FontsArray; -}; - -#endif // XFA_INCLUDE_FWL_THEME_WIDGETTP_H_ |