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 _PWL_LISTBOX_H_ | 7 #ifndef _PWL_LISTBOX_H_ |
8 #define _PWL_LISTBOX_H_ | 8 #define _PWL_LISTBOX_H_ |
9 | 9 |
10 class CPDF_ListCtrl; | 10 class CPDF_ListCtrl; |
11 class CPWL_List_Notify; | 11 class CPWL_List_Notify; |
12 class CPWL_ListBox; | 12 class CPWL_ListBox; |
13 class IPWL_Filler_Notify; | 13 class IPWL_Filler_Notify; |
14 | 14 |
15 class CPWL_List_Notify : public IFX_List_Notify | 15 class CPWL_List_Notify : public IFX_List_Notify { |
16 { | 16 public: |
17 public: | 17 CPWL_List_Notify(CPWL_ListBox* pList); |
18 » CPWL_List_Notify(CPWL_ListBox * pList); | 18 virtual ~CPWL_List_Notify(); |
19 » virtual ~CPWL_List_Notify(); | |
20 | 19 |
21 » void» » » » » » » IOnSetScrollInfo
X(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, | 20 void IOnSetScrollInfoX(FX_FLOAT fPlateMin, |
22 » » » » » » » » » »
» » FX_FLOAT fContentMin, FX_FLOAT fContentMax, | 21 FX_FLOAT fPlateMax, |
23 » » » » » » » » » »
» » FX_FLOAT fSmallStep, FX_FLOAT fBigStep){} | 22 FX_FLOAT fContentMin, |
24 » void» » » » » » » IOnSetScrollInfo
Y(FX_FLOAT fPlateMin, FX_FLOAT fPlateMax, | 23 FX_FLOAT fContentMax, |
25 » » » » » » » » » »
» » FX_FLOAT fContentMin, FX_FLOAT fContentMax, | 24 FX_FLOAT fSmallStep, |
26 » » » » » » » » » »
» » FX_FLOAT fSmallStep, FX_FLOAT fBigStep); | 25 FX_FLOAT fBigStep) {} |
27 » void» » » » » » » IOnSetScrollPosX
(FX_FLOAT fx){} | 26 void IOnSetScrollInfoY(FX_FLOAT fPlateMin, |
28 » void» » » » » » » IOnSetScrollPosY
(FX_FLOAT fy); | 27 FX_FLOAT fPlateMax, |
29 » void» » » » » » » IOnSetCaret(FX_B
OOL bVisible,const CPDF_Point & ptHead,const CPDF_Point & ptFoot, const CPVT_Wor
dPlace& place); | 28 FX_FLOAT fContentMin, |
30 » void» » » » » » » IOnCaretChange(c
onst CPVT_SecProps & secProps, const CPVT_WordProps & wordProps); | 29 FX_FLOAT fContentMax, |
31 » void» » » » » » » IOnInvalidateRec
t(CPDF_Rect * pRect); | 30 FX_FLOAT fSmallStep, |
| 31 FX_FLOAT fBigStep); |
| 32 void IOnSetScrollPosX(FX_FLOAT fx) {} |
| 33 void IOnSetScrollPosY(FX_FLOAT fy); |
| 34 void IOnSetCaret(FX_BOOL bVisible, |
| 35 const CPDF_Point& ptHead, |
| 36 const CPDF_Point& ptFoot, |
| 37 const CPVT_WordPlace& place); |
| 38 void IOnCaretChange(const CPVT_SecProps& secProps, |
| 39 const CPVT_WordProps& wordProps); |
| 40 void IOnInvalidateRect(CPDF_Rect* pRect); |
32 | 41 |
33 private: | 42 private: |
34 » CPWL_ListBox*» » » » » m_pList;» | 43 CPWL_ListBox* m_pList; |
35 }; | 44 }; |
36 | 45 |
37 class PWL_CLASS CPWL_ListBox : public CPWL_Wnd | 46 class PWL_CLASS CPWL_ListBox : public CPWL_Wnd { |
38 { | 47 public: |
39 public: | 48 CPWL_ListBox(); |
40 » CPWL_ListBox(); | 49 virtual ~CPWL_ListBox(); |
41 » virtual ~CPWL_ListBox(); | |
42 | 50 |
43 » virtual CFX_ByteString» » » GetClassName() const; | 51 virtual CFX_ByteString GetClassName() const; |
44 » virtual void» » » » » OnCreated(); | 52 virtual void OnCreated(); |
45 » virtual void» » » » » OnDestroy(); | 53 virtual void OnDestroy(); |
46 » virtual void» » » » » GetThisAppearanceStream(
CFX_ByteTextBuf & sAppStream); | 54 virtual void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream); |
47 » virtual void» » » » » DrawThisAppearance(CFX_R
enderDevice* pDevice, CPDF_Matrix* pUser2Device); | 55 virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, |
| 56 CPDF_Matrix* pUser2Device); |
48 | 57 |
49 » virtual FX_BOOL»» » » » OnKeyDown(FX_WORD nChar,
FX_DWORD nFlag); | 58 virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag); |
50 » virtual FX_BOOL»» » » » OnChar(FX_WORD nChar, FX
_DWORD nFlag); | 59 virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag); |
51 » virtual FX_BOOL»» » » » OnLButtonDown(const CPDF
_Point & point, FX_DWORD nFlag); | 60 virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag); |
52 » virtual FX_BOOL»» » » » OnLButtonUp(const CPDF_P
oint & point, FX_DWORD nFlag); | 61 virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag); |
53 » virtual FX_BOOL»» » » » OnMouseMove(const CPDF_P
oint & point, FX_DWORD nFlag); | 62 virtual FX_BOOL OnMouseMove(const CPDF_Point& point, FX_DWORD nFlag); |
54 » virtual FX_BOOL»» » » » OnMouseWheel(short zDelt
a, const CPDF_Point & point, FX_DWORD nFlag); | 63 virtual FX_BOOL OnMouseWheel(short zDelta, |
55 » virtual void» » » » » KillFocus(); | 64 const CPDF_Point& point, |
| 65 FX_DWORD nFlag); |
| 66 virtual void KillFocus(); |
56 | 67 |
57 » virtual void» » » » » OnNotify(CPWL_Wnd* pWnd,
FX_DWORD msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0); | 68 virtual void OnNotify(CPWL_Wnd* pWnd, |
58 » virtual void» » » » » RePosChildWnd(); | 69 FX_DWORD msg, |
59 » virtual void» » » » » SetText(FX_LPCWSTR csTex
t,FX_BOOL bRefresh = TRUE); | 70 FX_INTPTR wParam = 0, |
60 » virtual CFX_WideString» » » GetText() const;» | 71 FX_INTPTR lParam = 0); |
61 » virtual CPDF_Rect» » » » GetFocusRect() const; | 72 virtual void RePosChildWnd(); |
62 » virtual void» » » » » SetFontSize(FX_FLOAT fFo
ntSize); | 73 virtual void SetText(FX_LPCWSTR csText, FX_BOOL bRefresh = TRUE); |
63 » virtual FX_FLOAT» » » » GetFontSize() const; | 74 virtual CFX_WideString GetText() const; |
| 75 virtual CPDF_Rect GetFocusRect() const; |
| 76 virtual void SetFontSize(FX_FLOAT fFontSize); |
| 77 virtual FX_FLOAT GetFontSize() const; |
64 | 78 |
65 » void» » » » » » » OnNotifySelChang
ed(FX_BOOL bKeyDown, FX_BOOL & bExit , FX_DWORD nFlag); | 79 void OnNotifySelChanged(FX_BOOL bKeyDown, FX_BOOL& bExit, FX_DWORD nFlag); |
66 | 80 |
67 » void» » » » » » » AddString(FX_LPC
WSTR string);» | 81 void AddString(FX_LPCWSTR string); |
68 » void» » » » » » » SetTopVisibleInd
ex(FX_INT32 nItemIndex); | 82 void SetTopVisibleIndex(FX_INT32 nItemIndex); |
69 » void» » » » » » » ScrollToListItem
(FX_INT32 nItemIndex); | 83 void ScrollToListItem(FX_INT32 nItemIndex); |
70 » void» » » » » » » ResetContent(); | 84 void ResetContent(); |
71 » void» » » » » » » Reset(); | 85 void Reset(); |
72 » void» » » » » » » Select(FX_INT32
nItemIndex); | 86 void Select(FX_INT32 nItemIndex); |
73 » void» » » » » » » SetCaret(FX_INT3
2 nItemIndex); | 87 void SetCaret(FX_INT32 nItemIndex); |
74 » void» » » » » » » SetHoverSel(FX_B
OOL bHoverSel); | 88 void SetHoverSel(FX_BOOL bHoverSel); |
75 » | |
76 » FX_INT32» » » » » » GetCount() const
; | |
77 » FX_BOOL»» » » » » » IsMultipleSel()
const; | |
78 » FX_INT32» » » » » » GetCaretIndex()
const; | |
79 » FX_INT32» » » » » » GetCurSel() cons
t; | |
80 » FX_BOOL»» » » » » » IsItemSelected(F
X_INT32 nItemIndex) const; | |
81 » FX_INT32» » » » » » GetTopVisibleInd
ex() const; | |
82 » FX_INT32» » » » » » FindNext(FX_INT3
2 nIndex,FX_WCHAR nChar) const; | |
83 » CPDF_Rect» » » » » » GetContentRect()
const;» | |
84 » FX_FLOAT» » » » » » GetFirstHeight()
const; | |
85 » CPDF_Rect» » » » » » GetListRect() co
nst; | |
86 | 89 |
87 » void» » » » » » » SetFillerNotify(
IPWL_Filler_Notify* pNotify) {m_pFillerNotify = pNotify;} | 90 FX_INT32 GetCount() const; |
| 91 FX_BOOL IsMultipleSel() const; |
| 92 FX_INT32 GetCaretIndex() const; |
| 93 FX_INT32 GetCurSel() const; |
| 94 FX_BOOL IsItemSelected(FX_INT32 nItemIndex) const; |
| 95 FX_INT32 GetTopVisibleIndex() const; |
| 96 FX_INT32 FindNext(FX_INT32 nIndex, FX_WCHAR nChar) const; |
| 97 CPDF_Rect GetContentRect() const; |
| 98 FX_FLOAT GetFirstHeight() const; |
| 99 CPDF_Rect GetListRect() const; |
88 | 100 |
89 protected: | 101 void SetFillerNotify(IPWL_Filler_Notify* pNotify) { |
90 » IFX_List*» » » » » » m_pList; | 102 m_pFillerNotify = pNotify; |
91 » CPWL_List_Notify*» » » » m_pListNotify; | 103 } |
92 » FX_BOOL»» » » » » » m_bMouseDown; | 104 |
93 » FX_BOOL»» » » » » » m_bHoverSel; | 105 protected: |
94 » IPWL_Filler_Notify*» » » » m_pFillerNotify; | 106 IFX_List* m_pList; |
95 public: | 107 CPWL_List_Notify* m_pListNotify; |
96 » void» » » » » » » AttachFFLData(vo
id* pData) {m_pFormFiller = pData;} | 108 FX_BOOL m_bMouseDown; |
97 private: | 109 FX_BOOL m_bHoverSel; |
98 » void*» » » » » » » m_pFormFiller; | 110 IPWL_Filler_Notify* m_pFillerNotify; |
| 111 |
| 112 public: |
| 113 void AttachFFLData(void* pData) { m_pFormFiller = pData; } |
| 114 |
| 115 private: |
| 116 void* m_pFormFiller; |
99 }; | 117 }; |
100 | 118 |
101 #endif // !defined(AFX_PWL_LISTBOX_H__F8C0DD72_CC3C_4806_86FB_E9D02B04A34B__INCL
UDED_) | 119 #endif // !defined(AFX_PWL_LISTBOX_H__F8C0DD72_CC3C_4806_86FB_E9D02B04A34B__INC
LUDED_) |
102 | |
103 | |
OLD | NEW |