summaryrefslogtreecommitdiff
path: root/xfa/src/fee/include/ifde_txtedtbuf.h
blob: 6cfc3ec977759b63da200bf99b0fb572f7c848f3 (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
// 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 _IFDE_TXTEDTBUF_H
#define _IFDE_TXTEDTBUF_H
#define FDE_DEFCHUNKLENGTH	(1024)
class IFDE_TxtEdtBuf;
class IFDE_TxtEdtBuf
{
public:
    virtual void		Release() = 0;

    virtual FX_BOOL		SetChunkSize(FX_INT32 nChunkSize) = 0;
    virtual FX_INT32	GetChunkSize() const = 0;
    virtual FX_INT32	GetTextLength() const = 0;
    virtual void		SetText(const CFX_WideString &wsText) = 0;
    virtual void		GetText(CFX_WideString &wsText) const = 0;
    virtual FX_WCHAR	GetCharByIndex(FX_INT32 nIndex) const = 0;
    virtual void		GetRange(CFX_WideString &wsText, FX_INT32 nBegin, FX_INT32 nCount = - 1) const = 0;

    virtual void		Insert(FX_INT32 nPos, FX_LPCWSTR lpText, FX_INT32 nLength = 1) = 0;
    virtual void		Delete(FX_INT32 nIndex, FX_INT32 nLength = 1) = 0;

    virtual void		Clear(FX_BOOL bRelease = TRUE) = 0;

    virtual FX_BOOL		Optimize(IFX_Pause * pPause = NULL) = 0;
};
#endif