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/include/xfa_ffpageview.h" | 11 #include "xfa/fxfa/include/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; | 21 void OnProcessMessage(CFWL_Message* pMessage) override; |
22 void OnProcessEvent(CFWL_Event* pEvent) override; | 22 void OnProcessEvent(CFWL_Event* pEvent) override; |
23 void OnDrawWidget(CFX_Graphics* pGraphics, | 23 void OnDrawWidget(CFX_Graphics* pGraphics, |
24 const CFX_Matrix* pMatrix = NULL) override; | 24 const CFX_Matrix* pMatrix = nullptr) override; |
25 | 25 |
26 void OnSelectChanged(IFWL_Widget* pWidget, const CFX_Int32Array& arrSels); | 26 void OnSelectChanged(IFWL_Widget* pWidget, const CFX_Int32Array& arrSels); |
27 void SetItemState(int32_t nIndex, FX_BOOL bSelected); | 27 void SetItemState(int32_t nIndex, FX_BOOL bSelected); |
28 void InsertItem(const CFX_WideStringC& wsLabel, int32_t nIndex = -1); | 28 void InsertItem(const CFX_WideStringC& wsLabel, int32_t nIndex = -1); |
29 void DeleteItem(int32_t nIndex); | 29 void DeleteItem(int32_t nIndex); |
30 | 30 |
31 protected: | 31 protected: |
32 FX_BOOL CommitData() override; | 32 FX_BOOL CommitData() override; |
33 FX_BOOL UpdateFWLData() override; | 33 FX_BOOL UpdateFWLData() override; |
34 FX_BOOL IsDataChanged() override; | 34 FX_BOOL IsDataChanged() override; |
(...skipping 29 matching lines...) Expand all Loading... |
64 FX_BOOL Cut(CFX_WideString& wsCut) override; | 64 FX_BOOL Cut(CFX_WideString& wsCut) override; |
65 FX_BOOL Paste(const CFX_WideString& wsPaste) override; | 65 FX_BOOL Paste(const CFX_WideString& wsPaste) override; |
66 FX_BOOL SelectAll() override; | 66 FX_BOOL SelectAll() override; |
67 FX_BOOL Delete() override; | 67 FX_BOOL Delete() override; |
68 FX_BOOL DeSelect() override; | 68 FX_BOOL DeSelect() override; |
69 | 69 |
70 // IFWL_WidgetDelegate | 70 // IFWL_WidgetDelegate |
71 void OnProcessMessage(CFWL_Message* pMessage) override; | 71 void OnProcessMessage(CFWL_Message* pMessage) override; |
72 void OnProcessEvent(CFWL_Event* pEvent) override; | 72 void OnProcessEvent(CFWL_Event* pEvent) override; |
73 void OnDrawWidget(CFX_Graphics* pGraphics, | 73 void OnDrawWidget(CFX_Graphics* pGraphics, |
74 const CFX_Matrix* pMatrix = NULL) override; | 74 const CFX_Matrix* pMatrix = nullptr) override; |
75 | 75 |
76 virtual void OpenDropDownList(); | 76 virtual void OpenDropDownList(); |
77 | 77 |
78 void OnTextChanged(IFWL_Widget* pWidget, const CFX_WideString& wsChanged); | 78 void OnTextChanged(IFWL_Widget* pWidget, const CFX_WideString& wsChanged); |
79 void OnSelectChanged(IFWL_Widget* pWidget, | 79 void OnSelectChanged(IFWL_Widget* pWidget, |
80 const CFX_Int32Array& arrSels, | 80 const CFX_Int32Array& arrSels, |
81 FX_BOOL bLButtonUp); | 81 FX_BOOL bLButtonUp); |
82 void OnPreOpen(IFWL_Widget* pWidget); | 82 void OnPreOpen(IFWL_Widget* pWidget); |
83 void OnPostOpen(IFWL_Widget* pWidget); | 83 void OnPostOpen(IFWL_Widget* pWidget); |
84 void SetItemState(int32_t nIndex, FX_BOOL bSelected); | 84 void SetItemState(int32_t nIndex, FX_BOOL bSelected); |
85 void InsertItem(const CFX_WideStringC& wsLabel, int32_t nIndex = -1); | 85 void InsertItem(const CFX_WideStringC& wsLabel, int32_t nIndex = -1); |
86 void DeleteItem(int32_t nIndex); | 86 void DeleteItem(int32_t nIndex); |
87 | 87 |
88 protected: | 88 protected: |
89 // CXFA_FFField | 89 // CXFA_FFField |
90 FX_BOOL PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) override; | 90 FX_BOOL PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) override; |
91 FX_BOOL CommitData() override; | 91 FX_BOOL CommitData() override; |
92 FX_BOOL UpdateFWLData() override; | 92 FX_BOOL UpdateFWLData() override; |
93 FX_BOOL IsDataChanged() override; | 93 FX_BOOL IsDataChanged() override; |
94 | 94 |
95 uint32_t GetAlignment(); | 95 uint32_t GetAlignment(); |
96 void FWLEventSelChange(CXFA_EventParam* pParam); | 96 void FWLEventSelChange(CXFA_EventParam* pParam); |
97 | 97 |
98 CFX_WideString m_wsNewValue; | 98 CFX_WideString m_wsNewValue; |
99 IFWL_WidgetDelegate* m_pOldDelegate; | 99 IFWL_WidgetDelegate* m_pOldDelegate; |
100 }; | 100 }; |
101 | 101 |
102 #endif // XFA_FXFA_APP_XFA_FFCHOICELIST_H_ | 102 #endif // XFA_FXFA_APP_XFA_FFCHOICELIST_H_ |
OLD | NEW |