1 // Copyright 2014 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #ifndef _FWL_SCROLLBARTP_H 8 #define _FWL_SCROLLBARTP_H 9 class CFWL_WidgetTP; 10 class CFWL_ScrollBarTP; 11 class CFWL_ScrollBarTP : public CFWL_WidgetTP { 12 public: 13 CFWL_ScrollBarTP(); 14 virtual ~CFWL_ScrollBarTP(); 15 virtual FX_BOOL IsValidWidget(IFWL_Widget* pWidget); 16 virtual FX_DWORD SetThemeID(IFWL_Widget* pWidget, 17 FX_DWORD dwThemeID, 18 FX_BOOL bChildren = TRUE); 19 virtual FX_BOOL DrawBackground(CFWL_ThemeBackground* pParams); 20 virtual void* GetCapacity(CFWL_ThemePart* pThemePart, FX_DWORD dwCapacity); 21 22 protected: 23 void DrawThumbBtn(CFX_Graphics* pGraphics, 24 const CFX_RectF* pRect, 25 FX_BOOL bVert, 26 FWLTHEME_STATE eState, 27 FX_BOOL bPawButton = TRUE, 28 CFX_Matrix* pMatrix = NULL); 29 void DrawTrack(CFX_Graphics* pGraphics, 30 const CFX_RectF* pRect, 31 FX_BOOL bVert, 32 FWLTHEME_STATE eState, 33 FX_BOOL bLowerTrack, 34 CFX_Matrix* pMatrix = NULL); 35 void DrawMaxMinBtn(CFX_Graphics* pGraphics, 36 const CFX_RectF* pRect, 37 FWLTHEME_DIRECTION eDict, 38 FWLTHEME_STATE eState, 39 CFX_Matrix* pMatrix = NULL); 40 void DrawPaw(CFX_Graphics* pGraphics, 41 const CFX_RectF* pRect, 42 FX_BOOL bVert, 43 FWLTHEME_STATE eState, 44 CFX_Matrix* pMatrix = NULL); 45 void SetThemeData(FX_DWORD dwID); 46 struct SBThemeData { 47 FX_ARGB clrPawColorLight[4]; 48 FX_ARGB clrPawColorDark[4]; 49 FX_ARGB clrBtnBK[4][2]; 50 FX_ARGB clrBtnBorder[4]; 51 FX_ARGB clrTrackBKStart; 52 FX_ARGB clrTrackBKEnd; 53 } * m_pThemeData; 54 }; 55 #endif 56