| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef CORE_SRC_FPDFDOC_PDF_VT_H_ | 7 #ifndef CORE_SRC_FPDFDOC_PDF_VT_H_ |
| 8 #define CORE_SRC_FPDFDOC_PDF_VT_H_ | 8 #define CORE_SRC_FPDFDOC_PDF_VT_H_ |
| 9 | 9 |
| 10 class CPVT_Size; | 10 class CPVT_Size; |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 private: | 294 private: |
| 295 void SplitLines(FX_BOOL bTypeset, FX_FLOAT fFontSize); | 295 void SplitLines(FX_BOOL bTypeset, FX_FLOAT fFontSize); |
| 296 void OutputLines(); | 296 void OutputLines(); |
| 297 | 297 |
| 298 CPVT_FloatRect m_rcRet; | 298 CPVT_FloatRect m_rcRet; |
| 299 CPDF_VariableText* m_pVT; | 299 CPDF_VariableText* m_pVT; |
| 300 CSection* m_pSection; | 300 CSection* m_pSection; |
| 301 }; | 301 }; |
| 302 class CPDF_EditContainer { | 302 class CPDF_EditContainer { |
| 303 public: | 303 public: |
| 304 CPDF_EditContainer() : m_rcPlate(0, 0, 0, 0), m_rcContent(0, 0, 0, 0){}; | 304 CPDF_EditContainer() : m_rcPlate(0, 0, 0, 0), m_rcContent(0, 0, 0, 0) {} |
| 305 virtual ~CPDF_EditContainer(){}; | 305 virtual ~CPDF_EditContainer() {} |
| 306 virtual void SetPlateRect(const CPDF_Rect& rect) { m_rcPlate = rect; }; | 306 virtual void SetPlateRect(const CPDF_Rect& rect) { m_rcPlate = rect; } |
| 307 virtual const CPDF_Rect& GetPlateRect() const { return m_rcPlate; }; | 307 virtual const CPDF_Rect& GetPlateRect() const { return m_rcPlate; } |
| 308 virtual void SetContentRect(const CPVT_FloatRect& rect) { | 308 virtual void SetContentRect(const CPVT_FloatRect& rect) { |
| 309 m_rcContent = rect; | 309 m_rcContent = rect; |
| 310 }; | 310 }; |
| 311 virtual CPDF_Rect GetContentRect() const { return m_rcContent; }; | 311 virtual CPDF_Rect GetContentRect() const { return m_rcContent; } |
| 312 FX_FLOAT GetPlateWidth() const { return m_rcPlate.right - m_rcPlate.left; }; | 312 FX_FLOAT GetPlateWidth() const { return m_rcPlate.right - m_rcPlate.left; } |
| 313 FX_FLOAT GetPlateHeight() const { return m_rcPlate.top - m_rcPlate.bottom; }; | 313 FX_FLOAT GetPlateHeight() const { return m_rcPlate.top - m_rcPlate.bottom; } |
| 314 CPVT_Size GetPlateSize() const { | 314 CPVT_Size GetPlateSize() const { |
| 315 return CPVT_Size(GetPlateWidth(), GetPlateHeight()); | 315 return CPVT_Size(GetPlateWidth(), GetPlateHeight()); |
| 316 }; | 316 }; |
| 317 CPDF_Point GetBTPoint() const { | 317 CPDF_Point GetBTPoint() const { |
| 318 return CPDF_Point(m_rcPlate.left, m_rcPlate.top); | 318 return CPDF_Point(m_rcPlate.left, m_rcPlate.top); |
| 319 }; | 319 }; |
| 320 CPDF_Point GetETPoint() const { | 320 CPDF_Point GetETPoint() const { |
| 321 return CPDF_Point(m_rcPlate.right, m_rcPlate.bottom); | 321 return CPDF_Point(m_rcPlate.right, m_rcPlate.bottom); |
| 322 }; | 322 }; |
| 323 inline CPDF_Point InToOut(const CPDF_Point& point) const { | 323 inline CPDF_Point InToOut(const CPDF_Point& point) const { |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 FX_BOOL PrevLine() override; | 549 FX_BOOL PrevLine() override; |
| 550 FX_BOOL NextSection() override; | 550 FX_BOOL NextSection() override; |
| 551 FX_BOOL PrevSection() override; | 551 FX_BOOL PrevSection() override; |
| 552 FX_BOOL SetWord(const CPVT_Word& word) override; | 552 FX_BOOL SetWord(const CPVT_Word& word) override; |
| 553 FX_BOOL GetWord(CPVT_Word& word) const override; | 553 FX_BOOL GetWord(CPVT_Word& word) const override; |
| 554 FX_BOOL GetLine(CPVT_Line& line) const override; | 554 FX_BOOL GetLine(CPVT_Line& line) const override; |
| 555 FX_BOOL GetSection(CPVT_Section& section) const override; | 555 FX_BOOL GetSection(CPVT_Section& section) const override; |
| 556 FX_BOOL SetSection(const CPVT_Section& section) override; | 556 FX_BOOL SetSection(const CPVT_Section& section) override; |
| 557 void SetAt(int32_t nWordIndex) override; | 557 void SetAt(int32_t nWordIndex) override; |
| 558 void SetAt(const CPVT_WordPlace& place) override; | 558 void SetAt(const CPVT_WordPlace& place) override; |
| 559 const CPVT_WordPlace& GetAt() const override { return m_CurPos; }; | 559 const CPVT_WordPlace& GetAt() const override { return m_CurPos; } |
| 560 | 560 |
| 561 private: | 561 private: |
| 562 CPVT_WordPlace m_CurPos; | 562 CPVT_WordPlace m_CurPos; |
| 563 CPDF_VariableText* m_pVT; | 563 CPDF_VariableText* m_pVT; |
| 564 }; | 564 }; |
| 565 | 565 |
| 566 #endif // CORE_SRC_FPDFDOC_PDF_VT_H_ | 566 #endif // CORE_SRC_FPDFDOC_PDF_VT_H_ |
| OLD | NEW |