OLD | NEW |
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_DATETIMEPICKERIMP_H_ | 7 #ifndef XFA_FWL_BASEWIDGET_FWL_DATETIMEPICKERIMP_H_ |
8 #define XFA_FWL_BASEWIDGET_FWL_DATETIMEPICKERIMP_H_ | 8 #define XFA_FWL_BASEWIDGET_FWL_DATETIMEPICKERIMP_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 protected: | 101 protected: |
102 CFWL_DateTimeCalendar* m_pOwner; | 102 CFWL_DateTimeCalendar* m_pOwner; |
103 FX_BOOL m_bFlag; | 103 FX_BOOL m_bFlag; |
104 }; | 104 }; |
105 class CFWL_DateTimePickerImp : public CFWL_WidgetImp { | 105 class CFWL_DateTimePickerImp : public CFWL_WidgetImp { |
106 public: | 106 public: |
107 CFWL_DateTimePickerImp(const CFWL_WidgetImpProperties& properties, | 107 CFWL_DateTimePickerImp(const CFWL_WidgetImpProperties& properties, |
108 IFWL_Widget* pOuter); | 108 IFWL_Widget* pOuter); |
109 virtual ~CFWL_DateTimePickerImp(); | 109 virtual ~CFWL_DateTimePickerImp(); |
110 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const; | 110 virtual FWL_ERR GetClassName(CFX_WideString& wsClass) const; |
111 virtual FX_DWORD GetClassID() const; | 111 virtual uint32_t GetClassID() const; |
112 virtual FWL_ERR Initialize(); | 112 virtual FWL_ERR Initialize(); |
113 virtual FWL_ERR Finalize(); | 113 virtual FWL_ERR Finalize(); |
114 virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); | 114 virtual FWL_ERR GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); |
115 virtual FWL_ERR Update(); | 115 virtual FWL_ERR Update(); |
116 virtual FX_DWORD HitTest(FX_FLOAT fx, FX_FLOAT fy); | 116 virtual uint32_t HitTest(FX_FLOAT fx, FX_FLOAT fy); |
117 virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics, | 117 virtual FWL_ERR DrawWidget(CFX_Graphics* pGraphics, |
118 const CFX_Matrix* pMatrix = NULL); | 118 const CFX_Matrix* pMatrix = NULL); |
119 virtual FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pTP); | 119 virtual FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pTP); |
120 virtual FWL_ERR GetCurSel(int32_t& iYear, int32_t& iMonth, int32_t& iDay); | 120 virtual FWL_ERR GetCurSel(int32_t& iYear, int32_t& iMonth, int32_t& iDay); |
121 virtual FWL_ERR SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay); | 121 virtual FWL_ERR SetCurSel(int32_t iYear, int32_t iMonth, int32_t iDay); |
122 virtual FWL_ERR SetEditText(const CFX_WideString& wsText); | 122 virtual FWL_ERR SetEditText(const CFX_WideString& wsText); |
123 virtual FWL_ERR GetEditText(CFX_WideString& wsText, | 123 virtual FWL_ERR GetEditText(CFX_WideString& wsText, |
124 int32_t nStart = 0, | 124 int32_t nStart = 0, |
125 int32_t nCount = -1) const; | 125 int32_t nCount = -1) const; |
126 | 126 |
127 public: | 127 public: |
128 virtual FX_BOOL CanUndo(); | 128 virtual FX_BOOL CanUndo(); |
129 virtual FX_BOOL CanRedo(); | 129 virtual FX_BOOL CanRedo(); |
130 virtual FX_BOOL Undo(); | 130 virtual FX_BOOL Undo(); |
131 virtual FX_BOOL Redo(); | 131 virtual FX_BOOL Redo(); |
132 virtual FX_BOOL CanCopy(); | 132 virtual FX_BOOL CanCopy(); |
133 virtual FX_BOOL CanCut(); | 133 virtual FX_BOOL CanCut(); |
134 virtual FX_BOOL CanSelectAll(); | 134 virtual FX_BOOL CanSelectAll(); |
135 virtual FX_BOOL Copy(CFX_WideString& wsCopy); | 135 virtual FX_BOOL Copy(CFX_WideString& wsCopy); |
136 virtual FX_BOOL Cut(CFX_WideString& wsCut); | 136 virtual FX_BOOL Cut(CFX_WideString& wsCut); |
137 virtual FX_BOOL Paste(const CFX_WideString& wsPaste); | 137 virtual FX_BOOL Paste(const CFX_WideString& wsPaste); |
138 virtual FX_BOOL SelectAll(); | 138 virtual FX_BOOL SelectAll(); |
139 virtual FX_BOOL Delete(); | 139 virtual FX_BOOL Delete(); |
140 virtual FX_BOOL DeSelect(); | 140 virtual FX_BOOL DeSelect(); |
141 virtual FWL_ERR GetBBox(CFX_RectF& rect); | 141 virtual FWL_ERR GetBBox(CFX_RectF& rect); |
142 virtual FWL_ERR SetEditLimit(int32_t nLimit); | 142 virtual FWL_ERR SetEditLimit(int32_t nLimit); |
143 virtual FWL_ERR ModifyEditStylesEx(FX_DWORD dwStylesExAdded, | 143 virtual FWL_ERR ModifyEditStylesEx(uint32_t dwStylesExAdded, |
144 FX_DWORD dwStylesExRemoved); | 144 uint32_t dwStylesExRemoved); |
145 | 145 |
146 public: | 146 public: |
147 IFWL_DateTimeEdit* GetDataTimeEdit(); | 147 IFWL_DateTimeEdit* GetDataTimeEdit(); |
148 | 148 |
149 protected: | 149 protected: |
150 void DrawDropDownButton(CFX_Graphics* pGraphics, | 150 void DrawDropDownButton(CFX_Graphics* pGraphics, |
151 IFWL_ThemeProvider* pTheme, | 151 IFWL_ThemeProvider* pTheme, |
152 const CFX_Matrix* pMatrix); | 152 const CFX_Matrix* pMatrix); |
153 void FormatDateString(int32_t iYear, | 153 void FormatDateString(int32_t iYear, |
154 int32_t iMonth, | 154 int32_t iMonth, |
155 int32_t iDay, | 155 int32_t iDay, |
156 CFX_WideString& wsText); | 156 CFX_WideString& wsText); |
157 void ShowMonthCalendar(FX_BOOL bActivate); | 157 void ShowMonthCalendar(FX_BOOL bActivate); |
158 FX_BOOL IsMonthCalendarShowed(); | 158 FX_BOOL IsMonthCalendarShowed(); |
159 void ReSetEditAlignment(); | 159 void ReSetEditAlignment(); |
160 void InitProxyForm(); | 160 void InitProxyForm(); |
161 void ProcessSelChanged(int32_t iYear, int32_t iMonth, int32_t iDay); | 161 void ProcessSelChanged(int32_t iYear, int32_t iMonth, int32_t iDay); |
162 | 162 |
163 private: | 163 private: |
164 FWL_ERR DisForm_Initialize(); | 164 FWL_ERR DisForm_Initialize(); |
165 void DisForm_InitDateTimeCalendar(); | 165 void DisForm_InitDateTimeCalendar(); |
166 void DisForm_InitDateTimeEdit(); | 166 void DisForm_InitDateTimeEdit(); |
167 FX_BOOL DisForm_IsMonthCalendarShowed(); | 167 FX_BOOL DisForm_IsMonthCalendarShowed(); |
168 void DisForm_ShowMonthCalendar(FX_BOOL bActivate); | 168 void DisForm_ShowMonthCalendar(FX_BOOL bActivate); |
169 FX_DWORD DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy); | 169 uint32_t DisForm_HitTest(FX_FLOAT fx, FX_FLOAT fy); |
170 FX_BOOL DisForm_IsNeedShowButton(); | 170 FX_BOOL DisForm_IsNeedShowButton(); |
171 FWL_ERR DisForm_Update(); | 171 FWL_ERR DisForm_Update(); |
172 FWL_ERR DisForm_GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); | 172 FWL_ERR DisForm_GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); |
173 FWL_ERR DisForm_GetBBox(CFX_RectF& rect); | 173 FWL_ERR DisForm_GetBBox(CFX_RectF& rect); |
174 FWL_ERR DisForm_DrawWidget(CFX_Graphics* pGraphics, | 174 FWL_ERR DisForm_DrawWidget(CFX_Graphics* pGraphics, |
175 const CFX_Matrix* pMatrix = NULL); | 175 const CFX_Matrix* pMatrix = NULL); |
176 | 176 |
177 protected: | 177 protected: |
178 CFX_RectF m_rtBtn; | 178 CFX_RectF m_rtBtn; |
179 CFX_RectF m_rtClient; | 179 CFX_RectF m_rtClient; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 void OnMouseMove(CFWL_MsgMouse* pMsg); | 225 void OnMouseMove(CFWL_MsgMouse* pMsg); |
226 void OnMouseLeave(CFWL_MsgMouse* pMsg); | 226 void OnMouseLeave(CFWL_MsgMouse* pMsg); |
227 | 227 |
228 CFWL_DateTimePickerImp* m_pOwner; | 228 CFWL_DateTimePickerImp* m_pOwner; |
229 | 229 |
230 private: | 230 private: |
231 void DisForm_OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE); | 231 void DisForm_OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet = TRUE); |
232 }; | 232 }; |
233 | 233 |
234 #endif // XFA_FWL_BASEWIDGET_FWL_DATETIMEPICKERIMP_H_ | 234 #endif // XFA_FWL_BASEWIDGET_FWL_DATETIMEPICKERIMP_H_ |
OLD | NEW |