Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cpdf_textpagefind.h
Go to the documentation of this file.
1
// Copyright 2016 The PDFium Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7
#
ifndef
CORE_FPDFTEXT_CPDF_TEXTPAGEFIND_H_
8
#
define
CORE_FPDFTEXT_CPDF_TEXTPAGEFIND_H_
9
10
#
include
<
stddef
.
h
>
11
12
#
include
<
memory
>
13
#
include
<
vector
>
14
15
#
include
"core/fxcrt/fx_coordinates.h"
16
#
include
"core/fxcrt/unowned_ptr.h"
17
#
include
"core/fxcrt/widestring.h"
18
#
include
"third_party/abseil-cpp/absl/types/optional.h"
19
20
class
CPDF_TextPage
;
21
22
class
CPDF_TextPageFind
{
23
public
:
24
struct
Options
{
25
bool
bMatchCase
=
false
;
26
bool
bMatchWholeWord
=
false
;
27
bool
bConsecutive
=
false
;
28
};
29
30
static
std
::
unique_ptr
<
CPDF_TextPageFind
>
Create
(
31
const
CPDF_TextPage
* pTextPage,
32
const
WideString& findwhat,
33
const
Options
& options,
34
absl::optional<size_t> startPos);
35
36
~
CPDF_TextPageFind
();
37
38
bool
FindNext
();
39
bool
FindPrev
();
40
int
GetCurOrder
()
const
;
41
int
GetMatchedCount
()
const
;
42
43
private
:
44
CPDF_TextPageFind(
const
CPDF_TextPage
* pTextPage,
45
const
std::vector<WideString>& findwhat_array,
46
const
Options
& options,
47
absl::optional<size_t> startPos);
48
49
// Should be called immediately after construction.
50
bool
FindFirst();
51
52
int
GetCharIndex(
int
index)
const
;
53
54
UnownedPtr
<
const
CPDF_TextPage
>
const
m_pTextPage;
55
const
WideString m_strText;
56
const
std::vector<WideString> m_csFindWhatArray;
57
absl::optional<size_t> m_findNextStart;
58
absl::optional<size_t> m_findPreStart;
59
int
m_resStart = 0;
60
int
m_resEnd = -1;
61
const
Options
m_options;
62
};
63
64
#
endif
// CORE_FPDFTEXT_CPDF_TEXTPAGEFIND_H_
CPDF_TextPageFind
Definition
cpdf_textpagefind.h:22
CPDF_TextPageFind::Create
static std::unique_ptr< CPDF_TextPageFind > Create(const CPDF_TextPage *pTextPage, const WideString &findwhat, const Options &options, absl::optional< size_t > startPos)
Definition
cpdf_textpagefind.cpp:175
CPDF_TextPageFind::FindNext
bool FindNext()
Definition
cpdf_textpagefind.cpp:213
CPDF_TextPageFind::GetMatchedCount
int GetMatchedCount() const
Definition
cpdf_textpagefind.cpp:344
CPDF_TextPageFind::~CPDF_TextPageFind
~CPDF_TextPageFind()
CPDF_TextPageFind::GetCurOrder
int GetCurOrder() const
Definition
cpdf_textpagefind.cpp:340
CPDF_TextPageFind::FindPrev
bool FindPrev()
Definition
cpdf_textpagefind.cpp:305
CPDF_TextPage
Definition
cpdf_textpage.h:36
fxcrt::UnownedPtr
Definition
unowned_ptr.h:75
fxcrt::WideString::operator[]
CharType operator[](const size_t index) const
Definition
widestring.h:146
fxcrt::WideString::IsEmpty
bool IsEmpty() const
Definition
widestring.h:118
fxcrt::WideString::MakeLower
void MakeLower()
Definition
widestring.cpp:900
fxcrt::WideString::Back
CharType Back() const
Definition
widestring.h:152
FXSYS_IsDecimalDigit
bool FXSYS_IsDecimalDigit(wchar_t c)
Definition
fx_extension.h:101
pdfium::unicode
Definition
fx_unicode.h:97
pdfium::unicode::kRightSingleQuotationMark
constexpr wchar_t kRightSingleQuotationMark
Definition
fx_unicode.h:99
CPDF_TextPageFind::Options
Definition
cpdf_textpagefind.h:24
CPDF_TextPageFind::Options::bMatchWholeWord
bool bMatchWholeWord
Definition
cpdf_textpagefind.h:26
CPDF_TextPageFind::Options::bConsecutive
bool bConsecutive
Definition
cpdf_textpagefind.h:27
CPDF_TextPageFind::Options::bMatchCase
bool bMatchCase
Definition
cpdf_textpagefind.h:25
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fpdftext
cpdf_textpagefind.h
Generated on Thu Nov 14 2024 00:57:36 for Qt by
1.12.0