Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: fpdfsdk/include/pdfwindow/PWL_ComboBox.h

Issue 453133004: clang-format all code (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_COMBOBOX_H_ 7 #ifndef _PWL_COMBOBOX_H_
8 #define _PWL_COMBOBOX_H_ 8 #define _PWL_COMBOBOX_H_
9 9
10 class CPWL_CBEdit : public CPWL_Edit 10 class CPWL_CBEdit : public CPWL_Edit {
11 { 11 public:
12 public: 12 CPWL_CBEdit(){};
13 » CPWL_CBEdit(){}; 13 virtual ~CPWL_CBEdit(){};
14 » virtual ~CPWL_CBEdit(){};
15 }; 14 };
16 15
17 class PWL_CLASS CPWL_CBListBox : public CPWL_ListBox 16 class PWL_CLASS CPWL_CBListBox : public CPWL_ListBox {
18 { 17 public:
19 public: 18 CPWL_CBListBox(){};
20 » CPWL_CBListBox(){}; 19 virtual ~CPWL_CBListBox(){};
21 » virtual ~CPWL_CBListBox(){};
22 20
23 public: 21 public:
24 » virtual FX_BOOL»» » » OnLButtonUp(const CPDF_Point & p oint, FX_DWORD nFlag); 22 virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
25 23
26 » FX_BOOL»» » » OnKeyDownWithExit(FX_WORD nChar, FX_BOOL & bExit, FX_DWORD nFlag); 24 FX_BOOL OnKeyDownWithExit(FX_WORD nChar, FX_BOOL& bExit, FX_DWORD nFlag);
27 » FX_BOOL»» » » OnCharWithExit(FX_WORD nChar, FX_BOOL & bExit, FX_DWORD nFlag); 25 FX_BOOL OnCharWithExit(FX_WORD nChar, FX_BOOL& bExit, FX_DWORD nFlag);
28 }; 26 };
29 27
30 #define PWL_COMBOBOX_BUTTON_WIDTH» » 13 28 #define PWL_COMBOBOX_BUTTON_WIDTH 13
31 29
32 class CPWL_CBButton : public CPWL_Wnd 30 class CPWL_CBButton : public CPWL_Wnd {
33 { 31 public:
34 public: 32 CPWL_CBButton(){};
35 » CPWL_CBButton(){}; 33 virtual ~CPWL_CBButton(){};
36 » virtual ~CPWL_CBButton(){};
37 34
38 public: 35 public:
39 » virtual void» » » » GetThisAppearanceStream(CFX_Byte TextBuf & sAppStream); 36 virtual void GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream);
40 » virtual void» » » » DrawThisAppearance(CFX_RenderDev ice* pDevice, CPDF_Matrix* pUser2Device); 37 virtual void DrawThisAppearance(CFX_RenderDevice* pDevice,
38 CPDF_Matrix* pUser2Device);
41 39
42 » virtual FX_BOOL»» » » OnLButtonDown(const CPDF_Point & point, FX_DWORD nFlag); 40 virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag);
43 » virtual FX_BOOL»» » » OnLButtonUp(const CPDF_Point & p oint, FX_DWORD nFlag); 41 virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag);
44
45 }; 42 };
46 43
47 class PWL_CLASS CPWL_ComboBox : public CPWL_Wnd 44 class PWL_CLASS CPWL_ComboBox : public CPWL_Wnd {
48 { 45 public:
49 public: 46 CPWL_ComboBox();
50 » CPWL_ComboBox(); 47 operator CPWL_Edit*() { return m_pEdit; }
51 » operator CPWL_Edit* ()» » {return m_pEdit;}
52 48
53 public: 49 public:
54 » virtual CFX_ByteString» » GetClassName() const; 50 virtual CFX_ByteString GetClassName() const;
55 » virtual void» » » » OnCreate(PWL_CREATEPARAM & cp); 51 virtual void OnCreate(PWL_CREATEPARAM& cp);
56 52
57 » virtual FX_BOOL»» » » OnKeyDown(FX_WORD nChar, FX_DWOR D nFlag);» 53 virtual FX_BOOL OnKeyDown(FX_WORD nChar, FX_DWORD nFlag);
58 » virtual FX_BOOL»» » » OnChar(FX_WORD nChar, FX_DWORD n Flag); 54 virtual FX_BOOL OnChar(FX_WORD nChar, FX_DWORD nFlag);
59 55
60 » virtual void» » » » OnNotify(CPWL_Wnd* pWnd, FX_DWOR D msg, FX_INTPTR wParam = 0, FX_INTPTR lParam = 0); 56 virtual void OnNotify(CPWL_Wnd* pWnd,
57 FX_DWORD msg,
58 FX_INTPTR wParam = 0,
59 FX_INTPTR lParam = 0);
61 60
62 » virtual void» » » » CreateChildWnd(const PWL_CREATEP ARAM & cp); 61 virtual void CreateChildWnd(const PWL_CREATEPARAM& cp);
63 » virtual void» » » » RePosChildWnd(); 62 virtual void RePosChildWnd();
64 63
65 » virtual CPDF_Rect» » » GetFocusRect() const; 64 virtual CPDF_Rect GetFocusRect() const;
66 »
67 » virtual void» » » » SetFocus();
68 » virtual void» » » » KillFocus();
69 65
70 » FX_BOOL»» » » » » IsModified() const; 66 virtual void SetFocus();
67 virtual void KillFocus();
71 68
72 public:» 69 FX_BOOL IsModified() const;
73 » void» » » » » » SetFillerNotify(IPWL_Fil ler_Notify* pNotify);
74 70
75 » CFX_WideString» » » » GetText() const; 71 public:
76 » void» » » » » » SetText(FX_LPCWSTR text) ; 72 void SetFillerNotify(IPWL_Filler_Notify* pNotify);
77 73
78 » void» » » » » » AddString(FX_LPCWSTR str ing); 74 CFX_WideString GetText() const;
79 » FX_INT32» » » » » GetSelect() const; 75 void SetText(FX_LPCWSTR text);
80 » void» » » » » » SetSelect(FX_INT32 nItem Index);
81 76
82 » void» » » » » » SetEditSel(FX_INT32 nSta rtChar,FX_INT32 nEndChar); 77 void AddString(FX_LPCWSTR string);
83 » void» » » » » » GetEditSel(FX_INT32 & nS tartChar, FX_INT32 & nEndChar ) const; 78 FX_INT32 GetSelect() const;
84 » void» » » » » » Clear(); 79 void SetSelect(FX_INT32 nItemIndex);
85 » void» » » » » » SelectAll();
86 » FX_BOOL»» » » » » IsPopup() const;
87 80
88 » void» » » » » » SetSelectText(); 81 void SetEditSel(FX_INT32 nStartChar, FX_INT32 nEndChar);
82 void GetEditSel(FX_INT32& nStartChar, FX_INT32& nEndChar) const;
83 void Clear();
84 void SelectAll();
85 FX_BOOL IsPopup() const;
89 86
90 private:» 87 void SetSelectText();
91 » void» » » » » » CreateEdit(const PWL_CRE ATEPARAM & cp);
92 » void» » » » » » CreateButton(const PWL_C REATEPARAM & cp);
93 » void» » » » » » CreateListBox(const PWL_ CREATEPARAM & cp);
94 88
95 » void» » » » » » SetPopup(FX_BOOL bPopup) ; 89 private:
96 » 90 void CreateEdit(const PWL_CREATEPARAM& cp);
97 private: 91 void CreateButton(const PWL_CREATEPARAM& cp);
98 » CPWL_CBEdit*» » » » m_pEdit; 92 void CreateListBox(const PWL_CREATEPARAM& cp);
99 » CPWL_CBButton*» » » » m_pButton;
100 » CPWL_CBListBox*»» » » m_pList;
101 93
102 » FX_BOOL»» » » » » m_bPopup; 94 void SetPopup(FX_BOOL bPopup);
103 » CPDF_Rect» » » » » m_rcOldWindow;
104 » FX_INT32» » » » » m_nPopupWhere;
105 » FX_INT32» » » » » m_nSelectItem;
106 » IPWL_Filler_Notify*» » » m_pFillerNotify;
107 95
108 public: 96 private:
109 » void» » » » » » » AttachFFLData(vo id* pData) {m_pFormFiller = pData;} 97 CPWL_CBEdit* m_pEdit;
110 private: 98 CPWL_CBButton* m_pButton;
111 » void*» » » » » » » m_pFormFiller; 99 CPWL_CBListBox* m_pList;
100
101 FX_BOOL m_bPopup;
102 CPDF_Rect m_rcOldWindow;
103 FX_INT32 m_nPopupWhere;
104 FX_INT32 m_nSelectItem;
105 IPWL_Filler_Notify* m_pFillerNotify;
106
107 public:
108 void AttachFFLData(void* pData) { m_pFormFiller = pData; }
109
110 private:
111 void* m_pFormFiller;
112 }; 112 };
113 113
114 #endif // !defined(AFX_PWL_COMBOBOX_H__9D6645F8_64AA_4806_94E8_95FDEDD39C17__INC LUDED_) 114 #endif // !defined(AFX_PWL_COMBOBOX_H__9D6645F8_64AA_4806_94E8_95FDEDD39C17__IN CLUDED_)
115
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698