Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Side by Side Diff: xfa/fwl/basewidget/fwl_monthcalendarimp.h

Issue 1943413002: Convert FWL_ERR into an enum class. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@bcdattribute
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/basewidget/fwl_listboximp.cpp ('k') | xfa/fwl/basewidget/fwl_monthcalendarimp.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_FWL_BASEWIDGET_FWL_MONTHCALENDARIMP_H_ 7 #ifndef XFA_FWL_BASEWIDGET_FWL_MONTHCALENDARIMP_H_
8 #define XFA_FWL_BASEWIDGET_FWL_MONTHCALENDARIMP_H_ 8 #define XFA_FWL_BASEWIDGET_FWL_MONTHCALENDARIMP_H_
9 9
10 #include "xfa/fgas/localization/fgas_datetime.h" 10 #include "xfa/fgas/localization/fgas_datetime.h"
11 #include "xfa/fwl/core/fwl_widgetimp.h" 11 #include "xfa/fwl/core/fwl_widgetimp.h"
12 12
13 class CFWL_MonthCalendarImpDelegate; 13 class CFWL_MonthCalendarImpDelegate;
14 class CFWL_MsgMouse; 14 class CFWL_MsgMouse;
15 class CFWL_WidgetImpProperties; 15 class CFWL_WidgetImpProperties;
16 class IFWL_Widget; 16 class IFWL_Widget;
17 17
18 struct FWL_DATEINFO; 18 struct FWL_DATEINFO;
19 19
20 extern uint8_t FX_DaysInMonth(int32_t iYear, uint8_t iMonth); 20 extern uint8_t FX_DaysInMonth(int32_t iYear, uint8_t iMonth);
21 21
22 class CFWL_MonthCalendarImp : public CFWL_WidgetImp { 22 class CFWL_MonthCalendarImp : public CFWL_WidgetImp {
23 public: 23 public:
24 CFWL_MonthCalendarImp(const CFWL_WidgetImpProperties& properties, 24 CFWL_MonthCalendarImp(const CFWL_WidgetImpProperties& properties,
25 IFWL_Widget* pOuter); 25 IFWL_Widget* pOuter);
26 ~CFWL_MonthCalendarImp(); 26 ~CFWL_MonthCalendarImp();
27 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const; 27 virtual FWL_Error GetClassName(CFX_WideString& wsClass) const;
28 virtual uint32_t GetClassID() const; 28 virtual uint32_t GetClassID() const;
29 virtual FWL_ERR Initialize(); 29 virtual FWL_Error Initialize();
30 virtual FWL_ERR Finalize(); 30 virtual FWL_Error Finalize();
31 virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); 31 virtual FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE);
32 virtual FWL_ERR Update(); 32 virtual FWL_Error Update();
33 virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics, 33 virtual FWL_Error DrawWidget(CFX_Graphics* pGraphics,
34 const CFX_Matrix* pMatrix = NULL); 34 const CFX_Matrix* pMatrix = NULL);
35 virtual int32_t CountSelect(); 35 virtual int32_t CountSelect();
36 virtual FX_BOOL GetSelect(int32_t& iYear, 36 virtual FX_BOOL GetSelect(int32_t& iYear,
37 int32_t& iMonth, 37 int32_t& iMonth,
38 int32_t& iDay, 38 int32_t& iDay,
39 int32_t nIndex = 0); 39 int32_t nIndex = 0);
40 virtual FX_BOOL SetSelect(int32_t iYear, int32_t iMonth, int32_t iDay); 40 virtual FX_BOOL SetSelect(int32_t iYear, int32_t iMonth, int32_t iDay);
41 41
42 protected: 42 protected:
43 struct DATE { 43 struct DATE {
44 DATE() : iYear(0), iMonth(0), iDay(0) {} 44 DATE() : iYear(0), iMonth(0), iDay(0) {}
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 int32_t iDay; 222 int32_t iDay;
223 int32_t iDayOfWeek; 223 int32_t iDayOfWeek;
224 uint32_t dwStates; 224 uint32_t dwStates;
225 CFX_RectF rect; 225 CFX_RectF rect;
226 CFX_WideString wsDay; 226 CFX_WideString wsDay;
227 }; 227 };
228 228
229 class CFWL_MonthCalendarImpDelegate : public CFWL_WidgetImpDelegate { 229 class CFWL_MonthCalendarImpDelegate : public CFWL_WidgetImpDelegate {
230 public: 230 public:
231 CFWL_MonthCalendarImpDelegate(CFWL_MonthCalendarImp* pOwner); 231 CFWL_MonthCalendarImpDelegate(CFWL_MonthCalendarImp* pOwner);
232 int32_t OnProcessMessage(CFWL_Message* pMessage) override; 232 void OnProcessMessage(CFWL_Message* pMessage) override;
233 FWL_ERR OnDrawWidget(CFX_Graphics* pGraphics, 233 void OnDrawWidget(CFX_Graphics* pGraphics,
234 const CFX_Matrix* pMatrix = NULL) override; 234 const CFX_Matrix* pMatrix = NULL) override;
235 235
236 protected: 236 protected:
237 void OnActivate(CFWL_Message* pMsg); 237 void OnActivate(CFWL_Message* pMsg);
238 void OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE); 238 void OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE);
239 void OnLButtonDown(CFWL_MsgMouse* pMsg); 239 void OnLButtonDown(CFWL_MsgMouse* pMsg);
240 void OnLButtonUp(CFWL_MsgMouse* pMsg); 240 void OnLButtonUp(CFWL_MsgMouse* pMsg);
241 void OnMouseMove(CFWL_MsgMouse* pMsg); 241 void OnMouseMove(CFWL_MsgMouse* pMsg);
242 void OnMouseLeave(CFWL_MsgMouse* pMsg); 242 void OnMouseLeave(CFWL_MsgMouse* pMsg);
243 CFWL_MonthCalendarImp* m_pOwner; 243 CFWL_MonthCalendarImp* m_pOwner;
244 }; 244 };
245 245
246 #endif // XFA_FWL_BASEWIDGET_FWL_MONTHCALENDARIMP_H_ 246 #endif // XFA_FWL_BASEWIDGET_FWL_MONTHCALENDARIMP_H_
OLDNEW
« no previous file with comments | « xfa/fwl/basewidget/fwl_listboximp.cpp ('k') | xfa/fwl/basewidget/fwl_monthcalendarimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698