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

Side by Side Diff: xfa/fwl/core/ifwl_datetimepicker.h

Issue 2491443003: Fold IFWL_DateTimeCalendar into IFWL_MonthCalendar (Closed)
Patch Set: Created 4 years, 1 month 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
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_CORE_IFWL_DATETIMEPICKER_H_ 7 #ifndef XFA_FWL_CORE_IFWL_DATETIMEPICKER_H_
8 #define XFA_FWL_CORE_IFWL_DATETIMEPICKER_H_ 8 #define XFA_FWL_CORE_IFWL_DATETIMEPICKER_H_
9 9
10 #include "xfa/fwl/core/cfwl_event.h" 10 #include "xfa/fwl/core/cfwl_event.h"
(...skipping 12 matching lines...) Expand all
23 #define FWL_STYLEEXT_DTP_EditHFar (2L << 4) 23 #define FWL_STYLEEXT_DTP_EditHFar (2L << 4)
24 #define FWL_STYLEEXT_DTP_EditVNear (0L << 6) 24 #define FWL_STYLEEXT_DTP_EditVNear (0L << 6)
25 #define FWL_STYLEEXT_DTP_EditVCenter (1L << 6) 25 #define FWL_STYLEEXT_DTP_EditVCenter (1L << 6)
26 #define FWL_STYLEEXT_DTP_EditVFar (2L << 6) 26 #define FWL_STYLEEXT_DTP_EditVFar (2L << 6)
27 #define FWL_STYLEEXT_DTP_EditJustified (1L << 8) 27 #define FWL_STYLEEXT_DTP_EditJustified (1L << 8)
28 #define FWL_STYLEEXT_DTP_EditDistributed (2L << 8) 28 #define FWL_STYLEEXT_DTP_EditDistributed (2L << 8)
29 #define FWL_STYLEEXT_DTP_EditHAlignMask (3L << 4) 29 #define FWL_STYLEEXT_DTP_EditHAlignMask (3L << 4)
30 #define FWL_STYLEEXT_DTP_EditVAlignMask (3L << 6) 30 #define FWL_STYLEEXT_DTP_EditVAlignMask (3L << 6)
31 #define FWL_STYLEEXT_DTP_EditHAlignModeMask (3L << 8) 31 #define FWL_STYLEEXT_DTP_EditHAlignModeMask (3L << 8)
32 32
33 class IFWL_DateTimeCalendar; 33 class IFWL_Monthalendar;
34 class IFWL_DateTimeEdit; 34 class IFWL_DateTimeEdit;
35 class IFWL_FormProxy; 35 class IFWL_FormProxy;
36 36
37 FWL_EVENT_DEF(CFWL_Event_DtpDropDown, CFWL_EventType::DropDown) 37 FWL_EVENT_DEF(CFWL_Event_DtpDropDown, CFWL_EventType::DropDown)
38 38
39 FWL_EVENT_DEF(CFWL_Event_DtpCloseUp, CFWL_EventType::CloseUp) 39 FWL_EVENT_DEF(CFWL_Event_DtpCloseUp, CFWL_EventType::CloseUp)
40 40
41 FWL_EVENT_DEF(CFWL_Event_DtpEditChanged, 41 FWL_EVENT_DEF(CFWL_Event_DtpEditChanged,
42 CFWL_EventType::EditChanged, 42 CFWL_EventType::EditChanged,
43 CFX_WideString m_wsText;) 43 CFX_WideString m_wsText;)
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 void InitProxyForm(); 133 void InitProxyForm();
134 134
135 CFX_RectF m_rtBtn; 135 CFX_RectF m_rtBtn;
136 CFX_RectF m_rtClient; 136 CFX_RectF m_rtClient;
137 int32_t m_iBtnState; 137 int32_t m_iBtnState;
138 int32_t m_iYear; 138 int32_t m_iYear;
139 int32_t m_iMonth; 139 int32_t m_iMonth;
140 int32_t m_iDay; 140 int32_t m_iDay;
141 bool m_bLBtnDown; 141 bool m_bLBtnDown;
142 std::unique_ptr<IFWL_DateTimeEdit> m_pEdit; 142 std::unique_ptr<IFWL_DateTimeEdit> m_pEdit;
143 std::unique_ptr<IFWL_DateTimeCalendar> m_pMonthCal; 143 std::unique_ptr<IFWL_MonthCalendar> m_pMonthCal;
144 std::unique_ptr<IFWL_FormProxy> m_pForm; 144 std::unique_ptr<IFWL_FormProxy> m_pForm;
145 FX_FLOAT m_fBtn; 145 FX_FLOAT m_fBtn;
146 146
147 private: 147 private:
148 FWL_Error DisForm_Initialize(); 148 FWL_Error DisForm_Initialize();
149 void DisForm_InitDateTimeCalendar(); 149 void DisForm_InitMonthCalendar();
150 void DisForm_InitDateTimeEdit(); 150 void DisForm_InitDateTimeEdit();
151 bool DisForm_IsMonthCalendarShowed(); 151 bool DisForm_IsMonthCalendarShowed();
152 void DisForm_ShowMonthCalendar(bool bActivate); 152 void DisForm_ShowMonthCalendar(bool bActivate);
153 FWL_WidgetHit DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy); 153 FWL_WidgetHit DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy);
154 bool DisForm_IsNeedShowButton(); 154 bool DisForm_IsNeedShowButton();
155 void DisForm_Update(); 155 void DisForm_Update();
156 void DisForm_GetWidgetRect(CFX_RectF& rect, bool bAutoSize = false); 156 void DisForm_GetWidgetRect(CFX_RectF& rect, bool bAutoSize = false);
157 FWL_Error DisForm_GetBBox(CFX_RectF& rect); 157 FWL_Error DisForm_GetBBox(CFX_RectF& rect);
158 void DisForm_DrawWidget(CFX_Graphics* pGraphics, 158 void DisForm_DrawWidget(CFX_Graphics* pGraphics,
159 const CFX_Matrix* pMatrix = nullptr); 159 const CFX_Matrix* pMatrix = nullptr);
160 160
161 void OnFocusChanged(CFWL_Message* pMsg, bool bSet); 161 void OnFocusChanged(CFWL_Message* pMsg, bool bSet);
162 void OnLButtonDown(CFWL_MsgMouse* pMsg); 162 void OnLButtonDown(CFWL_MsgMouse* pMsg);
163 void OnLButtonUp(CFWL_MsgMouse* pMsg); 163 void OnLButtonUp(CFWL_MsgMouse* pMsg);
164 void OnMouseMove(CFWL_MsgMouse* pMsg); 164 void OnMouseMove(CFWL_MsgMouse* pMsg);
165 void OnMouseLeave(CFWL_MsgMouse* pMsg); 165 void OnMouseLeave(CFWL_MsgMouse* pMsg);
166 void DisForm_OnFocusChanged(CFWL_Message* pMsg, bool bSet); 166 void DisForm_OnFocusChanged(CFWL_Message* pMsg, bool bSet);
167 167
168 int32_t m_iCurYear; 168 int32_t m_iCurYear;
169 int32_t m_iCurMonth; 169 int32_t m_iCurMonth;
170 int32_t m_iCurDay; 170 int32_t m_iCurDay;
171 }; 171 };
172 172
173 #endif // XFA_FWL_CORE_IFWL_DATETIMEPICKER_H_ 173 #endif // XFA_FWL_CORE_IFWL_DATETIMEPICKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698