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_FXFA_APP_XFA_FFTEXTEDIT_H_ | 7 #ifndef XFA_FXFA_APP_XFA_FFTEXTEDIT_H_ |
8 #define XFA_FXFA_APP_XFA_FFTEXTEDIT_H_ | 8 #define XFA_FXFA_APP_XFA_FFTEXTEDIT_H_ |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 11 matching lines...) Expand all Loading... |
22 bool OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override; | 22 bool OnLButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override; |
23 bool OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override; | 23 bool OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override; |
24 bool OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override; | 24 bool OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) override; |
25 bool OnSetFocus(CXFA_FFWidget* pOldWidget) override; | 25 bool OnSetFocus(CXFA_FFWidget* pOldWidget) override; |
26 bool OnKillFocus(CXFA_FFWidget* pNewWidget) override; | 26 bool OnKillFocus(CXFA_FFWidget* pNewWidget) override; |
27 void OnProcessMessage(CFWL_Message* pMessage) override; | 27 void OnProcessMessage(CFWL_Message* pMessage) override; |
28 void OnProcessEvent(CFWL_Event* pEvent) override; | 28 void OnProcessEvent(CFWL_Event* pEvent) override; |
29 void OnDrawWidget(CFX_Graphics* pGraphics, | 29 void OnDrawWidget(CFX_Graphics* pGraphics, |
30 const CFX_Matrix* pMatrix = nullptr) override; | 30 const CFX_Matrix* pMatrix = nullptr) override; |
31 | 31 |
32 void OnTextChanged(IFWL_Widget* pWidget, | 32 void OnTextChanged(CFWL_Widget* pWidget, |
33 const CFX_WideString& wsChanged, | 33 const CFX_WideString& wsChanged, |
34 const CFX_WideString& wsPrevText); | 34 const CFX_WideString& wsPrevText); |
35 void OnTextFull(IFWL_Widget* pWidget); | 35 void OnTextFull(CFWL_Widget* pWidget); |
36 bool CheckWord(const CFX_ByteStringC& sWord); | 36 bool CheckWord(const CFX_ByteStringC& sWord); |
37 | 37 |
38 protected: | 38 protected: |
39 bool CommitData() override; | 39 bool CommitData() override; |
40 bool UpdateFWLData() override; | 40 bool UpdateFWLData() override; |
41 bool IsDataChanged() override; | 41 bool IsDataChanged() override; |
42 | 42 |
43 uint32_t GetAlignment(); | 43 uint32_t GetAlignment(); |
44 void ValidateNumberField(const CFX_WideString& wsText); | 44 void ValidateNumberField(const CFX_WideString& wsText); |
45 | 45 |
46 IFWL_WidgetDelegate* m_pOldDelegate; | 46 IFWL_WidgetDelegate* m_pOldDelegate; |
47 }; | 47 }; |
48 | 48 |
49 class CXFA_FFNumericEdit : public CXFA_FFTextEdit { | 49 class CXFA_FFNumericEdit : public CXFA_FFTextEdit { |
50 public: | 50 public: |
51 CXFA_FFNumericEdit(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc); | 51 CXFA_FFNumericEdit(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc); |
52 ~CXFA_FFNumericEdit() override; | 52 ~CXFA_FFNumericEdit() override; |
53 | 53 |
54 // CXFA_FFTextEdit | 54 // CXFA_FFTextEdit |
55 bool LoadWidget() override; | 55 bool LoadWidget() override; |
56 void UpdateWidgetProperty() override; | 56 void UpdateWidgetProperty() override; |
57 void OnProcessEvent(CFWL_Event* pEvent) override; | 57 void OnProcessEvent(CFWL_Event* pEvent) override; |
58 | 58 |
59 public: | 59 public: |
60 bool OnValidate(IFWL_Widget* pWidget, CFX_WideString& wsText); | 60 bool OnValidate(CFWL_Widget* pWidget, CFX_WideString& wsText); |
61 }; | 61 }; |
62 | 62 |
63 class CXFA_FFPasswordEdit : public CXFA_FFTextEdit { | 63 class CXFA_FFPasswordEdit : public CXFA_FFTextEdit { |
64 public: | 64 public: |
65 CXFA_FFPasswordEdit(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc); | 65 CXFA_FFPasswordEdit(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc); |
66 ~CXFA_FFPasswordEdit() override; | 66 ~CXFA_FFPasswordEdit() override; |
67 | 67 |
68 // CXFA_FFTextEdit | 68 // CXFA_FFTextEdit |
69 bool LoadWidget() override; | 69 bool LoadWidget() override; |
70 void UpdateWidgetProperty() override; | 70 void UpdateWidgetProperty() override; |
(...skipping 13 matching lines...) Expand all Loading... |
84 ~CXFA_FFDateTimeEdit() override; | 84 ~CXFA_FFDateTimeEdit() override; |
85 | 85 |
86 // CXFA_FFTextEdit | 86 // CXFA_FFTextEdit |
87 bool GetBBox(CFX_RectF& rtBox, | 87 bool GetBBox(CFX_RectF& rtBox, |
88 uint32_t dwStatus, | 88 uint32_t dwStatus, |
89 bool bDrawFocus = false) override; | 89 bool bDrawFocus = false) override; |
90 bool LoadWidget() override; | 90 bool LoadWidget() override; |
91 void UpdateWidgetProperty() override; | 91 void UpdateWidgetProperty() override; |
92 void OnProcessEvent(CFWL_Event* pEvent) override; | 92 void OnProcessEvent(CFWL_Event* pEvent) override; |
93 | 93 |
94 void OnSelectChanged(IFWL_Widget* pWidget, | 94 void OnSelectChanged(CFWL_Widget* pWidget, |
95 int32_t iYear, | 95 int32_t iYear, |
96 int32_t iMonth, | 96 int32_t iMonth, |
97 int32_t iDay); | 97 int32_t iDay); |
98 | 98 |
99 protected: | 99 protected: |
100 bool PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) override; | 100 bool PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) override; |
101 bool CommitData() override; | 101 bool CommitData() override; |
102 bool UpdateFWLData() override; | 102 bool UpdateFWLData() override; |
103 bool IsDataChanged() override; | 103 bool IsDataChanged() override; |
104 | 104 |
105 uint32_t GetAlignment(); | 105 uint32_t GetAlignment(); |
106 }; | 106 }; |
107 | 107 |
108 #endif // XFA_FXFA_APP_XFA_FFTEXTEDIT_H_ | 108 #endif // XFA_FXFA_APP_XFA_FFTEXTEDIT_H_ |
OLD | NEW |