7#ifndef CORE_FPDFDOC_CPVT_SECTION_H_
8#define CORE_FPDFDOC_CPVT_SECTION_H_
15#include "core/fpdfdoc/cpvt_floatrect.h"
16#include "core/fpdfdoc/cpvt_lineinfo.h"
17#include "core/fpdfdoc/cpvt_wordinfo.h"
18#include "core/fpdfdoc/cpvt_wordrange.h"
19#include "core/fxcrt/fx_coordinates.h"
20#include "core/fxcrt/unowned_ptr.h"
26class CPVT_Section
final {
64 const CPVT_FloatRect&
GetRect()
const {
return m_Rect; }
65 void SetRect(
const CPVT_FloatRect& rect) { m_Rect = rect; }
74 CPVT_FloatRect RearrangeCharArray()
const;
75 CPVT_FloatRect RearrangeTypeset();
76 CPVT_FloatRect SplitLines(
bool bTypeset,
float fFontSize);
77 CPVT_FloatRect OutputLines(
const CPVT_FloatRect& rect)
const;
79 void ClearLeftWords(int32_t nWordIndex);
80 void ClearRightWords(int32_t nWordIndex);
81 void ClearMidWords(int32_t nBeginIndex, int32_t nEndIndex);
84 CPVT_FloatRect m_Rect;
85 std::vector<std::unique_ptr<Line>> m_LineArray;
86 std::vector<std::unique_ptr<CPVT_WordInfo>> m_WordArray;
CPVT_FloatRect(float other_left, float other_top, float other_right, float other_bottom)
CPVT_WordPlace GetEndWordPlace() const
Line(const CPVT_LineInfo &lineinfo)
CPVT_WordPlace GetBeginWordPlace() const
CPVT_WordPlace GetNextWordPlace(const CPVT_WordPlace &place) const
CPVT_WordPlace m_LinePlace
CPVT_WordPlace GetPrevWordPlace(const CPVT_WordPlace &place) const
int32_t GetWordArraySize() const
void ClearWord(const CPVT_WordPlace &place)
void EraseWordsFrom(int32_t index)
CPVT_Section(CPVT_VariableText *pVT)
CPVT_FloatRect Rearrange()
CPVT_WordPlace GetEndWordPlace() const
CPVT_WordPlace SearchWordPlace(float fx, const CPVT_WordRange &range) const
const Line * GetLineFromArray(int32_t index) const
void SetRect(const CPVT_FloatRect &rect)
CFX_SizeF GetSectionSize(float fFontSize)
void UpdateWordPlace(CPVT_WordPlace &place) const
CPVT_WordPlace SearchWordPlace(float fx, const CPVT_WordPlace &lineplace) const
void ClearWords(const CPVT_WordRange &PlaceRange)
const CPVT_FloatRect & GetRect() const
CPVT_WordPlace GetBeginWordPlace() const
void SetPlace(const CPVT_WordPlace &place)
void SetPlaceIndex(int32_t index)
CPVT_WordPlace SearchWordPlace(const CFX_PointF &point) const
CPVT_WordPlace GetPrevWordPlace(const CPVT_WordPlace &place) const
const CPVT_WordInfo * GetWordFromArray(int32_t index) const
CPVT_WordPlace AddWord(const CPVT_WordPlace &place, const CPVT_WordInfo &wordinfo)
CPVT_WordPlace GetNextWordPlace(const CPVT_WordPlace &place) const
int32_t GetLineArraySize() const
CPVT_WordPlace AddLine(const CPVT_LineInfo &lineinfo)
#define FXSYS_IsFloatBigger(fa, fb)
#define FXSYS_IsFloatSmaller(fa, fb)
bool operator<=(const CPVT_WordPlace &wp) const
CPVT_WordPlace(int32_t other_nSecIndex, int32_t other_nLineIndex, int32_t other_nWordIndex)
bool operator>=(const CPVT_WordPlace &wp) const
CPVT_WordRange(const CPVT_WordPlace &begin, const CPVT_WordPlace &end)