Home | History | Annotate | Download | only in theme
      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_MONTHCALENDARTP_H_
      8 #define XFA_FWL_THEME_CFWL_MONTHCALENDARTP_H_
      9 
     10 #include <memory>
     11 
     12 #include "xfa/fwl/theme/cfwl_widgettp.h"
     13 
     14 class CFWL_MonthCalendarTP : public CFWL_WidgetTP {
     15  public:
     16   CFWL_MonthCalendarTP();
     17   ~CFWL_MonthCalendarTP() override;
     18 
     19   // CFWL_WidgetTP
     20   void Initialize() override;
     21   void Finalize() override;
     22   void DrawBackground(CFWL_ThemeBackground* pParams) override;
     23   void DrawText(CFWL_ThemeText* pParams) override;
     24 
     25  protected:
     26   struct MCThemeData {
     27     FX_ARGB clrCaption;
     28     FX_ARGB clrSeperator;
     29     FX_ARGB clrDatesHoverBK;
     30     FX_ARGB clrDatesSelectedBK;
     31     FX_ARGB clrDatesCircle;
     32     FX_ARGB clrToday;
     33     FX_ARGB clrBK;
     34   };
     35 
     36   void DrawTotalBK(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix);
     37   void DrawHeadBk(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix);
     38   void DrawLButton(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix);
     39   void DrawRButton(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix);
     40   void DrawDatesInBK(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix);
     41   void DrawDatesInCircle(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix);
     42   void DrawTodayCircle(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix);
     43   void DrawHSeperator(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix);
     44   void DrawWeekNumSep(CFWL_ThemeBackground* pParams, CFX_Matrix* pMatrix);
     45   FWLTHEME_STATE GetState(uint32_t dwFWLStates);
     46 
     47   std::unique_ptr<MCThemeData> m_pThemeData;
     48   CFX_WideString wsResource;
     49 
     50  private:
     51   void SetThemeData();
     52 };
     53 
     54 #endif  // XFA_FWL_THEME_CFWL_MONTHCALENDARTP_H_
     55