summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/cfwl_edit.h
blob: 4570d57f6ee0cc299d1d5c7072e540746e3148a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// 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 IFDE_TxtEdtDoRecord;

class CFWL_Edit : public CFWL_Widget {
 public:
  explicit CFWL_Edit(const CFWL_App*);
  ~CFWL_Edit() override;

  void Initialize();

  void SetText(const CFX_WideString& wsText);
  void GetText(CFX_WideString& wsText,
               int32_t nStart = 0,
               int32_t nCount = -1) const;

  int32_t CountSelRanges() const;
  int32_t GetSelRange(int32_t nIndex, int32_t& nStart) const;

  int32_t GetLimit() const;
  void SetLimit(int32_t nLimit);

  void SetAliasChar(FX_WCHAR wAlias);

  void SetScrollOffset(FX_FLOAT fScrollOffset);
};

#endif  // XFA_FWL_CORE_CFWL_EDIT_H_