summaryrefslogtreecommitdiff
path: root/xfa/fde/cfde_txtedttextset.h
blob: 35f7472b1fcb7b0a6c73e1f36c743a5218153569 (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 2016 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_FDE_CFDE_TXTEDTTEXTSET_H_
#define XFA_FDE_CFDE_TXTEDTTEXTSET_H_

#include <vector>

#include "xfa/fde/fde_visualset.h"

class CFDE_TxtEdtPage;

class CFDE_TxtEdtTextSet : public IFDE_VisualSet {
 public:
  explicit CFDE_TxtEdtTextSet(CFDE_TxtEdtPage* pPage);
  ~CFDE_TxtEdtTextSet() override;

  // IFDE_VisualSet
  FDE_VISUALOBJTYPE GetType() override;
  CFX_RectF GetRect(const FDE_TEXTEDITPIECE& hVisualObj) override;

  int32_t GetString(FDE_TEXTEDITPIECE* pPiece, CFX_WideString& wsText);
  CFX_RetainPtr<CFGAS_GEFont> GetFont();
  float GetFontSize();
  FX_ARGB GetFontColor();
  int32_t GetDisplayPos(const FDE_TEXTEDITPIECE& pPiece,
                        FXTEXT_CHARPOS* pCharPos,
                        bool bCharCode = false,
                        CFX_WideString* pWSForms = nullptr);
  std::vector<CFX_RectF> GetCharRects(const FDE_TEXTEDITPIECE* pPiece,
                                      bool bBBox);

 private:
  CFDE_TxtEdtPage* const m_pPage;
};

#endif  // XFA_FDE_CFDE_TXTEDTTEXTSET_H_