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

Side by Side Diff: fpdfsdk/include/formfiller/FFL_TextField.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 #if !defined(AFX_FFL_EDIT_H__8E0C9456_CBA2_4EFB_9F31_53C6D8C1A8AC__INCLUDED_) 7 #if !defined(AFX_FFL_EDIT_H__8E0C9456_CBA2_4EFB_9F31_53C6D8C1A8AC__INCLUDED_)
8 #define AFX_FFL_EDIT_H__8E0C9456_CBA2_4EFB_9F31_53C6D8C1A8AC__INCLUDED_ 8 #define AFX_FFL_EDIT_H__8E0C9456_CBA2_4EFB_9F31_53C6D8C1A8AC__INCLUDED_
9 9
10 #include "FFL_FormFiller.h" 10 #include "FFL_FormFiller.h"
11 11
12 #define BF_ALIGN_LEFT» » » 0 12 #define BF_ALIGN_LEFT 0
13 #define BF_ALIGN_MIDDLE»» » 1 13 #define BF_ALIGN_MIDDLE 1
14 #define BF_ALIGN_RIGHT» » » 2 14 #define BF_ALIGN_RIGHT 2
15 15
16 class CBA_FontMap; 16 class CBA_FontMap;
17 17
18 class CFFL_EditUndoItem //: public IUndoItem 18 class CFFL_EditUndoItem //: public IUndoItem
19 { 19 {
20 public: 20 public:
21 » CFFL_EditUndoItem(CPWL_Edit* pEdit); 21 CFFL_EditUndoItem(CPWL_Edit* pEdit);
22 » virtual ~CFFL_EditUndoItem(); 22 virtual ~CFFL_EditUndoItem();
23 » 23
24 » virtual void» » » » » Undo(); 24 virtual void Undo();
25 » virtual void» » » » » Redo(); 25 virtual void Redo();
26 » virtual CFX_WideString» » » GetDescr(); 26 virtual CFX_WideString GetDescr();
27 » virtual void» » » » » Release(); 27 virtual void Release();
28 }; 28 };
29 29
30 struct FFL_TextFieldState 30 struct FFL_TextFieldState {
31 { 31 int nStart;
32 » int nStart; 32 int nEnd;
33 » int nEnd; 33 CFX_WideString sValue;
34 » CFX_WideString sValue;
35 }; 34 };
36 35
37 class CFFL_TextField : public CFFL_FormFiller, public IPWL_FocusHandler, public IPWL_Edit_Notify 36 class CFFL_TextField : public CFFL_FormFiller,
38 { 37 public IPWL_FocusHandler,
39 public: 38 public IPWL_Edit_Notify {
40 » CFFL_TextField(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot); 39 public:
41 » virtual ~CFFL_TextField(); 40 CFFL_TextField(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot);
42 » 41 virtual ~CFFL_TextField();
43 » virtual»PWL_CREATEPARAM»» GetCreateParam();
44 » virtual CPWL_Wnd*» » » NewPDFWindow(const PWL_CREATEPAR AM& cp, CPDFSDK_PageView* pPageView);
45 42
46 » 43 virtual PWL_CREATEPARAM GetCreateParam();
47 » virtual FX_BOOL»» » » OnChar(CPDFSDK_Annot* pAnnot, FX _UINT nChar, FX_UINT nFlags); 44 virtual CPWL_Wnd* NewPDFWindow(const PWL_CREATEPARAM& cp,
48 » 45 CPDFSDK_PageView* pPageView);
49 » virtual FX_BOOL»» » » IsDataChanged(CPDFSDK_PageView* pPageView); 46
50 » virtual void» » » » SaveData(CPDFSDK_PageView* pPage View); 47 virtual FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);
51 » 48
52 » virtual void» » » » GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type, 49 virtual FX_BOOL IsDataChanged(CPDFSDK_PageView* pPageView);
53 » » » » » » » » » » » » PDFSDK_FieldAction& fa); 50 virtual void SaveData(CPDFSDK_PageView* pPageView);
54 » virtual void» » » » SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type, 51
55 » » » » » » » » » const PD FSDK_FieldAction& fa); 52 virtual void GetActionData(CPDFSDK_PageView* pPageView,
56 » virtual FX_BOOL»» » » IsActionDataChanged(CPDF_AAction ::AActionType type, const PDFSDK_FieldAction& faOld, 53 CPDF_AAction::AActionType type,
57 » » » » » » » » » » » » const PDFSDK_FieldAction& faNew); 54 PDFSDK_FieldAction& fa);
58 » virtual void» » » » SaveState(CPDFSDK_PageView* pPag eView); 55 virtual void SetActionData(CPDFSDK_PageView* pPageView,
59 » virtual void» » » » RestoreState(CPDFSDK_PageView* p PageView); 56 CPDF_AAction::AActionType type,
60 » 57 const PDFSDK_FieldAction& fa);
61 » virtual CPWL_Wnd*» » » ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue); 58 virtual FX_BOOL IsActionDataChanged(CPDF_AAction::AActionType type,
62 » 59 const PDFSDK_FieldAction& faOld,
63 public: 60 const PDFSDK_FieldAction& faNew);
64 » virtual void» » » » OnSetFocus(CPWL_Wnd* pWnd); 61 virtual void SaveState(CPDFSDK_PageView* pPageView);
65 » virtual void» » » » OnKillFocus(CPWL_Wnd* pWnd); 62 virtual void RestoreState(CPDFSDK_PageView* pPageView);
66 » 63
67 public: 64 virtual CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView,
68 » virtual void» » » » OnAddUndo(CPWL_Edit* pEdit); 65 FX_BOOL bRestoreValue);
69 » 66
70 public: 67 public:
71 » virtual FX_BOOL»» » » CanCopy(CPDFSDK_Document* pDocum ent); 68 virtual void OnSetFocus(CPWL_Wnd* pWnd);
72 » virtual FX_BOOL»» » » CanCut(CPDFSDK_Document* pDocume nt); 69 virtual void OnKillFocus(CPWL_Wnd* pWnd);
73 » virtual FX_BOOL»» » » CanPaste(CPDFSDK_Document* pDocu ment); 70
74 » 71 public:
75 » virtual void» » » » DoCopy(CPDFSDK_Document* pDocume nt); 72 virtual void OnAddUndo(CPWL_Edit* pEdit);
76 » virtual void» » » » DoCut(CPDFSDK_Document* pDocumen t); 73
77 » virtual void» » » » DoPaste(CPDFSDK_Document* pDocum ent); 74 public:
78 » 75 virtual FX_BOOL CanCopy(CPDFSDK_Document* pDocument);
79 private: 76 virtual FX_BOOL CanCut(CPDFSDK_Document* pDocument);
80 » CBA_FontMap*» » » » m_pFontMap; 77 virtual FX_BOOL CanPaste(CPDFSDK_Document* pDocument);
81 //» CBA_SpellCheck*»» » » m_pSpellCheck; 78
82 » FFL_TextFieldState» » » m_State; 79 virtual void DoCopy(CPDFSDK_Document* pDocument);
83 //» CFFL_IM_BOX» » » » » m_IMBox; 80 virtual void DoCut(CPDFSDK_Document* pDocument);
81 virtual void DoPaste(CPDFSDK_Document* pDocument);
82
83 private:
84 CBA_FontMap* m_pFontMap;
85 //» CBA_SpellCheck*»» » » m_pSpellCheck;
86 FFL_TextFieldState m_State;
87 //» CFFL_IM_BOX» » » » » m_IMBox;
84 }; 88 };
85 89
86 #endif // !defined(AFX_FFL_EDIT_H__8E0C9456_CBA2_4EFB_9F31_53C6D8C1A8AC__INCLUDE D_) 90 #endif // !defined(AFX_FFL_EDIT_H__8E0C9456_CBA2_4EFB_9F31_53C6D8C1A8AC__INCLUD ED_)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698