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 FPDFSDK_INCLUDE_PDFWINDOW_PWL_COMBOBOX_H_ | 7 #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_COMBOBOX_H_ |
8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_COMBOBOX_H_ | 8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_COMBOBOX_H_ |
9 | 9 |
10 #include "PWL_Edit.h" | 10 #include "PWL_Edit.h" |
11 #include "PWL_ListBox.h" | 11 #include "PWL_ListBox.h" |
12 #include "PWL_Wnd.h" | 12 #include "PWL_Wnd.h" |
13 | 13 |
14 class CPWL_CBEdit : public CPWL_Edit | 14 class CPWL_CBEdit : public CPWL_Edit { |
15 { | 15 public: |
16 public: | 16 CPWL_CBEdit(){}; |
17 » CPWL_CBEdit(){}; | 17 virtual ~CPWL_CBEdit(){}; |
18 » virtual ~CPWL_CBEdit(){}; | |
19 }; | 18 }; |
20 | 19 |
21 class CPWL_CBListBox : public CPWL_ListBox | 20 class CPWL_CBListBox : public CPWL_ListBox { |
22 { | 21 public: |
23 public: | 22 CPWL_CBListBox(){}; |
24 » CPWL_CBListBox(){}; | 23 virtual ~CPWL_CBListBox(){}; |
25 » virtual ~CPWL_CBListBox(){}; | |
26 | 24 |
27 public: | 25 public: |
28 » virtual FX_BOOL»» » » OnLButtonUp(const CPDF_Point & p
oint, FX_DWORD nFlag); | 26 virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag); |
29 | 27 |
30 » FX_BOOL»» » » OnKeyDownWithExit(FX_WORD nChar, FX_BOOL
& bExit, FX_DWORD nFlag); | 28 FX_BOOL OnKeyDownWithExit(FX_WORD nChar, FX_BOOL& bExit, FX_DWORD nFlag); |
31 » FX_BOOL»» » » OnCharWithExit(FX_WORD nChar, FX_BOOL &
bExit, FX_DWORD nFlag); | 29 FX_BOOL OnCharWithExit(FX_WORD nChar, FX_BOOL& bExit, FX_DWORD nFlag); |
32 }; | 30 }; |
33 | 31 |
34 #define PWL_COMBOBOX_BUTTON_WIDTH» » 13 | 32 #define PWL_COMBOBOX_BUTTON_WIDTH 13 |
35 | 33 |
36 class CPWL_CBButton : public CPWL_Wnd | 34 class CPWL_CBButton : public CPWL_Wnd { |
37 { | 35 public: |
38 public: | 36 CPWL_CBButton(){}; |
39 » CPWL_CBButton(){}; | 37 virtual ~CPWL_CBButton(){}; |
40 » virtual ~CPWL_CBButton(){}; | |
41 | 38 |
42 public: | 39 public: |
43 » virtual void» » » » GetThisAppearanceStream(CFX_Byte
TextBuf & sAppStream); | 40 virtual void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream); |
44 » virtual void» » » » DrawThisAppearance(CFX_RenderDev
ice* pDevice, CPDF_Matrix* pUser2Device); | 41 virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, |
| 42 CPDF_Matrix* pUser2Device); |
45 | 43 |
46 » virtual FX_BOOL»» » » OnLButtonDown(const CPDF_Point &
point, FX_DWORD nFlag); | 44 virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag); |
47 » virtual FX_BOOL»» » » OnLButtonUp(const CPDF_Point & p
oint, FX_DWORD nFlag); | 45 virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag); |
48 | |
49 }; | 46 }; |
50 | 47 |
51 class CPWL_ComboBox : public CPWL_Wnd | 48 class CPWL_ComboBox : public CPWL_Wnd { |
52 { | 49 public: |
53 public: | 50 CPWL_ComboBox(); |
54 » CPWL_ComboBox(); | 51 operator CPWL_Edit*() { return m_pEdit; } |
55 » operator CPWL_Edit* ()» » {return m_pEdit;} | |
56 | 52 |
57 public: | 53 public: |
58 » virtual CFX_ByteString» » GetClassName() const; | 54 virtual CFX_ByteString GetClassName() const; |
59 » virtual void» » » » OnCreate(PWL_CREATEPARAM & cp); | 55 virtual void OnCreate(PWL_CREATEPARAM& cp); |
60 | 56 |
61 » virtual FX_BOOL»» » » OnKeyDown(FX_WORD nChar, FX_DWOR
D nFlag); | 57 virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); |
62 » virtual FX_BOOL»» » » OnChar(FX_WORD nChar, FX_DWORD n
Flag); | 58 virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag); |
63 | 59 |
64 » virtual void» » » » OnNotify(CPWL_Wnd* pWnd, FX_DWOR
D msg, intptr_t wParam = 0, intptr_t lParam = 0); | 60 virtual void OnNotify(CPWL_Wnd* pWnd, |
| 61 FX_DWORD msg, |
| 62 intptr_t wParam = 0, |
| 63 intptr_t lParam = 0); |
65 | 64 |
66 » virtual void» » » » CreateChildWnd(const PWL_CREATEP
ARAM & cp); | 65 virtual void CreateChildWnd(const PWL_CREATEPARAM& cp); |
67 » virtual void» » » » RePosChildWnd(); | 66 virtual void RePosChildWnd(); |
68 | 67 |
69 » virtual CPDF_Rect» » » GetFocusRect() const; | 68 virtual CPDF_Rect GetFocusRect() const; |
70 | 69 |
71 » virtual void» » » » SetFocus(); | 70 virtual void SetFocus(); |
72 » virtual void» » » » KillFocus(); | 71 virtual void KillFocus(); |
73 | 72 |
74 » FX_BOOL»» » » » » IsModified() const; | 73 FX_BOOL IsModified() const; |
75 | 74 |
76 public: | 75 public: |
77 » void» » » » » » SetFillerNotify(IPWL_Fil
ler_Notify* pNotify); | 76 void SetFillerNotify(IPWL_Filler_Notify* pNotify); |
78 | 77 |
79 » CFX_WideString» » » » GetText() const; | 78 CFX_WideString GetText() const; |
80 » void» » » » » » SetText(const FX_WCHAR*
text); | 79 void SetText(const FX_WCHAR* text); |
81 | 80 |
82 » void» » » » » » AddString(const FX_WCHAR
* string); | 81 void AddString(const FX_WCHAR* string); |
83 » int32_t»» » » » GetSelect() const; | 82 int32_t GetSelect() const; |
84 » void» » » » » » SetSelect(int32_t nItemI
ndex); | 83 void SetSelect(int32_t nItemIndex); |
85 | 84 |
86 » void» » » » » » SetEditSel(int32_t nStar
tChar,int32_t nEndChar); | 85 void SetEditSel(int32_t nStartChar, int32_t nEndChar); |
87 » void» » » » » » GetEditSel(int32_t & nSt
artChar, int32_t & nEndChar ) const; | 86 void GetEditSel(int32_t& nStartChar, int32_t& nEndChar) const; |
88 » void» » » » » » Clear(); | 87 void Clear(); |
89 » void» » » » » » SelectAll(); | 88 void SelectAll(); |
90 » FX_BOOL»» » » » » IsPopup() const; | 89 FX_BOOL IsPopup() const; |
91 | 90 |
92 » void» » » » » » SetSelectText(); | 91 void SetSelectText(); |
93 | 92 |
94 private: | 93 private: |
95 » void» » » » » » CreateEdit(const PWL_CRE
ATEPARAM & cp); | 94 void CreateEdit(const PWL_CREATEPARAM& cp); |
96 » void» » » » » » CreateButton(const PWL_C
REATEPARAM & cp); | 95 void CreateButton(const PWL_CREATEPARAM& cp); |
97 » void» » » » » » CreateListBox(const PWL_
CREATEPARAM & cp); | 96 void CreateListBox(const PWL_CREATEPARAM& cp); |
98 | 97 |
99 » void» » » » » » SetPopup(FX_BOOL bPopup)
; | 98 void SetPopup(FX_BOOL bPopup); |
100 | 99 |
101 private: | 100 private: |
102 » CPWL_CBEdit*» » » » m_pEdit; | 101 CPWL_CBEdit* m_pEdit; |
103 » CPWL_CBButton*» » » » m_pButton; | 102 CPWL_CBButton* m_pButton; |
104 » CPWL_CBListBox*»» » » m_pList; | 103 CPWL_CBListBox* m_pList; |
105 | 104 |
106 » FX_BOOL»» » » » » m_bPopup; | 105 FX_BOOL m_bPopup; |
107 » CPDF_Rect» » » » » m_rcOldWindow; | 106 CPDF_Rect m_rcOldWindow; |
108 » int32_t»» » » » m_nPopupWhere; | 107 int32_t m_nPopupWhere; |
109 » int32_t»» » » » m_nSelectItem; | 108 int32_t m_nSelectItem; |
110 » IPWL_Filler_Notify*» » » m_pFillerNotify; | 109 IPWL_Filler_Notify* m_pFillerNotify; |
111 | 110 |
112 public: | 111 public: |
113 » void» » » » » » » AttachFFLData(vo
id* pData) {m_pFormFiller = pData;} | 112 void AttachFFLData(void* pData) { m_pFormFiller = pData; } |
114 private: | 113 |
115 » void*» » » » » » » m_pFormFiller; | 114 private: |
| 115 void* m_pFormFiller; |
116 }; | 116 }; |
117 | 117 |
118 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_COMBOBOX_H_ | 118 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_COMBOBOX_H_ |
OLD | NEW |