summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/cfwl_edit.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-10-20 09:59:48 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-20 09:59:48 -0700
commit05259e98f7416b59da18ee6059b48a23fddca8af (patch)
tree8af6be4a43aa37e8cd36023ffd36262c04c26ff7 /xfa/fwl/core/cfwl_edit.h
parent73895de7dea3737d1a25801001b8efe186c6f5a3 (diff)
downloadpdfium-05259e98f7416b59da18ee6059b48a23fddca8af.tar.xz
Move fwl/lightwidget to fwl/core
This CL moves the code from fwl/lightwidget into fwl/core. In anticipation of merging the two hierarchies. Review-Url: https://chromiumcodereview.appspot.com/2430923006
Diffstat (limited to 'xfa/fwl/core/cfwl_edit.h')
-rw-r--r--xfa/fwl/core/cfwl_edit.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/xfa/fwl/core/cfwl_edit.h b/xfa/fwl/core/cfwl_edit.h
new file mode 100644
index 0000000000..83343ac751
--- /dev/null
+++ b/xfa/fwl/core/cfwl_edit.h
@@ -0,0 +1,71 @@
+// 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 XFA_FWL_CORE_CFWL_EDIT_H_
+#define XFA_FWL_CORE_CFWL_EDIT_H_
+
+#include <vector>
+
+#include "xfa/fwl/core/cfwl_widget.h"
+#include "xfa/fwl/core/ifwl_edit.h"
+
+class CFWL_WidgetProperties;
+class IFDE_TxtEdtDoRecord;
+
+class CFWL_Edit : public CFWL_Widget {
+ public:
+ CFWL_Edit();
+ ~CFWL_Edit() override;
+
+ IFWL_Edit* GetWidget() override;
+ const IFWL_Edit* GetWidget() const override;
+
+ FWL_Error Initialize(const CFWL_WidgetProperties* pProperties = nullptr);
+ FWL_Error SetText(const CFX_WideString& wsText);
+ int32_t GetTextLength() const;
+ FWL_Error GetText(CFX_WideString& wsText,
+ int32_t nStart = 0,
+ int32_t nCount = -1) const;
+ FWL_Error ClearText();
+ int32_t GetCaretPos() const;
+ int32_t SetCaretPos(int32_t nIndex, FX_BOOL bBefore = TRUE);
+ int32_t AddSelRange(int32_t nStart, int32_t nCount = -1);
+ int32_t CountSelRanges();
+ int32_t GetSelRange(int32_t nIndex, int32_t& nStart);
+ FWL_Error ClearSelections();
+ int32_t GetLimit();
+ FWL_Error SetLimit(int32_t nLimit);
+ FWL_Error SetAliasChar(FX_WCHAR wAlias);
+ FWL_Error SetFormatString(const CFX_WideString& wsFormat);
+ FWL_Error Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLen);
+ FWL_Error DeleteSelections();
+ FWL_Error DeleteRange(int32_t nStart, int32_t nCount = -1);
+ FWL_Error Replace(int32_t nStart,
+ int32_t nLen,
+ const CFX_WideStringC& wsReplace);
+ FWL_Error DoClipboard(int32_t iCmd);
+ FX_BOOL Redo(const IFDE_TxtEdtDoRecord* pRecord);
+ FX_BOOL Undo(const IFDE_TxtEdtDoRecord* pRecord);
+ FWL_Error SetTabWidth(FX_FLOAT fTabWidth, FX_BOOL bEquidistant);
+ FWL_Error SetNumberRange(int32_t iMin, int32_t iMax);
+ FWL_Error SetBackColor(uint32_t dwColor);
+ FWL_Error SetFont(const CFX_WideString& wsFont, FX_FLOAT fSize);
+ FX_BOOL CanUndo();
+ FX_BOOL CanRedo();
+ FX_BOOL Undo();
+ FX_BOOL Redo();
+ FX_BOOL Copy(CFX_WideString& wsCopy);
+ FX_BOOL Cut(CFX_WideString& wsCut);
+ FX_BOOL Paste(const CFX_WideString& wsPaste);
+ FX_BOOL Delete();
+ void SetScrollOffset(FX_FLOAT fScrollOffset);
+ FX_BOOL GetSuggestWords(CFX_PointF pointf,
+ std::vector<CFX_ByteString>& sSuggest);
+ FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf,
+ const CFX_ByteStringC& bsReplace);
+};
+
+#endif // XFA_FWL_CORE_CFWL_EDIT_H_