Clean up CPDF_AnnotList.
[pdfium.git] / fpdfsdk / include / formfiller / FFL_TextField.h
index 2b6f069..057825a 100644 (file)
@@ -1,89 +1,64 @@
-// Copyright 2014 PDFium Authors. All rights reserved.\r
-// Use of this source code is governed by a BSD-style license that can be\r
-// found in the LICENSE file.\r
\r
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
-\r
-#if !defined(AFX_FFL_EDIT_H__8E0C9456_CBA2_4EFB_9F31_53C6D8C1A8AC__INCLUDED_)\r
-#define AFX_FFL_EDIT_H__8E0C9456_CBA2_4EFB_9F31_53C6D8C1A8AC__INCLUDED_\r
-\r
-#include "FFL_FormFiller.h"\r
-\r
-#define BF_ALIGN_LEFT                  0\r
-#define BF_ALIGN_MIDDLE                        1\r
-#define BF_ALIGN_RIGHT                 2\r
-\r
-class CBA_FontMap;\r
-\r
-class CFFL_EditUndoItem //: public IUndoItem\r
-{\r
-public:\r
-       CFFL_EditUndoItem(CPWL_Edit* pEdit);\r
-       virtual ~CFFL_EditUndoItem();\r
-       \r
-       virtual void                                    Undo();\r
-       virtual void                                    Redo();\r
-       virtual CFX_WideString                  GetDescr();\r
-       virtual void                                    Release();\r
-       \r
-private:\r
-       CPWL_Edit*                                              m_pEdit;\r
-};\r
-\r
-struct FFL_TextFieldState\r
-{\r
-       int nStart;\r
-       int nEnd;\r
-       CFX_WideString sValue;\r
-};\r
-\r
-class CFFL_TextField : public CFFL_FormFiller, public IPWL_FocusHandler, public IPWL_Edit_Notify\r
-{\r
-public:\r
-       CFFL_TextField(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot);\r
-       virtual ~CFFL_TextField();\r
-       \r
-       virtual PWL_CREATEPARAM         GetCreateParam();\r
-       virtual CPWL_Wnd*                       NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView* pPageView);\r
-\r
-       \r
-       virtual FX_BOOL                         OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags);\r
-       \r
-       virtual FX_BOOL                         IsDataChanged(CPDFSDK_PageView* pPageView);\r
-       virtual void                            SaveData(CPDFSDK_PageView* pPageView);\r
-       \r
-       virtual void                            GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type,\r
-                                                                                               PDFSDK_FieldAction& fa);\r
-       virtual void                            SetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AActionType type, \r
-                                                                       const PDFSDK_FieldAction& fa);\r
-       virtual FX_BOOL                         IsActionDataChanged(CPDF_AAction::AActionType type, const PDFSDK_FieldAction& faOld, \r
-                                                                                               const PDFSDK_FieldAction& faNew);\r
-       virtual void                            SaveState(CPDFSDK_PageView* pPageView);\r
-       virtual void                            RestoreState(CPDFSDK_PageView* pPageView);\r
-       \r
-       virtual CPWL_Wnd*                       ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue);\r
-       \r
-public:\r
-       virtual void                            OnSetFocus(CPWL_Wnd* pWnd);\r
-       virtual void                            OnKillFocus(CPWL_Wnd* pWnd);\r
-       \r
-public:\r
-       virtual void                            OnAddUndo(CPWL_Edit* pEdit);\r
-       \r
-public:\r
-       virtual FX_BOOL                         CanCopy(CPDFSDK_Document* pDocument); \r
-       virtual FX_BOOL                         CanCut(CPDFSDK_Document* pDocument); \r
-       virtual FX_BOOL                         CanPaste(CPDFSDK_Document* pDocument); \r
-       \r
-       virtual void                            DoCopy(CPDFSDK_Document* pDocument); \r
-       virtual void                            DoCut(CPDFSDK_Document* pDocument); \r
-       virtual void                            DoPaste(CPDFSDK_Document* pDocument); \r
-       \r
-private:\r
-       CBA_FontMap*                            m_pFontMap;\r
-//     CBA_SpellCheck*                         m_pSpellCheck;\r
-       FFL_TextFieldState                      m_State;\r
-//     CFFL_IM_BOX                                     m_IMBox;\r
-};\r
-\r
-#endif // !defined(AFX_FFL_EDIT_H__8E0C9456_CBA2_4EFB_9F31_53C6D8C1A8AC__INCLUDED_)\r
+// Copyright 2014 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef FPDFSDK_INCLUDE_FORMFILLER_FFL_TEXTFIELD_H_
+#define FPDFSDK_INCLUDE_FORMFILLER_FFL_TEXTFIELD_H_
+
+#include "FFL_FormFiller.h"
+
+#define BF_ALIGN_LEFT 0
+#define BF_ALIGN_MIDDLE 1
+#define BF_ALIGN_RIGHT 2
+
+class CBA_FontMap;
+
+struct FFL_TextFieldState {
+  int nStart;
+  int nEnd;
+  CFX_WideString sValue;
+};
+
+class CFFL_TextField : public CFFL_FormFiller,
+                       public IPWL_FocusHandler,
+                       public IPWL_Edit_Notify {
+ public:
+  CFFL_TextField(CPDFDoc_Environment* pApp, CPDFSDK_Annot* pAnnot);
+  ~CFFL_TextField() override;
+
+  // CFFL_FormFiller:
+  PWL_CREATEPARAM GetCreateParam() override;
+  CPWL_Wnd* NewPDFWindow(const PWL_CREATEPARAM& cp,
+                         CPDFSDK_PageView* pPageView) override;
+  FX_BOOL OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags) override;
+  FX_BOOL IsDataChanged(CPDFSDK_PageView* pPageView) override;
+  void SaveData(CPDFSDK_PageView* pPageView) override;
+  void GetActionData(CPDFSDK_PageView* pPageView,
+                     CPDF_AAction::AActionType type,
+                     PDFSDK_FieldAction& fa) override;
+  void SetActionData(CPDFSDK_PageView* pPageView,
+                     CPDF_AAction::AActionType type,
+                     const PDFSDK_FieldAction& fa) override;
+  FX_BOOL IsActionDataChanged(CPDF_AAction::AActionType type,
+                              const PDFSDK_FieldAction& faOld,
+                              const PDFSDK_FieldAction& faNew) override;
+  void SaveState(CPDFSDK_PageView* pPageView) override;
+  void RestoreState(CPDFSDK_PageView* pPageView) override;
+  CPWL_Wnd* ResetPDFWindow(CPDFSDK_PageView* pPageView,
+                           FX_BOOL bRestoreValue) override;
+
+  // IPWL_FocusHandler:
+  void OnSetFocus(CPWL_Wnd* pWnd) override;
+  void OnKillFocus(CPWL_Wnd* pWnd) override;
+
+  // IPWL_Edit_Notify:
+  void OnAddUndo(CPWL_Edit* pEdit) override;
+
+ private:
+  CBA_FontMap* m_pFontMap;
+  FFL_TextFieldState m_State;
+};
+
+#endif  // FPDFSDK_INCLUDE_FORMFILLER_FFL_TEXTFIELD_H_