summaryrefslogtreecommitdiff
path: root/xfa/include/fwl
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-02-17 10:07:21 -0800
committerTom Sepez <tsepez@chromium.org>2016-02-17 10:07:21 -0800
commitab27768d235985c0789a10ab490be43e262f48f6 (patch)
tree692c2707020bee87753c05208c7d0c6f176ff30b /xfa/include/fwl
parent32c70815316672091946be88e5941089c359d151 (diff)
downloadpdfium-ab27768d235985c0789a10ab490be43e262f48f6.tar.xz
Banish CFX_ByteArray and CFX_WideArray to the XFA side.
Fix IWYU and include paths as we go. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1701883004 .
Diffstat (limited to 'xfa/include/fwl')
-rw-r--r--xfa/include/fwl/basewidget/fwl_edit.h21
-rw-r--r--xfa/include/fwl/lightwidget/edit.h18
2 files changed, 26 insertions, 13 deletions
diff --git a/xfa/include/fwl/basewidget/fwl_edit.h b/xfa/include/fwl/basewidget/fwl_edit.h
index b92c20f00d..878e5319fc 100644
--- a/xfa/include/fwl/basewidget/fwl_edit.h
+++ b/xfa/include/fwl/basewidget/fwl_edit.h
@@ -4,12 +4,16 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef _FWL_EDIT_H
-#define _FWL_EDIT_H
+#ifndef FWL_EDIT_H_
+#define FWL_EDIT_H_
+
+#include <vector>
+
+#include "xfa/include/fwl/lightwidget/widget.h"
+
class CFWL_WidgetImpProperties;
-class IFWL_Widget;
-class IFWL_EditDP;
class IFWL_Edit;
+
#define FWL_CLASS_Edit L"FWL_EDIT"
#define FWL_CLASSHASH_Edit 2893987822
#define FWL_STYLEEXT_EDT_ReadOnly (1L << 0)
@@ -99,7 +103,7 @@ END_FWL_EVENT_DEF
BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtGetSuggestWords, FWL_EVTHASH_EDT_GetSuggestWords)
FX_BOOL bSuggestWords;
CFX_ByteString bsWord;
-CFX_ByteStringArray bsArraySuggestWords;
+std::vector<CFX_ByteString> bsArraySuggestWords;
END_FWL_EVENT_DEF
class IFWL_EditDP : public IFWL_DataProvider {};
#define FWL_EDT_FIND_FLAGS_Prev (0L << 0)
@@ -107,6 +111,7 @@ class IFWL_EditDP : public IFWL_DataProvider {};
#define FWL_EDT_FIND_FLAGS_WholeWord (1L << 1)
#define FWL_EDT_FIND_FLAGS_NoCase (1L << 2)
typedef struct _FWL_HEDTFIND { void* pData; } * FWL_HEDTFIND;
+
class IFWL_Edit : public IFWL_Widget {
public:
static IFWL_Edit* Create(const CFWL_WidgetImpProperties& properties,
@@ -154,11 +159,13 @@ class IFWL_Edit : public IFWL_Widget {
FWL_ERR SetBackColor(FX_DWORD dwColor);
FWL_ERR SetFont(const CFX_WideString& wsFont, FX_FLOAT fSize);
void SetScrollOffset(FX_FLOAT fScrollOffset);
- FX_BOOL GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray& sSuggest);
+ FX_BOOL GetSuggestWords(CFX_PointF pointf,
+ std::vector<CFX_ByteString>& sSuggest);
FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf,
const CFX_ByteStringC& bsReplace);
protected:
IFWL_Edit();
};
-#endif
+
+#endif // FWL_EDIT_H_
diff --git a/xfa/include/fwl/lightwidget/edit.h b/xfa/include/fwl/lightwidget/edit.h
index 42bb5e374a..b1dc79cfc7 100644
--- a/xfa/include/fwl/lightwidget/edit.h
+++ b/xfa/include/fwl/lightwidget/edit.h
@@ -4,11 +4,15 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef _FWL_EDIT_LIGHT_H
-#define _FWL_EDIT_LIGHT_H
-class CFWL_Widget;
+#ifndef FWL_LIGHTWIDGET_EDIT_H_
+#define FWL_LIGHTWIDGET_EDIT_H_
+
+#include <vector>
+
+#include "xfa/include/fwl/lightwidget/widget.h"
+
class CFWL_WidgetProperties;
-class CFWL_Edit;
+
class CFWL_Edit : public CFWL_Widget {
public:
static CFWL_Edit* Create();
@@ -52,10 +56,12 @@ class CFWL_Edit : public CFWL_Widget {
FX_BOOL Paste(const CFX_WideString& wsPaste);
FX_BOOL Delete();
void SetScrollOffset(FX_FLOAT fScrollOffset);
- FX_BOOL GetSuggestWords(CFX_PointF pointf, CFX_ByteStringArray& sSuggest);
+ FX_BOOL GetSuggestWords(CFX_PointF pointf,
+ std::vector<CFX_ByteString>& sSuggest);
FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf,
const CFX_ByteStringC& bsReplace);
CFWL_Edit();
virtual ~CFWL_Edit();
};
-#endif
+
+#endif // FWL_LIGHTWIDGET_EDIT_H_