• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 XFA_FWL_THEME_CFWL_PUSHBUTTONTP_H_
8 #define XFA_FWL_THEME_CFWL_PUSHBUTTONTP_H_
9 
10 #include <memory>
11 
12 #include "xfa/fwl/theme/cfwl_widgettp.h"
13 
14 class CFWL_PushButtonTP : public CFWL_WidgetTP {
15  public:
16   CFWL_PushButtonTP();
17   ~CFWL_PushButtonTP() override;
18 
19   // CFWL_WidgetTP
20   void DrawBackground(CFWL_ThemeBackground* pParams) override;
21 
22  protected:
23   struct PBThemeData {
24     FX_ARGB clrBorder[5];
25     FX_ARGB clrStart[5];
26     FX_ARGB clrEnd[5];
27     FX_ARGB clrFill[5];
28   };
29 
30   void SetTopLineColor(uint32_t* pData);
31   void SetLeftLineColor(uint32_t* pData);
32   void SetRightLineColor(uint32_t* pData);
33   void SetBottomLineColor(uint32_t* pData);
34   void SetBackgroudColor(uint32_t* pData);
35   void SetCaptionColor(uint32_t* pData);
36   void SetCornerColor(uint32_t* pData);
37 
38   int32_t GetColorID(uint32_t dwStates) const;
39 
40   std::unique_ptr<PBThemeData> m_pThemeData;
41 
42  private:
43   void SetThemeData();
44 };
45 
46 #endif  // XFA_FWL_THEME_CFWL_PUSHBUTTONTP_H_
47