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