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/app/xfa_ffpageview.h" | 11 #include "xfa/fxfa/app/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 virtual ~CXFA_FFListBox(); | 16 virtual ~CXFA_FFListBox(); |
17 virtual FX_BOOL LoadWidget(); | 17 virtual FX_BOOL LoadWidget(); |
18 virtual FX_BOOL OnKillFocus(CXFA_FFWidget* pNewWidget); | 18 virtual FX_BOOL OnKillFocus(CXFA_FFWidget* pNewWidget); |
19 | 19 |
20 protected: | 20 protected: |
21 virtual FX_BOOL CommitData(); | 21 virtual FX_BOOL CommitData(); |
22 virtual FX_BOOL UpdateFWLData(); | 22 virtual FX_BOOL UpdateFWLData(); |
23 virtual FX_BOOL IsDataChanged(); | 23 virtual FX_BOOL IsDataChanged(); |
24 FX_DWORD GetAlignment(); | 24 uint32_t GetAlignment(); |
25 | 25 |
26 public: | 26 public: |
27 void OnSelectChanged(IFWL_Widget* pWidget, const CFX_Int32Array& arrSels); | 27 void OnSelectChanged(IFWL_Widget* pWidget, const CFX_Int32Array& arrSels); |
28 void SetItemState(int32_t nIndex, FX_BOOL bSelected); | 28 void SetItemState(int32_t nIndex, FX_BOOL bSelected); |
29 void InsertItem(const CFX_WideStringC& wsLabel, int32_t nIndex = -1); | 29 void InsertItem(const CFX_WideStringC& wsLabel, int32_t nIndex = -1); |
30 void DeleteItem(int32_t nIndex); | 30 void DeleteItem(int32_t nIndex); |
31 virtual int32_t OnProcessMessage(CFWL_Message* pMessage); | 31 virtual int32_t OnProcessMessage(CFWL_Message* pMessage); |
32 virtual FWL_ERR OnProcessEvent(CFWL_Event* pEvent); | 32 virtual FWL_ERR OnProcessEvent(CFWL_Event* pEvent); |
33 virtual FWL_ERR OnDrawWidget(CFX_Graphics* pGraphics, | 33 virtual FWL_ERR OnDrawWidget(CFX_Graphics* pGraphics, |
34 const CFX_Matrix* pMatrix = NULL); | 34 const CFX_Matrix* pMatrix = NULL); |
35 | 35 |
36 protected: | 36 protected: |
37 IFWL_WidgetDelegate* m_pOldDelegate; | 37 IFWL_WidgetDelegate* m_pOldDelegate; |
38 }; | 38 }; |
39 class CXFA_FFComboBox : public CXFA_FFField { | 39 class CXFA_FFComboBox : public CXFA_FFField { |
40 public: | 40 public: |
41 CXFA_FFComboBox(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc); | 41 CXFA_FFComboBox(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc); |
42 virtual ~CXFA_FFComboBox(); | 42 virtual ~CXFA_FFComboBox(); |
43 virtual FX_BOOL GetBBox(CFX_RectF& rtBox, | 43 virtual FX_BOOL GetBBox(CFX_RectF& rtBox, |
44 FX_DWORD dwStatus, | 44 uint32_t dwStatus, |
45 FX_BOOL bDrawFocus = FALSE); | 45 FX_BOOL bDrawFocus = FALSE); |
46 virtual FX_BOOL LoadWidget(); | 46 virtual FX_BOOL LoadWidget(); |
47 virtual void UpdateWidgetProperty(); | 47 virtual void UpdateWidgetProperty(); |
48 virtual FX_BOOL OnRButtonUp(FX_DWORD dwFlags, FX_FLOAT fx, FX_FLOAT fy); | 48 virtual FX_BOOL OnRButtonUp(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy); |
49 virtual FX_BOOL OnKillFocus(CXFA_FFWidget* pNewWidget); | 49 virtual FX_BOOL OnKillFocus(CXFA_FFWidget* pNewWidget); |
50 virtual FX_BOOL CanUndo(); | 50 virtual FX_BOOL CanUndo(); |
51 virtual FX_BOOL CanRedo(); | 51 virtual FX_BOOL CanRedo(); |
52 virtual FX_BOOL Undo(); | 52 virtual FX_BOOL Undo(); |
53 virtual FX_BOOL Redo(); | 53 virtual FX_BOOL Redo(); |
54 | 54 |
55 virtual FX_BOOL CanCopy(); | 55 virtual FX_BOOL CanCopy(); |
56 virtual FX_BOOL CanCut(); | 56 virtual FX_BOOL CanCut(); |
57 virtual FX_BOOL CanPaste(); | 57 virtual FX_BOOL CanPaste(); |
58 virtual FX_BOOL CanSelectAll(); | 58 virtual FX_BOOL CanSelectAll(); |
59 virtual FX_BOOL Copy(CFX_WideString& wsCopy); | 59 virtual FX_BOOL Copy(CFX_WideString& wsCopy); |
60 virtual FX_BOOL Cut(CFX_WideString& wsCut); | 60 virtual FX_BOOL Cut(CFX_WideString& wsCut); |
61 virtual FX_BOOL Paste(const CFX_WideString& wsPaste); | 61 virtual FX_BOOL Paste(const CFX_WideString& wsPaste); |
62 virtual FX_BOOL SelectAll(); | 62 virtual FX_BOOL SelectAll(); |
63 virtual FX_BOOL Delete(); | 63 virtual FX_BOOL Delete(); |
64 virtual FX_BOOL DeSelect(); | 64 virtual FX_BOOL DeSelect(); |
65 void OpenDropDownList(); | 65 void OpenDropDownList(); |
66 | 66 |
67 protected: | 67 protected: |
68 virtual FX_BOOL PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy); | 68 virtual FX_BOOL PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy); |
69 virtual FX_BOOL CommitData(); | 69 virtual FX_BOOL CommitData(); |
70 virtual FX_BOOL UpdateFWLData(); | 70 virtual FX_BOOL UpdateFWLData(); |
71 virtual FX_BOOL IsDataChanged(); | 71 virtual FX_BOOL IsDataChanged(); |
72 FX_DWORD GetAlignment(); | 72 uint32_t GetAlignment(); |
73 void FWLEventSelChange(CXFA_EventParam* pParam); | 73 void FWLEventSelChange(CXFA_EventParam* pParam); |
74 | 74 |
75 CFX_WideString m_wsNewValue; | 75 CFX_WideString m_wsNewValue; |
76 | 76 |
77 public: | 77 public: |
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 virtual int32_t OnProcessMessage(CFWL_Message* pMessage); | 87 virtual int32_t OnProcessMessage(CFWL_Message* pMessage); |
88 virtual FWL_ERR OnProcessEvent(CFWL_Event* pEvent); | 88 virtual FWL_ERR OnProcessEvent(CFWL_Event* pEvent); |
89 virtual FWL_ERR OnDrawWidget(CFX_Graphics* pGraphics, | 89 virtual FWL_ERR OnDrawWidget(CFX_Graphics* pGraphics, |
90 const CFX_Matrix* pMatrix = NULL); | 90 const CFX_Matrix* pMatrix = NULL); |
91 | 91 |
92 protected: | 92 protected: |
93 IFWL_WidgetDelegate* m_pOldDelegate; | 93 IFWL_WidgetDelegate* m_pOldDelegate; |
94 }; | 94 }; |
95 | 95 |
96 #endif // XFA_FXFA_APP_XFA_FFCHOICELIST_H_ | 96 #endif // XFA_FXFA_APP_XFA_FFCHOICELIST_H_ |
OLD | NEW |