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_FFCHOICELIST_H_ | 7 #ifndef XFA_FXFA_APP_XFA_FFCHOICELIST_H_ |
8 #define XFA_FXFA_APP_XFA_FFCHOICELIST_H_ | 8 #define XFA_FXFA_APP_XFA_FFCHOICELIST_H_ |
9 | 9 |
10 #include "xfa/fxfa/app/xfa_fffield.h" | 10 #include "xfa/fxfa/app/xfa_fffield.h" |
11 #include "xfa/fxfa/xfa_ffpageview.h" | 11 #include "xfa/fxfa/xfa_ffpageview.h" |
12 | 12 |
13 class CXFA_FFListBox : public CXFA_FFField { | 13 class CXFA_FFListBox : public CXFA_FFField { |
14 public: | 14 public: |
15 CXFA_FFListBox(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc); | 15 CXFA_FFListBox(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc); |
16 ~CXFA_FFListBox() override; | 16 ~CXFA_FFListBox() override; |
17 | 17 |
18 // CXFA_FFField | 18 // CXFA_FFField |
19 FX_BOOL LoadWidget() override; | 19 FX_BOOL LoadWidget() override; |
20 FX_BOOL OnKillFocus(CXFA_FFWidget* pNewWidget) override; | 20 FX_BOOL OnKillFocus(CXFA_FFWidget* pNewWidget) override; |
21 void OnProcessMessage(CFWL_Message* pMessage) override; | |
22 void OnProcessEvent(CFWL_Event* pEvent) override; | |
23 void OnDrawWidget(CFX_Graphics* pGraphics, | |
24 const CFX_Matrix* pMatrix = nullptr) override; | |
25 | 21 |
26 void OnSelectChanged(IFWL_Widget* pWidget, const CFX_Int32Array& arrSels); | 22 void OnSelectChanged(IFWL_Widget* pWidget, const CFX_Int32Array& arrSels); |
27 void SetItemState(int32_t nIndex, FX_BOOL bSelected); | 23 void SetItemState(int32_t nIndex, FX_BOOL bSelected); |
28 void InsertItem(const CFX_WideStringC& wsLabel, int32_t nIndex = -1); | 24 void InsertItem(const CFX_WideStringC& wsLabel, int32_t nIndex = -1); |
29 void DeleteItem(int32_t nIndex); | 25 void DeleteItem(int32_t nIndex); |
30 | 26 |
31 protected: | 27 protected: |
32 FX_BOOL CommitData() override; | 28 FX_BOOL CommitData() override; |
33 FX_BOOL UpdateFWLData() override; | 29 FX_BOOL UpdateFWLData() override; |
34 FX_BOOL IsDataChanged() override; | 30 FX_BOOL IsDataChanged() override; |
35 | 31 |
36 uint32_t GetAlignment(); | 32 uint32_t GetAlignment(); |
37 | |
38 IFWL_WidgetDelegate* m_pOldDelegate; | |
39 }; | 33 }; |
40 | 34 |
41 class CXFA_FFComboBox : public CXFA_FFField { | 35 class CXFA_FFComboBox : public CXFA_FFField { |
42 public: | 36 public: |
43 CXFA_FFComboBox(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc); | 37 CXFA_FFComboBox(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc); |
44 ~CXFA_FFComboBox() override; | 38 ~CXFA_FFComboBox() override; |
45 | 39 |
46 // CXFA_FFField | 40 // CXFA_FFField |
47 FX_BOOL GetBBox(CFX_RectF& rtBox, | 41 FX_BOOL GetBBox(CFX_RectF& rtBox, |
48 uint32_t dwStatus, | 42 uint32_t dwStatus, |
(...skipping 11 matching lines...) Expand all Loading... |
60 FX_BOOL CanCut() override; | 54 FX_BOOL CanCut() override; |
61 FX_BOOL CanPaste() override; | 55 FX_BOOL CanPaste() override; |
62 FX_BOOL CanSelectAll() override; | 56 FX_BOOL CanSelectAll() override; |
63 FX_BOOL Copy(CFX_WideString& wsCopy) override; | 57 FX_BOOL Copy(CFX_WideString& wsCopy) override; |
64 FX_BOOL Cut(CFX_WideString& wsCut) override; | 58 FX_BOOL Cut(CFX_WideString& wsCut) override; |
65 FX_BOOL Paste(const CFX_WideString& wsPaste) override; | 59 FX_BOOL Paste(const CFX_WideString& wsPaste) override; |
66 FX_BOOL SelectAll() override; | 60 FX_BOOL SelectAll() override; |
67 FX_BOOL Delete() override; | 61 FX_BOOL Delete() override; |
68 FX_BOOL DeSelect() override; | 62 FX_BOOL DeSelect() override; |
69 | 63 |
70 // IFWL_WidgetDelegate | |
71 void OnProcessMessage(CFWL_Message* pMessage) override; | |
72 void OnProcessEvent(CFWL_Event* pEvent) override; | |
73 void OnDrawWidget(CFX_Graphics* pGraphics, | |
74 const CFX_Matrix* pMatrix = nullptr) override; | |
75 | |
76 virtual void OpenDropDownList(); | 64 virtual void OpenDropDownList(); |
77 | 65 |
78 void OnTextChanged(IFWL_Widget* pWidget, const CFX_WideString& wsChanged); | 66 void OnTextChanged(IFWL_Widget* pWidget, const CFX_WideString& wsChanged); |
79 void OnSelectChanged(IFWL_Widget* pWidget, | 67 void OnSelectChanged(IFWL_Widget* pWidget, |
80 const CFX_Int32Array& arrSels, | 68 const CFX_Int32Array& arrSels, |
81 FX_BOOL bLButtonUp); | 69 FX_BOOL bLButtonUp); |
82 void OnPreOpen(IFWL_Widget* pWidget); | 70 void OnPreOpen(IFWL_Widget* pWidget); |
83 void OnPostOpen(IFWL_Widget* pWidget); | 71 void OnPostOpen(IFWL_Widget* pWidget); |
84 void SetItemState(int32_t nIndex, FX_BOOL bSelected); | 72 void SetItemState(int32_t nIndex, FX_BOOL bSelected); |
85 void InsertItem(const CFX_WideStringC& wsLabel, int32_t nIndex = -1); | 73 void InsertItem(const CFX_WideStringC& wsLabel, int32_t nIndex = -1); |
86 void DeleteItem(int32_t nIndex); | 74 void DeleteItem(int32_t nIndex); |
87 | 75 |
88 protected: | 76 protected: |
89 // CXFA_FFField | 77 // CXFA_FFField |
90 FX_BOOL PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) override; | 78 FX_BOOL PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) override; |
91 FX_BOOL CommitData() override; | 79 FX_BOOL CommitData() override; |
92 FX_BOOL UpdateFWLData() override; | 80 FX_BOOL UpdateFWLData() override; |
93 FX_BOOL IsDataChanged() override; | 81 FX_BOOL IsDataChanged() override; |
94 | 82 |
95 uint32_t GetAlignment(); | 83 uint32_t GetAlignment(); |
96 void FWLEventSelChange(CXFA_EventParam* pParam); | 84 void FWLEventSelChange(CXFA_EventParam* pParam); |
97 | 85 |
98 CFX_WideString m_wsNewValue; | 86 CFX_WideString m_wsNewValue; |
99 IFWL_WidgetDelegate* m_pOldDelegate; | |
100 }; | 87 }; |
101 | 88 |
102 #endif // XFA_FXFA_APP_XFA_FFCHOICELIST_H_ | 89 #endif // XFA_FXFA_APP_XFA_FFCHOICELIST_H_ |
OLD | NEW |