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 bool LoadWidget() override; | 19 bool LoadWidget() override; |
20 bool OnKillFocus(CXFA_FFWidget* pNewWidget) override; | 20 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 = nullptr) override; | 24 const CFX_Matrix* pMatrix = nullptr) override; |
25 | 25 |
26 void OnSelectChanged(IFWL_Widget* pWidget, const CFX_Int32Array& arrSels); | 26 void OnSelectChanged(CFWL_Widget* pWidget, const CFX_Int32Array& arrSels); |
27 void SetItemState(int32_t nIndex, bool bSelected); | 27 void SetItemState(int32_t nIndex, 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 bool CommitData() override; | 32 bool CommitData() override; |
33 bool UpdateFWLData() override; | 33 bool UpdateFWLData() override; |
34 bool IsDataChanged() override; | 34 bool IsDataChanged() override; |
35 | 35 |
36 uint32_t GetAlignment(); | 36 uint32_t GetAlignment(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 void DeSelect() override; | 68 void 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 = nullptr) 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(CFWL_Widget* pWidget, const CFX_WideString& wsChanged); |
79 void OnSelectChanged(IFWL_Widget* pWidget, | 79 void OnSelectChanged(CFWL_Widget* pWidget, bool bLButtonUp); |
80 bool bLButtonUp); | 80 void OnPreOpen(CFWL_Widget* pWidget); |
81 void OnPreOpen(IFWL_Widget* pWidget); | 81 void OnPostOpen(CFWL_Widget* pWidget); |
82 void OnPostOpen(IFWL_Widget* pWidget); | |
83 void SetItemState(int32_t nIndex, bool bSelected); | 82 void SetItemState(int32_t nIndex, bool bSelected); |
84 void InsertItem(const CFX_WideStringC& wsLabel, int32_t nIndex = -1); | 83 void InsertItem(const CFX_WideStringC& wsLabel, int32_t nIndex = -1); |
85 void DeleteItem(int32_t nIndex); | 84 void DeleteItem(int32_t nIndex); |
86 | 85 |
87 protected: | 86 protected: |
88 // CXFA_FFField | 87 // CXFA_FFField |
89 bool PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) override; | 88 bool PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) override; |
90 bool CommitData() override; | 89 bool CommitData() override; |
91 bool UpdateFWLData() override; | 90 bool UpdateFWLData() override; |
92 bool IsDataChanged() override; | 91 bool IsDataChanged() override; |
93 | 92 |
94 uint32_t GetAlignment(); | 93 uint32_t GetAlignment(); |
95 void FWLEventSelChange(CXFA_EventParam* pParam); | 94 void FWLEventSelChange(CXFA_EventParam* pParam); |
96 | 95 |
97 CFX_WideString m_wsNewValue; | 96 CFX_WideString m_wsNewValue; |
98 IFWL_WidgetDelegate* m_pOldDelegate; | 97 IFWL_WidgetDelegate* m_pOldDelegate; |
99 }; | 98 }; |
100 | 99 |
101 #endif // XFA_FXFA_APP_XFA_FFCHOICELIST_H_ | 100 #endif // XFA_FXFA_APP_XFA_FFCHOICELIST_H_ |
OLD | NEW |